/* EN3RGY
   Layout concept: one full-screen scroll film (a star, a ray, a roof, a house that lights up),
   then quiet pages of hairlines, large light type and photographs on near-black.
   Colour: warm black, bone white, a single soft-gold accent taken from the sun in the film. */

:root {
  --bg: #06070b;
  --bg-2: #0b0d13;
  --ink: #f3efe7;
  --mute: #8a90a2;
  --line: rgba(255, 255, 255, 0.1);
  --gold: #f2b55c;
  --gold-2: #ffd9a0;

  --f-display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --f-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gl: max(20px, env(safe-area-inset-left, 0px));
  --gr: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--f-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { max-width: 100%; display: block; }
h1, h2, h3, p, dl, dd, figure, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--gold); color: #1a1000; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--f-display); font-weight: 300; letter-spacing: -0.025em; line-height: 1.08; text-wrap: balance; }
.eyebrow { font: 500 0.72rem/1 var(--f-body); letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-bottom: 22px; }
.fine { font-size: 0.8rem; line-height: 1.55; color: var(--mute); }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gl) var(--gr); }

/* ---------- header ---------- */
.top {
  position: fixed; z-index: 50; inset: 0 0 auto 0; display: flex; align-items: center; gap: 28px;
  padding: calc(22px + env(safe-area-inset-top, 0px)) var(--gr) 22px var(--gl);
  transition: background 0.4s, backdrop-filter 0.4s;
}
.top.solid { background: rgba(6, 7, 11, 0.72); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 300 1.25rem/1 var(--f-display); letter-spacing: 0.02em; margin-right: auto; }
.logo svg { color: var(--gold); }
.nav { display: flex; gap: 30px; }
.nav a { text-decoration: none; font-size: 0.86rem; letter-spacing: 0.04em; color: rgba(243, 239, 231, 0.82); text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55); transition: color 0.2s; }
.nav a:hover { color: var(--ink); }
.pill {
  display: inline-flex; align-items: center; justify-content: center; padding: 0.7em 1.4em; border-radius: 999px;
  border: 1px solid rgba(242, 181, 92, 0.55); color: var(--gold-2); text-decoration: none; font: 500 0.84rem/1 var(--f-body); letter-spacing: 0.04em;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.pill:hover { background: var(--gold); color: #1a1000; border-color: var(--gold); }
.pill-solid { background: var(--gold); color: #1a1000; border-color: var(--gold); padding: 1em 1.8em; }
.pill-solid:hover { background: var(--gold-2); border-color: var(--gold-2); }
.pill[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }

/* ---------- the film ---------- */
.film { position: relative; height: 980vh; background: #03040a; }
.film-stick { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #03040a; }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.film-stick::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(3, 4, 10, 0.55) 0%, rgba(3, 4, 10, 0) 140px), linear-gradient(0deg, rgba(3, 4, 10, 0.78) 0%, rgba(3, 4, 10, 0) 44%), radial-gradient(120% 90% at 50% 42%, transparent 58%, rgba(3, 4, 10, 0.5) 100%), radial-gradient(55% 50% at 14% 86%, rgba(3, 4, 10, 0.5), transparent 75%);
}
.caps { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.cap {
  position: absolute; left: var(--gl); right: var(--gr); bottom: clamp(92px, 14svh, 150px); max-width: 720px;
  opacity: 0; visibility: hidden; will-change: transform, opacity; text-shadow: 0 2px 40px rgba(0, 0, 0, 0.6);
}
@media (min-width: 1240px) { .cap { left: calc((100% - 1240px) / 2 + var(--gl)); } }
.cap .k { font: 500 0.72rem/1 var(--f-body); letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); margin-bottom: 20px; }
.cap h1, .cap h2 { font-size: clamp(2.2rem, 5.4vw, 4.8rem); line-height: 1.02; font-weight: 300; }
.cap .s { margin-top: 20px; max-width: 30em; color: rgba(243, 239, 231, 0.78); font-size: clamp(1rem, 1.45vw, 1.18rem); }
.flare { position: absolute; z-index: 2; left: 0; right: 0; top: 50%; height: 0; opacity: 0; pointer-events: none; }
.flare i {
  position: absolute; left: 0; right: 0; top: -1px; height: 2px; transform-origin: 50% 50%;
  background: linear-gradient(90deg, transparent, #ffd9a0 22%, #fff 50%, #ffd9a0 78%, transparent);
  box-shadow: 0 0 30px 8px rgba(255, 190, 110, 0.5), 0 0 120px 36px rgba(255, 150, 60, 0.25);
}
.film-bar { position: absolute; z-index: 3; right: max(22px, env(safe-area-inset-right, 0px)); top: 50%; height: 110px; width: 1px; translate: 0 -50%; background: rgba(255, 255, 255, 0.16); }
.film-bar i { display: block; height: 100%; background: var(--gold); transform-origin: 50% 0; transform: scaleY(0); }
.counter { position: absolute; z-index: 3; right: max(22px, env(safe-area-inset-right, 0px)); bottom: clamp(26px, 5svh, 48px); display: flex; align-items: baseline; gap: 8px; font: 400 0.78rem var(--f-body); letter-spacing: 0.16em; color: rgba(243, 239, 231, 0.6); pointer-events: none; font-variant-numeric: tabular-nums; }
.counter b { font-weight: 500; color: var(--ink); }
.counter em { font-style: normal; text-transform: uppercase; font-size: 0.66rem; letter-spacing: 0.24em; margin-left: 10px; color: var(--gold); }
.cue { position: absolute; z-index: 3; left: 50%; bottom: clamp(20px, 4svh, 40px); translate: -50% 0; display: grid; justify-items: center; gap: 10px; font: 500 0.66rem var(--f-body); letter-spacing: 0.3em; text-transform: uppercase; color: rgba(243, 239, 231, 0.7); pointer-events: none; }
.cue i { width: 1px; height: 38px; background: linear-gradient(var(--gold), transparent); animation: drip 2.2s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.film-load { position: absolute; z-index: 5; left: 0; right: 0; top: 0; height: 2px; background: rgba(255, 255, 255, 0.08); transition: opacity 0.8s 0.4s; pointer-events: none; }
.film-load i { display: block; height: 100%; background: var(--gold); transform-origin: 0 50%; transform: scaleX(0); transition: transform 0.3s; }
.film-load.done { opacity: 0; }
.film-cta {
  position: absolute; z-index: 4; left: 50%; bottom: clamp(20px, 4svh, 40px); translate: -50% 12px; opacity: 0; pointer-events: none;
  padding: 0.95em 1.9em; border-radius: 999px; background: rgba(6, 7, 11, 0.5); border: 1px solid rgba(242, 181, 92, 0.6); color: var(--gold-2);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); text-decoration: none; font: 500 0.84rem/1 var(--f-body); letter-spacing: 0.06em; white-space: nowrap;
  transition: opacity 0.6s ease, translate 0.6s ease, background 0.25s, color 0.25s;
}
.film-cta.on { opacity: 1; translate: -50% 0; pointer-events: auto; }
.film-cta:hover { background: var(--gold); color: #1a1000; }
.static { display: none; }
.no-film .film { height: auto; }
.no-film .film-stick { display: none; }
.no-film .static { display: grid; gap: 28px; padding: 96px var(--gr) 40px var(--gl); max-width: 1240px; margin-inline: auto; }
.static figure { margin: 0; }
.static img { width: 100%; height: auto; border-radius: 4px; }
.static figcaption { padding-top: 12px; font: 300 1.5rem/1.2 var(--f-display); }

/* ---------- after the film ---------- */
.after { position: relative; background: var(--bg); }
.after::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 160px; background: linear-gradient(180deg, #02030a, var(--bg)); pointer-events: none; }
.after section { position: relative; }
.statement { padding-block: clamp(110px, 16vw, 220px) clamp(70px, 10vw, 130px); }
.statement h2 { font-size: clamp(2rem, 4.6vw, 4rem); line-height: 1.08; max-width: 17em; }
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: clamp(56px, 8vw, 110px); padding-top: 28px; border-top: 1px solid var(--line); }
.figures dt { font: 500 0.7rem/1.3 var(--f-body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute); margin-bottom: 12px; }
.figures dd { font: 200 clamp(2rem, 4.2vw, 3.6rem)/1 var(--f-display); letter-spacing: -0.03em; }

.head { margin-bottom: clamp(36px, 5vw, 64px); }
.head h2 { font-size: clamp(1.9rem, 3.8vw, 3.2rem); }

.installs { padding-block: clamp(60px, 9vw, 120px); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(14px, 1.6vw, 24px); }
.shot { min-width: 0; }
.shot .ph { overflow: hidden; border-radius: 4px; background: var(--bg-2); aspect-ratio: 3 / 2; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.6s; filter: saturate(0.95); }
.shot:hover img { transform: scale(1.035); filter: saturate(1.05); }
.shot figcaption { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; font-size: 0.9rem; color: var(--mute); }
.shot figcaption b { font-weight: 500; color: var(--ink); }
.a { grid-column: span 7; } .a .ph { aspect-ratio: 7 / 5; }
.b { grid-column: span 5; } .b .ph { aspect-ratio: 5 / 5.04; }
.c, .d, .e { grid-column: span 4; } .c .ph, .d .ph, .e .ph { aspect-ratio: 4 / 3; }

.process { padding-block: clamp(60px, 9vw, 120px); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); border-top: 1px solid var(--line); padding-top: 36px; }
.num { display: block; font: 200 clamp(3.4rem, 6vw, 5.4rem)/1 var(--f-display); color: transparent; -webkit-text-stroke: 1px rgba(242, 181, 92, 0.75); margin-bottom: 26px; }
.steps h3 { font-size: 1.5rem; margin-bottom: 12px; }
.steps p { color: var(--mute); max-width: 24em; }

.estimate { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 7vw, 120px); align-items: start; padding-block: clamp(70px, 10vw, 140px); border-top: 1px solid var(--line); }
.estimate h2 { font-size: clamp(1.9rem, 3.8vw, 3.2rem); margin-bottom: 34px; max-width: 12em; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 36px; }
.seg button { border: 0; background: transparent; padding: 0.6em 1.5em; border-radius: 999px; font-size: 0.84rem; letter-spacing: 0.04em; color: var(--mute); cursor: pointer; transition: background 0.25s, color 0.25s; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #0b0d13; }
.bill label { display: block; font: 500 0.7rem var(--f-body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute); }
.bill output { display: block; font: 200 clamp(2.8rem, 5vw, 4.4rem)/1.1 var(--f-display); letter-spacing: -0.03em; margin: 10px 0 18px; font-variant-numeric: tabular-nums; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--gold) var(--fill, 20%), rgba(255, 255, 255, 0.18) var(--fill, 20%)); }
input[type="range"]::-moz-range-track { height: 2px; background: rgba(255, 255, 255, 0.18); }
input[type="range"]::-moz-range-progress { height: 2px; background: var(--gold); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -10px; border-radius: 50%; background: var(--gold); border: 0; box-shadow: 0 0 0 6px rgba(242, 181, 92, 0.18), 0 0 28px rgba(242, 181, 92, 0.6); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); border: 0; box-shadow: 0 0 0 6px rgba(242, 181, 92, 0.18), 0 0 28px rgba(242, 181, 92, 0.6); }
.ticks { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.72rem; color: var(--mute); letter-spacing: 0.04em; }
.est-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.est-out > div { padding: 28px 0 30px; border-bottom: 1px solid var(--line); }
.est-out > div:nth-child(odd) { padding-right: 24px; }
.est-out > div:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
.est-out dt { font: 500 0.7rem/1.3 var(--f-body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute); margin-bottom: 12px; }
.est-out dd { font: 200 clamp(1.8rem, 3vw, 2.7rem)/1.1 var(--f-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.est-out > div:nth-child(3) dd { color: var(--gold); }
.est-out .fine { grid-column: 1 / -1; padding-top: 22px; max-width: 44em; }

.contact { padding-block: clamp(80px, 12vw, 170px) clamp(60px, 8vw, 110px); border-top: 1px solid var(--line); }
.contact h2 { font-size: clamp(2.4rem, 6.4vw, 5.6rem); line-height: 1; }
.contact .lead { margin-top: 22px; color: var(--mute); max-width: 30em; }
.form { display: grid; grid-template-columns: 1.2fr 1fr 0.8fr auto; gap: 18px; align-items: end; margin-top: clamp(40px, 6vw, 70px); }
.field { display: grid; gap: 8px; min-width: 0; }
.field label { font: 500 0.68rem var(--f-body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute); }
.field input { width: 100%; min-width: 0; padding: 12px 0; background: transparent; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.22); border-radius: 0; font-size: 1.1rem; transition: border-color 0.25s; }
.field input::placeholder { color: rgba(243, 239, 231, 0.28); }
.field input:focus { outline: none; border-color: var(--gold); }
.field input.bad { border-color: #ff7a6b; }
.contact > .fine { margin-top: 18px; }
.reach { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin-top: clamp(50px, 7vw, 90px); padding-top: 26px; border-top: 1px solid var(--line); }
.reach span { display: block; font: 500 0.68rem var(--f-body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute); margin-bottom: 6px; }
.reach b { font-weight: 400; overflow-wrap: anywhere; }
.reach a { text-decoration: none; border-bottom: 1px solid rgba(242, 181, 92, 0.5); }
.reach a:hover { color: var(--gold-2); }
.foot { border-top: 1px solid var(--line); padding-block: 24px calc(24px + env(safe-area-inset-bottom, 0px)); font-size: 0.8rem; color: var(--mute); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .estimate { grid-template-columns: minmax(0, 1fr); }
  .form { grid-template-columns: 1fr 1fr; }
  .form .pill-solid { grid-column: 1 / -1; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .a, .b { grid-column: span 12; } .a .ph, .b .ph { aspect-ratio: 3 / 2; }
  .c, .d, .e { grid-column: span 6; }
  .e { grid-column: span 12; } .e .ph { aspect-ratio: 16 / 9; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .top { gap: 12px; padding-block: calc(16px + env(safe-area-inset-top, 0px)) 16px; }
  .pill { padding: 0.65em 1.1em; font-size: 0.78rem; }
  .figures { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .c, .d { grid-column: span 12; } .c .ph, .d .ph { aspect-ratio: 3 / 2; }
  .est-out > div:nth-child(odd) { padding-right: 14px; }
  .est-out > div:nth-child(even) { padding-left: 14px; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .reach { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .film { height: 860vh; }
  .film-bar { display: none; }
  #stage { height: 58svh; -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent); mask-image: linear-gradient(180deg, #000 82%, transparent); }
  .film-stick::before { background: linear-gradient(180deg, rgba(3, 4, 10, 0.5) 0%, rgba(3, 4, 10, 0) 110px); }
  .cap { bottom: clamp(84px, 12svh, 120px); }
  .cap h1, .cap h2 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  .counter { left: var(--gl); right: auto; bottom: 22px; }
  .cue { display: none; }
  .shot figcaption { flex-direction: column; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
