/* ==========================================================================
   NOWILL.CO — MOCKUP 4 "KINETIC" · type-as-hero fly-through
   Ink #0F0E0C · Signal Orange #FF4D00 · Bone #EFEAE3
   Archivo variable (wdth 62–125) + Fragment Mono
   Default styles = static stacked document (no-JS / reduced-motion).
   body.journey = fixed-stage 3D fly-through, driven by js/main.js.
   ========================================================================== */

:root {
  --ink: #0F0E0C;
  --orange: #FF4D00;
  --bone: #EFEAE3;
  --teal: #0FB5BA;
  --font-d: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-m: "Fragment Mono", "SFMono-Regular", Consolas, monospace;
  --head-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-d);
  font-variation-settings: "wdth" 90;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--orange); color: var(--bone); }

.mono {
  font-family: var(--font-m);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  line-height: 1.6;
}

.accent { color: var(--orange); }
.accent-text { color: var(--orange); font-style: normal; }
.dim { opacity: 0.55; }
em { font-style: normal; border-bottom: 2px solid var(--orange); }

img { display: block; }
a { color: inherit; }

/* ==========================================================================
   HEADER (always fixed — part of the HUD)
   ========================================================================== */

.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--head-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid currentColor;
  color: var(--ink);
  background: color-mix(in srgb, var(--bone) 82%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: color 0.6s ease, background 0.6s ease;
}

body.dark .site-head {
  color: var(--bone);
  background: color-mix(in srgb, var(--ink) 82%, transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-name {
  font-weight: 800;
  font-variation-settings: "wdth" 75;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}

.mark-on-dark { display: none; }
body.dark .mark-on-light { display: none; }
body.dark .mark-on-dark { display: block; }

.head-nav { display: flex; gap: 1.75rem; }

.head-nav a,
.head-cta {
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  position: relative;
}

.head-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.head-nav a:hover::after { transform: scaleX(1); }

.head-cta { color: var(--orange); font-weight: 700; }
.head-cta .arr { display: inline-block; transition: transform 0.25s ease; }
.head-cta:hover .arr { transform: translate(3px, -3px); }

/* ==========================================================================
   BEATS — shared type styling (both modes)
   ========================================================================== */

.beat { text-align: center; }

.beat-sub {
  max-width: 44ch;
  margin: 1.75rem auto 0;
  opacity: 0.85;
}

/* --- hero --- */
.hero-meta {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 2rem;
  color: var(--orange);
}

.hero-title {
  font-size: clamp(3rem, 11.5vw, 10.5rem);
  line-height: 0.94;
  font-weight: 870;
  font-variation-settings: "wdth" 68;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.hero-title .line { display: block; overflow: hidden; }

.hero-title .line-in {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--i) * 0.12s + 0.1s);
}

body.loaded .hero-title .line-in { transform: translateY(0); }

.outline {
  color: transparent;
  -webkit-text-stroke: 2.5px var(--ink);
}

.hero-foot { margin-top: 2.5rem; }

.hero-slogan {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-m);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  padding: 0.9rem 1.6rem;
  border: 1.5px solid var(--ink);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn--solid { background: var(--ink); color: var(--bone); }
.btn--solid:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--bone); }

/* --- giant single words --- */
.giant {
  font-size: clamp(3.4rem, 13vw, 12rem);
  line-height: 0.9;
  font-weight: 890;
  font-variation-settings: "wdth" 66;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

/* --- statement lines --- */
.mid {
  font-size: clamp(2rem, 6.2vw, 5.4rem);
  line-height: 1.02;
  font-weight: 810;
  font-variation-settings: "wdth" 74;
  text-transform: uppercase;
  max-width: 18ch;
  margin: 0 auto;
}

/* --- numerals band --- */
.numeral {
  font-size: clamp(8rem, 30vw, 26rem);
  line-height: 0.85;
  font-weight: 900;
  font-variation-settings: "wdth" 62;
  letter-spacing: -0.02em;
}

.num-cap {
  margin-top: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

/* --- service stations --- */
.svc-num {
  color: var(--orange);
  letter-spacing: 0.2em;
  margin-bottom: 1.25rem;
}

.svc-name {
  font-size: clamp(2.3rem, 7.8vw, 7.2rem);
  line-height: 0.96;
  font-weight: 850;
  font-variation-settings: "wdth" 68;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  transition: font-variation-settings 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.beat.active .svc-name,
.svc-name:hover {
  font-variation-settings: "wdth" 100;
}

.svc-paren {
  display: block;
  font-size: 0.32em;
  font-weight: 640;
  font-variation-settings: "wdth" 84;
  letter-spacing: 0.04em;
  margin-top: 0.5em;
  opacity: 0.7;
}

.svc-desc {
  max-width: 46ch;
  margin: 1.6rem auto 0;
  opacity: 0.85;
}

/* --- process steps --- */
.step-num { color: var(--orange); letter-spacing: 0.2em; margin-bottom: 1.25rem; }

.step-name {
  font-size: clamp(3rem, 11vw, 10rem);
  line-height: 0.9;
  font-weight: 890;
  font-variation-settings: "wdth" 66;
  text-transform: uppercase;
}

/* --- dark planes --- */
.p-dark { color: var(--bone); }
.p-dark .outline { -webkit-text-stroke-color: var(--bone); }
.p-dark em { border-bottom-color: var(--orange); }

/* --- contact --- */
.say-hello {
  display: inline-block;
  font-size: clamp(4rem, 16vw, 15rem);
  line-height: 0.88;
  font-weight: 900;
  font-variation-settings: "wdth" 64;
  text-transform: uppercase;
  text-decoration: none;
  color: transparent;
  -webkit-text-stroke: 2.5px var(--bone);
  transition: color 0.35s ease, -webkit-text-stroke-color 0.35s ease;
}

.say-hello:hover {
  color: var(--orange);
  -webkit-text-stroke-color: var(--orange);
}

/* --- marquee tickers --- */
.beat-ticker { width: 100vw; max-width: none; }

.marquee {
  overflow: hidden;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  background: var(--bone);
  padding: 0.6rem 0;
}

.marquee--orange {
  background: var(--orange);
  border-color: var(--ink);
}

.marquee-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: mq 24s linear infinite;
  font-size: clamp(1.6rem, 4.2vw, 3.4rem);
  font-weight: 830;
  font-variation-settings: "wdth" 70;
  text-transform: uppercase;
  color: var(--ink);
}

.marquee-track--rev { animation-direction: reverse; }

.marquee-track i {
  font-style: normal;
  color: var(--orange);
  font-size: 0.45em;
  vertical-align: middle;
  padding: 0 0.6em;
}

.marquee--orange .marquee-track i { color: var(--bone); }

@keyframes mq {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.3333%); }
}

/* --- footer (end wall) --- */
.beat-foot { width: min(94vw, 1500px); }

.site-foot {
  background: var(--ink);
  color: var(--bone);
  text-align: left;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 4vw, 3.5rem) 1rem;
  border: 1.5px solid var(--bone);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--bone) 25%, transparent);
}

.foot-brand p { margin-top: 1.2rem; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.06em; }

.foot-nav { display: flex; flex-direction: column; gap: 0.7rem; }

.foot-nav a {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.foot-nav a:hover { color: var(--orange); border-bottom-color: var(--orange); }

.foot-meta { text-align: right; opacity: 0.75; display: flex; flex-direction: column; gap: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; }

.foot-word {
  font-size: clamp(4rem, 12.5vw, 14rem);
  line-height: 1;
  font-weight: 900;
  font-variation-settings: "wdth" 62;
  letter-spacing: -0.01em;
  text-align: center;
  margin-top: 1.5rem;
  color: var(--bone);
}

/* ==========================================================================
   STATIC MODE (default flow — no-JS and reduced-motion fallback)
   ========================================================================== */

.stage { position: relative; }

.beat {
  position: relative;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 14vh 6vw;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

.beat:first-of-type { padding-top: calc(var(--head-h) + 10vh); }

.p-dark { background: var(--ink); border-bottom-color: color-mix(in srgb, var(--bone) 18%, transparent); }

.beat-ticker { min-height: 0; padding: 0; border-bottom: none; }

.beat-foot { border-bottom: none; padding: 0; min-height: 0; width: 100%; }
.beat-foot .site-foot { border: none; width: 100%; }

.dust, .spacer, .hud { display: none; }

/* no-JS: hero lines visible immediately */
html:not(.js) .hero-title .line-in { transform: none; transition: none; }

/* ==========================================================================
   JOURNEY MODE — fixed stage, JS-projected depth planes
   ========================================================================== */

body.journey { background: var(--bone); transition: background 0s; }

body.journey .stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

body.journey .beat {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(92vw, 1300px);
  min-height: 0;
  padding: 0;
  border: none;
  background: none;
  transform: translate(-50%, -50%);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity, filter;
}

body.journey .beat.on { visibility: visible; }
body.journey .beat.active { pointer-events: auto; }

body.journey .beat-ticker { width: 120vw; max-width: none; }
body.journey .beat-foot { width: min(94vw, 1500px); }
body.journey .beat-foot .site-foot { border: 1.5px solid var(--bone); }

body.journey .spacer { display: block; }

/* --- word-dust --- */
body.journey .dust { display: block; position: absolute; inset: 0; }

.dust span {
  position: absolute;
  left: 50%;
  top: 50%;
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  white-space: nowrap;
  will-change: transform, opacity;
}

body.dark .dust span { color: var(--bone); }

/* --- HUD --- */
body.journey .hud { display: block; position: fixed; inset: 0; z-index: 40; pointer-events: none; }

.hud-label {
  position: absolute;
  left: clamp(1rem, 3vw, 2.5rem);
  bottom: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease, color 0.6s ease;
}

.hud-label.on { opacity: 1; transform: none; }

.hud-count {
  position: absolute;
  right: clamp(2.4rem, 4vw, 3.6rem);
  bottom: 1.4rem;
  letter-spacing: 0.16em;
  color: var(--ink);
  transition: color 0.6s ease;
  opacity: 0.85;
}

.hud-hint {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  letter-spacing: 0.22em;
  color: var(--orange);
  animation: hint 1.8s ease-in-out infinite;
  transition: opacity 0.5s ease;
}

.hud-hint.off { opacity: 0; animation: none; }

@keyframes hint {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

body.dark .hud-label,
body.dark .hud-count { color: var(--bone); }

.rail {
  position: absolute;
  right: clamp(1rem, 2vw, 1.6rem);
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: min(38vh, 340px);
  background: color-mix(in srgb, currentColor 22%, transparent);
  color: var(--ink);
  transition: color 0.6s ease;
}

body.dark .rail { color: var(--bone); }

.rail-fill {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: var(--orange);
  transform-origin: top;
  transform: scaleY(0);
}

/* ==========================================================================
   RESPONSIVE ≤ 720px
   ========================================================================== */

@media (max-width: 720px) {
  .head-nav { display: none; }
  .brand-name { font-size: 0.85rem; }
  .head-cta { font-size: 0.7rem; }

  .beat-sub { max-width: 34ch; font-size: 0.78rem; }
  .svc-desc { max-width: 34ch; font-size: 0.78rem; }

  .hero-title { font-size: clamp(2.6rem, 14vw, 5rem); }
  .outline { -webkit-text-stroke-width: 1.6px; }
  .say-hello { -webkit-text-stroke-width: 1.6px; }

  .giant { font-size: clamp(3rem, 17vw, 5.6rem); }
  .mid { font-size: clamp(1.7rem, 8.6vw, 3rem); }
  .numeral { font-size: clamp(7rem, 42vw, 12rem); }
  .svc-name { font-size: clamp(1.8rem, 9.4vw, 4rem); }
  .step-name { font-size: clamp(2.6rem, 15vw, 5rem); }

  /* cap the width-stretch so long service names never overflow the viewport */
  .beat.active .svc-name,
  .svc-name:hover { font-variation-settings: "wdth" 84; }

  body.journey .beat { width: 94vw; }

  .foot-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .foot-meta { text-align: left; }
  .foot-word { font-size: clamp(3rem, 16vw, 6rem); }

  .rail { display: none; }
  .hud-count { display: none; }
  .hud-label { bottom: 1rem; font-size: 0.68rem; }
  .hud-hint { bottom: 3.4rem; }
}

/* ==========================================================================
   REDUCED MOTION — park everything static
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .marquee-track { animation: none; }
  .hud-hint { animation: none; }
  .hero-title .line-in { transform: none !important; transition: none !important; }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
