/* Selectrum website. Colors are taken from the app's interface theme (Selectrum/Theme.swift). */

:root {
  --page: #131b23;          /* a little darker than the app window, so screenshots stand out */
  --bg: #1b2530;            /* app window */
  --panel: #18222c;         /* app table background */
  --panel-2: #202c39;
  --line: #2a3a4b;
  --line-strong: #3c4b5a;   /* app field border */
  --header: #3f4f63;        /* app table header */
  --chrome: #455364;        /* app status bar */
  --tab: #465365;
  --tab-selected: #556879;
  --text: #e8edf2;
  --muted: #9aa7b5;
  --dim: #6f7c8a;
  --accent: #4a90d9;
  --accent-bright: #3d9be9;
  --bitcoin: #3ca0e8;
  --ok: #3ddc3d;
  --warn: #e0a72e;
  --bad: #e5252a;
  --icon: #9db4cb;
  --radius: 12px;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.5), 0 2px 0 rgba(255, 255, 255, 0.03) inset;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-bright); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #7cc0f5; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(74, 144, 217, 0.45); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.7rem); font-weight: 750; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: 0.4em; }
code, kbd { font-family: var(--mono); font-size: 0.88em; background: var(--panel-2); border: 1px solid var(--line); padding: 0.1em 0.4em; border-radius: 5px; }

.container { width: min(1120px, 100% - 48px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent-bright); color: #06121f; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(19, 27, 35, 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--panel-2); }
.lang { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; margin-left: 8px; }
.lang a { padding: 5px 10px; font-size: 0.82rem; border-radius: 0; color: var(--muted); }
.lang a[aria-current="true"] { background: var(--tab-selected); color: var(--text); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-strong); color: var(--text); border-radius: 8px; padding: 6px 12px; font: inherit; cursor: pointer; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  font: 600 1rem var(--font); text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent-bright); color: #06121f; }
.btn-primary:hover { background: #63b0f5; color: #06121f; }
.btn-secondary { background: var(--chrome); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--tab-selected); color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero {
  padding: 72px 0 24px;
  text-align: center;
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(61, 155, 233, 0.20), transparent 70%),
    radial-gradient(600px 300px at 85% 10%, rgba(74, 144, 217, 0.10), transparent 70%);
}
.eyebrow { display: inline-block; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-bright); font-weight: 650; margin-bottom: 18px; }
.hero h1 { max-width: 15ch; margin-inline: auto; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 46em; margin-inline: auto; }
.hero .btn-row { justify-content: center; margin: 28px 0 14px; }
.hero-meta { color: var(--dim); font-size: 0.92rem; margin-bottom: 40px; }
.hero-shot { width: min(980px, 100%); margin: 0 auto; }
.shot-note { text-align: center; color: var(--dim); font-size: 0.9rem; margin-top: 16px; }

/* Window frame around screenshots */
.window {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  background: var(--bg); border: 1px solid #364556; box-shadow: var(--shadow);
}
.window__bar { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px; background: linear-gradient(#303c4a, #29343f); border-bottom: 1px solid #1c252e; }
.dots { display: inline-flex; gap: 8px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.dots i:nth-child(1) { background: #ed6a5e; }
.dots i:nth-child(2) { background: #f4bf4f; }
.dots i:nth-child(3) { background: #61c554; }
.window__title { flex: 1; text-align: center; color: var(--muted); font-size: 0.85rem; margin-right: 52px; }
.window img { width: 100%; }
.window.compact { width: fit-content; max-width: 100%; margin-inline: auto; }

/* Sections */
section { padding: 84px 0; }
.band { background: var(--bg); border-block: 1px solid var(--line); }
.section-head { max-width: 46em; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* Trust strip */
.trust { padding: 28px 0; background: var(--bg); border-block: 1px solid var(--line); }
.trust ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.trust li { margin: 0; }
.trust strong { display: block; font-size: 1rem; }
.trust span { color: var(--muted); font-size: 0.92rem; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 36px; }
.feature { display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; align-items: start; }
.feature svg { width: 44px; height: 44px; color: var(--icon); stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { margin: 4px 0 8px; font-size: 1.28rem; }
.feature p { grid-column: 1 / -1; margin: 6px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.6; }
.feature .head { display: contents; }

/* Gallery tabs (look of the app's tab bar) */
.tabs { display: none; flex-wrap: wrap; gap: 3px; margin-bottom: 0; }
.js .tabs { display: flex; }
.tab {
  background: var(--tab); color: var(--text); border: 0; border-bottom: 2px solid transparent;
  padding: 7px 18px; font: 500 0.95rem var(--font); border-radius: 5px 5px 0 0; cursor: pointer;
}
.tab:hover { background: #50607a; }
.tab[aria-selected="true"] { background: var(--tab-selected); border-bottom-color: var(--accent-bright); }
.gallery-frame { border-top: 1px solid #2e5e86; padding-top: 28px; }
.gallery-panel { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.gallery-panel h3 { margin-top: 0; }
.gallery-panel p { color: var(--muted); }
.js .gallery-panel[hidden] { display: none; }
.gallery-panel + .gallery-panel { margin-top: 56px; }
.js .gallery-panel + .gallery-panel { margin-top: 0; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; margin: 0; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--tab-selected); color: var(--text); font-weight: 700; margin-bottom: 14px; border-bottom: 2px solid var(--accent-bright); }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 0.97rem; margin: 0; }

/* Columns / cards */
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.card.caution { border-color: #5a4a22; background: linear-gradient(180deg, rgba(224,167,46,.07), transparent 60%), var(--panel); }
.card.caution h3 { color: var(--warn); }
.tag { display: inline-block; font-size: 0.78rem; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-strong); color: var(--muted); margin-left: 6px; vertical-align: middle; }

/* Split rows (text + screenshot) */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 56px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.split h2 { margin-top: 0; }
.split p { color: var(--muted); }

/* Process (long steps on "How it works") */
.process { display: grid; gap: 80px; }
.process-item .num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--tab-selected); border-bottom: 2px solid var(--accent-bright); font-weight: 700; margin-bottom: 14px; }
.process-item h2 { margin-top: 0; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.process-item ul { color: var(--muted); }

/* Flow diagram */
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 28px; margin: 0 0 18px; padding: 0; list-style: none; }
.flow li { position: relative; margin: 0; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 10px; padding: 14px 16px; }
.flow li.local { border-color: #2e5e86; background: linear-gradient(180deg, rgba(61, 155, 233, 0.10), transparent), var(--panel); }
.flow li:not(:last-child)::after { content: "\2192"; position: absolute; right: -24px; top: 50%; transform: translateY(-50%); color: var(--accent-bright); font-size: 1.2rem; width: 20px; text-align: center; }
.flow li:nth-child(3n)::after { display: none; }
.flow strong { display: block; font-size: 1rem; }
.flow span { color: var(--muted); font-size: 0.88rem; line-height: 1.4; display: block; margin-top: 4px; }
.flow-label { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); margin: 28px 0 10px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
th, td { text-align: left; padding: 14px 18px; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--header); font-weight: 600; font-size: 0.9rem; }
tr:last-child td { border-bottom: 0; }
td:first-child { white-space: nowrap; font-weight: 600; }
td span.mono { color: var(--muted); }

/* FAQ */
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 20px; 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(--accent-bright); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 20px 16px; color: var(--muted); }
.faq .answer p:last-child { margin-bottom: 0; }

/* Download */
.download-card { background: linear-gradient(180deg, rgba(61,155,233,.12), transparent 70%), var(--panel); border: 1px solid #2e5e86; border-radius: 16px; padding: 40px; display: grid; grid-template-columns: 96px 1fr auto; gap: 28px; align-items: center; }
.download-card img { width: 96px; height: 96px; border-radius: 22px; }
.download-card h2 { margin: 0 0 6px; }
.download-card p { margin: 0; color: var(--muted); }
.reqs { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; color: var(--muted); font-size: 0.95rem; }
.reqs span::before { content: "\2713"; color: var(--ok); margin-right: 8px; }

/* Page heading (inner pages) */
.page-head { padding: 64px 0 40px; border-bottom: 1px solid var(--line); background: radial-gradient(700px 260px at 50% -20%, rgba(61,155,233,.16), transparent 70%); }
.page-head h1 { font-size: clamp(2rem, 4.2vw, 3rem); margin-bottom: 14px; }
.page-head .lead { margin-inline: 0; }

/* Legal text */
.legal h2 { font-size: 1.35rem; margin-top: 2.2em; }
.legal h3 { font-size: 1.05rem; margin-top: 1.6em; }
.legal p, .legal li { color: #cdd6df; }
.legal .meta { color: var(--dim); font-size: 0.95rem; }
.notice { border-left: 3px solid var(--accent-bright); background: var(--panel); padding: 14px 18px; border-radius: 0 10px 10px 0; color: var(--muted); }

/* CTA band */
.cta { text-align: center; }
.cta h2 { margin-bottom: 12px; }
.cta p { color: var(--muted); max-width: 40em; margin-inline: auto; }
.cta .btn-row { justify-content: center; margin-top: 24px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 56px; color: var(--muted); font-size: 0.93rem; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: var(--text); font-size: 0.95rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.fineprint { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--dim); }

/* Responsive */
@media (max-width: 960px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .trust ul { grid-template-columns: repeat(2, 1fr); }
  .gallery-panel, .split { grid-template-columns: 1fr; gap: 24px; }
  .split.reverse > :first-child { order: 0; }
  .cols-3 { grid-template-columns: 1fr; }
  .download-card { grid-template-columns: 72px 1fr; }
  .download-card .btn { grid-column: 1 / -1; }
  .download-card img { width: 72px; height: 72px; border-radius: 16px; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; background: var(--page); border-bottom: 1px solid var(--line); padding: 12px 24px 20px; margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .lang { align-self: flex-start; margin: 8px 0 0; }
  .cols-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
  .hero { padding-top: 48px; }
  .flow { grid-template-columns: 1fr; }
  .flow li::after { display: none; }
}
@media (max-width: 560px) {
  .features, .steps, .trust ul { grid-template-columns: 1fr; }
  .container, .narrow { width: min(1120px, 100% - 32px); }
  .download-card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* Legal pages: same width and side margins as the header */
.legal > * { max-width: none; }

/* Single-column copy blocks inside a full-width container */
.narrow-copy > * { max-width: 780px; }
.narrow-copy > .table-wrap { max-width: 100%; }
ol li, ul li { padding-left: 0.2em; }
