/* Ewald site: shared styles for the landing page and the legal pages. */
:root {
  color-scheme: light;
  --bg: #f9f9f7; --panel: #ffffff; --sunken: #f1f0ec; --line: #e4e3dd;
  --ink: #0b0b0b; --ink2: #52514e; --muted: #6b6963;
  --accent: #2a78d6; --accent-ink: #ffffff; --warm: #c9531f; --good: #0a8f0a;
  --hero-from: #0a0e26; --hero-to: #1e1a5c;
  --ring-a: #7dd3fc; --ring-b: #a78bfa; --spot: #ffe296;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(10, 14, 38, .12);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0d0d; --panel: #161615; --sunken: #111110; --line: #2c2c2a;
    --ink: #f5f5f3; --ink2: #c3c2b7; --muted: #9a988f;
    --accent: #4b93ea; --warm: #e2703f; --good: #22b322;
    --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0d; --panel: #161615; --sunken: #111110; --line: #2c2c2a;
  --ink: #f5f5f3; --ink2: #c3c2b7; --muted: #9a988f;
  --accent: #4b93ea; --warm: #e2703f; --good: #22b322;
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--ring-a); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--panel); color: var(--ink);
        padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 16px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* Navigation */
nav { display: flex; align-items: center; gap: 8px; padding: 18px 0; }
nav .brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 18px;
             letter-spacing: -0.01em; color: inherit; text-decoration: none; }
nav .brand img { width: 34px; height: 34px; }
nav .spacer { flex: 1; }
nav .links { display: none; gap: 4px; }
nav .links a { color: inherit; text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px;
               border-radius: 8px; opacity: .85; }
nav .links a:hover { opacity: 1; background: rgba(127, 127, 127, .14); }
@media (min-width: 820px) { nav .links { display: flex; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px;
  padding: 11px 18px; font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--panel); }
.btn-lg { padding: 14px 22px; font-size: 16px; }

/* Hero */
header.hero {
  background: radial-gradient(120% 90% at 50% 0%, #3b33b8 0%, transparent 60%),
              linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: #fff; overflow: hidden; position: relative;
}
header.hero::before { /* faint reciprocal lattice */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .22;
  background-image: radial-gradient(circle, #5666b4 1.6px, transparent 2px);
  background-size: 44px 44px; background-position: center top;
  -webkit-mask-image: radial-gradient(80% 70% at 50% 30%, #000 20%, transparent 75%);
          mask-image: radial-gradient(80% 70% at 50% 30%, #000 20%, transparent 75%);
}
header.hero .wrap { position: relative; }
header.hero .btn-ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: #fff; }
header.hero .btn-primary { background: #fff; color: #14124a; }
.hero-body { text-align: center; padding: 48px 0 36px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
           color: #ffd9a0; background: rgba(255,179,71,.12); border: 1px solid rgba(255,179,71,.3);
           border-radius: 999px; padding: 4px 12px; }
h1 { font-size: clamp(36px, 6.4vw, 64px); line-height: 1.04; letter-spacing: -0.03em; margin: 18px auto 16px;
     max-width: 900px; text-wrap: balance; }
h1 .glow { background: linear-gradient(90deg, var(--ring-a), var(--ring-b)); -webkit-background-clip: text;
           background-clip: text; color: transparent; }
.lede { font-size: clamp(17px, 2.2vw, 20px); color: #d6d8f5; max-width: 720px; margin: 0 auto 28px; text-wrap: pretty; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.platforms { margin: 18px 0 0; font-size: 14px; color: #aeb1e0; }

/* Film */
.film { margin: 44px auto 0; max-width: 1040px; border-radius: 14px 14px 0 0; overflow: hidden; position: relative;
        box-shadow: 0 -10px 60px rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.14); border-bottom: 0;
        background: #0a0e26; aspect-ratio: 16 / 9; }
.film img, .film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.film img { object-position: top left; }
.film.still { aspect-ratio: 1547 / 784; }
.film video { opacity: 0; transition: opacity .6s ease; }
.film.ready video { opacity: 1; }
.film .sound { position: absolute; right: 14px; bottom: 14px; display: none; align-items: center; gap: 8px;
               background: rgba(10,14,38,.72); color: #fff; border: 1px solid rgba(255,255,255,.25);
               backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.film.ready .sound { display: inline-flex; }
.film .sound[hidden] { display: none; }
.film .sound svg { width: 18px; height: 18px; }

/* Logos / works-with strip */
.works { border-bottom: 1px solid var(--line); background: var(--panel); }
.works .wrap { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; justify-content: center;
               padding-top: 18px; padding-bottom: 18px; color: var(--muted); font-size: 14px; }
.works b { color: var(--ink2); font-weight: 600; }

/* Sections */
section { padding: 80px 0; }
section.tight { padding-top: 0; }
h2 { font-size: clamp(27px, 4vw, 40px); letter-spacing: -0.025em; line-height: 1.12; margin: 0 0 12px; text-wrap: balance; }
h3 { line-height: 1.3; }
.kicker { display: block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
          color: var(--accent); margin-bottom: 10px; }
.sub { color: var(--ink2); max-width: 720px; margin: 0 0 36px; font-size: 18px; text-wrap: pretty; }
.center { text-align: center; }
.center .sub { margin-left: auto; margin-right: auto; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--ink2); font-size: 15px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
       color: var(--muted); background: var(--sunken); border-radius: 6px; padding: 2px 8px; margin-bottom: 10px; }
.tag.free { color: var(--good); }
.card .cost { display: block; margin-top: 12px; font-size: 13px; color: var(--muted); }

/* Feature rows */
.feature { display: grid; gap: 28px; align-items: center; grid-template-columns: 1fr; margin-bottom: 80px; }
.feature:last-child { margin-bottom: 0; }
@media (min-width: 900px) {
  .feature { grid-template-columns: 5fr 7fr; gap: 40px; }
  .feature.flip { grid-template-columns: 7fr 5fr; }
  .feature.flip > :first-child { order: 2; }
}
.feature img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.feature .sub { margin-bottom: 16px; }
.feature ul { padding-left: 18px; color: var(--ink2); margin: 0; }
.feature li { margin: 4px 0; }

/* Loop */
.loop { counter-reset: s; display: grid; gap: 12px; padding: 0; margin: 0; }
.loop li { list-style: none; counter-increment: s; background: var(--panel); border: 1px solid var(--line);
           border-radius: 12px; padding: 14px 16px 14px 58px; position: relative; color: var(--ink2); }
.loop li::before { content: counter(s); position: absolute; left: 16px; top: 13px; width: 28px; height: 28px;
                   border-radius: 50%; background: linear-gradient(135deg, var(--ring-a), var(--ring-b)); color: #14124a;
                   font-weight: 800; font-size: 14px; display: grid; place-items: center; }
.loop b { color: var(--ink); }

/* Reviewer 2 rule chips */
.feature .chips, .chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.chips li { font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--sunken);
            color: var(--ink2); }
.chips li.crit { border-color: color-mix(in srgb, var(--warm) 45%, var(--line)); color: var(--warm); }

/* Privacy band */
.band { background: var(--sunken); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Prior art */
.prior { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .prior { grid-template-columns: 1fr 1fr; } }
.prior ul { margin: 0; padding-left: 18px; color: var(--ink2); }
.prior li { margin: 6px 0; }

/* Pricing */
.pricing { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.plan { display: flex; flex-direction: column; }
.plan .tag { align-self: flex-start; }
.plan .price { font-size: 36px; font-weight: 750; letter-spacing: -0.02em; margin: 4px 0 2px; line-height: 1.1; }
.plan .price small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .alt { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.plan ul { padding-left: 18px; color: var(--ink2); font-size: 15px; margin: 14px 0 0; }
.plan li { margin: 4px 0; }
.plan.featured { border: 2px solid var(--accent); position: relative; }
.plan .badge { position: absolute; top: -12px; right: 16px; background: var(--accent); color: var(--accent-ink);
               font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.founding { margin-top: 20px; display: flex; gap: 14px; align-items: flex-start; border: 1px dashed var(--line);
            border-radius: var(--radius); padding: 16px 18px; background: var(--panel); }
.founding .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 8px; background: var(--spot);
                 box-shadow: 0 0 0 4px rgba(255, 138, 61, .22); }
.founding p { margin: 0; color: var(--ink2); }
.note { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 28px 16px 0; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 13px; font-size: 22px; font-weight: 400;
                      color: var(--muted); line-height: 1.2; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--ink2); }

/* Beta CTA */
.apply { text-align: center; padding: 48px 20px;
         background: radial-gradient(90% 120% at 50% 0%, rgba(59,51,184,.55), transparent 70%),
                     linear-gradient(135deg, var(--hero-from), var(--hero-to));
         color: #fff; border: 0; }
.apply h2 { color: #fff; }
.apply .sub { color: #d6d8f5; margin: 0 auto 24px; }
.apply .btn-primary { background: #fff; color: #14124a; }
.apply .small { font-size: 14px; color: #aeb1e0; margin: 16px 0 0; }
.apply .small a { color: #d6d8f5; }

/* Footer */
footer { padding: 36px 0 56px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
footer .spacer { flex: 1; }
footer a { color: var(--ink2); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* Legal / simple pages */
.page-head { background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); color: #fff; }
.page-head nav .brand { color: #fff; }
.page-head .btn-ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: #fff; }
.page-head .title { padding: 28px 0 44px; }
.page-head h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 6px; text-align: left; max-width: none; }
.page-head p { margin: 0; color: #c9ccef; }
.legal { padding: 48px 0 72px; }
.legal h2 { font-size: 22px; letter-spacing: -0.01em; margin: 36px 0 8px; }
.legal p, .legal li { color: var(--ink2); }
.legal ul { padding-left: 20px; }
.legal .summary { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.legal .summary p { margin: 0; }
.hero-body.notfound { padding: 12vh 0 18vh; }

/* downloads */
.downloads { margin-top: 28px; }
.downloads .card { display: flex; flex-direction: column; gap: 8px; }
.downloads .card p { flex: 1; }
.downloads .dl { flex: 0; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.downloads code { font-size: 13px; }
#download .note { margin-top: 18px; color: var(--muted); font-size: 14px; }
#download .note a { color: var(--accent); }
#download .soon { display: none; }
#download[data-open="false"] .soon { display: block; margin-top: 14px; font-weight: 600; color: var(--ink); }
#download[data-open="false"] .soon a { color: var(--accent); }
#download[data-open="false"] .downloads, #download[data-open="false"] .note { display: none; }
#download .feedback { margin-top: 10px; font-size: 15px; color: var(--ink2); }
#download .feedback a { color: var(--accent); font-weight: 600; }
.downloads .card p.dl { flex: 0 0 auto; align-items: center; margin-top: auto; padding-top: 8px; }
