/* ============================================================
   Nowill — b3-highland · "HIGHLAND DRIFT" (BLEND, dir 3 of 5)
   ENGINE  = nowill-flight-film "one unbroken flight" (scroll-scrubbed film)
   SKIN    = grounded organic warm world, re-fingerprinted airy/golden
   Fraunces (display serif) + Instrument Sans (body/UI)
   ============================================================ */
:root {
  /* airy & expansive golden-hour palette */
  --sky:       #eaddc8;   /* warm high sky */
  --haze-gold: #e7c187;
  --sun-amber: #d99a4e;
  --terra:     #b46a3a;   /* terracotta accent */
  --sage:      #8a9a7b;   /* highland sage */
  --stone:     #4a4238;   /* warm stone */
  --espresso:  #2e2822;
  --cream:     #f7f0e3;   /* misted cream */
  --cream-2:   #efe5d3;
  --teal:      #0fb5ba;   /* the Nowill signal dot only */
  --ink:       #26201a;
  --ink-soft:  #5a4f43;
}

* { box-sizing: border-box; }

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

h1, h2, h3 { font-family: 'Fraunces', Georgia, 'Times New Roman', serif; }

/* ---- loader ---- */
.loader {
  position: fixed; inset: 0; z-index: 60;
  background: radial-gradient(120% 120% at 50% 40%, #f7f0e3, #e7c187 120%);
  display: flex; flex-direction: column; gap: 22px;
  align-items: center; justify-content: center;
  transition: opacity 0.9s ease;
}
.loader.done { opacity: 0; pointer-events: none; }
.loader__path {
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: draw 1.5s cubic-bezier(0.6, 0, 0.2, 1) 0.2s forwards;
}
.loader__dot { opacity: 0; animation: dot 0.5s ease 1.55s forwards; }
.loader__word {
  font-size: 11px; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--stone); opacity: 0.7;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dot { to { opacity: 1; } }

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

/* ---- glue layers ---- */
.grade {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(120% 90% at 72% 30%, rgba(231, 193, 135, 0.20), transparent 55%),
    linear-gradient(180deg, rgba(247, 240, 227, 0.14), transparent 20%, transparent 72%, rgba(46, 40, 34, 0.30));
}
/* low warm sun-bloom, top-right */
.bloom {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(38% 30% at 76% 26%, rgba(255, 232, 186, 0.42), rgba(217, 154, 78, 0.12) 45%, transparent 70%);
  mix-blend-mode: screen;
  will-change: transform, opacity;
}
/* drifting haze veil */
.haze {
  position: fixed; inset: -12% -12% -12% -12%; z-index: 3; pointer-events: none;
  background:
    radial-gradient(60% 40% at 20% 82%, rgba(247, 240, 227, 0.34), transparent 60%),
    radial-gradient(50% 34% at 82% 88%, rgba(231, 193, 135, 0.26), transparent 62%);
  will-change: transform;
  opacity: 0.9;
}
#motes { position: fixed; inset: 0; z-index: 4; pointer-events: none; }
#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 56%, rgba(46, 40, 34, 0.46) 100%);
}

/* ---- copy overlays (flight beats) ---- */
.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; }

/* directional legibility scrim — the film is bright, so anchor copy over shade */
.beat::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(30, 24, 18, 0.60) 0%, rgba(30, 24, 18, 0.30) 34%, transparent 62%);
}
.beat--right::before {
  background: linear-gradient(270deg, rgba(30, 24, 18, 0.60) 0%, rgba(30, 24, 18, 0.30) 34%, transparent 62%);
}
.beat--center::before {
  background: radial-gradient(70% 55% at 50% 52%, rgba(30, 24, 18, 0.52), rgba(30, 24, 18, 0.22) 55%, transparent 78%);
}
.beat .eyebrow {
  font-size: 11px; letter-spacing: 0.40em; text-transform: uppercase;
  color: #fff2d8; margin-bottom: 20px; font-weight: 600;
  text-shadow: 0 1px 4px rgba(46, 40, 34, 0.55), 0 2px 22px rgba(46, 40, 34, 0.6);
}
.beat h2 {
  margin: 0; font-weight: 340; letter-spacing: -0.015em; line-height: 1.03;
  font-size: clamp(40px, 5.6vw, 96px);
  max-width: 15ch; text-wrap: balance;
  color: #fffaf0;
  font-variation-settings: "opsz" 96;
  text-shadow: 0 2px 10px rgba(46, 40, 34, 0.5), 0 4px 40px rgba(46, 40, 34, 0.55);
}
.beat--center h2, .beat--right h2 { max-width: 20ch; }
.beat h2 em { font-style: italic; color: #ffe6b8; }
.beat p {
  margin: 22px 0 0; max-width: 44ch;
  font-size: clamp(15px, 1.15vw, 19px); line-height: 1.6;
  color: #fbf1de;
  text-shadow: 0 1px 4px rgba(46, 40, 34, 0.7), 0 2px 24px rgba(46, 40, 34, 0.7);
}

/* film CTA (pill, glass) */
.cta {
  pointer-events: auto;
  margin-top: 36px;
  display: inline-flex; align-items: center;
  padding: 17px 36px;
  border: 1px solid rgba(255, 242, 216, 0.55); border-radius: 999px;
  color: #fffaf0;
  background: rgba(46, 40, 34, 0.26);
  backdrop-filter: blur(8px);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
  text-decoration: none;
  transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
}
.cta:hover { background: rgba(217, 154, 78, 0.5); border-color: #ffe6b8; transform: translateY(-2px); }

/* ---- chrome ---- */
.brand {
  position: fixed; top: 26px; left: 8vw; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; letter-spacing: 0.34em; text-transform: uppercase; font-weight: 600;
  color: #fffaf0;
  text-shadow: 0 1px 10px rgba(46, 40, 34, 0.5);
  transition: color 0.5s ease, text-shadow 0.5s ease;
}
.brand.dark { color: var(--stone); text-shadow: none; }
.brand__mark { flex: none; }
.rail {
  position: fixed; top: 50%; right: 26px; transform: translateY(-50%);
  width: 1px; height: 34vh; z-index: 20;
  background: rgba(247, 240, 227, 0.32);
}
.rail__fill {
  position: absolute; top: 0; left: 0; width: 100%; height: 0%;
  background: var(--teal);
  box-shadow: 0 0 12px rgba(15, 181, 186, 0.7);
}
.railpct {
  position: fixed; top: calc(50% + 19vh); right: 17px; z-index: 20;
  font-size: 10px; letter-spacing: 0.2em; color: #fffaf0; opacity: 0.7;
  text-shadow: 0 1px 8px rgba(46, 40, 34, 0.5);
}
.hint {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 20;
  font-size: 10px; letter-spacing: 0.42em; text-transform: uppercase; color: #fffaf0;
  opacity: 0.85;
  animation: hint 2.6s ease-in-out infinite;
  transition: opacity 0.6s ease;
  text-shadow: 0 1px 10px rgba(46, 40, 34, 0.5);
}
.hint.gone { opacity: 0 !important; animation: none; }
@keyframes hint {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.9; transform: translateX(-50%) translateY(6px); }
}

/* ============ the ground floor ============ */
.post {
  position: relative; z-index: 8;
  background:
    linear-gradient(180deg, rgba(247, 240, 227, 0) 0, var(--cream) 14vh),
    var(--cream);
  color: var(--ink);
  padding-top: 20vh;
}
.post .eyebrow {
  font-size: 11px; letter-spacing: 0.36em; text-transform: uppercase;
  color: var(--terra); margin-bottom: 20px; font-weight: 600;
}
.post h2 {
  margin: 0; font-weight: 360; letter-spacing: -0.01em; line-height: 1.06;
  font-size: clamp(32px, 4.3vw, 66px); color: var(--ink); text-wrap: balance;
  font-variation-settings: "opsz" 72;
}
.post > section { padding: 12vh 8vw; }

/* reveal-on-scroll (ground floor) */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.6, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* SERVICES — waypoints */
.services__head { max-width: 62ch; margin-bottom: 8vh; }
.services__head p { color: var(--ink-soft); font-size: clamp(15px, 1.15vw, 18px); line-height: 1.65; margin: 20px 0 0; max-width: 56ch; }
.waypoints { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.wp {
  position: relative;
  display: flex; gap: 26px; align-items: flex-start;
  padding: 34px 40px 34px 0;
  border-top: 1px solid rgba(74, 66, 56, 0.16);
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1);
  transition-delay: calc(var(--i) * 55ms);
}
.wp.in { opacity: 1; transform: none; }
.wp:nth-child(odd) { padding-right: 48px; }
.wp:nth-child(even) { padding-left: 40px; border-left: 1px solid rgba(74, 66, 56, 0.16); }
.wp__no {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: 15px; letter-spacing: 0.06em; color: var(--terra);
  padding-top: 6px; flex: none; min-width: 2ch;
  font-variation-settings: "opsz" 20;
}
.wp__body h3 { margin: 0 0 8px; font-size: clamp(21px, 2vw, 29px); font-weight: 400; letter-spacing: -0.01em; color: var(--ink); font-variation-settings: "opsz" 40; }
.wp__body p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-soft); max-width: 46ch; }
.wp__body em { font-style: italic; color: var(--stone); }

/* WHY — snow ridge */
.why { position: relative; overflow: hidden; }
.why__plate {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(46,40,34,0.34), rgba(46,40,34,0.62)), url("../public/img/plate-ridge.jpg") center/cover no-repeat;
  transform: scale(1.06);
}
.why__inner { position: relative; z-index: 1; max-width: 68ch; }
.why h2, .why .eyebrow { color: #fffaf0; }
.why .eyebrow { color: #ffe6b8; }
.why h2 { text-shadow: 0 2px 30px rgba(46,40,34,0.6); }
.why__list { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 18px; max-width: 62ch; }
.why__list li {
  padding: 18px 22px; border-radius: 12px;
  background: rgba(247, 240, 227, 0.10);
  border: 1px solid rgba(255, 242, 216, 0.18);
  backdrop-filter: blur(6px);
  color: #f4ecdd; font-size: 15px; line-height: 1.6;
}
.why__list li strong { color: #fffaf0; font-weight: 600; }

/* PROCESS */
.process__head { max-width: 50ch; margin-bottom: 7vh; }
.process__track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.step { padding: 30px 26px; border-radius: 14px; background: var(--cream-2); border: 1px solid rgba(74, 66, 56, 0.12); }
.step__no { font-family: 'Fraunces', serif; font-size: 13px; letter-spacing: 0.14em; color: var(--terra); }
.step h3 { margin: 16px 0 10px; font-size: 22px; font-weight: 400; color: var(--ink); font-variation-settings: "opsz" 30; }
.step p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); }

/* CONTACT */
.contact { text-align: center; padding: 18vh 8vw !important; }
.contact p { color: var(--ink-soft); max-width: 46ch; margin: 22px auto 0; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.6; }
.cta--solid {
  margin-top: 40px; text-transform: none; letter-spacing: 0.02em; font-size: 16px;
  color: var(--cream); background: var(--terra); border-color: var(--terra);
  backdrop-filter: none;
}
.cta--solid:hover { background: var(--sun-amber); border-color: var(--sun-amber); color: var(--espresso); }
.contact__note { color: var(--ink-soft); font-size: 14px; margin-top: 26px !important; opacity: 0.85; }

/* FOOTER */
.footer {
  border-top: 1px solid rgba(74, 66, 56, 0.16);
  padding: 7vh 8vw 9vh;
  display: flex; flex-wrap: wrap; align-items: center; gap: 22px;
  justify-content: space-between;
  color: var(--stone);
}
.footer__brand { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--stone); }
.footer__line { color: var(--ink-soft); font-size: 13px; letter-spacing: 0.02em; }
.footer__meta { color: var(--sage); font-size: 12px; }

/* ---- responsive ≤720 ---- */
@media (max-width: 720px) {
  .beat { padding: 0 7vw; }
  .beat h2 { font-size: clamp(32px, 9.5vw, 46px); }
  .beat--right { align-items: flex-start; text-align: left; }
  .rail, .railpct { display: none; }
  .waypoints { grid-template-columns: 1fr; }
  .wp:nth-child(odd), .wp:nth-child(even) { padding: 26px 0; padding-left: 0; border-left: none; }
  .process__track { grid-template-columns: 1fr; }
  .footer { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ---- reduced motion: full static fallback ---- */
@media (prefers-reduced-motion: reduce) {
  .hint, .loader__path, .loader__dot { animation: none; }
  .loader { display: none; }
  .bloom, .haze { display: none; }
  .reveal, .wp { opacity: 1 !important; transform: none !important; transition: none !important; }
  /* copy beats become a readable stacked poster over the parked film frame */
  .copy { position: static; }
  .beat {
    position: relative; inset: auto; min-height: 78vh;
    opacity: 1 !important; transform: none !important;
    background: linear-gradient(180deg, rgba(46,40,34,0.30), rgba(46,40,34,0.50));
  }
}
