/* =====================================================================
   GOOD HUNTER — HOMEPAGE LAYER
   =====================================================================
   Loaded by index.html only, after style.css. Everything is scoped to
   body.home or to homepage-only class names, so no other page changes.

     1. Tokens + type (one variable family: Archivo)
     2. Hero
     3. "A Tuesday, from both sides" scene
     4. Section heads
     5. Services index
     6. Terms
     7. Industries sentence
     8. FAQ + process tweaks
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. TOKENS + TYPE
   --------------------------------------------------------------------- */
body.home {
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --h-night: #06122b;                 /* midnight — hero + start/end of the day scene */
  --h-amber: #ffb224;                 /* daylight marker in the day scene only */
  --h-strong: var(--color-ink);
  --h-soft: var(--color-ink-soft);
  --h-line: #d5dbe8;
  --h-link: var(--color-brand);
  --h-hover: rgba(13, 71, 161, 0.05);
}
.theme-drk body.home {
  --h-strong: #fff;
  --h-soft: rgba(255, 255, 255, 0.62);
  --h-line: rgba(255, 255, 255, 0.14);
  --h-link: #8fb4ff;
  --h-hover: rgba(255, 255, 255, 0.04);
}

body.home h1,
body.home h2,
body.home h3 {
  font-stretch: 112%;
  font-weight: 700;
  letter-spacing: -0.025em;
}
body.home h2 { font-size: clamp(1.9rem, 3.6vw, 3.1rem); line-height: 1.04; }
body.home :focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

/* ---------------------------------------------------------------------
   2. HERO
   --------------------------------------------------------------------- */
.h-hero {
  background: var(--h-night);
  color: #fff;
  padding-top: var(--header-h);
  min-height: 80vh;
  display: flex;
  align-items: flex-end;
}
.h-hero-inner { position: relative; padding-block: clamp(3rem, 9vh, 6rem) clamp(3.5rem, 10vh, 6.5rem); }

/* Logo mark: outline draws itself once, then takes a faint fill */
.h-mark { display: none; }
@media (min-width: 1100px) {
  .h-mark {
    display: block;
    position: absolute;
    right: var(--container-pad);
    bottom: clamp(3.5rem, 10vh, 6.5rem);
    height: clamp(230px, 36vh, 360px);
    width: auto;
    overflow: visible;
    pointer-events: none;
  }
  .h-mark path {
    fill: rgba(143, 180, 255, 0.1);
    stroke: #8fb4ff;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
    stroke-linejoin: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    animation: hMarkDraw 2.2s cubic-bezier(0.65, 0, 0.35, 1) 0.5s both, hMarkFill 0.9s ease 2.5s both;
  }
}
@keyframes hMarkDraw { from { stroke-dashoffset: 1; } }
@keyframes hMarkFill { from { fill: rgba(143, 180, 255, 0); } }

.h-now {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.72);
  font-variant-numeric: tabular-nums;
}
.h-now-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--color-accent);
  flex: none;
}

.h-hero h1 {
  margin-top: 1.5rem;
  color: #fff;
  font-size: clamp(2.5rem, 6.3vw, 6.4rem);
  font-stretch: 118%;
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.035em;
}
.h-line { display: block; }
@media (min-width: 900px) { .h-line { white-space: nowrap; } }
/* The first line loses its weight a beat after load — "disappears" —
   while the second stays heavy. Variable-font weight, no JS. */
.h-vanish { animation: hVanish 1.8s cubic-bezier(0.65, 0, 0.35, 1) 0.9s both; }
@keyframes hVanish {
  from { font-weight: 800; color: #fff; }
  to   { font-weight: 150; color: rgba(255, 255, 255, 0.62); }
}

.h-lede {
  margin-top: clamp(1.75rem, 4vh, 2.75rem);
  max-width: 54ch;
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
}
/* "What's broken?" box */
.ask { margin-top: clamp(2rem, 5vh, 3rem); max-width: 46rem; }
.ask-label { display: block; font-size: 1.05rem; font-weight: 600; color: #fff; }
.ask-row {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.7rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.ask-row:focus-within { border-color: var(--color-accent); background: rgba(255, 255, 255, 0.1); }
.ask-input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 0.5rem 0.75rem 1.1rem;
  background: none;
  border: 0;
  outline: 0;
  color: #fff;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}
.ask-input::placeholder { color: rgba(255, 255, 255, 0.7); opacity: 1; }
.ask-btn { flex: none; }
.ask-reply {
  min-height: 1.6em;
  margin-top: 0.8rem;
  padding-left: 1.6rem;
  color: rgba(255, 255, 255, 0.72);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.ask-reply.is-shown { opacity: 1; transform: none; }
.ask-reply a, .h-alt a { color: #fff; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-color: var(--color-accent); }
.h-alt { margin-top: 1.1rem; color: rgba(255, 255, 255, 0.72); }
@media (max-width: 560px) {
  .ask-row { flex-direction: column; border-radius: 22px; }
  .ask-reply { padding-left: 0.2rem; }
}

/* ---------------------------------------------------------------------
   3. A TUESDAY, FROM BOTH SIDES
   ---------------------------------------------------------------------
   Default (phones, short screens, reduced motion, no JS): a plain
   two-part list on the midnight background, everything lit.
   With .day--scrub (added by home.js on wide screens): the section is
   tall, .day-pin sticks for the scroll, and home.js drives the clock,
   the bar, the sky colour (--sky) and which entries are lit (.is-on).
   --------------------------------------------------------------------- */
.day {
  --sky: var(--h-night);
  background: var(--sky);
  color: #fff;
}
.day-inner { padding-block: clamp(3rem, 8vw, 5rem); }
.day-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; }
.day h2 { color: #fff; }
.day-note { margin-top: 0.9rem; max-width: 46ch; color: rgba(255, 255, 255, 0.72); }
.day-clock, .day-bar { display: none; }

.day-cols { display: grid; gap: 2.5rem; margin-top: 2.5rem; }
.day-col h3 {
  color: #fff;
  font-size: 1.05rem;
  font-stretch: 100%;
  font-weight: 600;
  letter-spacing: 0;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}
.day-list li {
  display: grid;
  grid-template-columns: 5.4rem 1fr;
  gap: 0.75rem;
  padding-block: 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  line-height: 1.4;
  transition: opacity 0.35s ease;
}
.day-list time {
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.62);
  white-space: nowrap;
}

@media (min-width: 1000px) {
  .day-cols { grid-template-columns: 5fr 7fr; gap: clamp(2.5rem, 5vw, 5rem); }
}

/* --- Scrubbed mode --- */
.day--scrub { height: 340vh; }
.day--scrub .day-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
}
.day--scrub .day-inner { padding-block: 0; }
.day--scrub .day-clock {
  display: block;
  font-size: clamp(3rem, 6.2vw, 5.6rem);
  font-stretch: 118%;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.day--scrub .day-bar {
  display: block;
  position: relative;
  height: 2px;
  margin-top: 2.75rem;
  margin-bottom: 3.6rem;
  background: rgba(255, 255, 255, 0.22);
}
.day-bar-fill {
  position: absolute; inset: 0;
  background: #fff;
  transform-origin: left center;
  transform: scaleX(var(--p, 0));
}
.day-bar-head {
  position: absolute;
  top: 50%; left: calc(var(--p, 0) * 100%);
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: #dbe6ff;                  /* moon */
  transition: background 0.6s ease;
}
.day.is-daylight .day-bar-head { background: var(--h-amber); }   /* sun */
.day-bar-tick {
  position: absolute;
  top: -4px;
  width: 2px; height: 10px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.4);
}
.day-bar-tick.is-on { background: #fff; }
.day-bar-hours {
  position: absolute;
  top: 14px; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.day--scrub .day-cols { margin-top: 0; }
.day--scrub .day-list li { opacity: 0.2; }
.day--scrub .day-list li.is-on { opacity: 1; }
.day--scrub .day-list li.is-on time { color: #fff; }

/* ---------------------------------------------------------------------
   4. SECTION HEADS
   --------------------------------------------------------------------- */
.h-head { max-width: 46rem; margin-bottom: clamp(2.25rem, 5vw, 3.75rem); }
.h-head p { margin-top: 1.2rem; max-width: 60ch; font-size: 1.1rem; color: var(--h-soft); }

/* ---------------------------------------------------------------------
   5. SERVICES INDEX
   --------------------------------------------------------------------- */
.svc-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}
.svc-tabs::-webkit-scrollbar { display: none; }
.svc-tab {
  position: relative;
  flex: none;
  overflow: hidden;
  padding: 0.7rem 1.15rem;
  border: 1.5px solid var(--h-line);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--h-soft);
  white-space: nowrap;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease, background var(--dur-fast) ease;
}
.svc-tab:hover { color: var(--h-strong); border-color: var(--h-strong); }
.svc-tab[aria-selected="true"] { color: #fff; background: var(--color-brand); border-color: var(--color-brand); }
/* Auto-advance timer: a bar along the bottom of the active tab */
.svc-tab::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 3px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left center;
}
.svc-tabs.is-auto .svc-tab[aria-selected="true"]::after { animation: svcTimer var(--svc-dur, 6s) linear forwards; }
.svc-tabs.is-paused .svc-tab::after { animation-play-state: paused; }
@keyframes svcTimer { to { transform: scaleX(1); } }

.svc-panels { margin-top: 1.5rem; }
.svc-panel {
  display: grid;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--h-night);
  border-radius: var(--radius-md);
  color: #fff;
}
.svc-panel[hidden] { display: none; }
.svc-copy h3 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.05; }
.svc-copy p { margin-top: 1rem; max-width: 44ch; font-size: 1.1rem; color: rgba(255, 255, 255, 0.78); }
.svc-more {
  display: inline-block;
  margin-top: 1.6rem;
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--color-accent);
}
.svc-panel.is-active .svc-copy { animation: svcIn 0.5s var(--ease-out) both; }
@keyframes svcIn { from { opacity: 0; transform: translateY(10px); } }

/* Example activity window */
.act {
  align-self: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  overflow: hidden;
}
.act-bar {
  display: flex;
  justify-content: space-between;
  padding: 0.7rem 1.1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.act-bar span:first-child { font-weight: 600; color: #fff; }
.act li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.act li:last-child { border-bottom: 0; }
.act-name { min-width: 0; }
.act-state {
  position: relative;
  flex: none;
  display: grid;
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.act-from, .act-to { grid-area: 1 / 1; justify-self: end; padding: 0.3rem 0.7rem; border-radius: 999px; }
.act-from { background: rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.8); opacity: 0; }
.act-to { background: var(--color-accent); color: #06231f; }
/* When a panel becomes active: rows arrive one by one, each shows its
   starting state, then flips to the finished state. */
.svc-panel.is-active .act li { animation: actRow 0.45s var(--ease-out) both; animation-delay: calc(var(--i) * 0.9s + 0.2s); }
.svc-panel.is-active .act-from { animation: actFrom 1.1s ease both; animation-delay: calc(var(--i) * 0.9s + 0.3s); }
.svc-panel.is-active .act-to { animation: actTo 0.4s var(--ease-out) both; animation-delay: calc(var(--i) * 0.9s + 1.3s); }
.act li:nth-child(1) { --i: 0; }
.act li:nth-child(2) { --i: 1; }
.act li:nth-child(3) { --i: 2; }
@keyframes actRow { from { opacity: 0; transform: translateY(8px); } }
@keyframes actFrom { 0% { opacity: 0; } 20%, 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes actTo { from { opacity: 0; transform: scale(0.85); } }

@media (min-width: 900px) {
  .svc-tabs { flex-wrap: wrap; overflow: visible; }
  .svc-panel { grid-template-columns: 5fr 6fr; gap: clamp(2rem, 5vw, 4.5rem); min-height: 22rem; align-items: center; }
}

/* ---------------------------------------------------------------------
   6. TERMS
   --------------------------------------------------------------------- */
.terms { margin: 0; border-top: 2px solid var(--h-strong); }
.terms > div {
  display: grid;
  gap: 0.3rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--h-line);
}
.terms dt { font-weight: 600; color: var(--h-strong); }
.terms dd { margin: 0; color: var(--h-soft); max-width: 62ch; }
.terms-note { margin-top: 1.75rem; color: var(--h-soft); }
.terms-note a { color: var(--h-strong); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-color: var(--color-accent); }

@media (min-width: 860px) {
  .terms > div { grid-template-columns: 5fr 7fr; gap: 2rem; }
  .terms dd { font-size: 1.1rem; }
}

/* ---------------------------------------------------------------------
   7. INDUSTRIES SENTENCE
   --------------------------------------------------------------------- */
.ind-title { max-width: 22ch; }
.ind-sentence {
  margin-top: 1.75rem;
  max-width: 32em;
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  line-height: 1.35;
  color: var(--h-soft);
}
.ind-sentence a {
  color: var(--h-strong);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--color-accent);
  transition: color var(--dur-fast) ease;
}
.ind-sentence a:hover { color: var(--h-link); }

/* ---------------------------------------------------------------------
   8. FAQ + PROCESS TWEAKS
   --------------------------------------------------------------------- */
.faq-wrap { max-width: 880px; }
.section.faq-section { padding-bottom: 0; }
body.home .process-step .step-num { font-variant-numeric: tabular-nums; font-weight: 700; }
body.home .process-step p { margin-top: 0.6rem; }

@media (prefers-reduced-motion: reduce) {
  .h-vanish { animation: none; font-weight: 150; color: rgba(255, 255, 255, 0.62); }
  .h-mark path { animation: none; }
  .svc-panel.is-active .svc-copy,
  .svc-panel.is-active .act li,
  .svc-panel.is-active .act-to { animation: none; }
  .svc-panel.is-active .act-from { animation: none; opacity: 0; }
}
