/* ectrapi website. Same colours and feel as the ectrapi app (see its DESIGN.md): dark space sky, one sky-blue
   accent, Geist, frosted glass, outline icons. Laid out as a landing page: nav, hero with an illustration,
   sections, call-to-action band, footer. Every colour is a variable here; never hard-code one below. */

:root {
  --bg: #0d1217; --text: #e8f1f8; --muted: #7d8a96; --line: #1a1f24;
  --sky: #9fd3f7; --sky-bright: #c9e8fc;
  --title: #d4ecfc; --title-glow: rgba(120, 195, 255, 0.35);
  --logo-glow: rgba(255, 255, 255, 0.35);
  --bubble: rgba(24, 33, 41, 0.38); --bubble-edge: rgba(159, 211, 247, 0.18); --bubble-focus: rgba(159, 211, 247, 0.6);
  --bubble-strong: rgba(18, 27, 36, 0.66);   /* the illustration panels: a little more solid */
  --frost: blur(12px) saturate(1.2);
  --glow: rgba(96, 182, 255, 0.5);
  --art-glow: rgba(31, 106, 163, 0.45);     /* soft light under the illustrations */
  --on-accent: #000;
  --top-bg: rgba(13, 18, 23, 0.6);
  --menu-bg: rgba(16, 24, 32, 0.94);
  --scroll: #2a3138;
  --cell: rgba(159, 211, 247, 0.14); --cell-strong: rgba(232, 241, 248, 0.34);   /* bars standing in for text */
  --chart: #cfe7fa;
  --placeholder: #5c646c;   /* hint text inside empty boxes */
  --ok: #5fd39a; --bad: #ff6b6b; --bad-soft: rgba(255, 107, 107, 0.22);
  --meteor-head: #eaf6ff; --meteor-glow: rgba(159, 211, 247, 0.6);
  --nebula-1: rgba(31, 106, 163, 0.20); --nebula-2: rgba(108, 76, 190, 0.13); --nebula-3: rgba(28, 140, 150, 0.11);
  --star: #e6f2ff;
  --gutter: 32px; --wide: 1200px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
  background: var(--bg); color: var(--text);
  font: 16px/1.55 "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--sky); outline-offset: 4px; border-radius: 8px; }
main { flex: 1; }
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }

.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
        stroke-linecap: round; stroke-linejoin: round; }

/* ---- Nav: logo, links, Contact button. Blurs what passes under it once scrolled ---- */
.top { position: sticky; top: 0; z-index: 10; transition: background-color 0.25s ease-out; }
body.scrolled .top { background: var(--top-bg); backdrop-filter: var(--frost); -webkit-backdrop-filter: var(--frost);
                     box-shadow: 0 1px 0 var(--bubble-edge); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 76px; position: relative; }
.logo img { height: 28px; display: block; filter: drop-shadow(0 0 5px var(--logo-glow)); -webkit-user-drag: none; }
.tabs { margin-left: auto; display: flex; align-items: center; gap: 36px; }
.tabs a { font-size: 15px; color: var(--text); opacity: 0.7; transition: opacity 0.15s ease-out, color 0.15s ease-out; }
.tabs a:hover { opacity: 1; }
.tabs a[aria-current="page"] { opacity: 1; color: var(--sky); }
.tabs .pill { opacity: 1; padding: 10px 22px; font-size: 14px; }
.tabs .pill[aria-current="page"] { color: var(--on-accent); }   /* the current-page blue would hide its text */
.menu-btn { display: none; margin-left: auto; padding: 4px; border: 0; background: none; color: var(--sky); cursor: pointer; }
.menu-btn:hover { color: var(--sky-bright); }

/* ---- Buttons ---- */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 30px;
        border-radius: 999px; font-size: 16px; font-weight: 600; color: var(--sky); white-space: nowrap;
        background: var(--bubble); backdrop-filter: var(--frost); -webkit-backdrop-filter: var(--frost);
        border: 1px solid var(--bubble-edge);
        transition: color 0.15s ease-out, background-color 0.15s ease-out, border-color 0.15s ease-out; }
.pill:hover { color: var(--sky-bright); border-color: var(--bubble-focus); }
.pill.primary { background: var(--sky); border-color: var(--sky); color: var(--on-accent); }
.pill.primary:hover { background: var(--sky-bright); border-color: var(--sky-bright); color: var(--on-accent); }
.pill .icon { width: 18px; height: 18px; }
.pill .go { transition: transform 0.25s ease-out; }
.pill:hover .go { transform: translateX(3px); }

/* ---- Hero: headline and buttons on the left, illustration on the right ---- */
.hero { display: grid; grid-template-columns: 1fr 1.05fr; align-items: center; gap: 56px;
        min-height: min(calc(100vh - 76px), 820px); padding-top: 24px; padding-bottom: 72px; }
.hero h1 { margin: 0 0 40px; font-size: clamp(42px, 6vw, 76px); font-weight: 600; line-height: 1.04;
           letter-spacing: -0.035em; color: var(--title); text-shadow: 0 0 24px var(--title-glow); }
.hero h1 em { font-style: normal; color: var(--sky); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; padding: 8px 16px 8px 12px;
           border-radius: 999px; background: var(--cell); color: var(--sky); font-size: 14px; font-weight: 600; }
.eyebrow .icon { width: 20px; height: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---- Sections ---- */
.section { padding-top: 112px; padding-bottom: 112px; }   /* top/bottom only, so .wrap keeps its side gutters */
.section + .section { padding-top: 24px; }
h2 { margin: 0 0 56px; text-align: center; font-size: clamp(30px, 3.6vw, 44px); font-weight: 600; line-height: 1.1;
     letter-spacing: -0.025em; color: var(--title); text-shadow: 0 0 18px var(--title-glow); }

/* Frosted cards and tiles, with the app's hover glow fading down */
.card, .tile, .step, .band {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--bubble); backdrop-filter: var(--frost); -webkit-backdrop-filter: var(--frost);
  border: 1px solid var(--bubble-edge); border-radius: 20px;
  transition: border-color 0.25s ease-out, transform 0.25s ease-out;
}
.card::before, .tile::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: linear-gradient(to bottom, var(--glow), transparent 75%); transition: opacity 0.25s ease-out; }
.card:hover, .card:focus-visible, .tile:hover { border-color: var(--bubble-focus); }
.card:hover::before, .card:focus-visible::before, .tile:hover::before { opacity: 0.5; }
.card:hover, .card:focus-visible { transform: translateY(-4px); }

/* Services: three big cards, each a link */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { display: flex; flex-direction: column; min-height: 300px; padding: 36px; }
.card .badge { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center;
               background: var(--cell); color: var(--sky); }
.card .badge .icon { width: 38px; height: 38px; stroke-width: 1.6; }
.card h3 { margin: auto 0 0; padding-top: 40px; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; color: var(--title); }
.card .go { position: absolute; top: 36px; right: 36px; width: 26px; height: 26px; color: var(--sky);
            transition: transform 0.25s ease-out; }
.card:hover .go { transform: translateX(4px); }
.card .chips { display: flex; gap: 10px; margin-top: 18px; color: var(--muted); }
.card .chips .icon { width: 20px; height: 20px; }

/* What's included: icon tiles */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile { display: flex; align-items: center; gap: 20px; padding: 28px; font-size: 18px; font-weight: 500; }
.tile .badge { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; flex: none;
               background: var(--cell); color: var(--sky); }
.tile .badge .icon { width: 28px; height: 28px; }

/* How it works: three numbered steps joined by a faint line */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
         counter-reset: step; position: relative; }
.step { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 44px 24px 40px;
        text-align: center; font-size: 19px; font-weight: 600; color: var(--title); counter-increment: step; }
.step::after { content: counter(step, decimal-leading-zero); position: absolute; top: 18px; left: 22px;
               font-size: 13px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); }
.step .icon { width: 44px; height: 44px; color: var(--sky); stroke-width: 1.6; }
.step.done { border-color: var(--bubble-focus); }
.step.done::after { content: "✓"; color: var(--ok); font-size: 16px; }

/* Why us: a row of icons with one-word labels */
.why { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.why li { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
          font-size: 17px; font-weight: 500; }
.why .icon { width: 40px; height: 40px; color: var(--sky); stroke-width: 1.6; }

/* Closing call to action */
.band { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
        padding: 56px 64px; border-radius: 28px;
        background: radial-gradient(120% 140% at 0% 0%, var(--art-glow), transparent 60%), var(--bubble); }
.band h2 { margin: 0; text-align: left; }

/* ---- Footer ---- */
footer { margin-top: 112px; border-top: 1px solid var(--bubble-edge); }
footer .wrap { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; flex-wrap: wrap;
               padding-top: 48px; padding-bottom: 48px; }
footer .logo img { height: 24px; }
footer .copy { margin-top: 18px; font-size: 13px; color: var(--muted); }
.foot-links { display: flex; gap: 72px; flex-wrap: wrap; }
.foot-links h4 { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.foot-links a { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 15px; opacity: 0.8;
                transition: opacity 0.15s ease-out, color 0.15s ease-out; }
.foot-links a:hover { opacity: 1; color: var(--sky); }
.foot-links .icon { width: 18px; height: 18px; color: var(--sky); }

/* ---- Submit a Data Request: icon choices (checkboxes and radios drawn as pills), then contact fields ---- */
.request { padding-top: 40px; }
.request h1 { margin: 0 0 24px; text-align: center; font-size: clamp(36px, 5vw, 60px); font-weight: 600; line-height: 1.08;
              letter-spacing: -0.03em; color: var(--title); text-shadow: 0 0 24px var(--title-glow); }
.promise { list-style: none; margin: 0 0 48px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px;
           font-size: 15px; font-weight: 500; color: var(--sky); }
.promise li { display: flex; align-items: center; gap: 8px; }
.promise .icon { width: 20px; height: 20px; }
.form { max-width: 900px; margin: 0 auto; display: grid; gap: 44px; padding: 44px;
        background: var(--bubble); backdrop-filter: var(--frost); -webkit-backdrop-filter: var(--frost);
        border: 1px solid var(--bubble-edge); border-radius: 28px; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.q { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 0;
     font-size: 19px; font-weight: 600; color: var(--title); }
.q .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none;
        background: var(--cell); color: var(--sky); font-size: 13px; }
.opts { display: flex; flex-wrap: wrap; gap: 10px; }
.opts.big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.need-group + .need-group { margin-top: 10px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt span { display: flex; align-items: center; gap: 9px; height: 100%; padding: 10px 18px 10px 14px; border-radius: 999px;
            border: 1px solid var(--bubble-edge); background: var(--bubble); font-size: 15px; font-weight: 500;
            transition: background-color 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out; }
.opt span .icon { width: 18px; height: 18px; color: var(--sky); transition: color 0.15s ease-out; }
.opt:hover span { border-color: var(--bubble-focus); }
.opt input:checked + span { background: var(--sky); border-color: var(--sky); color: var(--on-accent); }
.opt input:checked + span .icon { color: var(--on-accent); }
.opt input:focus-visible + span { outline: 2px solid var(--sky); outline-offset: 3px; }
.opts.big .opt span { flex-direction: column; justify-content: center; gap: 14px; padding: 28px 16px; border-radius: 20px;
                      font-size: 17px; font-weight: 600; }
.opts.big .opt span .icon { width: 36px; height: 36px; stroke-width: 1.6; }
.fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
         text-transform: uppercase; color: var(--muted); }
.field.wide { margin-top: 22px; }
.field input, .field textarea { font: inherit; font-size: 16px; font-weight: 400; letter-spacing: 0; text-transform: none;
         color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--bubble-edge);
         padding: 10px 0; outline: none; transition: border-color 0.15s ease-out; }
.field textarea { resize: vertical; min-height: 104px; padding: 14px 16px; border: 1px solid var(--bubble-edge);
                  border-radius: 14px; background: var(--bubble); }
.field input:focus, .field textarea:focus { border-color: var(--sky); }
.field ::placeholder { color: var(--placeholder); }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.submit-row { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.form-error { margin: 0; min-height: 1.5em; font-size: 15px; color: var(--bad); }
.pill:disabled { opacity: 0.6; cursor: wait; }
button.pill { font-family: inherit; cursor: pointer; }
.sent { display: flex; flex-direction: column; align-items: center; padding: 24px 0 0; }
.sent .seal { position: relative; margin-bottom: 32px; }
.sent h2 { margin: 0 0 10px; }
.sent .num { margin: 0 0 48px; font-size: 15px; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); }
.sent .steps { width: 100%; }

/* ---- Insights: cards for the most popular Substack posts (insights.js) ---- */
.stories-page { display: flex; flex-direction: column; align-items: center; padding-top: 40px; }
.stories-page h1 { margin: 0 0 56px; text-align: center; font-size: clamp(36px, 5vw, 60px); font-weight: 600; line-height: 1.08;
                   letter-spacing: -0.03em; color: var(--title); text-shadow: 0 0 24px var(--title-glow); }
.stories-page h1 em { font-style: normal; color: var(--sky); }
.stories-page > .cta { margin-top: 48px; }
.stories-page .section { width: 100%; padding-bottom: 0; }
.stories { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.story { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column;
         background: var(--bubble); backdrop-filter: var(--frost); -webkit-backdrop-filter: var(--frost);
         border: 1px solid var(--bubble-edge); border-radius: 20px;
         transition: border-color 0.25s ease-out, transform 0.25s ease-out; }
a.story:hover, a.story:focus-visible { border-color: var(--bubble-focus); transform: translateY(-4px); }
.story-img { aspect-ratio: 16 / 9; background: var(--cell); overflow: hidden; }
.story-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease-out; }
a.story:hover .story-img img { transform: scale(1.04); }
.story-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 26px; }
.story h3 { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; color: var(--title); }
.story time { font-size: 13px; color: var(--muted); }
.story.loading .story-body b { height: 12px; width: 80%; border-radius: 6px; background: var(--cell); }
.story.loading .story-body b + b { width: 40%; height: 8px; }
.story.loading { animation: pulse 1.6s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: 0.5; } }
.stories-empty { display: flex; flex-direction: column; align-items: center; padding: 24px 0 8px; }
.stories-empty .seal { position: relative; margin-bottom: 28px; }
.stories-empty h2 { margin: 0; }

/* ---- Illustrations: frosted panels with bars standing in for text, floating gently ---- */
.art { position: relative; width: 100%; max-width: 600px; aspect-ratio: 1 / 0.9; margin-left: auto; }
.art::before { content: ""; position: absolute; inset: 10%; border-radius: 50%; z-index: -1;
               background: radial-gradient(closest-side, var(--art-glow), transparent); filter: blur(30px); }
.mock { position: absolute; padding: 20px; border-radius: 18px; border: 1px solid var(--bubble-edge);
        background: var(--bubble-strong); backdrop-filter: var(--frost); -webkit-backdrop-filter: var(--frost);
        box-shadow: 0 40px 80px -40px var(--art-glow); animation: float 9s ease-in-out infinite alternate; }
.mock:nth-child(2) { animation-delay: -3s; animation-duration: 11s; }
.mock:nth-child(3) { animation-delay: -6s; animation-duration: 10s; }
@keyframes float { to { transform: translateY(-14px); } }

.dots { display: flex; gap: 6px; margin-bottom: 16px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--cell-strong); opacity: 0.6; }

.rows { display: grid; }
.row { display: grid; grid-template-columns: 1.5fr 1fr 0.7fr; gap: 12px; align-items: center; padding: 11px 0;
       border-bottom: 1px solid var(--bubble-edge); }
.row:last-child { border-bottom: 0; }
.row b { height: 8px; border-radius: 4px; background: var(--cell); }
.row b:first-child { background: var(--cell-strong); }
.row b:last-child { justify-self: end; width: 70%; }
.row.head b { background: var(--sky); opacity: 0.55; height: 7px; }
.row.total b { background: var(--sky); opacity: 0.9; }
.row.bad { background: var(--bad-soft); border-radius: 6px; padding-left: 8px; padding-right: 8px; margin: 0 -8px; }
.row.skew b:nth-child(1) { width: 60%; margin-left: 30%; }
.row.skew b:nth-child(2) { width: 120%; }
.row.skew b:nth-child(3) { width: 40%; justify-self: start; }

.cols { display: flex; align-items: flex-end; gap: 10px; height: 130px; }
.cols i { flex: 1; height: var(--h); border-radius: 5px 5px 2px 2px; background: var(--chart); opacity: 0.85; }
.cols i:nth-child(odd) { opacity: 0.6; }

.ask { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 999px;
       border: 1px solid var(--bubble-focus); background: var(--bubble); color: var(--sky); }
.ask .icon { width: 18px; height: 18px; }
.ask b { flex: 1; height: 8px; border-radius: 4px; background: var(--cell-strong); max-width: 70%; }
.ask .send { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
             background: var(--sky); color: var(--on-accent); }
.ask .send .icon { width: 16px; height: 16px; }

.chip-row { display: flex; gap: 10px; margin-top: 16px; }
.chip { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px;
        background: var(--cell); color: var(--sky); }
.chip .icon { width: 16px; height: 16px; }
.chip b { width: 44px; height: 6px; border-radius: 3px; background: var(--cell-strong); }

.seal { position: absolute; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
        background: var(--sky); color: var(--on-accent); box-shadow: 0 0 0 8px var(--cell), 0 20px 50px -10px var(--glow);
        animation: float 7s ease-in-out infinite alternate; }
.seal .icon { width: 30px; height: 30px; stroke-width: 2.4; }
.seal.bad { background: var(--bad); }
.flow { position: absolute; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
        background: var(--bubble-strong); border: 1px solid var(--bubble-focus); color: var(--sky); z-index: 2; }

.kpi { display: flex; flex-direction: column; gap: 12px; }
.kpi .num { height: 26px; width: 70%; border-radius: 6px; background: var(--chart); opacity: 0.9; }
.kpi .lbl { height: 7px; width: 45%; border-radius: 4px; background: var(--cell); }
.kpi .up { display: flex; align-items: center; gap: 6px; color: var(--ok); }
.kpi .up .icon { width: 18px; height: 18px; }
.kpi .up b { width: 34px; height: 6px; border-radius: 3px; background: var(--ok); opacity: 0.6; }

/* ---- Fade sections in as they scroll into view (site.js adds .in) ---- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---- Space background (site.js): drifting colour patches, stars, meteors on Home ---- */
.space-layer { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.space-layer::before {
  content: ""; position: absolute; inset: -25%;
  background:
    radial-gradient(var(--p1, 38% 32% at 22% 30%), var(--p1-colour, var(--nebula-1)), transparent 70%),
    radial-gradient(var(--p2, 34% 30% at 78% 24%), var(--p2-colour, var(--nebula-2)), transparent 70%),
    radial-gradient(var(--p3, 42% 36% at 60% 78%), var(--p3-colour, var(--nebula-3)), transparent 70%),
    radial-gradient(var(--p4, 30% 28% at 18% 80%), var(--p4-colour, var(--nebula-2)), transparent 70%);
  animation: nebula 60s ease-in-out infinite alternate; animation-delay: var(--drift-start, 0s); }
@keyframes nebula {
  50%  { transform: translate(-4%, 3%) scale(1.08) rotate(4deg); filter: hue-rotate(-18deg); }
  100% { transform: translate(3%, -2%) scale(1.04) rotate(-3deg); filter: hue-rotate(14deg); }
}
.stars { position: absolute; top: 0; left: 0; width: 1px; height: 1px; border-radius: 50%; transform-origin: 0 0; }
.stars-dim { opacity: 0.45; }
.stars-bright { opacity: 0.8; transform: scale(1.6); }
.stars-twinkle { opacity: 0.1; transform: scale(1.4); will-change: opacity;
                 animation: twinkle 4s ease-in-out infinite alternate; }
@keyframes twinkle { 70% { opacity: 0.55; } 100% { opacity: 1; } }

.meteor-layer { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.meteor { position: absolute; width: var(--len); height: 2px; border-radius: 2px; opacity: 0;
          background: linear-gradient(90deg, transparent, var(--meteor-head));
          filter: drop-shadow(0 0 6px var(--meteor-glow));
          transform-origin: left center; transform: rotate(var(--angle)) translateX(0);
          animation: meteor var(--dur) ease-out forwards; }
@keyframes meteor {
  12%, 70% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--angle)) translateX(var(--dist)); }
}

/* ---- Smaller windows ---- */
@media (max-width: 1100px) {
  .grid, .steps, .stories { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 48px; padding-top: 40px; text-align: center; }
  .hero .actions { justify-content: center; }
  .art { margin: 0 auto; }
  .cards, .steps { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .fields { grid-template-columns: 1fr; }
  .form { padding: 32px 24px; }
  .card { min-height: 0; flex-direction: row; align-items: center; gap: 24px; padding: 28px; }
  .card h3 { margin: 0; padding: 0; }
  .card .chips { display: none; }
  .card .go { position: static; margin-left: auto; order: 3; }
  .step { flex-direction: row; justify-content: flex-start; padding: 28px 28px 28px 64px; text-align: left; }
  .step::after { top: 50%; transform: translateY(-50%); }
  .why { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .band { padding: 44px 32px; justify-content: center; text-align: center; }
  .band h2 { text-align: center; }
}
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .top .wrap { height: 64px; }
  .menu-btn { display: flex; }
  .tabs { display: none; position: absolute; top: calc(100% - 4px); right: var(--gutter);
          flex-direction: column; align-items: stretch; gap: 0; min-width: 220px; padding: 8px;
          background: var(--menu-bg); backdrop-filter: var(--frost); -webkit-backdrop-filter: var(--frost);
          border: 1px solid var(--bubble-edge); border-radius: 14px; }
  .tabs.open { display: flex; }
  .tabs a { padding: 12px 14px; }
  .tabs .pill { margin-top: 6px; }
  .section { padding-top: 72px; padding-bottom: 72px; }
  h2 { margin-bottom: 36px; }
  .grid, .stories { grid-template-columns: 1fr; gap: 12px; }
  .tile { padding: 18px 20px; font-size: 17px; }
  .tile .badge { width: 48px; height: 48px; }
  .mock { padding: 14px; border-radius: 14px; }
  .row { padding: 8px 0; gap: 8px; }
  .cols { height: 90px; gap: 7px; }
  .seal { width: 50px; height: 50px; }
  .seal .icon { width: 24px; height: 24px; }
  .flow { width: 42px; height: 42px; }
  footer { margin-top: 72px; }
  .foot-links { gap: 48px; }
}
@media (max-width: 420px) {
  :root { --gutter: 16px; }
  .hero .actions .pill { width: 100%; }
  .opts.big { grid-template-columns: 1fr; }
  .opts.big .opt span { flex-direction: row; justify-content: flex-start; padding: 18px 20px; }
  .opts.big .opt span .icon { width: 28px; height: 28px; }
  .form { padding: 28px 18px; border-radius: 22px; }
  .chip-row { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .meteor { display: none; }
  .space-layer::before, .stars-twinkle, .mock, .seal, .story.loading { animation: none; }
  .card, .tile, .card::before, .tile::before, .js .reveal { transition: none; }
  .card:hover, .card:focus-visible { transform: none; }
  .js .reveal { opacity: 1; transform: none; }
}
