/* ==========================================================================
   Dyvo — getdyvo.com design system

   One stylesheet for every page. The tokens mirror Theme.swift so the site
   and the app read as one product; when a palette token changes in the app,
   change it here too.

   No build step, on purpose: the site is deployed by dragging web/ into
   Cloudflare Pages, so anything that needs compiling is a way for the live
   site to fall out of sync with the repo.
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Palette — mirrors Theme.Palette */
  --bg:            #0A0E1A;
  --bg-deep:       #060911;
  --card:          #161D2F;
  --card-2:        #1C2438;
  --border:        #222B42;
  --border-soft:   rgba(255, 255, 255, 0.07);
  --text:          #FFFFFF;
  --prose:         #C3C9D6;
  --text-2:        #9BA4BE;
  --text-3:        #5D6885;
  --accent:        #22D3EE;
  --accent-deep:   #0991B2;
  --accent-abyss:  #155E75;
  --good:          #34D399;

  /* Type */
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Rhythm */
  --wrap:      1160px;
  --wrap-prose: 700px;
  --gutter:    clamp(20px, 5vw, 32px);
  --section:   clamp(64px, 9vw, 112px);
  --radius:    22px;
  --radius-lg: 28px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  min-height: 100svh;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The ocean gradient. Fixed so it reads as one continuous body of water
   behind the whole page rather than repeating per section. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(110% 60% at 88% -8%,  rgba(34, 211, 238, 0.16), transparent 58%),
    radial-gradient(90% 55% at 4% 12%,    rgba(21, 94, 117, 0.30),  transparent 60%),
    linear-gradient(170deg, #0A0E1A 0%, #0B1526 46%, #070B14 100%);
}

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

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

::selection { background: rgba(34, 211, 238, 0.28); }

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

/* `.wrap` owns the horizontal gutter and nothing else may touch it.
   Every element that carries `.wrap` also carries a second class —
   `.nav`, `.section`, `.stats` — and a `padding: <v> 0` shorthand in any
   of those silently resets this one to zero. Above 1160px the max-width
   hides it; below, the text runs into the edge of the screen. Those rules
   set `padding-block` for exactly this reason. */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.prose-wrap { width: 100%; max-width: var(--wrap-prose); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 12px 18px; border-radius: 0 0 12px 0;
  background: var(--accent); color: #042027; font-weight: 700;
}
.skip:focus { left: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Type roles — named like Theme.Typography rather than sized like CSS,
   and fluid so one scale covers phone through desktop.
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 { font-family: var(--font-rounded); letter-spacing: -0.02em; line-height: 1.06; font-weight: 800; }

.hero-title  { font-size: clamp(42px, 7.2vw, 76px); }
.display     { font-size: clamp(32px, 4.6vw, 50px); }
.section-title { font-size: clamp(28px, 3.6vw, 42px); }
h3           { font-size: clamp(19px, 1.6vw, 22px); font-weight: 700; letter-spacing: -0.01em; }

.grad {
  background: linear-gradient(115deg, #FFFFFF 22%, #7DE7F7 62%, #22D3EE 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.eyebrow {
  font-family: var(--font-rounded);
  font-weight: 700; font-size: 12.5px; line-height: 1.4;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
}

.lede  { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--text-2); }
.muted { color: var(--text-2); }
.small { font-size: 14px; color: var(--text-3); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 14, 26, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header { background: rgba(10, 14, 26, 0.55); -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px); }
}
.site-header.is-stuck { border-bottom-color: var(--border-soft); background: rgba(8, 12, 22, 0.86); }

.nav { display: flex; align-items: center; gap: 22px; padding-block: 14px; }

.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand .tile { position: relative; display: block; }
.brand .tile::before {
  content: ""; position: absolute; inset: -26%; z-index: 0;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.42), transparent 70%);
}
.brand img {
  position: relative; z-index: 1;
  width: 34px; height: 34px; border-radius: 10px; object-fit: cover;
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}
.brand .wordmark {
  font-family: var(--font-rounded); font-weight: 800; font-size: 20px;
  letter-spacing: 0.15em; padding-left: 0.15em; color: #fff;
}

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  color: var(--text-2); font-size: 14.5px; font-weight: 500;
  padding: 8px 12px; border-radius: 10px;
  transition: color .15s ease, background .15s ease;
}
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); text-decoration: none; }
.nav-links a[aria-current="page"] { color: #fff; background: rgba(34, 211, 238, 0.12); }

.nav .btn-store { flex: 0 0 auto; }

@media (max-width: 940px) {
  .nav { gap: 12px; }
  .nav-links { display: none; }
  .nav .btn-store { margin-left: auto; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-rounded); font-weight: 700; font-size: 15.5px;
  padding: 14px 26px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  color: #042027;
  background: linear-gradient(155deg, #67E8F9, #0991B2);
  box-shadow: 0 14px 32px rgba(34, 211, 238, 0.26);
}
.btn-primary:hover { box-shadow: 0 20px 44px rgba(34, 211, 238, 0.36); }

.btn-ghost {
  color: #fff; background: rgba(255, 255, 255, 0.05); border-color: var(--border);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(34, 211, 238, 0.4); }

/* App Store badge — Apple's lockup, drawn rather than an image so it stays
   crisp at any size and costs no request. */
.btn-store {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 10px 20px 10px 17px; border-radius: 14px;
  background: #fff; color: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-store:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); }
.btn-store .apple { width: 24px; height: 24px; color: #000; flex: 0 0 auto; }
.btn-store .lockup { display: flex; flex-direction: column; line-height: 1.08; text-align: left; }
.btn-store small { font-size: 10.5px; font-weight: 500; }
.btn-store strong { font-family: var(--font-rounded); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.btn-store.sm { padding: 8px 15px 8px 13px; border-radius: 12px; }
.btn-store.sm .apple { width: 18px; height: 18px; }
.btn-store.sm strong { font-size: 14px; }
.btn-store.sm small { font-size: 9px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* --------------------------------------------------------------------------
   Surfaces
   -------------------------------------------------------------------------- */

.card {
  background: linear-gradient(170deg, rgba(28, 36, 56, 0.85), rgba(22, 29, 47, 0.72));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
}

/* Gradient-edged card for the one or two things per page that should pull
   the eye. The border is a masked gradient, not a solid colour, so it
   catches light the way the app's glass surfaces do. */
.card-lit { position: relative; background: linear-gradient(170deg, rgba(34, 211, 238, 0.09), rgba(22, 29, 47, 0.78) 55%); border-color: transparent; }
.card-lit::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(150deg, rgba(34, 211, 238, 0.65), rgba(34, 211, 238, 0.06) 45%, rgba(255, 255, 255, 0.1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}

.ico {
  width: 46px; height: 46px; border-radius: 13px; margin-bottom: 15px;
  background: rgba(34, 211, 238, 0.13); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.ico svg { width: 24px; height: 24px; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.025);
}
.chip b { color: var(--accent); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.badge-free, .badge-pro {
  display: inline-block; font-family: var(--font-rounded); font-weight: 700;
  font-size: 10.5px; letter-spacing: 0.09em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; vertical-align: 2px;
}
.badge-free { color: var(--good); background: rgba(52, 211, 153, 0.14); }
.badge-pro  { color: var(--accent); background: rgba(34, 211, 238, 0.14); }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

section { position: relative; }
.section { padding-block: var(--section); }
.section-head { max-width: 660px; margin-bottom: clamp(32px, 5vw, 52px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .section-title { margin-top: 14px; }
.section-head p { margin-top: 16px; }

.rule { border: 0; border-top: 1px solid var(--border-soft); }

/* Bento — an asymmetric grid so the two features worth leading with get the
   room, and the rest tile underneath. Collapses to one column on phones. */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.bento > * { grid-column: span 2; }
.bento .span-3 { grid-column: span 3; }
.bento .span-6 { grid-column: span 6; }
@media (max-width: 900px) { .bento > *, .bento .span-3 { grid-column: span 3; } }
@media (max-width: 620px) { .bento > *, .bento .span-3, .bento .span-6 { grid-column: span 6; } }

.grid-tight { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .grid-tight { grid-template-columns: 1fr; } }

/* Fixed column counts rather than auto-fit: a six-card section wants two
   rows of three, and auto-fit's answer at desktop width is four narrow
   columns and a ragged second row. */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 940px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .grid-3 { grid-template-columns: 1fr; } }

.card h3 + p, .card p + p { margin-top: 9px; }
.card p { color: var(--text-2); font-size: 15px; line-height: 1.58; }

/* Alternating screenshot + copy */
.split { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.split.reverse .split-media { order: 2; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 44px; }
  .split.reverse .split-media { order: 0; }
}

.ticks { list-style: none; margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.ticks li { position: relative; padding-left: 32px; font-size: 15.5px; color: #DFE4EE; line-height: 1.5; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(34, 211, 238, 0.16); }
.ticks li::after { content: ""; position: absolute; left: 6.5px; top: 6.5px; width: 6px; height: 10px; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* --------------------------------------------------------------------------
   Device frame
   -------------------------------------------------------------------------- */

.stage { position: relative; display: flex; justify-content: center; }
.stage::before {
  content: ""; position: absolute; width: min(430px, 90%); aspect-ratio: 1;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(34, 211, 238, 0.20), transparent 65%);
  pointer-events: none;
}
.device {
  position: relative; width: min(292px, 78vw); padding: 12px; border-radius: 54px;
  background: linear-gradient(155deg, #39435F, #0E131D);
  box-shadow: 0 50px 90px -20px rgba(0, 0, 0, 0.75),
              0 0 0 1px rgba(255, 255, 255, 0.06) inset,
              0 2px 6px rgba(255, 255, 255, 0.10) inset;
  transform: rotate(3deg);
}
.device.tilt-left { transform: rotate(-3deg); }
.device .island { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; background: #000; border-radius: 999px; z-index: 3; }
.device .shot {
  display: block; width: 100%; height: auto; border-radius: 43px;
  aspect-ratio: 1179 / 2556;
  background: radial-gradient(120% 60% at 50% 22%, #12263D, #05070F);
  object-fit: cover;
}
@media (max-width: 900px) { .device, .device.tilt-left { transform: none; } }

/* --------------------------------------------------------------------------
   Stat band
   -------------------------------------------------------------------------- */

.stats-band { border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); background: rgba(6, 9, 17, 0.4); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 20px; padding-block: 34px; }
.stat { text-align: center; padding: 8px 4px; }
.stat b {
  display: block; font-family: var(--font-rounded); font-weight: 800;
  font-size: clamp(28px, 3.2vw, 38px); letter-spacing: -0.02em; line-height: 1.1;
  color: #fff;
}
.stat span { display: block; margin-top: 5px; font-size: 13.5px; color: var(--text-3); }

/* --------------------------------------------------------------------------
   Comparison table (pricing)
   -------------------------------------------------------------------------- */

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--border); }
table.compare { width: 100%; min-width: 560px; border-collapse: collapse; background: rgba(22, 29, 47, 0.6); }
table.compare th, table.compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); font-size: 15px; }
table.compare thead th { font-family: var(--font-rounded); font-size: 14px; color: var(--text-2); background: rgba(6, 9, 17, 0.5); letter-spacing: 0.02em; }
table.compare thead th:not(:first-child) { text-align: center; width: 24%; }
table.compare td:not(:first-child) { text-align: center; color: var(--text-2); }
table.compare tbody tr:last-child td { border-bottom: 0; }
table.compare td.yes { color: var(--good); font-weight: 600; }
table.compare th[scope="row"] { font-weight: 600; color: #fff; }

/* Pricing cards */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 18px; align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan .price { font-family: var(--font-rounded); font-weight: 800; font-size: 40px; letter-spacing: -0.03em; margin-top: 10px; }
.plan .price small { font-size: 16px; font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.plan .note { margin-top: 8px; font-size: 14px; color: var(--text-3); }
.plan ul { list-style: none; margin-top: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan .btn { margin-top: 24px; width: 100%; }
.tag {
  position: absolute; top: -11px; right: 20px;
  font-family: var(--font-rounded); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 11px; border-radius: 999px; color: #042027;
  background: linear-gradient(150deg, #67E8F9, #22D3EE);
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details {
  background: rgba(22, 29, 47, 0.62); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  transition: border-color .15s ease;
}
.faq details[open] { border-color: rgba(34, 211, 238, 0.34); }
.faq summary {
  cursor: pointer; list-style: none; padding: 17px 52px 17px 20px; position: relative;
  font-family: var(--font-rounded); font-weight: 700; font-size: 16.5px; color: #fff;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 24px;
  width: 9px; height: 9px; border: solid var(--accent); border-width: 0 2px 2px 0;
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 27px; }
.faq .answer { padding: 0 20px 19px; color: var(--text-2); font-size: 15.5px; line-height: 1.62; }
.faq .answer p + p { margin-top: 11px; }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */

.cta-band { text-align: center; }
.cta-inner {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg); border: 1px solid rgba(34, 211, 238, 0.22);
  background:
    radial-gradient(110% 130% at 50% -20%, rgba(34, 211, 238, 0.20), transparent 60%),
    linear-gradient(170deg, rgba(28, 36, 56, 0.9), rgba(10, 14, 26, 0.9));
  padding: clamp(40px, 6vw, 68px) var(--gutter);
}
.cta-inner .btn-row { justify-content: center; margin-top: 28px; }
.cta-inner p { margin: 16px auto 0; max-width: 520px; }

/* --------------------------------------------------------------------------
   Long-form pages (privacy, terms, support)
   -------------------------------------------------------------------------- */

.doc { padding: clamp(40px, 6vw, 64px) 0 var(--section); }
.doc h1 { font-size: clamp(32px, 4.4vw, 44px); }
.doc .updated { margin-top: 12px; font-size: 14px; color: var(--text-3); }
.doc h2 { margin-top: 40px; font-size: clamp(20px, 2vw, 23px); font-weight: 700; }
.doc h3 { margin-top: 26px; font-size: 17px; }
.doc p, .doc li { margin-top: 12px; font-size: 16px; line-height: 1.68; color: var(--prose); }
.doc ul, .doc ol { margin-top: 12px; padding-left: 22px; }
.doc li { margin-top: 8px; }
.doc strong { color: #fff; }
.doc .callout {
  margin-top: 24px; padding: 18px 20px; border-radius: 16px;
  border: 1px solid var(--border); background: rgba(22, 29, 47, 0.6);
}
.doc .callout p:first-child { margin-top: 0; }

/* Breadcrumbs */
.crumbs { font-size: 13.5px; color: var(--text-3); padding-top: 26px; }
.crumbs a { color: var(--text-2); }
.crumbs span { padding: 0 7px; opacity: .5; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--border-soft); background: rgba(6, 9, 17, 0.55); margin-top: auto; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px;
  padding: clamp(40px, 5vw, 56px) 0 34px;
}
.footer-grid h4 { font-family: var(--font-rounded); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.footer-grid ul { list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: var(--text-2); font-size: 14.5px; }
.footer-grid a:hover { color: #fff; }
.footer-about p { margin-top: 14px; font-size: 14.5px; color: var(--text-3); max-width: 300px; line-height: 1.6; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  padding: 20px 0 40px; border-top: 1px solid var(--border-soft);
  font-size: 13.5px; color: var(--text-3);
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Scroll reveal — additive only. Everything is visible without JS, and the
   whole effect is dropped for anyone who asked for reduced motion.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.22,.61,.36,1); }
  .js .reveal.in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .device, .device.tilt-left { transform: none; }
}
