/* ============================================================
   Nowill — The Makers' Table (BLEND b2)
   ENGINE: the "one unbroken flight" film-scrub (flight-film).
   SKIN:   Grounded's warm candle-lit workshop world.
   The whole page IS one scroll-scrubbed Ken-Burns interior film;
   DOM copy beats ride pixel-locked on top, room by room.
   ============================================================ */

:root {
  --bark:   #1c1510;   /* roasted brown-black base */
  --bark2:  #241a12;   /* raised surface */
  --soil:   #2c2016;
  --clay:   #b96a3d;   /* terracotta accent */
  --ember:  #e58a3c;   /* candle/ember glow */
  --ember2: #f6b866;   /* hot highlight */
  --parch:  #ece0cb;   /* aged-paper text */
  --haze:   #b9a98c;   /* muted secondary */
  --moss:   #5d6b46;   /* rare accent */
  --ink-shadow: rgba(12, 8, 4, 0.9);
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bark);
  color: var(--parch);
  font-family: "Newsreader", Georgia, serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---- loader: carved mark draws itself ---- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  background: radial-gradient(120% 120% at 50% 42%, #26190f 0%, var(--bark) 70%);
  transition: opacity 0.9s ease, visibility 0.9s ease;
}
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__path {
  stroke-dasharray: 320; stroke-dashoffset: 320;
  animation: draw 1.7s ease forwards;
}
.loader__dot { opacity: 0; animation: dot 0.5s ease 1.6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dot { to { opacity: 1; } }
.loader__word {
  font-family: "Spline Sans Mono", monospace;
  font-size: 12px; letter-spacing: 0.44em; text-transform: uppercase;
  color: var(--ember); opacity: 0; animation: fadein 0.8s ease 1.2s forwards;
}
.loader__count {
  font-family: "Spline Sans Mono", monospace;
  font-size: 11px; letter-spacing: 0.3em; color: var(--haze);
  opacity: 0; animation: fadein 0.8s ease 1.4s forwards;
}
@keyframes fadein { to { opacity: 1; } }

/* ---- the fixed cinema stage ---- */
.stage {
  position: fixed; inset: 0; z-index: 1;
  background: var(--bark);
}
.stage video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ---- glue: warm grade + hearth glow + motes + grain + vignette ---- */
.grade {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 108%, rgba(229, 138, 60, 0.16), transparent 55%),
    linear-gradient(180deg, rgba(20, 13, 7, 0.30), transparent 20%, transparent 74%, rgba(20, 13, 7, 0.42));
  mix-blend-mode: normal;
}
/* hearth-glow fog — a warm breathing amber wash from below, intensifies at the hearth beat */
.hearth {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(90% 70% at 50% 118%, rgba(246, 184, 102, 0.22), rgba(229, 138, 60, 0.08) 40%, transparent 66%);
  opacity: 0.5;
  will-change: opacity;
  transition: opacity 0.2s linear;
}
#motes { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
#grain { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0.5; mix-blend-mode: overlay; }
.vignette {
  position: fixed; inset: 0; z-index: 5; pointer-events: none;
  background: radial-gradient(120% 120% at 50% 46%, transparent 52%, rgba(14, 9, 5, 0.62) 100%);
}

/* ---- copy overlays — one per beat, pixel-locked ---- */
.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;
}
.beat--center { align-items: center; text-align: center; }
.beat--right { align-items: flex-end; text-align: right; }

.beat .eyebrow {
  font-family: "Spline Sans Mono", monospace;
  font-size: 11px; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--ember); margin-bottom: 22px;
  text-shadow: 0 1px 8px var(--ink-shadow), 0 2px 22px var(--ink-shadow);
}
.beat h2 {
  margin: 0; font-family: "Fraunces", Georgia, serif;
  font-weight: 300; letter-spacing: -0.015em; line-height: 1.03;
  font-size: clamp(40px, 6vw, 100px);
  max-width: 15ch; text-wrap: balance;
  color: var(--parch);
  text-shadow: 0 2px 30px var(--ink-shadow), 0 1px 8px var(--ink-shadow);
}
.beat h2 em { font-style: italic; color: var(--ember2); font-weight: 400; }
.beat--center h2, .beat--right h2 { max-width: 20ch; }
.beat p {
  margin: 26px 0 0; max-width: 46ch;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(16px, 1.2vw, 21px); line-height: 1.62; font-weight: 300;
  color: #e7d9c1;
  text-shadow: 0 1px 6px var(--ink-shadow), 0 2px 26px var(--ink-shadow);
}
.beat .cta {
  pointer-events: auto;
  margin-top: 40px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 17px 38px;
  border-radius: 999px;
  background: var(--ember); color: #1c1207;
  font-family: "Spline Sans Mono", monospace;
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500;
  text-decoration: none;
  box-shadow: 0 10px 40px rgba(229, 138, 60, 0.32);
  transition: transform 0.3s ease, background 0.3s ease;
}
.beat .cta:hover { transform: translateY(-2px); background: var(--ember2); }

/* ---- chrome ---- */
.brand {
  position: fixed; top: 30px; left: 40px; z-index: 40;
  display: flex; align-items: center; gap: 11px;
  font-family: "Spline Sans Mono", monospace;
  font-size: 13px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--parch);
  mix-blend-mode: normal;
}
.brand svg { display: block; }
.rail {
  position: fixed; top: 50%; right: 34px; transform: translateY(-50%); z-index: 40;
  width: 2px; height: 130px; border-radius: 2px;
  background: rgba(236, 224, 203, 0.14);
  overflow: hidden;
}
.rail__fill { position: absolute; left: 0; top: 0; width: 100%; height: 0%; background: var(--ember); }
.railpct {
  position: fixed; bottom: 30px; right: 36px; z-index: 40;
  font-family: "Spline Sans Mono", monospace;
  font-size: 11px; letter-spacing: 0.24em; color: var(--haze);
}
.hint {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 40;
  font-family: "Spline Sans Mono", monospace;
  font-size: 11px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--haze);
  animation: hint 2.6s ease-in-out infinite;
  transition: opacity 0.6s ease;
}
.hint.gone { opacity: 0 !important; animation: none; }
@keyframes hint {
  0%, 100% { opacity: 0.28; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.85; transform: translateX(-50%) translateY(6px); }
}

/* ============ after the film: the ground floor — the full bench ============ */
.post {
  position: relative; z-index: 8;
  background: linear-gradient(180deg, rgba(28, 21, 16, 0) 0, var(--bark) 15vh);
  padding-top: 22vh;
}
.post .eyebrow {
  font-family: "Spline Sans Mono", monospace;
  font-size: 11px; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--ember); margin-bottom: 20px;
}
.post h2 {
  margin: 0; font-family: "Fraunces", Georgia, serif;
  font-weight: 300; letter-spacing: -0.01em; line-height: 1.08;
  font-size: clamp(34px, 4.4vw, 72px); text-wrap: balance; color: var(--parch);
}
.post h2 em { font-style: italic; color: var(--ember2); font-weight: 400; }
.post > section { padding: 12vh 8vw; max-width: 1320px; margin: 0 auto; }

/* stations */
.stations__head { max-width: 62ch; margin-bottom: 8vh; }
.stations__head p { color: var(--haze); font-size: clamp(16px, 1.15vw, 19px); line-height: 1.62; margin: 22px 0 0; font-weight: 300; }
.stations__grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid rgba(236, 224, 203, 0.12);
}
.svc {
  position: relative;
  padding: 42px 44px 46px;
  border-bottom: 1px solid rgba(236, 224, 203, 0.12);
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.2, 0.6, 0.2, 1);
  transition-delay: calc(var(--i) * 55ms);
}
.svc:nth-child(odd) { border-right: 1px solid rgba(236, 224, 203, 0.12); }
.svc.in { opacity: 1; transform: none; }
.svc::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, var(--ember), transparent);
  opacity: 0; transition: opacity 0.5s ease;
}
.svc:hover::before { opacity: 1; }
.svc:hover { background: rgba(44, 32, 22, 0.5); }
.svc__top { display: flex; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.svc__no {
  font-family: "Spline Sans Mono", monospace;
  font-size: 12px; letter-spacing: 0.14em; color: var(--ember);
}
.svc__tool {
  font-family: "Fraunces", serif; font-style: italic; font-weight: 400;
  font-size: 17px; color: var(--ember2);
}
.svc h3 {
  margin: 0 0 12px; font-family: "Fraunces", serif; font-weight: 400;
  font-size: clamp(22px, 2vw, 30px); letter-spacing: -0.01em; color: var(--parch);
}
.svc p { margin: 0; color: var(--haze); font-size: 15.5px; line-height: 1.6; font-weight: 300; max-width: 46ch; }
.svc em { font-style: italic; color: var(--parch); }
.svc__rule { display: none; }

/* why — three pillars */
.why__head { max-width: 60ch; margin-bottom: 7vh; }
.why__head p { color: var(--haze); font-size: clamp(16px, 1.15vw, 19px); line-height: 1.62; margin: 22px 0 0; font-weight: 300; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.pillar {
  padding: 38px 32px;
  background: linear-gradient(180deg, rgba(44, 32, 22, 0.55), rgba(28, 21, 16, 0.3));
  border: 1px solid rgba(236, 224, 203, 0.1);
  border-radius: 14px;
}
.p-ico { width: 30px; height: 30px; color: var(--ember); margin-bottom: 22px; }
.pillar h4 { margin: 0 0 10px; font-family: "Fraunces", serif; font-weight: 400; font-size: 21px; color: var(--parch); }
.pillar p { margin: 0; color: var(--haze); font-size: 15px; line-height: 1.6; font-weight: 300; }
.pillar em { font-style: italic; color: var(--ember2); }

/* making — steps */
.making__head { margin-bottom: 6vh; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.step {
  display: grid; grid-template-columns: 90px 1fr; gap: 30px; align-items: start;
  padding: 34px 0;
  border-top: 1px solid rgba(236, 224, 203, 0.12);
}
.step:last-child { border-bottom: 1px solid rgba(236, 224, 203, 0.12); }
.step__no { font-family: "Fraunces", serif; font-weight: 300; font-size: 46px; color: var(--ember); line-height: 1; opacity: 0.9; }
.step h3 { margin: 0 0 8px; font-family: "Fraunces", serif; font-weight: 400; font-size: clamp(20px, 1.8vw, 26px); color: var(--parch); }
.step p { margin: 0; color: var(--haze); font-size: 15.5px; line-height: 1.6; font-weight: 300; max-width: 62ch; }

/* contact */
.contact { text-align: center; }
.contact p { color: var(--haze); font-size: clamp(16px, 1.2vw, 20px); line-height: 1.6; margin: 22px auto 0; max-width: 54ch; font-weight: 300; }
.contact .cta {
  display: inline-flex; margin-top: 40px;
  padding: 18px 42px; border-radius: 999px;
  background: var(--ember); color: #1c1207; text-decoration: none;
  font-family: "Spline Sans Mono", monospace; font-size: 14px; letter-spacing: 0.12em; font-weight: 500;
  box-shadow: 0 12px 44px rgba(229, 138, 60, 0.3);
  transition: transform 0.3s ease, background 0.3s ease;
}
.contact .cta:hover { transform: translateY(-2px); background: var(--ember2); }

/* footer */
.footer {
  border-top: 1px solid rgba(236, 224, 203, 0.1);
  padding: 7vh 8vw 9vh;
  display: flex; flex-wrap: wrap; align-items: center; gap: 22px;
  justify-content: space-between;
  max-width: 1320px; margin: 0 auto;
}
.footer__brand { display: flex; align-items: center; gap: 12px; font-family: "Spline Sans Mono", monospace; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; }
.footer__line { color: var(--haze); font-size: 14px; letter-spacing: 0.02em; font-weight: 300; max-width: 44ch; }
.footer__meta { color: #7a6a54; font-family: "Spline Sans Mono", monospace; font-size: 11px; letter-spacing: 0.06em; }

/* ---- responsive ---- */
@media (max-width: 720px) {
  .brand { top: 20px; left: 22px; }
  .beat { padding: 0 7vw; }
  .beat h2 { font-size: clamp(32px, 10vw, 50px); }
  .beat p { font-size: 16px; }
  .rail, .railpct { display: none; }
  .stations__grid { grid-template-columns: 1fr; }
  .svc:nth-child(odd) { border-right: none; }
  .svc { padding: 34px 24px 36px; }
  .pillars { grid-template-columns: 1fr; gap: 20px; }
  .step { grid-template-columns: 60px 1fr; gap: 18px; }
  .step__no { font-size: 34px; }
  .footer { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ---- reduced motion: readable static fallback ---- */
@media (prefers-reduced-motion: reduce) {
  .hint, .loader__path, .loader__dot, .loader__word, .loader__count { animation: none; }
  .loader__path { stroke-dashoffset: 0; }
  .loader__dot { opacity: 1; }
  .loader__word, .loader__count { opacity: 1; }
  .beat { position: static; opacity: 1 !important; transform: none !important; min-height: 82vh; }
  .copy { position: relative; z-index: 10; }
  .svc { opacity: 1 !important; transform: none !important; }
  #motes, #grain, .hearth { display: none; }
}
