/* Elsonia website. Plain CSS, no build step, no external fonts or trackers. */

:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f2f0ea;
  --ink: #1b1f2a;
  --ink-2: #4a5160;
  --ink-3: #6b7280;
  --line: #e4e1d8;
  --brand: #3b3486;        /* deep indigo */
  --brand-ink: #ffffff;
  --brand-soft: #ecebf8;
  --accent: #1f8a70;       /* calm green: "covered / safe" */
  --accent-soft: #e3f3ee;
  --shadow: 0 1px 2px rgb(20 20 40 / 6%), 0 8px 24px rgb(20 20 40 / 8%);
  --radius: 16px;
  --max: 1080px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12131a;
    --surface: #1a1c25;
    --surface-2: #20232e;
    --ink: #eceef3;
    --ink-2: #b9bfcc;
    --ink-3: #8d94a3;
    --line: #2c303d;
    --brand: #8f87ff;
    --brand-ink: #12131a;
    --brand-soft: #25244a;
    --accent: #4cc9a4;
    --accent-soft: #17332c;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.logo svg { width: 32px; height: 32px; }
.nav { display: flex; gap: 22px; font-size: 16px; }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 999px; font-weight: 600; font-size: 17px; text-decoration: none; border: 0; cursor: pointer; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn[aria-disabled="true"] { cursor: default; }
.btn svg { width: 20px; height: 20px; }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; background: var(--brand-soft); color: var(--brand); font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 18px; }
.lead { font-size: 20px; color: var(--ink-2); margin: 0 0 28px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { font-size: 15px; color: var(--ink-3); margin-top: 14px; }
@media (max-width: 860px) {
  .hero { padding-top: 40px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
}

/* Phone mockups */
.phones { display: flex; justify-content: center; gap: 20px; }
.phone { margin: 0; width: min(240px, 44vw); }
.phone-frame { position: relative; border-radius: 30px; padding: 8px; background: #0d0f14; box-shadow: var(--shadow); }
/* Before/after screens: a vertical feed that both phones scroll in step (site.js). */
.screen { border-radius: 23px; overflow: hidden; aspect-ratio: 600 / 1299; background: #222; }
.feed { transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1); }
.feed img { width: 100%; aspect-ratio: 600 / 1299; object-fit: cover; }
/* How much the "before" screen is blurred. 0px = not blurred; ~2.4px is about 1% of the screen width (14px ≈ 6%). */
:root { --before-blur: 9px; }
.tag, .reveal { z-index: 2; }
.screen.blurred img { filter: blur(var(--before-blur)); }
.phone figcaption { text-align: center; margin-top: 12px; font-weight: 600; font-size: 16px; }
.phone figcaption small { display: block; font-weight: 400; color: var(--ink-3); font-size: 14px; }
.tag { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.tag-off { background: rgb(255 255 255 / 85%); color: #1b1f2a; }
.tag-on { background: var(--accent); color: #fff; }
.reveal { position: absolute; inset: auto 16px 18px; padding: 10px; border-radius: 12px; border: 0; background: rgb(255 255 255 / 90%); color: #1b1f2a; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.reveal[hidden] { display: none; }
.phones { align-items: center; }
.arrow { flex: none; width: 44px; height: 44px; margin-bottom: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.arrow svg { width: 24px; height: 24px; }
@media (max-width: 520px) {
  .phones { gap: 8px; }
  .phone { width: 39vw; }
  .arrow { width: 30px; height: 30px; }
  .arrow svg { width: 18px; height: 18px; }
  .tag { font-size: 11px; padding: 3px 8px; top: 14px; }
  .reveal { inset: auto 10px 12px; }
}

/* "Works in" logo row */
.works-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: -8px 0 28px; }
.works-in > span { font-size: 15px; font-weight: 600; color: var(--ink-3); }
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; list-style: none; margin: 0; padding: 0; }
.logos svg { width: 26px; height: 26px; fill: var(--ink-2); display: block; }
.logos .more { font-size: 15px; color: var(--ink-3); }

/* Sections */
section { padding: 56px 0; }
.section-alt { background: var(--surface-2); }
h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 14px; }
.section-intro { color: var(--ink-2); font-size: 19px; margin: 0 0 32px; max-width: 40em; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; counter-increment: step; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-weight: 700; margin-bottom: 14px; }
.steps h3, .cards h3 { margin: 0 0 6px; font-size: 20px; }
.steps p, .cards p { margin: 0; color: var(--ink-2); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

.apps { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.apps li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 16px; }
.muted { color: var(--ink-3); font-size: 16px; }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card .icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.card .icon svg { width: 22px; height: 22px; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }

.promise { background: var(--brand); color: var(--brand-ink); border-radius: 24px; padding: 40px; }
.promise h2 { color: inherit; }
.promise ul { margin: 16px 0 0; padding-left: 22px; }
.promise li { margin: 6px 0; }
.promise a { color: inherit; }
@media (max-width: 640px) { .promise { padding: 28px 22px; } }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--ink-2); }

/* Legal pages */
.doc { padding: 48px 0 64px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); }
.doc h2 { font-size: 24px; margin-top: 36px; }
.doc p, .doc li { color: var(--ink-2); }
.doc .updated { color: var(--ink-3); font-size: 16px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 12px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--ink); background: var(--surface-2); }
.table-scroll { overflow-x: auto; }
.callout { background: var(--accent-soft); border-radius: 12px; padding: 16px 20px; margin: 20px 0; color: var(--ink); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 15px; color: var(--ink-3); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
