/*
 * Noko homepage, v2 (the bolder take). Separate from ../home.css on purpose.
 * Design read: friendly B2B landing for site owners and agencies, kinetic-type language,
 * dark-locked brand page with ONE full-bleed Ecto Lime color block (the demo).
 * Dials: variance 9 / motion 8 / density 3.
 * Radius rule: interactive = pill, containers = 16px, inner frames = 10px.
 * Scale rule: the hero is the one oversized moment; every other display line caps at 6rem.
 * Tracking floor: -0.04em. Refined with the Impeccable polish pass + official GSAP skills.
 * Motion: GSAP + ScrollTrigger (v2.js). Everything collapses to static under reduced motion.
 */
@font-face { font-family: "Raveo Display"; src: local("Raveo Display Medium"), url(../fonts/raveo-display-medium.otf) format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Raveo Display"; src: local("Raveo Display Regular"), url(../fonts/raveo-display-regular.otf) format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Raveo"; src: local("Raveo Regular"), url(../fonts/raveo-regular.otf) format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Raveo"; src: local("Raveo Medium"), url(../fonts/raveo-medium.otf) format("opentype"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #121311;
  --bg-raise: #1a1c18;
  --bg-deep: #0d0e0c;
  --ink: #f0ffe0;
  --mute: rgba(240, 255, 224, 0.62);
  --line: rgba(240, 255, 224, 0.09);
  --line-2: rgba(240, 255, 224, 0.18);
  --lime: #8ef54a;
  --lime-hi: #a8fa70;
  --on-lime: #0a1f07;
  --forest: #17301a;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --display: "Raveo Display", "Raveo", ui-sans-serif, system-ui, sans-serif;
  --text: "Raveo", ui-sans-serif, system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --r-card: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-width: thin; scrollbar-color: rgba(240, 255, 224, 0.22) var(--bg); -webkit-tap-highlight-color: transparent; }
::selection { background: var(--lime); color: var(--on-lime); }
input, textarea { caret-color: var(--lime); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 var(--text); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a, button { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 999px; }
[id] { scroll-margin-top: 80px; }
.wrap { width: 100%; max-width: 1600px; margin-inline: auto; padding-inline: var(--gutter); }
.skip {
  position: fixed; left: 16px; top: 12px; z-index: 70; padding: 10px 16px; border-radius: 999px;
  background: var(--lime); color: var(--on-lime); font-weight: 500; translate: 0 -300%; opacity: 0;
}
.skip:focus-visible { translate: none; opacity: 1; }

/* ---------- Type ---------- */
.h2 { font: 500 clamp(40px, 6.2vw, 6rem)/0.98 var(--display); letter-spacing: -0.035em; max-width: 14ch; text-wrap: balance; }
.lede { color: var(--mute); font-size: clamp(17px, 1.5vw, 20px); max-width: 46ch; margin-top: 22px; }

/* ---------- Buttons (pill) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  font: 500 16px/1 var(--text); white-space: nowrap; color: inherit; background: transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, scale 0.2s var(--ease);
}
.btn:active { scale: 0.97; }
.btn .ph-bold { transition: translate 0.35s var(--ease); }
.btn:hover .ph-bold { translate: 3px -3px; }
.btn-sm { height: 40px; padding: 0 18px; font-size: 15px; }
.btn-lg { height: 58px; padding: 0 30px; font-size: 18px; }
.btn-xl { height: 76px; padding: 0 42px; font-size: 22px; }
.btn-primary { background: var(--lime); color: var(--on-lime); }
.btn-primary:hover { background: var(--lime-hi); }
.btn-ghost { box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px rgba(240, 255, 224, 0.45); }
.magnet { will-change: transform; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: 72px;
  padding-inline: max(var(--gutter), calc((100vw - 1600px) / 2 + var(--gutter)));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
}
/* A soft fade behind the nav so scrolled text never collides with it (gone over the lime). */
.nav::before {
  content: ""; position: absolute; inset: 0 0 -24px; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--bg) 30%, transparent); transition: opacity 0.25s ease;
}
.nav.on-lime::before { opacity: 0; }
.nav-mark { font: 500 28px/1 var(--display); letter-spacing: -0.03em; justify-self: start; }
.nav-pill {
  display: flex; gap: 2px; padding: 5px; border-radius: 999px;
  background: rgba(18, 19, 17, 0.62); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(240, 255, 224, 0.06);
}
.nav-pill a { padding: 9px 16px; border-radius: 999px; font-size: 14.5px; font-weight: 500; color: var(--mute); transition: color 0.2s, background-color 0.2s; }
.nav-pill a:hover { color: var(--ink); background: rgba(240, 255, 224, 0.06); }
.nav-actions { justify-self: end; display: flex; align-items: center; gap: 18px; }
.nav-login { font-size: 15px; font-weight: 500; padding: 10px 2px; transition: opacity 0.2s; }
.nav-login:hover { opacity: 0.7; }
/* Over the lime field the wordmark and login flip to dark ink. */
.nav-mark, .nav-login { transition: color 0.25s ease, opacity 0.2s; }
.nav.on-lime .nav-mark, .nav.on-lime .nav-login { color: var(--on-lime); }
.nav.on-lime .nav-actions .btn { background: var(--on-lime); color: var(--lime); }

/* ---------- 1. Hero ---------- */
.hero {
  position: relative; min-height: 100dvh; padding: 120px var(--gutter) clamp(32px, 6vh, 64px);
  display: grid; align-content: end; gap: clamp(28px, 5vh, 56px);
  max-width: 1600px; margin-inline: auto;
}
.hero::before { /* one soft lime light behind the mascot, not a mesh */
  content: ""; position: absolute; z-index: -1; right: 4%; top: 6%; width: min(60vw, 820px); aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(142, 245, 74, 0.13), transparent 70%); pointer-events: none;
}
.hero-title { font: 500 clamp(58px, 11.2vw, 196px)/0.9 var(--display); letter-spacing: -0.04em; }
.hero-title .line { display: flex; flex-wrap: wrap; align-items: center; column-gap: 0.22em; }
.hero-title .word { display: inline-block; position: relative; }
.hero-title .nobreak { display: inline-flex; align-items: center; column-gap: 0.22em; } /* keeps the pointed-at word with the word before it */
.word-lime { color: var(--lime); }
/* The pointed-at word: Noko's own selection box (dashed lime + corner handles) draws around it. */
.target { padding: 0 0.06em; }
.target-text { display: inline-block; transform-origin: 50% 70%; }
.sel { position: absolute; inset: 0.02em -0.04em -0.04em; border-radius: 0.08em; pointer-events: none; opacity: 0;
  outline: 0.02em dashed var(--lime); outline-offset: 0; background: rgba(142, 245, 74, 0.07); }
.sel i { position: absolute; width: 0.07em; height: 0.07em; background: var(--lime); border-radius: 2px; }
.sel i:nth-child(1) { left: -0.035em; top: -0.035em; } .sel i:nth-child(2) { right: -0.035em; top: -0.035em; }
.sel i:nth-child(3) { left: -0.035em; bottom: -0.035em; } .sel i:nth-child(4) { right: -0.035em; bottom: -0.035em; }
.target.changed .target-text { color: var(--lime); font-style: italic; }
.hero-slot { display: inline-block; width: 1.25em; height: 1em; margin-left: 0.05em; flex: none; }
.hero-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px; }
.hero-sub { font-size: clamp(18px, 1.6vw, 22px); color: var(--mute); max-width: 38ch; line-height: 1.45; text-wrap: pretty; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-cursor {
  position: absolute; left: 0; top: 0; z-index: 42; font-size: clamp(30px, 3vw, 44px); color: var(--ink); pointer-events: none;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); opacity: 0; will-change: transform;
}
.ask-chip {
  position: absolute; left: 0; top: 0; z-index: 41; display: flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 10px; border-radius: 999px; background: var(--ink); color: var(--on-lime);
  font: 500 clamp(15px, 1.3vw, 18px)/1 var(--text); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7);
  opacity: 0; pointer-events: none; white-space: nowrap; will-change: transform;
}
.ask-orb { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f0ffe0, #8ef54a 45%, #2c9414); flex: none; }
.ask-caret { width: 2px; height: 1.1em; background: var(--on-lime); margin-left: -6px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* ---------- 2. Asks marquee ---------- */
.asks { padding: clamp(40px, 7vw, 96px) 0; overflow: hidden; display: grid; gap: 14px; border-block: 1px solid var(--line); }
.asks-row { display: flex; white-space: nowrap; }
.asks-track { display: flex; align-items: center; gap: clamp(20px, 2.4vw, 36px); padding-right: clamp(20px, 2.4vw, 36px); flex: none; will-change: transform; }
.asks-track span { font: 500 clamp(32px, 4.6vw, 68px)/1.1 var(--display); letter-spacing: -0.03em; }
.asks-row-2 .asks-track span { color: transparent; -webkit-text-stroke: 1.2px rgba(240, 255, 224, 0.55); }
.asks-track i { color: var(--lime); font-size: clamp(22px, 2.4vw, 34px); }

/* ---------- 3. Demo (the lime block) ---------- */
.demo { background: var(--lime); color: var(--on-lime); padding: clamp(96px, 12vw, 160px) 0 clamp(64px, 8vw, 120px); overflow: hidden; }
.demo-title { max-width: none; }
.demo .lede { color: rgba(10, 31, 7, 0.72); }
.frame-wrap { padding-inline: var(--gutter); margin-top: clamp(40px, 6vw, 72px); }
.frame {
  max-width: 1320px; margin-inline: auto; padding: 0 clamp(8px, 1.6vw, 18px) clamp(8px, 1.6vw, 18px);
  border-radius: var(--r-card); background: var(--bg); box-shadow: 0 60px 120px -50px rgba(10, 31, 7, 0.7);
  transform-origin: 50% 0;
}
.frame-bar { height: 50px; display: grid; place-items: center; }
.frame-url { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: rgba(240, 255, 224, 0.06); color: var(--mute); font-size: 13px; }
.frame iframe { display: block; width: 100%; height: clamp(520px, 74vh, 720px); border: 0; border-radius: 10px; background: #fff; pointer-events: none; }

/* ---------- 4. Adds on to your site ---------- */
.plug { padding: clamp(96px, 12vw, 160px) 0 0; }
.plug-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
/* The connection: your site, a wire that fills, Noko, then the status. --p (0..1) drives the wire. */
.link { --p: 1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; row-gap: 22px; }
.node {
  display: inline-flex; align-items: center; gap: 10px; height: 64px; padding: 0 24px; border-radius: 999px;
  background: var(--bg-raise); box-shadow: inset 0 0 0 1px var(--line-2); font: 500 clamp(16px, 1.4vw, 19px)/1 var(--text); white-space: nowrap;
}
.node i { font-size: 22px; color: var(--mute); }
.node-noko { background: var(--lime); color: var(--on-lime); box-shadow: none; }
.node-noko .ask-orb { width: 24px; height: 24px; }
.wire { position: relative; height: 2px; margin-inline: 10px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.wire i { position: absolute; inset: 0; background: var(--lime); transform-origin: 0 50%; transform: scaleX(var(--p)); }
.status {
  grid-column: 1 / -1; justify-self: center; display: inline-flex; align-items: center; gap: 8px;
  color: var(--lime); font-weight: 500; font-size: 15px;
}
.status i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--lime); color: var(--on-lime); font-size: 12px; }

/* ---------- 5. Safety stack ---------- */
.safe { padding: clamp(96px, 12vw, 160px) 0 clamp(48px, 6vw, 96px); }
.stack { display: grid; gap: 24px; margin-top: clamp(40px, 5vw, 64px); }
.stack-card {
  position: sticky; top: calc(96px + var(--i, 0) * 22px);
  min-height: clamp(340px, 52vh, 480px); border-radius: var(--r-card);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px;
  padding: clamp(28px, 4vw, 56px); overflow: hidden; transform-origin: 50% 0;
  box-shadow: 0 -30px 60px -30px rgba(0, 0, 0, 0.8);
}
.stack-card:nth-child(1) { --i: 0; background: var(--bg-raise); box-shadow: inset 0 0 0 1px var(--line); }
.stack-card:nth-child(2) { --i: 1; background: var(--forest); }
.stack-card:nth-child(3) { --i: 2; background: var(--lime); color: var(--on-lime); }
.stack-card h3 { font: 500 clamp(56px, 8vw, 6rem)/0.9 var(--display); letter-spacing: -0.04em; }
.stack-card p { margin-top: 20px; font-size: clamp(18px, 1.7vw, 24px); line-height: 1.4; max-width: 30ch; opacity: 0.78; }
.stack-icon { font-size: clamp(72px, 10vw, 140px); opacity: 0.9; align-self: start; }
.card-draft .stack-icon, .card-check .stack-icon { color: var(--lime); }

/* ---------- 6. Experience ---------- */
.mind { padding: clamp(96px, 12vw, 180px) 0; }
.mind-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.mind-slot { width: 100%; aspect-ratio: 1; max-width: 460px; justify-self: center; }
.habits { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; margin-top: 44px; }
.habits li { text-wrap: pretty; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.4; }
.habits i { font-size: 26px; color: var(--lime); margin-top: 1px; }

/* ---------- 7. Who it's for (expanding panels) ---------- */
.who { padding: clamp(48px, 6vw, 96px) 0 clamp(96px, 12vw, 160px); }
.who-panels { display: flex; gap: 14px; margin-top: clamp(40px, 5vw, 64px); min-height: clamp(420px, 56vh, 540px); }
.panel {
  flex: 1 1 0; min-width: 0; position: relative; display: grid; align-content: end; gap: 14px;
  padding: clamp(28px, 3.4vw, 48px); border-radius: var(--r-card); background: var(--bg-raise);
  box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; cursor: default;
  transition: flex-grow 0.7s var(--ease);
}
.panel:focus-visible { border-radius: var(--r-card); outline-offset: 4px; }
.panel-lime { background: var(--lime); color: var(--on-lime); box-shadow: none; }
.panel h3 { font: 500 clamp(44px, 5.6vw, 84px)/0.92 var(--display); letter-spacing: -0.035em; }
.panel p { font-size: clamp(17px, 1.4vw, 20px); max-width: 34ch; opacity: 0.8; }
.panel-icon { position: absolute; top: clamp(24px, 3vw, 40px); right: clamp(24px, 3vw, 40px); font-size: clamp(48px, 5vw, 72px); }
@media (min-width: 768px) and (pointer: fine) {
  .who-panels:hover .panel, .who-panels:focus-within .panel { flex-grow: 0.7; }
  .who-panels .panel:hover, .who-panels .panel:focus-visible { flex-grow: 1.5; }
}

/* ---------- 8. Close ---------- */
.close { position: relative; padding: clamp(96px, 14vw, 200px) 0; overflow: hidden; }
.close-inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: clamp(32px, 4vw, 64px); }
.close-copy { display: grid; justify-items: start; gap: clamp(32px, 4vw, 56px); }
.close-slot { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1; justify-self: center; }
.close-slot::before {
  content: ""; position: absolute; inset: -20%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(142, 245, 74, 0.14), transparent 70%);
}
.close-title { font: 500 clamp(48px, 7vw, 6rem)/0.95 var(--display); letter-spacing: -0.04em; max-width: 13ch; text-wrap: balance; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding-top: 40px; overflow: hidden; }
.foot-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 28px; font-weight: 500; }
.foot-links a:hover { color: var(--lime); }
.foot-legal { color: var(--mute); font-size: 14px; }
.foot-mark {
  font: 500 clamp(140px, 36vw, 560px)/0.74 var(--display); letter-spacing: -0.04em; text-align: center;
  color: var(--lime); margin-top: clamp(24px, 4vw, 56px); margin-bottom: -0.1em; user-select: none;
}

/* ---------- Mascot on this page ---------- */
.noki, .noki-shadow { z-index: 40; }
.noki-bubble { z-index: 45; --bg: var(--ink); font: 500 14px/1.3 var(--text); color: var(--on-lime); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
@media (prefers-reduced-motion: no-preference) {
  .noki.noko-enter canvas { animation: noko-enter 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
}
@keyframes noko-enter { from { opacity: 0; scale: 0.8; filter: blur(10px); } to { opacity: 1; scale: 1; filter: blur(0); } }

@media (prefers-reduced-motion: reduce) {
  .ask-caret { animation: none; }
}

/* ---------- Book a demo (dialog) ---------- */
.book [hidden] { display: none !important; }
.book {
  width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: 24px;
  background: var(--bg-raise); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
}
.book::backdrop { background: rgba(10, 10, 10, 0.6); backdrop-filter: blur(6px); }
.book-form, .book-done { position: relative; display: grid; gap: 14px; padding: 32px 28px 28px; }
.book-title { font: 500 32px/1.05 var(--display); letter-spacing: -0.03em; }
.book-sub { color: var(--mute); margin-top: -6px; margin-bottom: 6px; }
.book-field { display: grid; gap: 6px; }
.book-field span { color: var(--mute); font-size: 14px; }
.book-field input {
  height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line-2);
  background: rgba(240, 255, 224, 0.04); color: var(--ink); font: inherit; font-size: 16px;
}
.book-field input:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 4px rgba(142, 245, 74, 0.15); }
.book-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.book-send { margin-top: 6px; }
.book-send[disabled] { opacity: 0.6; cursor: progress; }
.book-error { color: #ff8a7a; font-size: 14px; }
.book-close {
  position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none; color: var(--mute); font-size: 20px; cursor: pointer;
}
.book-close:hover { background: rgba(240, 255, 224, 0.06); color: var(--ink); }
.book-done { justify-items: center; text-align: center; padding-block: 40px 32px; }
.book-check { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--lime); color: var(--on-lime); font-size: 26px; }

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  .nav-pill { display: none; }
  .nav { grid-template-columns: 1fr auto; }
  .mind-grid { grid-template-columns: 1fr; }
  .mind-slot { max-width: 320px; }
}

/* ---------- Mobile: everything single column ---------- */
@media (max-width: 767px) {
  .nav-login { display: none; }
  /* No room beside the words: Noko floats in the open space above the headline. The slot starts
     low enough that Noko's bubble clears the nav, and the hero reserves the slot's height so the
     headline never slides under Noko on short phones. */
  .hero { --slot-top: max(128px, calc(100dvh - 680px)); --slot-h: 150px;
    padding-top: calc(var(--slot-top) + var(--slot-h) + 12px); align-content: end; }
  .hero-slot { position: absolute; right: var(--gutter); top: var(--slot-top); width: 170px; height: var(--slot-h); margin: 0; }  .hero-foot { grid-template-columns: 1fr; gap: 24px; }
  .hero-ctas .btn { flex: 1 1 auto; }
  .frame iframe { height: 570px; }
  .habits { grid-template-columns: 1fr; gap: 20px; }
  .close-inner { grid-template-columns: 1fr; }
  .close-slot { grid-row: 1; max-width: 240px; }
  .plug-grid { grid-template-columns: 1fr; }
  /* Phones: the connection runs top to bottom. */
  .link { grid-template-columns: 1fr; justify-items: center; row-gap: 0; }
  .wire { width: 2px; height: 56px; margin: 0; }
  .wire i { transform-origin: 50% 0; transform: scaleY(var(--p)); }
  .status { margin-top: 20px; }
  .who-panels { flex-direction: column; min-height: 0; }
  .panel { min-height: 300px; }
  .stack-card { grid-template-columns: 1fr; top: calc(88px + var(--i, 0) * 14px); }
  .stack-icon { grid-row: 1; justify-self: end; font-size: 64px; }
  .btn-xl { height: 64px; padding: 0 32px; font-size: 19px; }
}
@media (max-width: 767px) and (max-height: 760px) {
  .hero { --slot-h: 124px; }
  .hero-slot { width: 150px; }
}
