/* ============================================================
   Wilderness Labs — design system
   Palette: deep forest night, aurora green, glacial cyan, ember
   ============================================================ */

:root {
  --bg: #05080a;
  --bg-2: #0a1114;
  --ink: #e9f2ec;
  --ink-dim: #9aa7a0;
  --ink-faint: #57695f;
  --aurora: #6dffa8;
  --glacier: #67e8f9;
  --ember: #f5c66b;
  --line: rgba(233, 242, 236, 0.09);
  --line-strong: rgba(233, 242, 236, 0.18);
  --card: rgba(13, 22, 24, 0.55);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(109, 255, 168, 0.25); }

/* ---------- GPU canvas + grain ---------- */

#gpu-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1.4%); }
  50% { transform: translate(1.6%, -1%); }
  75% { transform: translate(-1%, -1.8%); }
  100% { transform: translate(0, 0); }
}

main { position: relative; z-index: 2; }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10; /* above main (z-index 2) so the hero can't swallow nav clicks */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  transition: background 0.4s var(--ease-out), backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}

.nav--scrolled {
  background: rgba(5, 8, 10, 0.72);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom-color: var(--line);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.nav__brand-thin { font-weight: 300; color: var(--aurora); margin-left: 0.15rem; }

.nav__mark { width: 26px; height: 26px; color: var(--aurora); }

.nav__links { display: flex; gap: 2rem; }

.nav__links a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  transition: color 0.25s;
  position: relative;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 1px;
  background: var(--aurora);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.72rem 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.3s var(--ease-out), border-color 0.3s, background 0.3s, box-shadow 0.3s;
}

.btn svg { width: 17px; height: 17px; }

.btn:hover { transform: translateY(-2px); border-color: rgba(233, 242, 236, 0.4); }
.btn:active { transform: translateY(0); }

.btn--solid {
  background: var(--aurora);
  border-color: var(--aurora);
  color: #04120a;
  font-weight: 600;
}

.btn--solid:hover {
  box-shadow: 0 0 34px rgba(109, 255, 168, 0.35);
  border-color: var(--aurora);
}

.btn--ghost:hover { background: rgba(233, 242, 236, 0.05); }

.nav__cta { padding: 0.5rem 1.1rem; font-size: 0.82rem; }

.text-link {
  color: var(--aurora);
  text-decoration: none;
  border-bottom: 1px solid rgba(109, 255, 168, 0.4);
  transition: border-color 0.25s, color 0.25s;
}

.text-link:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7rem clamp(1.2rem, 6vw, 6rem) 6rem;
  position: relative;
}

/* Soft scrim behind the copy: keeps the particle field visible at the
   edges while guaranteeing text contrast. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 68% 62% at 32% 47%,
    rgba(5, 8, 10, 0.78),
    rgba(5, 8, 10, 0.42) 52%,
    transparent 78%
  );
}

.hero__inner { max-width: 900px; position: relative; z-index: 1; }

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--aurora);
  border: 1px solid rgba(109, 255, 168, 0.28);
  background: rgba(109, 255, 168, 0.06);
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 2.2rem;
}

.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--aurora);
  box-shadow: 0 0 10px var(--aurora);
  animation: pulse 2.2s ease-in-out infinite;
  flex: none;
}

.hero__tag--ember {
  color: var(--ember);
  border-color: rgba(245, 198, 107, 0.32);
  background: rgba(245, 198, 107, 0.07);
}

.pulse-dot--ember { background: var(--ember); box-shadow: 0 0 10px var(--ember); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero__title {
  font-size: clamp(2.6rem, 7.2vw, 6rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 1.8rem;
}

.hero__title span { display: block; }

.hero__title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--ember) 5%, #ff9d6b 55%, #ff7d5e 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  max-width: 560px;
  color: var(--ink-dim);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  font-weight: 300;
  margin-bottom: 2.6rem;
}

.hero__sub strong { color: var(--ink); font-weight: 500; }

.hero__actions { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* ---------- Ticker ---------- */

.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 0.9rem 0;
  background: rgba(5, 8, 10, 0.5);
  backdrop-filter: blur(6px);
}

.ticker__track {
  display: flex;
  gap: 2.4rem;
  width: max-content;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--ink-dim);
  animation: ticker 36s linear infinite;
}

.ticker__track i { color: var(--aurora); font-style: normal; font-size: 0.55rem; align-self: center; }

@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */

.section {
  padding: clamp(5rem, 11vw, 9.5rem) clamp(1.2rem, 6vw, 6rem);
  max-width: 1280px;
  margin: 0 auto;
  scroll-margin-top: 4.5rem; /* keep anchored sections clear of the fixed nav */
}

.section__head {
  display: flex;
  gap: clamp(1rem, 3vw, 2.6rem);
  margin-bottom: clamp(2.6rem, 6vw, 4.5rem);
  align-items: baseline;
}

.section__index {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--aurora);
  letter-spacing: 0.1em;
  flex: none;
}

.section__head h2 {
  font-size: clamp(1.8rem, 4.2vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.section__head .dim { color: var(--ink-faint); font-weight: 300; }

/* ---------- Technology grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  backdrop-filter: blur(10px);
  padding: 1.7rem 1.6rem 1.5rem;
  overflow: hidden;
  transition: transform 0.45s var(--ease-out), border-color 0.45s, background 0.45s;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(109, 255, 168, 0.35);
  background: rgba(15, 26, 28, 0.7);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(109, 255, 168, 0.09), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.card:hover::before { opacity: 1; }

.card__glyph { width: 44px; height: 44px; margin-bottom: 1.2rem; color: var(--aurora); }
.card__glyph svg { width: 100%; height: 100%; }

.card h3 { font-size: 1.18rem; font-weight: 500; letter-spacing: -0.015em; margin-bottom: 0.6rem; }

.card p { color: var(--ink-dim); font-size: 0.92rem; font-weight: 300; line-height: 1.65; }

.card__tag {
  position: absolute;
  top: 1.2rem; right: 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

/* ---------- Use-case feature ---------- */

.usecase {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(10, 17, 20, 0.85), rgba(6, 10, 12, 0.92));
  backdrop-filter: blur(14px);
  padding: clamp(1.6rem, 4vw, 2.4rem);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(233, 242, 236, 0.06);
  transition: transform 0.45s var(--ease-out), border-color 0.45s;
  max-width: 760px;
}

.usecase:hover {
  transform: translateY(-4px);
  border-color: rgba(109, 255, 168, 0.4);
}

.usecase__tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ember);
  border: 1px solid rgba(245, 198, 107, 0.32);
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}

.usecase h3 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 0.7rem;
}

.usecase p {
  color: var(--ink-dim);
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.65;
  max-width: 58ch;
}

.usecase__go {
  display: inline-block;
  margin-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--aurora);
}

.usecase__go::after { content: " →"; }

/* ---------- Corpus page: spec strip ---------- */

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.1rem;
}

.spec {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  backdrop-filter: blur(10px);
  padding: 1.4rem 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.spec__v {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--aurora);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.spec__k { font-size: 0.8rem; color: var(--ink-faint); line-height: 1.5; }

.specs__note {
  margin-top: 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-faint);
  max-width: 640px;
  line-height: 1.7;
}

/* ---------- CTA ---------- */

.section--cta { text-align: center; }

.cta {
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.4rem, 5vw, 4rem);
  background:
    radial-gradient(600px 300px at 50% -10%, rgba(109, 255, 168, 0.12), transparent 70%),
    var(--card);
  backdrop-filter: blur(12px);
}

.cta h2 { font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 1.2rem; }

.cta p { color: var(--ink-dim); font-weight: 300; max-width: 480px; margin: 0 auto 2.2rem; }

.cta__form { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

.cta__form input {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink);
  background: rgba(5, 8, 10, 0.6);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.75rem 1.3rem;
  width: min(320px, 100%);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.cta__form input:focus { border-color: var(--aurora); box-shadow: 0 0 0 3px rgba(109, 255, 168, 0.15); }

.cta__ok {
  display: block;
  margin-top: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--aurora);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s, transform 0.5s var(--ease-out);
}

.cta__ok--show { opacity: 1; transform: none; }

/* ---------- Footer ---------- */

.footer {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 2rem;
  padding: 3.5rem clamp(1.2rem, 6vw, 6rem) 3rem;
  border-top: 1px solid var(--line);
  max-width: 1280px;
  margin: 0 auto;
}

.footer__col { display: flex; flex-direction: column; gap: 0.55rem; }

.footer__brand { font-weight: 600; font-size: 1.05rem; }

.footer__line { color: var(--ink-faint); font-size: 0.85rem; font-weight: 300; line-height: 1.6; }

.footer__head {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.3rem;
}

.footer__col a { color: var(--ink-dim); text-decoration: none; font-size: 0.88rem; transition: color 0.25s; }
.footer__col a:hover { color: var(--aurora); }

.footer__col--right { text-align: left; }

.footer__mono { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-faint); }

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}

.reveal--in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker__track, .grain, .pulse-dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .nav__links { display: none; }
  .footer { grid-template-columns: 1fr 1fr; }
}
