/* ==========================================================================
   Into the Wildz — coming soon, v2
   Brand Guidelines Vol. 01 · Pine / Deep Timber / Basecamp / Brass / Ember /
   Stone · Bitter + Archivo · topographic contours · imagery: moody, vast, real.

   Concept: the brand's own ridge-at-dawn photograph carries the page. The
   mark draws itself on over it (the one signature moment), the wordmark sets
   editorial and large, a running "in the works for" ticker uses the brand's
   big-numeral device, and one form catches people who want in.

   Motion discipline (v1 lesson): no JS-driven transforms on text, ever.
   One orchestrated load sequence, then stillness except the ticking numerals.
   ========================================================================== */

@font-face {
  font-family: 'Bitter';
  src: url('/assets/fonts/bitter-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --pine:     #2E4034;
  --timber:   #14211B;
  --basecamp: #EFEBDD;
  --brass:    #9B8350;
  --brass-hi: #C9AC69;
  --ember:    #9C4A2A;
  --stone:    #A9AAA0;
  --ground:   #0B120F;

  --ff-display: 'Bitter', Georgia, 'Times New Roman', serif;
  --ff-ui: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --pad: clamp(22px, 5vw, 84px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ground);
  color: var(--basecamp);
  font-family: var(--ff-ui);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ------------------------------------------------------------------ field */

.field { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.field img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 62% 42%;
  display: block;
  transform: scale(1.045);
  filter: brightness(0.8) saturate(0.94);
  animation: settle 2.4s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
  will-change: transform, filter;
}

/* Legibility shades — brand rule: type over a photo gets a dark gradient */
.shade { position: absolute; inset: 0; }
.shade-side {
  background: linear-gradient(to right,
    rgba(6, 10, 8, 0.87) 0%,
    rgba(6, 10, 8, 0.68) 26%,
    rgba(6, 10, 8, 0.34) 48%,
    rgba(6, 10, 8, 0.02) 72%);
}
.shade-floor {
  background: linear-gradient(to top,
    rgba(4, 7, 6, 0.78) 0%,
    rgba(4, 7, 6, 0.28) 22%,
    rgba(4, 7, 6, 0) 44%);
}

/* The signature texture: real elevation contours, Brass, over the dark zone
   only — they fade out before the photo's bright valley takes over. */
.contours {
  position: absolute; inset: 0;
  background: var(--brass);
  -webkit-mask-image: url('/assets/topo.webp'), linear-gradient(to right, #000 0%, #000 34%, transparent 66%);
          mask-image: url('/assets/topo.webp'), linear-gradient(to right, #000 0%, #000 34%, transparent 66%);
  -webkit-mask-size: 160% auto, 100% 100%;
          mask-size: 160% auto, 100% 100%;
  -webkit-mask-position: left center, center;
          mask-position: left center, center;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
  opacity: 0.10;
}

.grain {
  position: absolute; inset: 0;
  opacity: 0.04; /* banked standard: film grain 3.5-5% (Design KB, Nine-Video Synthesis) */
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------------ stage */

.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  padding: calc(var(--pad) * 0.9) var(--pad) max(calc(var(--pad) * 1.6), 96px);
}

.col {
  max-width: 620px;
  display: grid;
  justify-items: start;
}

/* --------------------------------------------------------------- the mark */

.mark {
  height: clamp(84px, 13vh, 128px);
  width: auto;
  overflow: visible;
  margin-bottom: clamp(18px, 3vh, 30px);
}

.draw {
  stroke: var(--brass);
  /* pathLength="1" normalizes dasharray/dashoffset only — stroke-width stays
     in user units (viewBox is ~1246 wide), so it needs a real value */
  stroke-width: 7;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  fill-opacity: 0;
}
.draw-sil {
  fill: url(#silGrad);
  animation: draw 1.25s cubic-bezier(0.65, 0, 0.35, 1) 0.25s forwards,
             ink  0.9s ease-out 1.35s forwards;
}
.draw-trail {
  fill: #E9E4D3;
  animation: draw 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.75s forwards,
             ink  0.9s ease-out 1.7s forwards;
}

/* ------------------------------------------------------------------- type */

.eyebrow {
  margin: 0 0 clamp(10px, 1.6vh, 16px);
  font-size: clamp(0.66rem, 1.4vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--brass-hi);
  text-shadow: 0 1px 3px rgba(4, 7, 6, 0.7), 0 0 22px rgba(4, 7, 6, 0.55);
  opacity: 0;
  animation: up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.5s forwards;
}

.wordmark {
  margin: 0;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: clamp(3rem, 9.5vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.018em;
  color: var(--basecamp);
  text-shadow: 0 2px 6px rgba(4, 7, 6, 0.45), 0 0 40px rgba(4, 7, 6, 0.35);
  text-wrap: balance;
  opacity: 0;
  animation: up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.62s forwards;
}

.sub {
  margin: clamp(16px, 2.6vh, 26px) 0 0;
  max-width: 44ch;
  font-size: clamp(0.95rem, 1.8vw, 1.08rem);
  font-weight: 500;
  line-height: 1.6;
  color: rgba(239, 235, 221, 0.86);
  opacity: 0;
  animation: up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.74s forwards;
}

/* ----------------------------------------------------------------- ticker */

.ticker-wrap {
  margin-top: clamp(26px, 4.4vh, 44px);
  opacity: 0;
  animation: up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.86s forwards;
}

.ticker-label {
  margin: 0 0 10px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--stone);
}

.ticker {
  display: flex;
  align-items: stretch;
  gap: clamp(14px, 2.4vw, 26px);
}

.cell { display: grid; justify-items: start; row-gap: 4px; }

.num {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  line-height: 1;
  color: var(--basecamp);
  font-variant-numeric: tabular-nums;
  min-width: 2ch;               /* two digits reserved: no layout shift */
}

.lab {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-hi);
}

.rule { width: 1px; background: rgba(169, 170, 160, 0.28); }

/* ------------------------------------------------------------------- form */

.notify {
  margin-top: clamp(28px, 4.6vh, 48px);
  width: 100%;
  max-width: 520px;
  opacity: 0;
  animation: up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.98s forwards;
}

.notify-copy {
  margin: 0 0 12px;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.55;
  color: rgba(239, 235, 221, 0.72);
  max-width: 52ch;
}

.row { display: flex; gap: 10px; flex-wrap: wrap; }

.notify input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 14px 16px;
  font: 500 0.95rem/1.2 var(--ff-ui);
  color: var(--basecamp);
  background: rgba(11, 18, 15, 0.55);
  border: 1px solid rgba(169, 170, 160, 0.34);
  border-radius: 6px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.notify input[type="email"]::placeholder { color: rgba(169, 170, 160, 0.75); }
.notify input[type="email"]:focus {
  outline: none;
  border-color: var(--brass);
  background: rgba(11, 18, 15, 0.72);
}
.notify input[type="email"]:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.notify button {
  flex: 0 0 auto;
  padding: 14px 26px;
  font: 600 0.82rem/1 var(--ff-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #14110A;
  background: var(--brass);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.15s ease;
}
.notify button:hover { background: var(--brass-hi); }
.notify button:active { transform: translateY(1px); }
.notify button:focus-visible { outline: 2px solid var(--basecamp); outline-offset: 3px; }
.notify button[disabled] { opacity: 0.6; cursor: default; }

.status {
  margin: 10px 0 0;
  min-height: 1.3em;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--brass-hi);
}
.status.err { color: #D8A18B; }   /* lifted ember tint that passes on dark */

/* honeypot: visually removed, still in the DOM for bots */
.hp {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden;
}

/* ----------------------------------------------------------------- footer */

.meta {
  position: fixed;
  z-index: 2;
  left: var(--pad);
  right: var(--pad);
  bottom: clamp(16px, 3vh, 28px);
  display: flex;
  justify-content: space-between;
  gap: 10px 24px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(239, 235, 221, 0.55);
  opacity: 0;
  animation: fade 1.2s ease-out 2.2s forwards;
}

/* -------------------------------------------------------------- keyframes */

@keyframes settle {
  to { transform: scale(1); filter: brightness(1) saturate(0.94); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ink  { to { fill-opacity: 1; } }
@keyframes fade { to { opacity: 1; } }
@keyframes up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ----------------------------------------------------------------- narrow */

@media (max-width: 700px) {
  .stage { align-items: end; padding-bottom: max(calc(var(--pad) * 2.4), 96px); }
  .col { max-width: 100%; justify-items: start; }
  .field img { object-position: 50% 58%; }
  .shade-side {
    background: linear-gradient(to top,
      rgba(6, 10, 8, 0.9) 0%,
      rgba(6, 10, 8, 0.62) 34%,
      rgba(6, 10, 8, 0.14) 62%,
      rgba(6, 10, 8, 0.52) 100%);
  }
  .contours {
    -webkit-mask-image: url('/assets/topo.webp'), linear-gradient(to top, #000 0%, #000 30%, transparent 60%);
            mask-image: url('/assets/topo.webp'), linear-gradient(to top, #000 0%, #000 30%, transparent 60%);
  }
  .meta { flex-direction: row; font-size: 0.55rem; letter-spacing: 0.16em; }
  .notify button { flex: 1 1 100%; }
}

/* Short viewports (small laptops): compact the column so the fixed footer
   never collides with the form */
@media (min-width: 701px) and (max-height: 780px) {
  .mark { height: clamp(64px, 10vh, 92px); margin-bottom: 14px; }
  .wordmark { font-size: clamp(2.5rem, 7.2vh, 4.2rem); }
  .sub { margin-top: 12px; }
  .ticker-wrap { margin-top: 18px; }
  .num { font-size: clamp(1.6rem, 3.6vh, 2.2rem); }
  .notify { margin-top: 20px; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .mark { height: 56px; margin-bottom: 10px; }
  .ticker-wrap { display: none; }
  .meta { display: none; }
}

/* --------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  .field img { animation: none; transform: none; filter: brightness(1) saturate(0.94); }
  .draw {
    animation: none;
    stroke-dashoffset: 0;
    fill-opacity: 1;
  }
  .eyebrow, .wordmark, .sub, .ticker-wrap, .notify, .meta {
    animation: fade 0.01s linear forwards;
    transform: none;
  }
}
