/* Glowworm AI — shared styles for every page.
   Colours come from the logo. Light and dark mode both supported. */

:root {
  --navy: #080814;
  --navy-2: #0e1433;
  --blue: #3b9eff;
  --btn: #1d6fd1;        /* deeper than the logo blue so white text passes contrast */
  --blue-press: #175db3;
  --purple: #7b4de0;
  --amber: #ffa62b;
  --silver: #c0c6d0;

  --bg: #f7f8fc;
  --surface: #ffffff;
  --ink: #141a2a;
  --muted: #5a6478;
  --line: rgba(20, 26, 42, 0.09);
  --link: #1f74d6;
  --nav-bg: rgba(247, 248, 252, 0.72);
  --shadow: 0 1px 2px rgba(20, 26, 42, 0.04), 0 8px 24px rgba(20, 26, 42, 0.06);

  --radius: 20px;
  --wrap: 68rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d18;
    --surface: #141828;
    --ink: #eef1f8;
    --muted: #9aa3b8;
    --line: rgba(255, 255, 255, 0.08);
    --link: #6bb6ff;
    --nav-bg: rgba(11, 13, 24, 0.7);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --purple: #a98bff;   /* lighter violet so labels stay readable on dark */
  }
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  font: 100%/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.18em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--surface); padding: .5rem 1rem; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* ---------- type scale: tracking tightens as size grows ---------- */
.display {
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4.1rem);
  line-height: 1.05;
  letter-spacing: -0.028em;
  font-weight: 700;
}
h2, .h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.022em;
  font-weight: 700;
}
h3, .h3 {
  font-size: 1.3rem;
  line-height: 1.25;
  letter-spacing: -0.012em;
  font-weight: 650;
}
.lead { font-size: clamp(1.08rem, 1rem + 0.35vw, 1.25rem); line-height: 1.55; color: var(--muted); }
.eyebrow {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--purple);
}
.small { font-size: 0.9rem; color: var(--muted); letter-spacing: 0.005em; }

/* ---------- buttons: feedback on press, not release ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: 0 1.4rem;
  border-radius: 999px; border: 0;
  background: var(--btn); color: #fff;
  font: inherit; font-weight: 600; font-size: 1.02rem; letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer;
  transition: transform 120ms ease-out, background-color 120ms ease-out;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--blue-press); }
.btn:active { transform: scale(0.97); }
.btn.small-btn { min-height: 2.25rem; padding: 0 1rem; font-size: 0.9rem; }
.btn.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn.ghost:hover { background: rgba(127, 127, 127, 0.1); }
.arrow-link { font-weight: 600; text-decoration: none; display: inline-flex; gap: .35rem; align-items: center; }
.arrow-link:hover { text-decoration: underline; }
.arrow-link span { transition: transform 150ms ease-out; }
.arrow-link:hover span { transform: translateX(3px); }

/* ---------- nav: translucent layer, content scrolls under it ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 transparent;
  transition: box-shadow 200ms ease;
}
.nav.scrolled { box-shadow: 0 1px 0 var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 1rem; height: 3.75rem; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -0.015em; font-size: 1.08rem; }
.brand img { width: 34px; height: 34px; border-radius: 50%; }
.nav-links { display: flex; gap: 1.6rem; margin-left: auto; list-style: none; padding: 0; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: 0.95rem; font-weight: 500; opacity: .82; }
.nav-links a:hover, .nav-links a[aria-current] { opacity: 1; }
.nav .btn { margin-left: .5rem; }
.menu-btn { display: none; margin-left: .25rem; background: none; border: 0; color: var(--ink); width: 2.75rem; height: 2.75rem; border-radius: 50%; cursor: pointer; }
.menu-btn:active { transform: scale(0.94); }
.menu-btn svg { width: 22px; height: 22px; }

@media (max-width: 760px) {
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 3.75rem;
    flex-direction: column; gap: 0; margin: 0; padding: .5rem 1.25rem 1rem;
    background: color-mix(in srgb, var(--bg) 98%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 1px 0 var(--line);
  }
  .nav-links a { display: block; padding: .8rem 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
  .nav.open .nav-links { display: flex; }
  .menu-btn { display: inline-grid; place-items: center; }
  .nav .btn { margin-left: auto; white-space: nowrap; }
}
@media (max-width: 420px) {
  .nav .wrap { gap: .5rem; }
  .brand { font-size: 1rem; }
  .nav-cta { font-size: 0 !important; }
  .nav-cta::after { content: "Free score"; font-size: .9rem; }
}

/* ---------- sections ---------- */
section { padding: clamp(4rem, 3rem + 4vw, 7rem) 0; }
.section-head { max-width: 42rem; margin-bottom: 2.5rem; }
.section-head p { margin-top: .9rem; }

/* dark band: hero and closing (always dark, matches the logo) */
.dark { background: var(--navy); color: #eef1f8; position: relative; overflow: hidden; isolation: isolate; }
.dark .lead, .dark .small { color: #aab3c8; }
.dark .eyebrow { color: var(--amber); }
.dark a:not(.btn) { color: #8cc8ff; }
.dark::before {
  content: ""; position: absolute; z-index: -1; inset: auto -20% -60% auto; width: 70vmax; height: 70vmax;
  background: radial-gradient(closest-side, rgba(123, 77, 224, 0.22), rgba(59, 158, 255, 0.08) 55%, transparent);
  pointer-events: none;
}

/* ---------- cards ---------- */
.card {
  background: var(--surface); border-radius: var(--radius); padding: 1.75rem;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}

/* ---------- closing band (shared) ---------- */
.closing { text-align: center; }
.closing h2 { max-width: 22ch; margin: 0 auto; }
.closing .lead { max-width: 34rem; margin: 1.1rem auto 2rem; }

/* ---------- inner-page header ---------- */
.page-head { padding: clamp(3.5rem, 2.5rem + 4vw, 6rem) 0 clamp(2rem, 1.5rem + 2vw, 3rem); }
.page-head h1 { margin: .7rem 0 1rem; max-width: 20ch; }
.page-head .lead { max-width: 40rem; }
.jump { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.8rem; padding: 0; list-style: none; }
.jump a { display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 1.1rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  font-size: .95rem; font-weight: 500; transition: transform 120ms ease-out, border-color 150ms ease; }
.jump a:hover { border-color: var(--link); }
.jump a:active { transform: scale(0.97); }

.band { background: var(--surface); border-block: 1px solid var(--line); }
.band .card { background: var(--bg); box-shadow: none; }

/* ---------- price cards ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.price-card { display: flex; flex-direction: column; gap: .75rem; }
.price-card p { color: var(--muted); }
.price-card .body { flex: 1; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .7rem; }
.price strong { font-size: 1.45rem; letter-spacing: -0.02em; font-weight: 700; color: var(--ink); }
.price span { font-size: .9rem; color: var(--muted); }
.price-card .btn { align-self: flex-start; margin-top: .5rem; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: .25rem .6rem; border-radius: 999px; background: rgba(123,77,224,.12); color: var(--purple); align-self: flex-start; }

/* ---------- quotes ---------- */
.quote { margin: 0; }
.quote blockquote { font-size: 1.1rem; line-height: 1.55; letter-spacing: -0.006em; }
.quote figcaption { margin-top: .8rem; font-size: .9rem; color: var(--muted); }
.stars { color: var(--amber); letter-spacing: .15em; margin-right: .4rem; }

/* ---------- long text ---------- */
.prose { max-width: 40rem; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { margin-top: 2.8rem; font-size: clamp(1.35rem, 1.2rem + .6vw, 1.7rem); letter-spacing: -0.016em; }
.prose h3 { margin-top: 2rem; }
.prose p, .prose li { font-size: 1.08rem; line-height: 1.7; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: .6rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem;
  padding: 1.2rem 0; font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; display: inline-block; font-weight: 400; font-size: 1.5rem; line-height: 1; color: var(--muted); transition: transform 200ms ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 1.3rem; max-width: 42rem; line-height: 1.65; }

/* ---------- forms ---------- */
.field { display: grid; gap: .4rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: .8rem .95rem; min-height: 3rem; transition: border-color 150ms ease, box-shadow 150ms ease; }
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(59,158,255,.18); }
.hidden { position: absolute; left: -9999px; }

/* ---------- footer ---------- */
footer { padding: 3rem 0 4rem; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
footer .wrap { display: grid; gap: 1.5rem; grid-template-columns: 1fr auto; align-items: start; }
footer nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }
footer .brand { font-size: 1rem; }
footer .contact { text-align: right; display: grid; gap: .3rem; }
@media (max-width: 700px) {
  footer .wrap { grid-template-columns: 1fr; }
  footer .contact { text-align: left; }
}

/* ---------- reveal on scroll (gentle; off for reduced motion) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 600ms ease, transform 600ms cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- accessibility preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { transform: none; transition: opacity 200ms ease; }
  .btn, .arrow-link span, .menu-btn { transition: none; }
  .btn:active { transform: none; opacity: .85; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav, .nav-links { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --muted: #3a4256; --line: rgba(20, 26, 42, 0.35); }
  .card { border-width: 2px; }
}
