/* SWELL site. Light by default, dark when the device asks for it (prefers-color-scheme).
   System fonts only: the site loads nothing from other origins (see the CSP in _headers). */
:root {
  color-scheme: light dark;
  --bg: #f3f7fc;
  --bg-2: #e8f0fa;
  --surface: #ffffff;
  --surface-2: #f7fafe;
  --text: #0a1a33;
  --muted: #45566f;
  --faint: #56657c;
  --line: rgba(10, 26, 51, 0.11);
  --accent: #0a62d6;
  --accent-2: #006a85;
  --accent-ink: #ffffff;
  --btn: #0a62d6;
  --link: #0a5cc8;
  --glow: rgba(10, 98, 214, 0.18);
  --shadow: 0 18px 50px rgba(10, 30, 70, 0.12);
  --grad: linear-gradient(100deg, #0a62d6, #00a3cc);
  --tag-bg: rgba(10, 98, 214, 0.08);
  --tag-line: rgba(10, 98, 214, 0.22);
  --ok: #0a7a52;
  --no: #b2332d;
  --max: 1120px;
  --radius: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #030c1c;
    --bg-2: #061733;
    --surface: rgba(255, 255, 255, 0.045);
    --surface-2: rgba(255, 255, 255, 0.03);
    --text: #eef5ff;
    --muted: rgba(226, 238, 255, 0.74);
    --faint: rgba(226, 238, 255, 0.52);
    --line: rgba(255, 255, 255, 0.11);
    --accent: #2f8cff;
    --btn: #1a6ee6;   /* white text on it: 4.75:1 */
    --accent-2: #3fd2ff;
    --link: #5cc8ff;
    --glow: rgba(47, 140, 255, 0.35);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    --grad: linear-gradient(100deg, #7fdcff, #2f8cff);
    --tag-bg: rgba(63, 210, 255, 0.1);
    --tag-line: rgba(63, 210, 255, 0.3);
    --ok: #4fd69c;
    --no: #ff8a80;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 88% -12%, var(--glow), transparent 62%),
    radial-gradient(800px 520px at -12% 28%, rgba(0, 163, 204, 0.1), transparent 62%);
  background-repeat: no-repeat;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -0.022em; line-height: 1.12; text-wrap: balance; }
p { text-wrap: pretty; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 12px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
}
.top.scrolled { border-bottom-color: var(--line); }
.top-in { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 19px; letter-spacing: 0.06em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 9px; }
.top-links { display: flex; align-items: center; gap: 22px; }
.top-links a:not(.btn) { color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; }
.top-links a:not(.btn):hover, .top-links a[aria-current="page"] { color: var(--text); text-decoration: none; }
.menu { display: none; position: relative; }
.menu > summary { list-style: none; cursor: pointer; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; font-size: 15px; color: var(--text); background: var(--surface); }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 8px; margin: 0; list-style: none; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.menu-list a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--text); font-weight: 600; }
.menu-list a:hover { background: var(--surface-2); text-decoration: none; }
@media (max-width: 760px) {
  .top-links { display: none; }
  .menu { display: block; }
  .top-in { padding: 12px 16px; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 14px;
  font: inherit; font-weight: 700; font-size: 16px; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--btn); color: var(--accent-ink); box-shadow: 0 8px 24px var(--glow); }
.btn-primary:hover { background: color-mix(in srgb, var(--btn) 90%, black); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14.5px; border-radius: 999px; box-shadow: none; }
.btn svg { width: 18px; height: 18px; }

/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--line); }
.kicker { color: var(--accent-2); font-weight: 700; font-size: 13.5px; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 12px; }
.h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; }
.intro { color: var(--muted); font-size: clamp(16px, 1.9vw, 18.5px); max-width: 40em; margin: 14px 0 0; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Hero */
.hero { max-width: var(--max); margin: 0 auto; padding: 40px 20px 80px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(44px, 7vw, 80px); font-weight: 900; letter-spacing: -0.035em; }
.lede { color: var(--muted); font-size: clamp(17px, 2vw, 20px); max-width: 32em; margin: 22px 0 10px; }
.lede-plain { color: var(--faint); font-size: 15.5px; margin: 0 0 28px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding: 0; list-style: none; }
.chips li { font-size: 13.5px; font-weight: 600; color: var(--muted); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art .wave {
  position: absolute; inset: 6% -10% 6% -6%; border-radius: 40px; overflow: hidden; opacity: 0.9;
  background: url(/assets/wave.jpg) center / cover no-repeat;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent);
  mask-image: radial-gradient(closest-side, #000 55%, transparent);
}
.phone {
  position: relative; width: min(300px, 74vw); aspect-ratio: 506 / 1100;
  border-radius: 46px; padding: 9px;
  background: linear-gradient(145deg, #2b3546, #0b1019);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 38px; background: #000; }
@media (prefers-color-scheme: light) { .hero-art .wave { opacity: 0.6; } .phone { background: linear-gradient(145deg, #dfe6ef, #b9c4d3); box-shadow: 0 40px 80px rgba(10, 30, 70, 0.22), 0 0 0 1px rgba(10, 26, 51, 0.1) inset; } }

/* Journey strip */
.journey { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 6px; margin: 30px 0 0; padding: 18px; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.journey li { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; }
.journey li span { font-weight: 500; color: var(--faint); font-size: 13.5px; }
.journey li + li::before { content: "→"; color: var(--faint); margin-right: 6px; font-weight: 400; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; counter-reset: s; }
.step { position: relative; padding: 26px 24px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); counter-increment: s; }
.step::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--btn); color: #fff; font-weight: 800; margin-bottom: 14px; }
.step h3 { font-size: 20px; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card .name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-2); }
.card h3 { font-size: 19px; margin: 10px 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; color: var(--accent-2); background: var(--tag-bg); border: 1px solid var(--tag-line); }
.tag.dim { color: var(--faint); background: transparent; border-color: var(--line); }

/* Split (text + picture) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split .shots { display: flex; gap: 16px; justify-content: center; }
.split .shots .phone { width: min(230px, 40vw); border-radius: 36px; padding: 7px; }
.split .shots .phone img { border-radius: 30px; }
.split .shots .phone:nth-child(2) { margin-top: 48px; }
.checks { list-style: none; padding: 0; margin: 22px 0 0; }
.checks li { position: relative; padding: 8px 0 8px 32px; color: var(--muted); }
.checks li strong { color: var(--text); }
.checks li::before { content: ""; position: absolute; left: 0; top: 12px; width: 20px; height: 20px; border-radius: 50%; background: var(--tag-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%2300a3cc' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; border: 1px solid var(--tag-line); }

/* Platforms */
.platforms { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 32px; }
.plat { padding: 20px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.plat svg { width: 30px; height: 30px; color: var(--text); }
.plat h3 { font-size: 17px; }
.plat p { margin: 0; color: var(--muted); font-size: 14px; }
.plat .tag { align-self: flex-start; }

/* Download page cards */
.dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 32px; }
.dl .plat { padding: 26px; gap: 10px; }
.dl .plat h2 { font-size: 22px; }
.dl .plat p { font-size: 15.5px; }
.dl .plat ul { margin: 4px 0 0; padding-left: 20px; color: var(--muted); font-size: 15px; }
.dl .plat .btn { align-self: flex-start; margin-top: 8px; }
.dl .plat.wide { grid-column: 1 / -1; }

/* Security page */
.algos { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); font-size: 15.5px; }
.algos th, .algos td { text-align: left; padding: 16px 18px; vertical-align: top; border-bottom: 1px solid var(--line); }
.algos tr:last-child td { border-bottom: 0; }
.algos thead th { font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); background: var(--surface-2); }
.algos td:first-child { font-weight: 700; white-space: nowrap; }
.algos td { color: var(--muted); }
.algos td:first-child, .algos td:nth-child(2) { color: var(--text); }
.seecant { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.box { padding: 24px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.box h3 { font-size: 19px; display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.box ul { margin: 0; padding-left: 20px; color: var(--muted); }
.box li { margin: 8px 0; }
.box li strong { color: var(--text); }
.box.cant h3::before, .box.can h3::before { content: ""; width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto; }
.box.cant h3::before { background: var(--ok); }
.box.can h3::before { background: var(--accent-2); }
.note { margin-top: 26px; padding: 20px 24px; border-radius: var(--radius); border: 1px dashed var(--tag-line); background: var(--tag-bg); color: var(--muted); font-size: 15.5px; }
.note strong { color: var(--text); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }

/* Long-form documents: privacy, support, guide */
.doc { max-width: 780px; margin: 0 auto; padding: 36px 20px 80px; }
.doc .crumbs { color: var(--faint); font-size: 14.5px; margin: 0 0 14px; }
.doc .crumbs a { color: var(--faint); }
.doc h1 { font-size: clamp(34px, 5vw, 48px); font-weight: 900; }
.doc .meta { color: var(--faint); margin: 10px 0 26px; font-size: 15px; }
.doc h2 { font-size: 23px; margin: 42px 0 10px; }
.doc h3 { font-size: 18px; margin: 26px 0 6px; }
.doc p, .doc li { color: var(--muted); font-size: 16.5px; }
.doc strong { color: var(--text); }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .lede { margin-top: 14px; }
.doc.intro-wide { max-width: var(--max); padding-bottom: 8px; }
.doc.intro-wide .lede { max-width: 40em; }
.doc.intro-wide + .section { border-top: 0; padding-top: 40px; }
.doc .toc, .toc { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 20px 0 8px; list-style: none; }
.toc a { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14.5px; }
.toc a:hover { text-decoration: none; background: var(--surface-2); }
.gstep { display: grid; grid-template-columns: 1fr 200px; gap: 28px; align-items: start; margin: 26px 0; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.gstep h3 { margin: 0 0 8px; font-size: 20px; }
.gstep ol, .gstep ul { margin: 8px 0 0; }
.gstep .phone { width: 200px; border-radius: 30px; padding: 6px; }
.gstep .phone img { border-radius: 25px; }
.gstep.noshot { grid-template-columns: 1fr; }
.ui { font-weight: 700; color: var(--text); white-space: nowrap; }
.contact { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 22px 0; }
.contact .box p { margin: 6px 0 0; font-size: 15.5px; }
details.faq { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); margin: 10px 0; }
details.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 700; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--faint); font-weight: 400; font-size: 22px; line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq > div { padding: 0 20px 14px; }
details.faq p { margin: 0 0 10px; font-size: 15.5px; }

/* Closer */
.closer { text-align: center; padding: 80px 20px 88px; }
.closer img { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 18px; box-shadow: var(--shadow); }
.closer h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.closer p { color: var(--muted); font-size: 18px; margin: 10px auto 26px; max-width: 32em; }
.closer .cta { justify-content: center; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 34px 20px 44px; color: var(--faint); font-size: 14px; }
.foot-in { max-width: calc(var(--max) - 40px); margin: 0 auto; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot a { color: var(--muted); }
.foot .fine { max-width: calc(var(--max) - 40px); margin: 16px auto 0; font-size: 12.5px; }

/* Tablet */
@media (max-width: 1000px) {
  .platforms { grid-template-columns: repeat(3, 1fr); }
  .cards, .facts { grid-template-columns: repeat(2, 1fr); }
}
/* Phone */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 20px 20px 56px; text-align: center; }
  .lede { margin-left: auto; margin-right: auto; }
  .cta, .chips { justify-content: center; }
  .section { padding: 52px 0; }
  .steps, .cards, .facts, .seecant, .dl, .contact, .split { grid-template-columns: 1fr; }
  .split { gap: 32px; }
  .platforms { grid-template-columns: repeat(2, 1fr); }
  .gstep { grid-template-columns: 1fr; }
  .gstep .phone { width: 180px; margin: 0 auto; }
  .ui { white-space: normal; }
  .algos, .algos tbody, .algos tr, .algos td { display: block; }
  .algos thead { display: none; }
  .algos tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .algos tr:last-child { border-bottom: 0; }
  .algos td { border: 0; padding: 4px 18px; }
  .algos td:first-child { padding-top: 10px; }
  .algos td:last-child { padding-bottom: 12px; }
  .journey { flex-direction: column; gap: 2px; }
  .journey li { flex-direction: column; gap: 0; }
  .journey li + li::before { content: "↓"; margin: 0 0 2px; }
}
@media (max-width: 420px) {
  .plat { padding: 16px 14px; }
  .cta .btn { width: 100%; }
  .split .shots .phone { width: 44vw; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.more { margin-top: 22px; font-weight: 600; }

/* Language picker, written into the header by tools/i18n.py once there is more than one language */
.lang { position: relative; display: inline-block; }
.lang > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); user-select: none; }
.lang > summary::-webkit-details-marker { display: none; }
.lang > summary:hover, .lang[open] > summary { color: var(--text); background: var(--surface-2); }
.lang > summary svg { width: 16px; height: 16px; }
.lang ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; margin: 0; padding: 6px; list-style: none; min-width: 170px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.lang li a { display: block; padding: 8px 12px; border-radius: 9px; color: var(--text); font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.lang li a:hover { background: var(--surface-2); text-decoration: none; }
.lang li a[aria-current] { color: var(--accent-2); font-weight: 700; }

/* Patents pending notice (home, under the features) */
.patent { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.patent p { margin: 0; color: var(--muted); font-size: 15px; flex: 1 1 320px; }
