/* ============================================================
   Haystack landing — styles
   STAGE 1: minimal readable base only. Full visual design
   (palette, mood, motion, responsive system) lands in Stage 3.
   ============================================================ */

:root {
  --bg: #0B0E12;
  --surface: #161C23;
  --border: #2A323C;
  --accent: #00a8c8;
  --accent-dim: #007e96;
  --accent-faint: #0c3a48;
  --text: #E8EDF2;
  --text-primary: #E8EDF2;
  --text-secondary: #97A1AC;
  --text-tertiary: #6A7480;
  --on-accent: #04222A;
  --danger: #e08a96;
  --radius: 10px;
  --maxw: 720px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- wordmark --- */
.wordmark { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--text); }
.wordmark__text { font-family: 'Outfit', sans-serif; font-weight: 200; font-size: 1.4rem; letter-spacing: 0.02em; }
.wordmark__mark { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

/* --- layout shells --- */
.nav { padding: 1.5rem 1.25rem; position: relative; z-index: 3; }
.section { position: relative; padding: clamp(4.5rem, 10vw, 7.5rem) 1.25rem; border-top: 1px solid var(--border); overflow: hidden; }
.section__inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; }
/* surfacing-needles field behind each section's content */
.section__field {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 80%;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, #000 0%, #000 10%, transparent 88%);
  mask-image: linear-gradient(to top, #000 0%, #000 10%, transparent 88%);
}

/* ---------- HERO: cinematic full-height stage ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
/* vignette — darkens the edges for cinematic framing */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 30%, transparent 40%, rgba(0,0,0,0.55) 100%);
}
/* film grain — very subtle texture */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* the surfacing-needles field (canvas), anchored low and fading up into dark */
.hero__field {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 78%;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, #000 0%, #000 12%, transparent 92%);
  mask-image: linear-gradient(to top, #000 0%, #000 12%, transparent 92%);
}
/* soft cyan glow behind the headline */
.hero__glow {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 38%;
  width: min(900px, 120vw);
  height: min(900px, 120vw);
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: radial-gradient(circle, rgba(0,168,200,0.16) 0%, rgba(0,168,200,0.05) 30%, transparent 62%);
}
.hero__inner {
  position: relative;
  z-index: 3;
  max-width: 820px;   /* a touch wider than the body so the headline fits on one line */
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.25rem 6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* --- type --- */
.hero__kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.hero__kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}
.hero__hook {
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  font-size: clamp(2.4rem, 7vw, 4.3rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}
.hero__hook-accent {
  background: linear-gradient(120deg, #00a8c8 0%, #4fd4e8 55%, #00a8c8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero__tagline {
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  font-size: clamp(1.2rem, 2.8vw, 1.6rem);
  color: var(--text-primary);
  letter-spacing: 0.01em;
  margin-bottom: 1.25rem;
}
.hero__sub {
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  max-width: 640px;
  margin-bottom: 2.25rem;
}

/* staggered fade-up entrance — each hero element rises and fades in, in turn */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__inner > * { animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero__kicker  { animation-delay: 0.15s; }
.hero__hook    { animation-delay: 0.30s; }
.hero__tagline { animation-delay: 0.45s; }
.hero__sub     { animation-delay: 0.58s; }
.signup        { animation-delay: 0.72s; }

/* scroll cue */
.hero__cue {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  width: 26px;
  height: 40px;
  display: flex;
  justify-content: center;
}
.hero__cue-line {
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--accent));
  opacity: 0.7;
  animation: cue 2.2s ease-in-out infinite;
  transform-origin: bottom;
}
@keyframes cue {
  0%, 100% { transform: scaleY(0.4); opacity: 0.25; }
  50%      { transform: scaleY(1);   opacity: 0.7; }
}
/* ---------- SECTIONS (below the hero) ---------- */
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.section-label::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}
.section__h {
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  max-width: 20ch;
  margin-bottom: 1.9rem;
}
.section__h .accent {
  background: linear-gradient(120deg, #00a8c8 0%, #4fd4e8 55%, #00a8c8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
/* inline cyan emphasis inside body copy */
.hl { color: var(--accent); font-weight: 500; }

/* story */
.story__body p {
  color: var(--text-secondary);
  font-size: 1.12rem;
  line-height: 1.8;
  margin-bottom: 1.3rem;
  max-width: 62ch;
}
.story__body p:first-child {
  color: var(--text-primary);
  font-size: clamp(1.25rem, 2.4vw, 1.45rem);
  line-height: 1.6;
}

/* what */
.what__lead {
  color: var(--text-secondary);
  font-size: 1.12rem;
  line-height: 1.8;
  max-width: 62ch;
  margin-bottom: 2.5rem;
}
.what__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0 0 2.75rem;
}
.what__list li {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.5rem;
  color: var(--text-primary);
  font-size: 1.02rem;
  line-height: 1.5;
}
.what__list li::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(0, 168, 200, 0.55);
  margin-bottom: 1rem;
}
.what__position {
  color: var(--text-secondary);
  font-size: 1.12rem;
  line-height: 1.75;
  max-width: 62ch;
  margin-bottom: 1.5rem;
}
.what__ethic {
  display: inline-block;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--accent-faint);
  border-radius: 999px;
  background: rgba(0, 168, 200, 0.06);
}

/* CTA — a centered closing moment with a soft cyan glow */
.cta { text-align: center; overflow: hidden; }
.cta__glow {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: min(760px, 120vw);
  height: min(760px, 120vw);
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: radial-gradient(circle, rgba(0, 168, 200, 0.13) 0%, transparent 60%);
}
.cta .section__inner { position: relative; z-index: 1; }
.cta__h { font-size: clamp(2.1rem, 5.5vw, 3.4rem); max-width: none; margin-bottom: 2.25rem; }
.cta__h-dim {
  background: linear-gradient(120deg, #00a8c8 0%, #4fd4e8 55%, #00a8c8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.cta .signup { margin-left: auto; margin-right: auto; }
.cta .signup__row { justify-content: center; }
.cta .signup__note, .cta .signup__msg { text-align: center; }

/* --- signup form --- */
.signup { max-width: 480px; }
.signup__row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.signup__input {
  flex: 1 1 220px;
  padding: 0.9rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.signup__input::placeholder { color: var(--text-secondary); }
.signup__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 168, 200, 0.16);
}
.signup__btn {
  padding: 0.9rem 1.5rem;
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s, transform 0.05s;
}
.signup__btn:hover { filter: brightness(1.12); }
.signup__btn:active { transform: translateY(1px); }
.signup__note { color: var(--text-secondary); font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; margin-top: 0.9rem; }
.signup__msg { font-size: 0.92rem; margin-top: 0.75rem; min-height: 1.2em; }
.signup__msg.is-ok { color: var(--accent); }
.signup__msg.is-err { color: var(--danger); }

/* --- footer --- */
.footer {
  padding: clamp(3rem, 6vw, 4.5rem) 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}
.footer__line { color: var(--text-secondary); font-size: 0.9rem; }
.footer__year { color: var(--text-tertiary); font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; letter-spacing: 0.12em; }
.wordmark--sm .wordmark__text { font-size: 1.15rem; }

/* --- reveal-on-scroll --- */
.reveal { opacity: 1; }
.reveal--pending { opacity: 0; transform: translateY(28px); }
.reveal--in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- responsive --- */
@media (max-width: 720px) {
  .what__list { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .signup__btn { flex: 1 1 100%; }
}
