/*
 * Vokkl marketing one-pager.
 *
 * Every colour resolves to a --vokkl-* token from vokkl-tokens.css, copied in from
 * frontend/src/styles by scripts/sync-brand.sh. There are deliberately NO hex literals
 * here: brand hex lives in exactly one place and tokens.test.ts enforces that.
 *
 * Contrast notes, because the greens are not interchangeable:
 *   --vokkl-green ON NAVY  = 5.16:1, fine for the H1 accent and the tick badges.
 *   --vokkl-green ON WHITE = 2.85:1, fails. Inside the card, green text uses
 *     --vokkl-green-ink at 7.04:1. That is what the ink token exists for.
 *   WHITE on green         = 2.85:1, fails. The button label is navy
 *     (--vokkl-on-primary, 5.16:1), per the rule "navy on green, never white".
 *
 * The supplied design used two greens, the guidelines-PDF value and Tailwind green-500.
 * The system has one fill green; both map to --vokkl-green.
 */

*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--vokkl-navy);
  color: rgb(255 255 255);
  font-family: var(--vokkl-font-body);
  -webkit-font-smoothing: antialiased;
}

/* ---------- shell and atmosphere ---------- */

.shell {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  padding: 28px clamp(22px, 5vw, 76px);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 78% 18%, color-mix(in srgb, var(--vokkl-green) 13%, transparent), transparent 28%),
    radial-gradient(circle at 10% 88%, color-mix(in srgb, var(--vokkl-lime) 6%, transparent), transparent 34%),
    var(--vokkl-navy);
}

/* Faint grid, faded out low so the footer sits on flat navy. */
.shell::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.10;
  background-image:
    linear-gradient(rgb(255 255 255 / 6%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 6%) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(rgb(0 0 0), transparent 78%);
          mask-image: linear-gradient(rgb(0 0 0), transparent 78%);
  pointer-events: none;
}

/* Concentric rings echoing the mark's handset, bottom right. */
.shell::after {
  content: "";
  position: absolute;
  width: 540px;
  height: 540px;
  border: 1px solid color-mix(in srgb, var(--vokkl-lime) 10%, transparent);
  border-radius: var(--vokkl-radius-full);
  right: -300px;
  bottom: -300px;
  box-shadow:
    0 0 0 70px color-mix(in srgb, var(--vokkl-lime) 2.5%, transparent),
    0 0 0 140px color-mix(in srgb, var(--vokkl-lime) 1.8%, transparent);
  pointer-events: none;
}

.glow {
  position: absolute;
  width: 430px;
  height: 430px;
  border-radius: var(--vokkl-radius-full);
  filter: blur(120px);
  background: color-mix(in srgb, var(--vokkl-green) 16%, transparent);
  top: -280px;
  right: -60px;
  pointer-events: none;
}

.header, .hero, .footer {
  width: min(1240px, 100%);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* ---------- brand lockup ---------- */
/* Mark plus wordmark, matching components/auth/AuthHero.tsx. Replaces a 94 KB base64
   PNG with roughly 700 bytes of inline SVG at the correct green. */

.header { display: flex; align-items: center; justify-content: flex-start; gap: 22px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: rgb(255 255 255);
}

.brand-mark { width: 38px; height: auto; flex-shrink: 0; }

.brand-word {
  font-family: var(--vokkl-font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  color: var(--vokkl-lime);
  border: 1px solid color-mix(in srgb, var(--vokkl-lime) 40%, transparent);
  background: color-mix(in srgb, var(--vokkl-lime) 8%, transparent);
  border-radius: var(--vokkl-radius-full);
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- hero ---------- */

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(470px, 1.02fr);
  align-items: center;
  gap: clamp(48px, 5.5vw, 82px);
  padding: clamp(44px, 6.5vh, 72px) 0 42px;
}

.hero-copy { max-width: 700px; }

.eyebrow, .kicker {
  text-transform: uppercase;
  letter-spacing: 2.1px;
  font-size: 11.5px;
  font-weight: 700;
  margin: 0;
}

.eyebrow { color: var(--vokkl-lime); }

h1 {
  margin: 16px 0 22px;
  max-width: 690px;
  font-family: var(--vokkl-font-display);
  font-size: clamp(40px, 4.65vw, 70px);
  line-height: 0.96;
  letter-spacing: -0.047em;
  font-weight: 700;
  text-wrap: balance;
}

h1 span { color: var(--vokkl-green); }   /* 5.16:1 on navy */

.intro {
  max-width: 620px;
  color: rgb(255 255 255 / 88%);
  font-size: clamp(16px, 1.28vw, 19px);
  line-height: 1.58;
  margin: 0;
}

.features {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  column-gap: 26px;
  row-gap: 11px;
  margin: 27px 0 0;
  padding: 0;
  list-style: none;
  color: rgb(255 255 255 / 91%);
  font-size: 14.5px;
}

.features li { display: flex; align-items: center; white-space: nowrap; }

.features li::before {
  content: "\2713";
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: var(--vokkl-radius-full);
  background: color-mix(in srgb, var(--vokkl-green) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--vokkl-green) 24%, transparent);
  color: var(--vokkl-green);
  font-weight: 700;
  font-size: 12px;
  margin-right: 8px;
  flex-shrink: 0;
}

/* ---------- waitlist card ---------- */

.card {
  position: relative;
  color: var(--vokkl-navy);
  background: rgb(255 255 255 / 88%);
  border: 1px solid rgb(255 255 255 / 50%);
  border-top: 5px solid var(--vokkl-green);
  box-shadow: 0 28px 70px color-mix(in srgb, var(--vokkl-navy-deep) 28%, transparent);
  border-radius: var(--vokkl-radius-md);
  padding: clamp(40px, 3.8vw, 56px);
  min-height: 370px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: var(--vokkl-radius-full);
  background: color-mix(in srgb, var(--vokkl-lime) 18%, transparent);
  right: -95px;
  top: -105px;
  filter: blur(2px);
}

.card > * { position: relative; z-index: 1; }

.kicker { color: var(--vokkl-green-ink); letter-spacing: 1.8px; }  /* 7.04:1, not --vokkl-green */

.card h2 {
  font-family: var(--vokkl-font-display);
  font-size: clamp(28px, 2.25vw, 35px);
  line-height: 1.08;
  letter-spacing: -1.1px;
  margin: 10px 0 12px;
  font-weight: 700;
  max-width: 430px;
}

.card-lede { color: var(--vokkl-fg3); line-height: 1.5; margin: 0 0 24px; font-size: 15.5px; }

.card label {
  display: block;
  margin-bottom: 8px;
  color: var(--vokkl-navy);
  font-size: 13.5px;
  font-weight: 600;
}

.row { display: flex; gap: 10px; align-items: stretch; }

.row input {
  min-width: 0;
  flex: 1;
  height: 52px;
  border: 1px solid var(--vokkl-border);
  border-radius: var(--vokkl-radius-md);
  background: color-mix(in srgb, var(--vokkl-bg) 92%, transparent);
  padding: 0 15px;
  font-size: 16px;              /* 16px stops iOS Safari zooming the page on focus */
  color: var(--vokkl-navy);
  font-family: inherit;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.row input:focus-visible {
  border-color: color-mix(in srgb, var(--vokkl-green) 55%, transparent);
  box-shadow: var(--vokkl-shadow-focus);
  background: var(--vokkl-surface);
}

.row button {
  height: 52px;                 /* matches the input: the source design used 46 and 52 */
  border: 0;
  border-radius: var(--vokkl-radius-md);
  background: var(--vokkl-green);
  color: var(--vokkl-on-primary);   /* navy at 5.16:1, never white */
  padding: 0 18px;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--vokkl-green) 19%, transparent);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.row button:hover {
  background: var(--vokkl-green-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--vokkl-green) 24%, transparent);
}

.row button:focus-visible { outline: none; box-shadow: var(--vokkl-shadow-focus); }
.row button[disabled] { opacity: .65; cursor: progress; transform: none; }

/* Honeypot. Off screen rather than display:none, because some bots skip hidden
   fields. Never focusable. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-msg { margin: 14px 0 0; font-size: 14.5px; font-weight: 600; min-height: 1.4em; }
.form-msg:empty { margin: 0; min-height: 0; }
.form-msg.is-ok { color: var(--vokkl-green-ink); }   /* not --vokkl-green: 2.85:1 on white */
.form-msg.is-error { color: var(--vokkl-danger-text); }
.form-msg a { color: inherit; }

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

/* Copyright left, brand line right, no separator. They are unrelated, so they get their
   own places rather than being glued onto one line with a dot: a 4px green dot was the
   brightest thing in the footer and read as a stray bullet. The right edge lines up with
   the signup card, since both sit inside the same 1240px container. */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 18px 0;
  color: var(--vokkl-navy-light);   /* 6.21:1 on navy. The source used the border token. */
  font-size: 13px;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 52px 0; gap: 42px; }
  .hero-copy { max-width: 760px; }
  .card { max-width: 620px; min-height: 0; }
  .features { grid-template-columns: repeat(2, minmax(0, max-content)); }
}

@media (max-width: 560px) {
  .shell { padding: 20px 20px 24px; }
  .hero { padding: 40px 0 28px; }
  h1 { font-size: clamp(39px, 12vw, 54px); margin-bottom: 18px; }
  .intro { font-size: 16px; }
  .features { grid-template-columns: 1fr; gap: 10px; margin-top: 24px; }
  .row { flex-direction: column; }
  .row button { width: 100%; }
  .card { padding: 30px 24px; }
  .brand-mark { width: 32px; }
  .brand-word { font-size: 27px; }
  .pill { font-size: 13px; padding: 9px 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
