/* pricing.css — page-specific stylesheet for /pricing/.
   Same editorial system as /about/ and the legal pages: warm off-white
   ground, Geist, single brand purple, hairline rules, subtle grain.
   Adds plan cards and a free-vs-pro comparison. OKLCH tokens, light + dark. */

:root {
  --ink: oklch(0.20 0.012 295);
  --ink-soft: oklch(0.42 0.012 295);
  --ink-mute: oklch(0.56 0.010 295);
  --rule: oklch(0.90 0.006 295);
  --bg: oklch(0.985 0.005 90);
  --bg-tint: oklch(0.965 0.010 295);
  --card: oklch(0.995 0.004 90);
  --brand: #6A1B9A;
  --brand-ink: oklch(0.38 0.18 305);
  --brand-bg: oklch(0.95 0.030 305);
  --focus: oklch(0.65 0.18 305);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: oklch(0.96 0.008 90);
    --ink-soft: oklch(0.78 0.012 295);
    --ink-mute: oklch(0.60 0.012 295);
    --rule: oklch(0.28 0.008 295);
    --bg: oklch(0.16 0.012 295);
    --bg-tint: oklch(0.21 0.014 295);
    --card: oklch(0.20 0.014 295);
    --brand: oklch(0.74 0.16 305);
    --brand-ink: oklch(0.82 0.16 305);
    --brand-bg: oklch(0.27 0.05 305);
    --focus: oklch(0.74 0.16 305);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, sans-serif;
  font-feature-settings: 'ss01', 'ss02', 'cv11';
  font-variant-numeric: tabular-nums;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

@media (prefers-color-scheme: dark) {
  body::before { opacity: 0.06; mix-blend-mode: overlay; }
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 120ms ease-out;
}
a:hover { color: var(--ink); }

::selection { background: var(--brand); color: #fff; }

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

/* ─── Header ───────────────────────────────────────── */

.page-header {
  padding: clamp(56px, 9vw, 104px) 0 clamp(28px, 4vw, 40px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 32px;
}
.eyebrow .dot {
  width: 7px;
  height: 7px;
  background: var(--brand);
  border-radius: 50%;
  flex-shrink: 0;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.038em;
  color: var(--ink);
  text-wrap: balance;
}

.page-header .lede {
  margin: 20px 0 0;
  max-width: 50ch;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: balance;
}

/* ─── Plans ────────────────────────────────────────── */

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: clamp(8px, 2vw, 16px) 0 0;
}

@media (max-width: 560px) {
  .plans { grid-template-columns: 1fr; }
}

.plan {
  position: relative;
  padding: 26px 24px 24px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
}

.plan.featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand),
              0 18px 40px -24px oklch(0.40 0.16 305 / 0.5);
}

.plan .tag {
  position: absolute;
  top: -11px;
  left: 24px;
  padding: 4px 10px;
  background: var(--brand);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 999px;
}

.plan .name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

.plan .price {
  margin: 12px 0 2px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--ink);
}
.plan .price .amount {
  font-size: clamp(34px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.plan .price .period {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-mute);
}

.plan .sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  min-height: 2.6em;
}
.plan .sub strong { color: var(--ink); font-weight: 600; }

.plan-note {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--ink-mute);
  text-align: center;
  line-height: 1.6;
}

/* ─── Buttons ──────────────────────────────────────── */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin: 26px 0 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 1px 0 0 oklch(0.30 0.16 305 / 0.4) inset,
              0 1px 2px oklch(0.30 0.16 305 / 0.18),
              0 6px 18px -8px oklch(0.30 0.16 305 / 0.35);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
              background 140ms ease-out, box-shadow 220ms ease-out;
}
.btn-primary:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.08) inset,
              0 8px 22px -8px var(--ink);
}
.btn-primary:active { transform: translateY(0); }

.btn-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.btn-link:hover { color: var(--ink); }

/* ─── Sections ─────────────────────────────────────── */

.section {
  padding: clamp(44px, 6vw, 64px) 0;
  border-top: 1px solid var(--rule);
  margin-top: clamp(44px, 6vw, 64px);
}

.section h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.section .section-lede {
  margin: 0 0 28px;
  max-width: 56ch;
  font-size: 15.5px;
  color: var(--ink-soft);
}

/* ─── Free vs Pro comparison ───────────────────────── */

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

.tier {
  padding: 22px 22px 24px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--card);
}
.tier.pro {
  background: var(--brand-bg);
  border-color: color-mix(in oklch, var(--brand) 35%, transparent);
}

.tier h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.tier .tier-sub {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--ink-mute);
}

.tier ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}
.tier li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.tier li strong { color: var(--ink); font-weight: 600; }
.tier li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background-color: var(--brand);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'><path d='M3 7.2 5.8 10l5.2-6' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 13px;
}
.tier.free li::before {
  background-color: transparent;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'><path d='M3 7.2 5.8 10l5.2-6' stroke='%236A1B9A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-size: 14px;
}

/* ─── FAQ ──────────────────────────────────────────── */

.faq {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.faq details {
  border-bottom: 1px solid var(--rule);
  padding: 4px 0;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 32px 16px 0;
  position: relative;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink-mute);
  transition: transform 180ms ease-out;
}
.faq details[open] summary::after {
  content: '\2212';
}
.faq details p {
  margin: 0 0 16px;
  max-width: 64ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ─── Closing CTA ──────────────────────────────────── */

.cta-end {
  text-align: center;
  padding: clamp(52px, 8vw, 88px) 0 clamp(48px, 7vw, 80px);
  border-top: 1px solid var(--rule);
}
.cta-end h2 {
  margin: 0 0 20px;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}
.cta-end .btn-primary { font-size: 16px; padding: 15px 32px; }
.cta-end .meta { margin: 18px 0 0; font-size: 13px; color: var(--ink-mute); }

/* ─── Footer ───────────────────────────────────────── */

.page-footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-tint);
  padding: 32px 0;
}
.page-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--ink-mute);
}
.page-footer .mark {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.page-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.page-footer nav a { color: var(--ink-mute); text-decoration: none; }
.page-footer nav a:hover { color: var(--ink); }
.page-footer .copy { margin-left: auto; }

@media (max-width: 640px) {
  .page-footer .copy { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ── Country picker + all-prices transparency table (v2) ────────────────── */

.region-bar {
  position: relative;
  text-align: center;
  margin: 14px 0 32px;
}
.region-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}
.region-toggle:hover {
  border-color: var(--brand);
  color: var(--ink);
}
.region-toggle:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.region-icon { font-size: 14px; }
.region-chevron { font-size: 10px; margin-left: 2px; opacity: 0.7; }

.country-picker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 8px);
  width: min(360px, calc(100vw - 32px));
  max-height: 380px;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 16px 40px -10px oklch(0.20 0.012 295 / 0.18);
  z-index: 20;
  overflow: hidden;
  text-align: left;
}
.country-picker[hidden] { display: none; }
.country-picker input[type="search"] {
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  outline: none;
}
.country-picker input[type="search"]:focus {
  border-bottom-color: var(--brand);
}
.country-picker ul {
  margin: 0;
  padding: 4px 0;
  list-style: none;
  overflow-y: auto;
  flex: 1;
}
.country-picker li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
}
.country-picker li:hover,
.country-picker li:focus {
  background: var(--bg-tint);
  outline: none;
}
.country-picker li.current {
  background: var(--brand-bg);
  color: var(--brand-ink);
  font-weight: 600;
}
.cp-flag { font-size: 18px; flex: 0 0 auto; line-height: 1; }
.cp-name { flex: 1 1 auto; }
.cp-code {
  font-size: 11px;
  color: var(--ink-mute);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.all-prices {
  margin: 0 auto 40px;
  max-width: 760px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
}
.all-prices > summary {
  cursor: pointer;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}
.all-prices > summary::-webkit-details-marker { display: none; }
.all-prices > summary::after {
  content: '▾';
  float: right;
  font-size: 11px;
  color: var(--ink-mute);
  transition: transform 120ms ease;
}
.all-prices[open] > summary::after { transform: rotate(180deg); }
.all-prices-note {
  font-size: 12.5px;
  color: var(--ink-mute);
  padding: 0 18px 8px;
  margin: 0;
  line-height: 1.55;
}
.all-prices-note a { color: var(--brand-ink); }
.all-prices-meta {
  font-size: 11.5px;
  color: var(--ink-mute);
  padding: 0 18px 12px;
}
.all-prices-table-wrap {
  max-height: 480px;
  overflow-y: auto;
  border-top: 1px solid var(--rule);
}
.all-prices-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.all-prices-table th,
.all-prices-table td {
  padding: 8px 14px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
}
.all-prices-table th {
  position: sticky;
  top: 0;
  background: var(--card);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-mute);
  z-index: 1;
}
.all-prices-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.all-prices-table .muted { color: var(--ink-mute); }
.all-prices-table tr:last-child td { border-bottom: 0; }
.ap-name { font-weight: 500; }
.ap-code { font-size: 10.5px; color: var(--ink-mute); margin-left: 6px; letter-spacing: 0.04em; }

/* ─── Platforms (iOS / Android / Web) ─────────────────────────────── */
.platforms {
  margin: 36px 0 8px;
  padding: 24px;
  background: var(--bg-tint);
  border: 1px solid var(--rule);
  border-radius: 16px;
}
.platforms-title {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.platforms-lede {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.platforms-lede [data-price-region] {
  font-weight: 600;
  color: var(--ink);
}
.platform-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 720px) {
  .platform-cards { grid-template-columns: 1fr; }
}
.platform-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.platform-card.unavailable { opacity: 0.55; }
.platform-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--brand-bg);
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 700;
}
.platform-card[data-platform="ios"] .platform-icon::after { content: ""; }
.platform-name { font-size: 13px; }
.platform-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.platform-price .amount {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.platform-price .period {
  font-size: 12.5px;
  color: var(--ink-mute);
}
.platform-price.secondary .amount {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
}
.platform-price.secondary .period {
  font-size: 11.5px;
}
.platform-note {
  margin: 8px 0 0;
  font-size: 11.5px;
  color: var(--ink-mute);
  line-height: 1.5;
}
.platforms-foot {
  margin: 16px 0 0;
  font-size: 11.5px;
  color: var(--ink-mute);
  line-height: 1.55;
  padding-top: 12px;
  border-top: 1px dashed var(--rule);
}

/* ─── 3-platform "all prices" table extensions ────────────────────── */
.all-prices-table .th-group {
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--rule);
}
.all-prices-table .th-group.ios { color: var(--ink-soft); }
.all-prices-table .th-group.android { color: var(--ink-soft); }
.all-prices-table .th-group.web { color: var(--brand-ink); }
.all-prices-table .ios-cell,
.all-prices-table .android-cell {
  font-size: 12.5px;
}
.all-prices-table .android-cell {
  background: oklch(from var(--brand-bg) l c h / 0.35);
}
.all-prices-table .web-cell .web-usd {
  display: block;
  font-weight: 600;
  color: var(--brand-ink);
}
.all-prices-table .web-cell .web-hint {
  display: block;
  font-size: 10.5px;
  color: var(--ink-mute);
  font-weight: 400;
  margin-top: 1px;
}
.all-prices-table-wrap { max-height: 560px; }
