/* Material Merge — public website
   Palette mirrors the iOS app's own tokens (src/App.css) so the site and the
   product read as one thing. Dark-first, because that's how the app ships. */

:root {
  --bg: #0B0D12;
  --surface: #141824;
  --surface-2: #1B2130;
  --border: #232B3A;
  --border-subtle: #1A2030;
  --text: #F5F7FA;
  --text-2: #A7B0C0;
  --text-3: #5A6478;
  --accent: #4C8DFF;
  --accent-dim: rgba(76, 141, 255, 0.12);
  --accent-line: rgba(76, 141, 255, 0.35);
  --success: #34D399;
  --violet: #A855F7;

  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;

  --maxw: 1120px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 750; }
h3 { font-size: 1.12rem; font-weight: 650; }

p { margin: 0 0 1em; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ── Navigation ─────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 18, 0.85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo img { width: 30px; height: 30px; border-radius: 7px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-links a {
  color: var(--text-2);
  font-size: 0.94rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 9px;
  width: 42px;
  height: 38px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 17px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.nav-mobile { display: none; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 8px 0 16px;
    border-top: 1px solid var(--border-subtle);
  }
  .nav-mobile.open { display: flex; }
  .nav-mobile a {
    color: var(--text-2);
    padding: 11px 4px;
    font-weight: 500;
    border-radius: 8px;
  }
  .nav-mobile a:hover { color: var(--text); text-decoration: none; }
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.97rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #3d7df0; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent-line); background: var(--accent-dim); }

/* App Store badge — deliberately NOT a link until the app is live.
   Rendered as a static, visibly-pending chip so nothing implies a
   working download that doesn't exist yet. */
.appstore-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  background: var(--surface);
  cursor: default;
}
.appstore-chip svg { flex-shrink: 0; color: var(--text-2); }
.appstore-chip .chip-pre {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-3);
}
.appstore-chip .chip-main {
  display: block;
  font-size: 1rem;
  font-weight: 650;
  color: var(--text);
  line-height: 1.25;
}

/* ── Sections ───────────────────────────────────────────── */
section { padding: 84px 0; }
@media (max-width: 640px) { section { padding: 56px 0; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  padding: 6px 13px;
  border-radius: 100px;
  margin-bottom: 18px;
}

.section-head { max-width: 700px; margin: 0 auto 48px; text-align: center; }
.section-head p { font-size: 1.06rem; color: var(--text-2); margin: 0; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  padding: 86px 0 74px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 130vw);
  height: 620px;
  background: radial-gradient(ellipse at center, rgba(76,141,255,0.16), rgba(168,85,247,0.07) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }

.hero-mark {
  width: 84px;
  height: 84px;
  margin: 0 auto 26px;
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.5);
}

.hero h1 { margin-bottom: 20px; }
.hero h1 .accent {
  background: linear-gradient(100deg, var(--accent), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(1.02rem, 2.3vw, 1.2rem);
  max-width: 620px;
  margin: 0 auto 34px;
  color: var(--text-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
}

.hero-note {
  margin-top: 22px;
  font-size: 0.87rem;
  color: var(--text-3);
}

/* ── Feature grid ───────────────────────────────────────── */
.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: 0.95rem; color: var(--text-2); }

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

/* ── Steps ──────────────────────────────────────────────── */
.steps {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  counter-reset: step;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
}
.step-num {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}
.step h3 { margin-bottom: 7px; }
.step p { margin: 0; font-size: 0.94rem; }

/* ── Why / split ────────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 54px;
  align-items: center;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 34px; }
}

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.97rem;
}
.checklist li:last-child { border-bottom: 0; }
.checklist svg { flex-shrink: 0; color: var(--success); margin-top: 4px; }

.brandmark-wrap {
  display: flex;
  justify-content: center;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}
.brandmark-wrap img { width: min(300px, 78%); }

/* ── Detail chips (real values pulled from the app) ─────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  font-size: 0.82rem;
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  white-space: nowrap;
}

/* ── CTA band ───────────────────────────────────────────── */
.cta {
  text-align: center;
  background: linear-gradient(160deg, rgba(76,141,255,0.13), rgba(168,85,247,0.09));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 56px 28px;
}
.cta h2 { margin-bottom: 12px; }
.cta p { max-width: 520px; margin: 0 auto 26px; }

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 40px;
  background: var(--surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 34px;
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}
.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-3);
  margin: 12px 0 0;
  max-width: 300px;
}
.footer h4 {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  margin-bottom: 13px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 9px; }
.footer li a { color: var(--text-2); font-size: 0.92rem; }
.footer li a:hover { color: var(--text); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 22px;
  font-size: 0.85rem;
  color: var(--text-3);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

/* ── Long-form documents (privacy / terms / support) ────── */
.doc { padding: 56px 0 76px; }
.doc-inner { max-width: 760px; margin: 0 auto; }
.doc h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); margin-bottom: 10px; }
.doc .updated {
  font-size: 0.88rem;
  color: var(--text-3);
  margin-bottom: 36px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.doc h2 {
  font-size: 1.28rem;
  margin-top: 42px;
  margin-bottom: 12px;
  padding-top: 4px;
}
.doc h3 { margin-top: 26px; font-size: 1.02rem; }
.doc p, .doc li { font-size: 0.97rem; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 1em; }
.doc li { margin-bottom: 8px; }
.doc strong { color: var(--text); font-weight: 640; }

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 22px 0;
}
.callout p:last-child { margin-bottom: 0; }

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 38px;
}
.toc h2 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  padding-top: 0;
}
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; font-size: 0.93rem; }

/* Data-practice table */
.table-wrap { overflow-x: auto; margin: 20px 0; -webkit-overflow-scrolling: touch; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 520px;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  color: var(--text);
  font-weight: 650;
  background: var(--surface);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* FAQ / support */
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 10px;
  overflow: hidden;
}
summary {
  cursor: pointer;
  padding: 15px 18px;
  font-weight: 600;
  color: var(--text);
  font-size: 0.96rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  color: var(--text-3);
  font-size: 1.25rem;
  font-weight: 400;
  flex-shrink: 0;
  line-height: 1;
}
details[open] summary::after { content: "\2212"; }
details > div {
  padding: 0 18px 16px;
  font-size: 0.95rem;
}
details > div p:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
