/* Veil — site styles. Same tokens as the iOS app (Veil/Design/Theme.swift). */
:root {
  color-scheme: dark;
  --base: #0B0B0F;
  --surface: #15151A;
  --raised: #1E1E25;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --label: #F5F5F7;
  --label2: rgba(235, 235, 245, 0.64);
  --label3: rgba(235, 235, 245, 0.42);
  --accent: #3D8BFF;
  --accent-soft: #7EB2FF;
  --accent-deep: #2B6FDB;
  --secure: #30D158;
  --radius: 20px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--base);
  color: var(--label);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-soft); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 11, 15, 0.72);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--label); font-weight: 600; font-size: 18px; }
.brand:hover { text-decoration: none; }
.logo { width: 26px; height: 26px; flex: none; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--label2); font-size: 15px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--label); text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 24px; border-radius: 16px;
  font: 600 17px/1 var(--font); white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 30px -10px rgba(61, 139, 255, 0.7); }
.btn-primary:hover { background: #4E97FF; }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: var(--label); border-color: var(--line); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn small { font-weight: 500; font-size: 13px; color: rgba(255, 255, 255, 0.72); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--secure);
  background: rgba(48, 209, 88, 0.1); border: 1px solid rgba(48, 209, 88, 0.28);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--secure); box-shadow: 0 0 8px var(--secure); }

h1 {
  margin: 22px 0 18px;
  font-size: clamp(44px, 6.4vw, 76px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700;
}
h1 .accent { color: var(--accent); }
.lede { margin: 0 0 32px; max-width: 520px; font-size: 19px; color: var(--label2); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--label3); }

.stage { position: relative; display: grid; place-items: center; min-height: 640px; }
.stage .glow {
  position: absolute; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(48, 209, 88, 0.22), transparent 62%);
  filter: blur(10px);
}
.rings { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.rings span { position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.06); }
.rings span:nth-child(1) { width: 380px; height: 380px; border-color: rgba(48, 209, 88, 0.2); }
.rings span:nth-child(2) { width: 540px; height: 540px; }
.rings span:nth-child(3) { width: 700px; height: 700px; border-color: rgba(255, 255, 255, 0.04); }

.flag-chip {
  position: absolute; width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.14); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: float 6s ease-in-out infinite;
}
.flag-chip img { width: 100%; height: 100%; object-fit: cover; }
.flag-chip.f1 { top: 8%; left: 6%; }
.flag-chip.f2 { top: 20%; right: 2%; width: 44px; height: 44px; animation-delay: -2s; }
.flag-chip.f3 { bottom: 16%; left: 2%; width: 40px; height: 40px; animation-delay: -4s; }
.flag-chip.f4 { bottom: 6%; right: 10%; animation-delay: -1s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Phone frame ---------- */
.phone {
  position: relative; width: 300px; padding: 9px; border-radius: 52px;
  background: linear-gradient(160deg, #2A2A32, #121216);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 80px -20px rgba(0, 0, 0, 0.8), 0 0 60px -20px rgba(61, 139, 255, 0.25);
}
.phone img { width: 100%; aspect-ratio: 1206 / 2622; border-radius: 44px; background: var(--base); }
.phone.lg { width: 320px; }

/* ---------- Trust strip ---------- */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.015); }
.strip .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip div { padding: 22px 16px; text-align: center; font-size: 15px; color: var(--label2); }
.strip div + div { border-left: 1px solid var(--line); }
.strip strong { display: block; color: var(--label); font-size: 17px; font-weight: 600; }

/* ---------- Sections ---------- */
section.block { padding: 112px 0; }
section.block.flush { padding-top: 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-soft); }
h2 { margin: 10px 0 14px; font-size: clamp(32px, 4.2vw, 48px); line-height: 1.08; letter-spacing: -0.03em; }
.section-head p { margin: 0; font-size: 18px; color: var(--label2); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.card h3 { margin: 18px 0 8px; font-size: 19px; letter-spacing: -0.01em; }
.card p { margin: 0; font-size: 15px; color: var(--label2); }
.card .pill { margin-left: 6px; vertical-align: 2px; }
.icon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(61, 139, 255, 0.12); color: var(--accent);
}
.icon svg { width: 22px; height: 22px; }
.icon.green { background: rgba(48, 209, 88, 0.12); color: var(--secure); }

.pill {
  display: inline-block; padding: 3px 8px; border-radius: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent-soft); background: rgba(61, 139, 255, 0.14);
}

/* Screens */
.screens { display: flex; justify-content: center; gap: 36px; align-items: flex-start; }
.screens figure { margin: 0; text-align: center; }
.screens figure:nth-child(2) { margin-top: 48px; }
.screens figcaption { margin-top: 20px; font-size: 15px; color: var(--label2); }
.screens figcaption strong { display: block; color: var(--label); font-size: 17px; }

/* Privacy split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.list { margin: 18px 0 0; padding: 0; list-style: none; }
.list li { position: relative; padding: 11px 0 11px 34px; border-top: 1px solid var(--line); font-size: 16px; color: var(--label2); }
.list li:first-child { border-top: 0; }
.list li::before {
  content: ""; position: absolute; left: 0; top: 13px; width: 20px; height: 20px; border-radius: 50%;
  background: no-repeat center / 12px;
}
.list.no li::before { background-color: rgba(255, 69, 58, 0.14); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 3l6 6M9 3L3 9' stroke='%23FF6961' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
.list.yes li::before { background-color: rgba(48, 209, 88, 0.14); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.4 2.3 4.6-5' fill='none' stroke='%2330D158' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.list strong { color: var(--label); font-weight: 600; }
.split .card h3 { margin-top: 0; }
.fine { margin-top: 20px; font-size: 14px; color: var(--label3); }

/* Plans */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 880px; }
.plan { display: flex; flex-direction: column; }
.plan.premium {
  background: linear-gradient(180deg, rgba(61, 139, 255, 0.14), rgba(61, 139, 255, 0.03) 60%), var(--surface);
  border-color: rgba(61, 139, 255, 0.35);
}
.plan h3 { margin: 0; font-size: 22px; }
.plan .tag { margin: 6px 0 0; font-size: 15px; color: var(--label2); }
.plan .list { flex: 1; }
.plan .list li { font-size: 15px; }

/* CTA band */
.band {
  position: relative; overflow: hidden; text-align: center;
  padding: 72px 24px; border-radius: 32px;
  background: radial-gradient(120% 140% at 50% 0%, rgba(61, 139, 255, 0.28), transparent 60%), var(--surface);
  border: 1px solid var(--line);
}
.band h2 { margin-top: 0; }
.band p { margin: 0 auto 28px; max-width: 520px; color: var(--label2); font-size: 18px; }
.band .cta-row { justify-content: center; }

/* ---------- Footer ---------- */
footer { margin-top: 112px; border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 14px; color: var(--label3); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-left: auto; }
footer nav a { color: var(--label2); }
footer .credits { flex-basis: 100%; font-size: 12px; }
footer .credits a { color: var(--label3); text-decoration: underline; }

/* ---------- Document pages (Privacy, Terms, Support) ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 64px 24px 0; }
.doc h1 { margin: 0 0 10px; font-size: clamp(38px, 5vw, 52px); }
.doc .updated { margin: 0 0 32px; color: var(--label3); font-size: 15px; }
.doc .summary {
  margin: 0 0 40px; padding: 22px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--label2); font-size: 16px;
}
.doc .summary strong { color: var(--label); }
.doc h2 { margin: 48px 0 12px; font-size: 26px; letter-spacing: -0.02em; scroll-margin-top: 80px; }
.doc h3 { margin: 28px 0 8px; font-size: 19px; }
.doc p, .doc li { color: var(--label2); font-size: 16.5px; line-height: 1.7; }
.doc strong { color: var(--label); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--label2); }
.doc th { color: var(--label); font-weight: 600; background: rgba(255, 255, 255, 0.03); }
.doc .table-scroll { overflow-x: auto; }
.doc .toc { margin: 0 0 8px; padding: 0; list-style: none; columns: 2; column-gap: 24px; }
.toc li { margin: 0 0 6px; font-size: 15px; break-inside: avoid; }

.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 36px 20px 0; position: relative;
  font-size: 18px; font-weight: 600; color: var(--label);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--label3); border-bottom: 2px solid var(--label3); transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 0 18px; }
.faq details p { margin: 0 0 10px; }
.contact-card { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin: 0 0 40px; }
.contact-card p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .lede { margin-left: auto; margin-right: auto; }
  .hero .cta-row { justify-content: center; }
  .stage { min-height: 560px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .screens { gap: 20px; }
  .screens .phone { width: 230px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav-links a.hide-sm { display: none; }
  .nav .wrap { gap: 16px; }
  .nav-links { gap: 18px; }
  .hero { padding: 40px 0 64px; }
  .stage { min-height: 520px; }
  .stage .glow { width: 380px; height: 380px; }
  .rings span:nth-child(1) { width: 300px; height: 300px; }
  .rings span:nth-child(2) { width: 420px; height: 420px; }
  .rings span:nth-child(3) { display: none; }
  .phone, .phone.lg { width: 250px; border-radius: 44px; padding: 8px; }
  .phone img { border-radius: 37px; }
  .flag-chip { width: 40px; height: 40px; }
  .flag-chip.f2, .flag-chip.f3 { width: 34px; height: 34px; }
  .strip .wrap { grid-template-columns: 1fr 1fr; }
  .strip div:nth-child(3) { border-left: 0; }
  .strip div:nth-child(n+3) { border-top: 1px solid var(--line); }
  section.block { padding: 80px 0; }
  .grid, .split, .plans { grid-template-columns: 1fr; }
  .screens { flex-direction: column; align-items: center; gap: 48px; }
  .screens figure:nth-child(2) { margin-top: 0; }
  .screens .phone { width: 250px; }
  .band { padding: 56px 20px; border-radius: 24px; }
  footer nav { margin-left: 0; }
  .doc { padding: 40px 16px 0; }
  .toc { columns: 1; }
  .btn { width: 100%; }
  .contact-card .btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flag-chip { animation: none; }
  .btn { transition: none; }
}
