/* =========================================================================
   Karmaplus — landing page
   Aesthetic: deep-water premium. Navy canvas, luminous teal, editorial type.
   ========================================================================= */

:root {
  color-scheme: dark;

  /* Brand-derived palette (teal + navy from the original logo) */
  --navy-900: #04161f;
  --navy-850: #061f2b;
  --navy-800: #072838; /* brand navy */
  --navy-700: #0b3142;
  --navy-600: #103a4d;

  --teal: #5cc6d0; /* brand teal */
  --teal-bright: #7ad9e1;
  --teal-soft: #a6e6eb;
  --teal-deep: #2f9aa6;

  --mint: #a6df8d; /* "implemented" / positive */
  --periwinkle: #aebce8; /* "in review" */
  --amber: #ffc36b;

  --ink: #eaf7f9;
  --ink-muted: #aac6cf;
  --ink-faint: #6f8c96;

  --line: rgba(124, 198, 208, 0.16);
  --line-strong: rgba(124, 198, 208, 0.34);

  --card: rgba(255, 255, 255, 0.028);
  --card-hi: rgba(124, 198, 208, 0.06);

  --glow-teal: 0 0 0 1px rgba(124, 198, 208, 0.15), 0 18px 50px -18px rgba(92, 198, 208, 0.55);

  /* Themed surfaces — overridden wholesale by the light theme below. Keeping
     these as variables (instead of inline literals) is what lets one
     [data-theme="light"] block recolor the whole page. */
  --nav-glass: rgba(5, 22, 31, 0.72);
  --field-bg: rgba(255, 255, 255, 0.04);
  --chip-bg: rgba(7, 31, 43, 0.66);
  --chip-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.7);
  --footer-bg: rgba(4, 22, 31, 0.6);
  --inset-bg: rgba(255, 255, 255, 0.03);
  --menu-bg: rgba(5, 22, 31, 0.96);
  --menu-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --grid-line: rgba(124, 198, 208, 0.05);
  --icon-tint: rgba(92, 198, 208, 0.1);
  --selection-bg: rgba(124, 198, 208, 0.28);
  --selection-ink: #ffffff;
  --btn-ink: #042029;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --maxw: 1180px;

  --font-display: "Spectral", Georgia, serif;
  --font-sans: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ------------------------------------------------------------------ reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--navy-900);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

section {
  scroll-margin-top: 96px;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--selection-bg);
  color: var(--selection-ink);
}

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

/* ------------------------------------------------------------- background */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 78% -8%, rgba(16, 58, 77, 0.7), transparent 60%),
    radial-gradient(900px 600px at 8% 6%, rgba(11, 49, 66, 0.55), transparent 55%),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-850) 45%, var(--navy-900) 100%);
}

.bg-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.bg-aurora--1 {
  width: 620px;
  height: 620px;
  top: -160px;
  right: -120px;
  background: radial-gradient(circle, rgba(92, 198, 208, 0.5), transparent 65%);
  animation: drift1 26s ease-in-out infinite;
}
.bg-aurora--2 {
  width: 540px;
  height: 540px;
  top: 38%;
  left: -180px;
  background: radial-gradient(circle, rgba(47, 154, 166, 0.42), transparent 65%);
  animation: drift2 32s ease-in-out infinite;
}
.bg-aurora--3 {
  width: 460px;
  height: 460px;
  bottom: -160px;
  left: 46%;
  background: radial-gradient(circle, rgba(174, 188, 232, 0.22), transparent 65%);
  animation: drift1 38s ease-in-out infinite reverse;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 78%);
}

.bg-grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  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");
}

@keyframes drift1 {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-40px, 50px, 0) scale(1.12);
  }
}
@keyframes drift2 {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(60px, -40px, 0) scale(1.1);
  }
}

/* -------------------------------------------------------------------- nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: var(--nav-glass);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand-logo {
  height: 30px;
  width: auto;
}
/* Theme-aware wordmark: white on dark, navy on light. The theme script sets
   data-theme pre-paint, so the correct variant shows without a swap flash. */
.brand-logo--light,
.footer-logo--light {
  display: none;
}
:root[data-theme="light"] .brand-logo--dark,
:root[data-theme="light"] .footer-logo--dark {
  display: none;
}
:root[data-theme="light"] .brand-logo--light,
:root[data-theme="light"] .footer-logo--light {
  display: block;
}
.nav-links {
  margin-left: auto;
  display: flex;
  gap: 30px;
}
.nav-links a {
  position: relative;
  font-size: 0.93rem;
  color: var(--ink-muted);
  padding: 6px 2px;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nav-links a:hover {
  color: var(--ink);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}
.nav-links a.active {
  color: var(--ink);
}
.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
/* nav-links already pushes right; keep actions snug beside it when both show */
.nav-links + .nav-actions {
  margin-left: 18px;
}
.lang-switch-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lang-switch {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}
.lang-switch:hover {
  color: var(--ink);
  border-color: var(--teal);
}
.nav-cta {
  margin-left: 0;
}

/* ----------------------------------------------------------------- button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}
.btn-sm {
  padding: 10px 18px;
  font-size: 0.9rem;
}
.btn-primary {
  color: var(--btn-ink);
  background: linear-gradient(135deg, var(--teal-bright), var(--teal) 55%, var(--teal-deep));
  box-shadow: var(--glow-teal);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(124, 198, 208, 0.3), 0 22px 60px -16px rgba(92, 198, 208, 0.8);
}
.btn-primary:active {
  transform: translateY(0);
}

/* -------------------------------------------------------------- typography */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--teal);
}
.eyebrow-dot {
  width: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--teal), transparent);
}

.hero-title,
.section-title,
.cta-title {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.04;
  color: var(--ink);
  text-wrap: balance;
}

.accent {
  position: relative;
  background: linear-gradient(120deg, var(--teal-bright), var(--teal-soft) 60%, var(--periwinkle));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
}

/* ------------------------------------------------------------------- hero */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 9vw, 104px) 28px clamp(40px, 7vw, 80px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr;
  gap: clamp(20px, 3vw, 48px);
  align-items: center;
}
.hero-title {
  font-size: clamp(2.6rem, 5.8vw, 4.5rem);
  margin: 22px 0 22px;
  max-width: 20ch;
}
.hero-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--ink-muted);
  max-width: 58ch;
}
.hero-aside {
  margin-top: 14px;
  font-size: 0.95rem;
  color: var(--ink-faint);
  font-style: italic;
  max-width: 72ch;
}
.hero-aside s {
  color: var(--ink-muted);
  text-decoration-color: var(--teal-deep);
  text-decoration-thickness: 2px;
}

/* ------------------------------------------------------------------- form */
.signup-form {
  margin-top: 30px;
  max-width: 480px;
}
.signup-form--center {
  margin-inline: auto;
}
.field {
  display: flex;
  gap: 10px;
  padding: 7px;
  background: var(--field-bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.field:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(92, 198, 208, 0.16);
}
.field input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 8px 16px;
}
.field input::placeholder {
  color: var(--ink-faint);
}
.field.invalid {
  border-color: #ff6b8b;
  box-shadow: 0 0 0 4px rgba(255, 107, 139, 0.14);
}
.form-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--ink-faint);
  padding-left: 4px;
}
.form-note.error {
  color: #ff96ab;
}
.form-note.success {
  color: var(--mint);
}
.signup-form--center .form-note {
  text-align: center;
}

/* success swap */
.signup-form.is-success .field {
  border-color: rgba(166, 223, 141, 0.5);
  box-shadow: 0 0 0 4px rgba(166, 223, 141, 0.12);
}
.field-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: var(--mint);
  font-weight: 600;
}
.field-success .check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--mint);
  color: #04161f;
  display: grid;
  place-items: center;
  font-size: 13px;
}

/* ----------------------------------------------------------- hero visual */
.hero-visual {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
}
.brain-stage {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.brain-glow {
  position: absolute;
  inset: 12%;
  background: radial-gradient(circle, rgba(92, 198, 208, 0.5), transparent 62%);
  filter: blur(36px);
  animation: pulse 5.5s ease-in-out infinite;
}
.brain {
  position: relative;
  width: 62%;
  filter: drop-shadow(0 14px 40px rgba(92, 198, 208, 0.45));
  animation: float 7s ease-in-out infinite;
}

.chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--chip-bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  box-shadow: var(--chip-shadow);
  white-space: nowrap;
}
.chip--review {
  top: 12%;
  left: -6%;
  animation: float 6s ease-in-out infinite;
}
.chip--done {
  top: 30%;
  right: -8%;
  animation: float 7.5s ease-in-out 0.4s infinite;
}
.chip--karma {
  bottom: 14%;
  left: 8%;
  animation: float 6.8s ease-in-out 0.8s infinite;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.dot--teal {
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
}
.dot--mint {
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
}
.dot--peri {
  background: var(--periwinkle);
  box-shadow: 0 0 10px var(--periwinkle);
}

.spark {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal-soft);
  box-shadow: 0 0 12px var(--teal);
  opacity: 0;
}
.spark--1 {
  left: 22%;
  bottom: 20%;
  animation: rise-spark 4.5s ease-in-out infinite;
}
.spark--2 {
  right: 26%;
  bottom: 14%;
  animation: rise-spark 5.5s ease-in-out 1s infinite;
}
.spark--3 {
  left: 54%;
  bottom: 24%;
  animation: rise-spark 6s ease-in-out 2.2s infinite;
}
.spark--4 {
  right: 40%;
  bottom: 10%;
  animation: rise-spark 5s ease-in-out 3s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.08);
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}
@keyframes rise-spark {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.6);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-90px) scale(1);
  }
}

/* --------------------------------------------------------------- sections */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 9vw, 110px) 28px;
}
.section-head {
  /* Full content width like the cards below. The eyebrow is tiny and the
     lead keeps its own narrower cap, so only the title benefits from the
     extra room. */
  margin-bottom: clamp(36px, 5vw, 60px);
}
.section-title {
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  margin-top: 18px;
}
.section-lead {
  margin-top: 18px;
  color: var(--ink-muted);
  font-size: 1.08rem;
  max-width: 48ch;
}

/* --------------------------------------------------------------- cards */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.card {
  padding: 26px 24px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease,
    box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  background: var(--card-hi);
  box-shadow: 0 24px 60px -28px rgba(92, 198, 208, 0.5);
}
.card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--teal);
  background: var(--icon-tint);
  border: 1px solid var(--line);
  margin-bottom: 20px;
}
.card-icon svg {
  width: 24px;
  height: 24px;
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.22rem;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.card p {
  color: var(--ink-muted);
  font-size: 0.96rem;
}

/* --------------------------------------------------------------- steps */
.steps {
  list-style: none;
  display: grid;
  gap: 18px;
  counter-reset: step;
}
.step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 28px 30px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.step:hover {
  border-color: var(--line-strong);
  background: var(--card-hi);
}
.step-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 500;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  line-height: 1;
}
.step-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  margin-bottom: 6px;
}
.step-body p {
  color: var(--ink-muted);
  font-size: 0.98rem;
  max-width: 60ch;
}
.step-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
  background: var(--inset-bg);
  border: 1px solid var(--line);
  white-space: nowrap;
}

/* ----------------------------------------------------------------- ai */
.ai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.ai-list {
  list-style: none;
  margin-top: 26px;
  display: grid;
  gap: 14px;
}
.ai-list li {
  position: relative;
  padding-left: 28px;
  color: var(--ink-muted);
}
.ai-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
}
.ai-list strong {
  color: var(--ink);
  font-weight: 600;
}

.demo-card {
  background: linear-gradient(180deg, rgba(11, 49, 66, 0.6), rgba(7, 31, 43, 0.5));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.9);
}
.demo-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
}
.demo-raw {
  color: var(--ink-muted);
  font-style: italic;
  padding: 14px 16px;
  background: var(--inset-bg);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
}
.demo-arrow {
  display: grid;
  place-items: center;
  color: var(--teal);
  margin: 12px 0;
}
.demo-arrow svg {
  width: 22px;
  height: 22px;
}
.demo-out {
  display: grid;
  gap: 12px;
}
.demo-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: start;
}
.demo-key {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-deep);
  padding-top: 3px;
}
.demo-val {
  color: var(--ink);
  font-size: 0.96rem;
}
.demo-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.demo-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--navy-900);
  background: var(--teal);
  padding: 4px 12px;
  border-radius: 999px;
}
.demo-cta {
  color: var(--teal);
  font-weight: 600;
  font-size: 0.92rem;
}

/* ----------------------------------------------------------------- cta */
.cta {
  padding-bottom: clamp(70px, 10vw, 130px);
}
.cta-panel {
  position: relative;
  text-align: center;
  padding: clamp(44px, 7vw, 80px) 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(700px 320px at 50% -10%, rgba(92, 198, 208, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(11, 49, 66, 0.5), rgba(7, 31, 43, 0.32));
  overflow: hidden;
}
.cta-panel .eyebrow {
  justify-content: center;
}
.cta-title {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  margin: 18px 0 14px;
}
.cta-sub {
  color: var(--ink-muted);
  max-width: 44ch;
  margin: 0 auto;
}

/* --------------------------------------------------------------- footer */
.footer {
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 46px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-logo {
  height: 28px;
  margin-bottom: 14px;
}
.footer-brand p {
  color: var(--ink-faint);
  font-size: 0.92rem;
  max-width: 38ch;
}
.footer-meta {
  text-align: right;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: flex-end;
  margin-bottom: 14px;
}
.footer-links a,
.footer-links .footer-link-btn {
  color: var(--ink-muted);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}
.footer-links a:hover,
.footer-links .footer-link-btn:hover {
  color: var(--teal);
}
/* The cookie-settings control is a <button> styled to read as a footer link. */
.footer-links .footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-weight: inherit;
  line-height: inherit;
  cursor: pointer;
}
.footer-copy {
  color: var(--ink-faint);
  font-size: 0.85rem;
}

/* ----------------------------------------------------- theme switcher */
.footer-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--inset-bg);
}
.theme-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 8px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.theme-opt svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.theme-opt:hover {
  color: var(--ink);
}
.theme-opt:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
.theme-opt[aria-pressed="true"] {
  color: var(--btn-ink);
  background: var(--teal);
}

/* --------------------------------------------------------- reveal motion */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0ms);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

.rise {
  opacity: 0;
  animation: rise-in 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .hero-grid,
  .ai-grid {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    order: -1;
    min-height: 300px;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 560px) {
  .nav-inner {
    padding: 14px 20px;
  }
  .hero,
  .section {
    padding-left: 20px;
    padding-right: 20px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .field {
    flex-direction: column;
    border-radius: 20px;
  }
  .field .btn {
    width: 100%;
  }
  .step {
    grid-template-columns: auto 1fr;
    gap: 18px;
  }
  .step-chip {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .footer-inner,
  .footer-meta {
    text-align: left;
  }
  .footer-links {
    justify-content: flex-start;
  }
}

/* --------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal,
  .rise {
    opacity: 1;
    transform: none;
  }
}

/* ===================================================================
   LIGHT THEME
   Applied when <html data-theme="light"> is set. The inline theme
   script (ThemeScript.astro) resolves the stored preference —
   system | light | dark — to a concrete light/dark value and sets
   the attribute before first paint, so there is no flash. "system"
   tracks the OS via matchMedia in that script (no CSS duplication).
   =================================================================== */
:root[data-theme="light"] {
  color-scheme: light;

  /* Page + ink: soft slate canvas, deep teal-navy text (matches the email theme) */
  --navy-900: #eef2f5;
  --navy-850: #e7edf1;
  --navy-800: #dfe7ec;
  --ink: #0c2027;
  --ink-muted: #4a626c;
  --ink-faint: #7a929b;

  /* Accent: deepen the teal so it reads as text/links on white */
  --teal: #0b8ea6;
  --teal-bright: #12a7c0; /* hover accents (links, picker); vivid but legible on white */
  --teal-deep: #2f7e8c;

  /* Hairlines + cards */
  --line: #e2e8ec;
  --line-strong: #cdd8de;
  --card: #ffffff;
  --card-hi: #f6fafb;

  /* Themed surfaces */
  --nav-glass: rgba(255, 255, 255, 0.8);
  --field-bg: #ffffff;
  --chip-bg: rgba(255, 255, 255, 0.92);
  --chip-shadow: 0 12px 30px -16px rgba(12, 32, 39, 0.28);
  --footer-bg: rgba(255, 255, 255, 0.55);
  --inset-bg: rgba(12, 32, 39, 0.035);
  --menu-bg: rgba(255, 255, 255, 0.97);
  --menu-shadow: 0 16px 38px -12px rgba(12, 32, 39, 0.22);
  --grid-line: rgba(12, 32, 39, 0.05);
  --icon-tint: rgba(11, 142, 166, 0.1);
  --selection-bg: rgba(11, 142, 166, 0.22);
  --selection-ink: #062029;
  --btn-ink: #ffffff;
  --glow-teal: 0 0 0 1px rgba(11, 142, 166, 0.16), 0 18px 44px -20px rgba(11, 142, 166, 0.4);
}

/* Surfaces whose fill is a multi-stop gradient can't be a single variable, so
   restate them for light. */
:root[data-theme="light"] body {
  background: var(--navy-900);
}
:root[data-theme="light"] .bg {
  background:
    radial-gradient(1200px 700px at 78% -8%, rgba(11, 142, 166, 0.1), transparent 60%),
    radial-gradient(900px 600px at 8% 6%, rgba(91, 111, 192, 0.1), transparent 55%),
    linear-gradient(180deg, #eef2f5 0%, #e8eef2 45%, #eef2f5 100%);
}
:root[data-theme="light"] .bg-aurora {
  opacity: 0.22;
}
:root[data-theme="light"] .bg-grain {
  opacity: 0.02;
}
:root[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #12a7c0, #0b8ea6 55%, #0a7589);
}
:root[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(11, 142, 166, 0.28), 0 22px 50px -18px rgba(11, 142, 166, 0.5);
}
/* The italic hero word + section accents: pastel gradient is invisible on white */
:root[data-theme="light"] .accent {
  background: linear-gradient(120deg, #0b8ea6, #2f9aa6 55%, #5b6fc0);
  -webkit-background-clip: text;
  background-clip: text;
}
:root[data-theme="light"] .demo-card {
  background: linear-gradient(180deg, #ffffff, #f3f8fa);
  box-shadow: 0 34px 80px -52px rgba(12, 32, 39, 0.4);
}
:root[data-theme="light"] .cta-panel {
  background:
    radial-gradient(700px 320px at 50% -10%, rgba(11, 142, 166, 0.12), transparent 70%),
    linear-gradient(180deg, #ffffff, #f3f8fa);
}

/* ----------------------------------------- theme switcher: responsive */
@media (max-width: 560px) {
  .footer-tools {
    justify-content: flex-start;
  }
}
