/* ============================================================
   Nowill — LANTERN HOUR (blend b4)
   ENGINE  = the flight-film "One Unbroken Flight": the whole page
             is ONE continuous, blob-preloaded, scroll-scrubbed film,
             DOM copy beats pixel-locked on top, then a ground floor
             (services / why / process / contact / footer).
   SKIN    = Grounded's warm world, sibling "LANTERN HOUR":
             dusk->night orchard lit by hanging lanterns + fireflies,
             deep pine-navy dark + candle-amber, the TRUST register.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,330..500;1,9..144,330..500&family=Instrument+Sans:ital,wght@0,400..600;1,400..500&display=swap');

:root {
  /* nocturnal-warm palette (from LANTERN HOUR fingerprint) */
  --night:     #0b1418;   /* deep pine-navy base */
  --night-2:   #081014;   /* deepest shadow */
  --pine:      #13262a;   /* raised surfaces */
  --pine-lit:  #1a3239;
  --amber:     #f0b45c;   /* candle-amber primary */
  --amber-hot: #ffcf7d;   /* hot core */
  --honey:     #e89a4a;   /* honey glow */
  --ember:     #d9622e;   /* ember accent */
  --firefly:   #d8f08a;   /* pale green-gold firefly */
  --parch:     #f2e8d2;   /* warm parchment text */
  --haze:      #b6ab92;   /* muted secondary text */
  --haze-dim:  #7d7862;
}

* { box-sizing: border-box; }

html { background: var(--night-2); }
body {
  margin: 0;
  background: var(--night-2);
  color: var(--parch);
  font-family: 'Instrument Sans', -apple-system, 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- loader: a lantern igniting (flicker -> glow), then the film begins ---- */
.loader {
  position: fixed; inset: 0; z-index: 60;
  background: radial-gradient(120% 120% at 50% 46%, #12222a 0%, var(--night-2) 62%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px;
  transition: opacity 0.9s ease;
}
.loader.done { opacity: 0; pointer-events: none; }
.loader__lantern {
  position: relative; width: 118px; height: 150px;
  display: flex; align-items: center; justify-content: center;
}
/* the swinging cord */
.loader__cord {
  position: absolute; top: -2px; left: 50%; width: 2px; height: 30px;
  background: linear-gradient(#5a4a34, #2a2118);
  transform: translateX(-50%); transform-origin: top center;
}
/* the glass body */
.loader__glass {
  position: relative; width: 52px; height: 78px; margin-top: 26px;
  border-radius: 10px 10px 8px 8px;
  border: 2px solid #4a3a26;
  background: radial-gradient(60% 55% at 50% 58%, rgba(255,207,125,0.0), rgba(255,207,125,0.0));
  box-shadow: 0 0 0 rgba(240,180,92,0);
}
.loader__glass::before {  /* the flame core */
  content: ''; position: absolute; left: 50%; top: 56%;
  width: 14px; height: 20px; transform: translate(-50%,-50%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 60%, var(--amber-hot), var(--honey) 55%, transparent 72%);
  opacity: 0;
  animation: ignite 2.2s cubic-bezier(.5,.1,.2,1) 0.25s forwards, flicker 0.16s steps(2) 1.1s infinite;
}
.loader__glass::after { /* the top cap */
  content: ''; position: absolute; left: 50%; top: -9px; transform: translateX(-50%);
  width: 30px; height: 12px; border-radius: 4px 4px 0 0;
  background: linear-gradient(#5a4a30, #2a2016);
}
@keyframes ignite {
  0%   { opacity: 0; }
  40%  { opacity: 0.55; }
  70%  { opacity: 0.9; }
  100% { opacity: 1; }
}
@keyframes flicker { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-50%,-52%) scale(1.06); } }
/* halo grows as it ignites */
.loader__glow {
  position: absolute; inset: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,180,92,0.5), rgba(240,180,92,0.0) 62%);
  opacity: 0;
  animation: haloUp 2.4s ease 0.4s forwards;
  pointer-events: none;
}
@keyframes haloUp { to { opacity: 0.85; } }
.loader__word {
  font-family: 'Fraunces', serif; font-weight: 360; font-style: italic;
  font-size: 20px; letter-spacing: 0.02em; color: var(--amber);
  opacity: 0; animation: fadeUp 0.9s ease 1.2s forwards;
}
.loader__sub {
  font-size: 11px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--haze-dim);
  opacity: 0; animation: fadeUp 0.9s ease 1.5s forwards;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- the cinema stage: the one film lives here, scrubbed by scroll ---- */
.stage { position: fixed; inset: 0; z-index: 1; background: var(--night-2); }
.stage video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  will-change: opacity;
}

/* ---- glue layers ---- */
/* warm grade + lantern-glow fog */
.grade {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(90% 60% at 50% 42%, rgba(240,180,92,0.10), transparent 60%),
    radial-gradient(120% 90% at 50% 112%, rgba(217,98,46,0.10), transparent 58%),
    linear-gradient(180deg, rgba(8,16,20,0.42), transparent 24%, transparent 74%, rgba(8,16,20,0.5));
}
/* slow-drifting warm fog band that lifts on scroll (set via JS var --fog) */
.fog {
  position: fixed; inset: -10% 0; z-index: 3; pointer-events: none;
  background:
    radial-gradient(60% 40% at 22% 68%, rgba(240,180,92,0.07), transparent 62%),
    radial-gradient(55% 38% at 78% 30%, rgba(255,207,125,0.055), transparent 60%);
  transform: translateY(calc(var(--fog, 0) * -60px));
  opacity: 0.9;
}
#motes { position: fixed; inset: 0; z-index: 4; pointer-events: none; mix-blend-mode: screen; }
#grain { position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: 0.5; mix-blend-mode: overlay; }
.vignette {
  position: fixed; inset: 0; z-index: 6; pointer-events: none;
  background: radial-gradient(118% 118% at 50% 46%, transparent 50%, rgba(4,8,10,0.72) 100%);
}

/* ---- copy overlays (one per beat, injected by JS) ---- */
.copy { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.beat {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 8vw;
  opacity: 0;
  will-change: opacity, transform;
}
/* directional legibility scrim so copy never fights hot footage */
.beat::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(6,12,15,0.72) 0%, rgba(6,12,15,0.4) 34%, transparent 62%);
}
.beat--right::before {
  background: linear-gradient(270deg, rgba(6,12,15,0.72) 0%, rgba(6,12,15,0.4) 34%, transparent 62%);
}
.beat--center::before {
  background: radial-gradient(70% 60% at 50% 50%, rgba(6,12,15,0.6), transparent 70%);
}
.beat--center { align-items: center; text-align: center; }
.beat--right  { align-items: flex-end; text-align: right; }

.beat .eyebrow {
  font-size: 11px; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 22px; font-weight: 500;
  text-shadow: 0 1px 20px rgba(4,8,10,0.85);
}
.beat h2 {
  margin: 0; font-family: 'Fraunces', serif; font-weight: 360;
  letter-spacing: -0.015em; line-height: 1.02;
  font-size: clamp(38px, 5.6vw, 94px);
  max-width: 16ch; text-wrap: balance; color: var(--parch);
  text-shadow: 0 2px 40px rgba(4,8,10,0.85);
}
.beat--center h2, .beat--right h2 { max-width: 20ch; }
.beat h2 em {
  font-style: italic; color: var(--amber-hot);
  text-shadow: 0 0 34px rgba(255,207,125,0.55), 0 2px 40px rgba(4,8,10,0.85);
}
.beat p {
  margin: 24px 0 0; max-width: 46ch;
  font-size: clamp(15px, 1.15vw, 19px); line-height: 1.62;
  color: var(--parch);
  text-shadow: 0 1px 22px rgba(4,8,10,0.9);
}
.beat .cta {
  display: inline-block; margin-top: 34px; pointer-events: auto;
  padding: 15px 30px; border-radius: 999px;
  background: linear-gradient(180deg, var(--amber-hot), var(--honey));
  color: #2a1a08; font-weight: 600; font-size: 14px; letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 0 40px rgba(240,180,92,0.4), 0 10px 30px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.beat .cta:hover { transform: translateY(-2px); box-shadow: 0 0 60px rgba(240,180,92,0.6), 0 14px 40px rgba(0,0,0,0.5); }

/* ---- chrome ---- */
.brand {
  position: fixed; top: 26px; left: 8vw; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  color: var(--parch); mix-blend-mode: normal;
}
.brand img { width: 34px; height: auto; filter: drop-shadow(0 0 10px rgba(240,180,92,0.3)); }
.brand span {
  font-family: 'Fraunces', serif; font-weight: 420; font-size: 18px; letter-spacing: 0.01em;
  text-shadow: 0 1px 14px rgba(0,0,0,0.7);
}

.rail {
  position: fixed; right: 34px; top: 50%; transform: translateY(-50%);
  z-index: 40; width: 2px; height: 42vh;
  background: rgba(240,180,92,0.14); border-radius: 2px;
}
.rail__fill {
  position: absolute; top: 0; left: 0; width: 100%;
  background: linear-gradient(180deg, var(--amber-hot), var(--ember));
  box-shadow: 0 0 12px rgba(240,180,92,0.7);
  border-radius: 2px;
}
.railpct {
  position: fixed; right: 26px; bottom: 30px; z-index: 40;
  font-size: 12px; letter-spacing: 0.2em; color: var(--amber);
  font-variant-numeric: tabular-nums;
}
.hint {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  z-index: 40; font-size: 11px; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--haze); transition: opacity 0.5s ease;
  animation: bob 2.4s ease-in-out infinite;
}
.hint.gone { opacity: 0; }
@keyframes bob { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(6px); } }

/* ============ after the film: the ground floor ============ */
.post {
  position: relative; z-index: 20;
  margin-top: 100vh;                 /* clears the fixed film for the last beat */
  background:
    linear-gradient(180deg, transparent, var(--night) 12%, var(--night) 100%);
}
.post::before {  /* the ground floor still breathes lantern warmth at the seam */
  content: ''; position: absolute; top: -30vh; left: 0; right: 0; height: 32vh;
  background: linear-gradient(180deg, transparent, rgba(11,20,24,0.7) 55%, var(--night) 96%);
  pointer-events: none;
}

/* ---- services ---- */
.services { position: relative; padding: 12vh 8vw 6vh; }
.services__head { max-width: 62ch; margin: 0 auto 6vh; text-align: center; }
.services__head .eyebrow {
  font-size: 11px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--amber); font-weight: 500;
}
.services__head h2 {
  margin: 18px 0 14px; font-family: 'Fraunces', serif; font-weight: 350;
  font-size: clamp(30px, 4.4vw, 58px); line-height: 1.04; letter-spacing: -0.015em; color: var(--parch);
}
.services__head p { margin: 0; color: var(--haze); font-size: clamp(15px,1.1vw,18px); line-height: 1.6; }

.services__grid {
  list-style: none; margin: 0 auto; padding: 0; max-width: 1200px;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px;
}
.svc {
  position: relative; grid-column: span 2; min-height: 200px;
  padding: 26px 26px 28px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(26,50,57,0.55), rgba(11,20,24,0.8));
  border: 1px solid rgba(240,180,92,0.12);
  overflow: hidden;
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.2,1), border-color 0.3s ease;
}
.svc.in { opacity: 1; transform: none; }
.svc:hover { border-color: rgba(240,180,92,0.4); }
.svc--wide { grid-column: span 3; }
.svc__dot {  /* the lantern dot */
  position: absolute; top: 26px; right: 26px; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, var(--amber-hot), var(--honey));
  box-shadow: 0 0 16px rgba(240,180,92,0.8);
  animation: lanternpulse 3.4s ease-in-out infinite;
}
@keyframes lanternpulse { 0%,100% { opacity: 0.75; box-shadow: 0 0 14px rgba(240,180,92,0.6);} 50% { opacity: 1; box-shadow: 0 0 22px rgba(240,180,92,0.95);} }
.svc .num {
  display: block; font-family: 'Fraunces', serif; font-size: 13px; letter-spacing: 0.16em;
  color: var(--amber); opacity: 0.8; margin-bottom: 14px;
}
.svc h3 {
  margin: 0 0 10px; font-family: 'Fraunces', serif; font-weight: 420;
  font-size: clamp(18px, 1.5vw, 23px); line-height: 1.15; color: var(--parch);
}
.svc p { margin: 0; color: var(--haze); font-size: 14.5px; line-height: 1.56; }
.svc p em { color: var(--parch); font-style: normal; font-weight: 600; }

/* ---- why / trust (sold hardest here) ---- */
.why { position: relative; padding: 10vh 8vw; }
.why__inner { max-width: 1100px; margin: 0 auto; }
.why__head { max-width: 60ch; margin-bottom: 6vh; }
.why__head .eyebrow { font-size: 11px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--amber); font-weight: 500; }
.why__head h2 {
  margin: 18px 0 16px; font-family: 'Fraunces', serif; font-weight: 350;
  font-size: clamp(28px, 4vw, 52px); line-height: 1.05; letter-spacing: -0.015em; color: var(--parch);
}
.why__head p { margin: 0; color: var(--haze); font-size: clamp(15px,1.1vw,18px); line-height: 1.6; max-width: 54ch; }
.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.trust {
  padding: 28px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(26,50,57,0.4), rgba(11,20,24,0.7));
  border: 1px solid rgba(240,180,92,0.1);
}
.trust .ico { width: 30px; height: 30px; color: var(--amber); margin-bottom: 16px; }
.trust h4 { margin: 0 0 8px; font-family: 'Fraunces', serif; font-weight: 420; font-size: 19px; color: var(--parch); }
.trust p { margin: 0; color: var(--haze); font-size: 14.5px; line-height: 1.56; }
.trust p em { color: var(--amber); font-style: italic; }

/* ---- process ---- */
.process { padding: 8vh 8vw 12vh; }
.process__inner { max-width: 900px; margin: 0 auto; }
.process__head { margin-bottom: 6vh; }
.process__head .eyebrow { font-size: 11px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--amber); font-weight: 500; }
.process__head h2 {
  margin: 16px 0 0; font-family: 'Fraunces', serif; font-weight: 350;
  font-size: clamp(28px, 4vw, 52px); line-height: 1.05; letter-spacing: -0.015em; color: var(--parch);
}
.steps { display: grid; gap: 4px; }
.step {
  display: grid; grid-template-columns: 40px 1fr; gap: 22px; align-items: start;
  padding: 26px 0; border-bottom: 1px solid rgba(240,180,92,0.1);
}
.step:last-child { border-bottom: none; }
.step .node {
  width: 14px; height: 14px; margin-top: 6px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, var(--amber-hot), var(--honey));
  box-shadow: 0 0 16px rgba(240,180,92,0.7);
}
.step .k { display: block; font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--amber); margin-bottom: 8px; }
.step h4 { margin: 0 0 8px; font-family: 'Fraunces', serif; font-weight: 420; font-size: clamp(19px,1.8vw,26px); color: var(--parch); }
.step p { margin: 0; color: var(--haze); font-size: 15px; line-height: 1.6; max-width: 60ch; }

/* ---- contact ---- */
.contact { text-align: center; padding: 12vh 8vw; }
.contact .eyebrow { font-size: 11px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--amber); font-weight: 500; }
.contact h2 {
  margin: 18px 0 16px; font-family: 'Fraunces', serif; font-weight: 350; font-style: italic;
  font-size: clamp(32px, 5vw, 66px); line-height: 1.03; letter-spacing: -0.015em; color: var(--parch);
}
.contact p { margin: 0 auto 32px; max-width: 52ch; color: var(--haze); font-size: clamp(15px,1.1vw,18px); line-height: 1.62; }
.contact__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 15px 30px; border-radius: 999px; text-decoration: none;
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em; transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn--amber {
  background: linear-gradient(180deg, var(--amber-hot), var(--honey)); color: #2a1a08;
  box-shadow: 0 0 40px rgba(240,180,92,0.4), 0 10px 30px rgba(0,0,0,0.4);
}
.btn--amber:hover { transform: translateY(-2px); box-shadow: 0 0 60px rgba(240,180,92,0.6); }
.btn--line { border: 1px solid rgba(240,180,92,0.4); color: var(--parch); }
.btn--line:hover { border-color: var(--amber); color: var(--amber-hot); }

/* ---- footer ---- */
.footer {
  border-top: 1px solid rgba(240,180,92,0.1);
  padding: 7vh 8vw 9vh;
  display: flex; flex-wrap: wrap; align-items: center; gap: 22px;
  justify-content: space-between;
}
.footer__brand { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--parch); }
.footer__brand img { width: 26px; height: auto; }
.footer__line { color: var(--amber); font-family: 'Fraunces', serif; font-style: italic; font-size: 15px; letter-spacing: 0.01em; }
.footer__meta { color: var(--haze-dim); font-size: 12px; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .svc, .svc--wide { grid-column: span 3; }
  .trust-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .brand { left: 6vw; top: 20px; }
  .beat { padding: 0 7vw; }
  .beat--right { align-items: flex-start; text-align: left; }
  /* full-width scrim on mobile — the band is busy, keep copy legible */
  .beat::before, .beat--right::before, .beat--center::before {
    background: linear-gradient(180deg, rgba(6,12,15,0.5) 0%, rgba(6,12,15,0.66) 45%, rgba(6,12,15,0.78) 100%);
  }
  .beat h2 { font-size: clamp(30px, 9vw, 46px); }
  .rail, .railpct { display: none; }
  .services__grid { grid-template-columns: 1fr; }
  .svc, .svc--wide { grid-column: span 1; min-height: 0; }
  .step { grid-template-columns: 28px 1fr; gap: 16px; }
  .footer { flex-direction: column; align-items: flex-start; gap: 14px; }
  .contact__actions { flex-direction: column; align-items: stretch; }
}

/* ---- reduced motion: park a readable frame, drop all live motion ---- */
@media (prefers-reduced-motion: reduce) {
  .hint, .loader__glass::before, .loader__glow, .svc__dot, .step .node, .brand img { animation: none !important; }
  .loader { display: none; }
  .svc { opacity: 1; transform: none; }
  .fog { transform: none; }
}
