/* Embers — site styles.
   The palette is the app's own (Shared/Theme.swift, `Flame`): the icon's three fixed colours fill
   the gradient blocks in either scheme, and everything drawn on a background is re-stepped for dark
   rather than flipped, exactly as the app does it. */

:root {
  --icon-deep: #b32210;
  --icon-ember: #ec3013;
  --icon-glow: #ff7a1a;
  --gradient: linear-gradient(135deg, var(--icon-deep), var(--icon-ember) 55%, var(--icon-glow));
  --inflow-gradient: linear-gradient(135deg, #0d6b3d, #1f9e59 55%, #52c773);

  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --text: #1c1c1e;
  --text-2: #5b5b60;
  --text-3: #8e8e93;
  --line: rgba(60, 60, 67, 0.12);
  --ember: #ec3013;
  --deep: #b32210;
  --inflow: #1f9e59;
  --outflow: #d92e29;
  --tinted-fill: rgba(236, 48, 19, 0.10);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 28px rgba(0, 0, 0, 0.06);
  --glow-shadow: 0 18px 50px rgba(236, 48, 19, 0.28);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #151517;
  --text: #f5f5f7;
  --text-2: #b4b4bb;
  --text-3: #8e8e93;
  --line: rgba(235, 235, 245, 0.12);
  --ember: #ff6a3d;
  --deep: #ff8a5c;
  --inflow: #3ed98a;
  --outflow: #ff6b63;
  --tinted-fill: rgba(255, 122, 26, 0.18);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 28px rgba(0, 0, 0, 0.45);
  --glow-shadow: 0 18px 60px rgba(255, 90, 30, 0.22);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ember); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--icon-glow); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: 10px;
}
.skip:focus { top: 12px; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.nav { display: flex; gap: 22px; margin-inline-start: auto; }
.nav a { color: var(--text-2); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }

.gh-badge {
  display: inline-flex; align-items: stretch; height: 34px; flex: none;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow);
}
.gh-badge:hover { text-decoration: none; border-color: color-mix(in srgb, var(--ember) 45%, var(--line)); }
.gh-badge svg { width: 16px; height: 16px; align-self: center; margin-inline: 10px 6px; }
.gh-badge .gh-label { align-self: center; padding-inline-end: 10px; }
.gh-badge .gh-count {
  display: inline-flex; align-items: center; padding-inline: 10px;
  border-inline-start: 1px solid var(--line); background: var(--tinted-fill); color: var(--deep);
  font-variant-numeric: tabular-nums;
}
.gh-badge .gh-count[hidden] { display: none; }

.theme-toggle {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--ember);
  cursor: pointer; box-shadow: var(--shadow);
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

@media (max-width: 760px) {
  .nav { display: none; }
  .site-header .gh-badge { margin-inline-start: auto; }
}
@media (max-width: 380px) { .gh-badge .gh-label { display: none; } }

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

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 10px 20px; border-radius: 14px;
  font-weight: 600; font-size: 16px; line-height: 1.15;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn small { display: block; font-size: 11px; font-weight: 500; opacity: .85; letter-spacing: .02em; }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: var(--glow-shadow); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: var(--shadow); }
.btn[aria-disabled="true"] { cursor: default; }
.btn[aria-disabled="true"]:hover { transform: none; }

.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.soon {
  display: inline-block; margin-inline-start: 6px; padding: 2px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, .22); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.btn-secondary .soon { background: var(--tinted-fill); color: var(--deep); }

/* ---------- Hero ---------- */

.hero { position: relative; overflow: hidden; padding: 88px 0 64px; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 720px; height: 720px;
  background: radial-gradient(closest-side, rgba(255, 122, 26, .22), transparent);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--tinted-fill); color: var(--deep);
  font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.hero h1 {
  margin: 18px 0 16px; font-size: clamp(40px, 6vw, 68px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 800;
}
.hero h1 .flame {
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { margin: 0 0 28px; font-size: clamp(18px, 2.1vw, 21px); color: var(--text-2); max-width: 34em; }
.hero .fineprint { margin: 18px 0 0; font-size: 14px; color: var(--text-3); }

.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-visual .phone { width: min(300px, 74vw); transform: rotate(-3deg); }
.hero-visual .phone.back {
  position: absolute; width: min(270px, 64vw); transform: translate(46%, 8%) rotate(6deg); opacity: .96;
  z-index: -1;
}

@media (max-width: 900px) {
  .hero { padding-top: 48px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 12px; }
  .hero-visual .phone.back { display: none; }
  .hero-visual .phone { transform: none; }
}

/* ---------- Phone frame ---------- */

.phone {
  position: relative; border-radius: 46px; padding: 10px;
  background: linear-gradient(160deg, #2a2a2e, #0d0d0f);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .25), inset 0 0 0 1.5px rgba(255, 255, 255, .08);
}
.phone img { border-radius: 37px; width: 100%; aspect-ratio: 1206 / 2622; object-fit: cover; background: var(--surface); }
/* One screenshot per scheme; the page shows whichever matches its own theme. */
.phone .shot-dark { display: none; }
:root[data-theme="dark"] .phone .shot-light { display: none; }
:root[data-theme="dark"] .phone .shot-dark { display: block; }

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

section { padding: 80px 0; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker { color: var(--ember); font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 10px; }
h2 { margin: 0 0 14px; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 800; }
.section-head p { margin: 0; color: var(--text-2); font-size: 19px; }

.alt { background: var(--surface-2); border-block: 1px solid var(--line); }

/* ---------- Highlight cards ---------- */

.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: -24px; }
.highlight {
  border-radius: 22px; padding: 24px; color: #fff; background: var(--gradient); box-shadow: var(--glow-shadow);
}
.highlight.green { background: var(--inflow-gradient); box-shadow: 0 18px 50px rgba(31, 158, 89, .22); }
.highlight.dark { background: linear-gradient(135deg, #1c1c1e, #3a3a3c); box-shadow: var(--shadow); }
.highlight .label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.highlight .big { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 4px; }
.highlight p { margin: 0; opacity: .92; font-size: 15px; }
@media (max-width: 860px) { .highlights { grid-template-columns: 1fr; margin-top: 0; } }

/* ---------- Feature grid ---------- */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 26px;
  box-shadow: var(--shadow);
}
.feature .icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--tinted-fill); color: var(--ember); margin-bottom: 16px;
}
.feature .icon svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--text-2); font-size: 15.5px; }
.feature ul { margin: 10px 0 0; padding-inline-start: 18px; color: var(--text-2); font-size: 15px; }
.feature li + li { margin-top: 4px; }
.feature.wide { grid-column: span 2; }
@media (max-width: 980px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } .feature.wide { grid-column: auto; } }

/* ---------- FX example ---------- */

.fx { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.fx-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow);
}
.fx-card .top { background: var(--gradient); color: #fff; padding: 22px 24px; }
.fx-card .top .ccy { display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-size: 13px; font-weight: 700; }
.fx-card .top .amount { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; margin-top: 8px; }
.fx-card dl { margin: 0; padding: 8px 24px 16px; }
.fx-card .row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.fx-card .row:last-child { border-bottom: 0; }
.fx-card dt { color: var(--text-2); }
.fx-card dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-card .total dd { color: var(--outflow); font-size: 19px; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; color: var(--text-2); }
.checks li::before {
  content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%;
  background: var(--tinted-fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ec3013' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
@media (max-width: 860px) { .fx { grid-template-columns: 1fr; } }

/* ---------- Screenshot gallery ---------- */

.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 250px);
  gap: 26px; overflow-x: auto; padding: 10px 16px 30px; margin: 0 -16px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.gallery figure { margin: 0; scroll-snap-align: center; }
.gallery .phone { border-radius: 38px; padding: 8px; box-shadow: 0 18px 40px rgba(0, 0, 0, .18); }
.gallery .phone img { border-radius: 31px; }
.gallery figcaption { text-align: center; margin-top: 14px; font-weight: 600; }
.gallery figcaption span { display: block; color: var(--text-3); font-weight: 400; font-size: 14px; }

/* ---------- Languages ---------- */

.languages { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0; padding: 0; list-style: none; }
.languages li {
  padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-weight: 600; box-shadow: var(--shadow);
}
.languages li span { color: var(--text-3); font-weight: 400; margin-inline-start: 6px; font-size: 14px; }

/* ---------- Pricing / license ---------- */

.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 30px; box-shadow: var(--shadow); }
.plan-card.featured { border: 2px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--gradient) border-box; }
.plan-card h3 { margin: 0 0 4px; font-size: 22px; }
.plan-card .price { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; margin: 10px 0 6px; }
.plan-card .price small { font-size: 15px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.plan-card p { color: var(--text-2); margin: 0 0 16px; }
.plan-card .checks { margin: 0 0 24px; }
@media (max-width: 800px) { .pricing { grid-template-columns: 1fr; } }

.license-note { margin-top: 26px; text-align: center; color: var(--text-2); font-size: 15px; }

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

.faq { max-width: 820px; margin-inline: auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 0 22px; margin-bottom: 12px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ember); font-size: 22px; line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--text-2); }

/* ---------- CTA + footer ---------- */

.cta {
  border-radius: 32px; padding: 56px 32px; text-align: center; color: #fff;
  background: var(--gradient); box-shadow: var(--glow-shadow); position: relative; overflow: hidden;
}
.cta img { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.cta h2 { color: #fff; }
.cta p { margin: 0 auto 28px; max-width: 34em; opacity: .92; font-size: 18px; }
.cta .store-buttons { justify-content: center; }
.cta .btn-secondary { background: #fff; color: #1c1c1e; border-color: transparent; }
.cta .btn-secondary .soon { background: rgba(236, 48, 19, .12); color: var(--icon-deep); }

.site-footer { padding: 40px 0 56px; color: var(--text-3); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--text-2); }

/* ---------- Prose pages (privacy, license, support) ---------- */

.prose { max-width: 760px; margin-inline: auto; padding: 56px 0 80px; }
.prose h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 8px; }
.prose .updated { color: var(--text-3); margin: 0 0 36px; }
.prose h2 { font-size: 24px; margin: 40px 0 10px; letter-spacing: -0.015em; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); }
.prose .card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; box-shadow: var(--shadow); }
.prose pre {
  white-space: pre-wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; font: 14px/1.6 ui-monospace, "SF Mono", Menlo, monospace; color: var(--text);
}
