/* SwiftBrief — swiftbrief.app
   Brand: gold swift (#FFCC00) on a near-black ground; red→black is the icon
   ground and is used only as a glow; blue (#007AFF) is reserved for
   interactive states. System font stack so Apple visitors get SF Pro. */

:root {
  color-scheme: light;
  --gold: #FFCC00;
  --gold-deep: #8A6500;      /* gold as *text* on light backgrounds (AA) */
  --red: #FF3B30;
  --blue: #007AFF;

  --bg: #FAFAF7;
  --bg-elev: #FFFFFF;
  --bg-sunk: #F1F1EC;
  --ink: #111114;
  --ink-2: #4A4A52;
  --ink-3: #6E6E78;
  --line: rgba(17, 17, 20, 0.10);
  --line-strong: rgba(17, 17, 20, 0.18);
  --accent-text: var(--gold-deep);
  --link: #0062CC;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 40px rgba(17,17,20,.08);
  --device-bg: #0B0B0F;
  --glow: rgba(255, 59, 48, 0.10);
  --header-bg: rgba(250, 250, 247, 0.82);
}

:root[data-theme="dark"] {
  --bg: #0B0B0F;
  --bg-elev: #141419;
  --bg-sunk: #08080B;
  --ink: #F4F4F6;
  --ink-2: #B9B9C2;
  --ink-3: #8C8C97;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --accent-text: var(--gold);
  --link: #4DA3FF;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 20px 60px rgba(0,0,0,.5);
  --glow: rgba(255, 59, 48, 0.16);
  --header-bg: rgba(11, 11, 15, 0.78);
}

/* ---------- base ---------- */
*, *::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;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif; letter-spacing: -0.02em; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; z-index: 100; text-decoration: none; }
.skip-link:focus { top: 12px; }

.container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
@media (max-width: 480px) { .container { width: calc(100% - 32px); } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.lockup .mark { width: 38px; height: 28px; flex: none; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { color: var(--ink); background: var(--bg-sunk); }
.nav .cta { color: var(--ink); background: var(--gold); font-weight: 600; margin-left: 6px; }
.nav .cta:hover { background: #F2C200; color: #111; }
:root[data-theme="dark"] .nav .cta { color: #111; }
@media (max-width: 640px) { .nav a:not(.cta) { display: none; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid var(--line-strong); color: var(--ink); background: var(--bg-elev); }
.btn:hover { border-color: var(--ink-3); }
.btn-primary { background: var(--gold); border-color: transparent; color: #111; }
.btn-primary:hover { background: #F2C200; color: #111; }
.badge-link { display: inline-block; line-height: 0; border-radius: 10px; }
.badge-link img { height: 54px; width: auto; display: block; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto -20%; height: 120%; pointer-events: none;
  background: radial-gradient(60% 50% at 30% 20%, var(--glow), transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.hero h1 { font-size: clamp(38px, 6vw, 68px); font-weight: 800; letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; color: var(--accent-text); }
.hero .lead { font-size: clamp(17px, 2vw, 21px); color: var(--ink-2); max-width: 34em; margin-top: 20px; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 30px; }
.price-note { font-size: 15px; color: var(--ink-3); }
.price-note strong { color: var(--ink); font-weight: 600; }
.platforms-line { margin-top: 26px; font-size: 14px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.platforms-line span::before { content: "✓ "; color: var(--accent-text); }

.device { position: relative; margin: 0; justify-self: center; width: min(320px, 78vw); filter: drop-shadow(0 30px 60px rgba(0,0,0,.35)); }
.device img { width: 100%; height: auto; display: block; border-radius: 12%/6%; }
.device figcaption { margin-top: 14px; text-align: center; font-size: 14px; color: var(--ink-3); }

@media (max-width: 880px) {
  .hero { padding-top: 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .device { width: min(280px, 72vw); }
}

/* ---------- sections ---------- */
.section { padding: 72px 0; scroll-margin-top: 64px; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 40em; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; }
.section-head p { margin-top: 14px; font-size: 18px; color: var(--ink-2); }
.kicker { display: block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 12px; }

/* ---------- reader demo: app mock ---------- */
.idea-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); gap: 40px; align-items: start; }
@media (max-width: 880px) { .idea-grid { grid-template-columns: 1fr; } }
.demo-col { display: grid; gap: 18px; }
.app-mock { --am-accent: #FEAD02; background: #000; color: #F4F4F6; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.08); outline-offset: 4px; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif; }
.app-mock svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.am-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; background: #0b0b0b; }
.am-round { width: 36px; height: 36px; border-radius: 50%; background: #1e1e1e; display: grid; place-items: center; color: #F4F4F6; }
.am-title { flex: 1; text-align: center; font-weight: 600; font-size: 16px; }
.am-pill { display: flex; align-items: center; gap: 14px; height: 36px; padding: 0 14px; border-radius: 999px; background: #1e1e1e; }
.am-doc { position: relative; background: #1a1a1a; padding: 0 44px; }
.am-doc-btn { position: absolute; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: rgba(120,120,120,.55); display: grid; place-items: center; color: #fff; z-index: 2; }
.am-doc-btn svg { width: 16px; height: 16px; }
.am-doc-btn:first-child { left: 8px; } .am-doc-btn:nth-child(2) { left: 44px; background: rgba(120,120,120,.35); }
.am-page { background: #fff; color: #222; height: 190px; overflow: hidden; padding: 30px 22px 16px; font-size: 12.5px; line-height: 1.5; position: relative; }
.am-page::after { content: ""; position: absolute; inset: auto 0 0 0; height: 36px; background: linear-gradient(transparent, #fff); pointer-events: none; }
.am-page h4 { margin: 0 0 6px; font-size: 14px; letter-spacing: -0.01em; }
.am-page p { margin: 0; }
.am-page span { border-radius: 3px; padding: 1px 0; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.am-page span.hl { background: rgba(254,173,2,.45); }
.am-panel { position: relative; padding: 14px 16px 18px; background: radial-gradient(60% 40% at 50% 115%, rgba(254,173,2,.18), transparent 70%), #000; }
.am-skips { display: flex; justify-content: flex-end; gap: 10px; }
.am-skips button, .am-wpm button { font: inherit; color: #F4F4F6; background: #1e1e1e; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.am-skips button { width: 34px; height: 34px; }
.am-skips button:hover, .am-wpm button:hover { background: #2c2c2e; }
.am-skips button:focus-visible, .am-wpm button:focus-visible, .am-word-area:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.am-word-area { display: grid; place-items: center; width: 100%; min-height: 128px; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; border-radius: 12px; }
.am-playicon { width: 64px; height: 64px; stroke: none; fill: #8e8e93; }
.am-playicon path { fill: #000; }
.is-started .am-playicon { display: none; }
.rsvp-word { display: none; font-size: clamp(30px, 5vw, 42px); font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.is-started .rsvp-word { display: block; }
.rsvp-word .orp { color: var(--am-accent); }
.am-wpm { display: flex; align-items: center; justify-content: space-between; }
.am-wpm button { width: 46px; height: 46px; font-size: 26px; font-weight: 600; }
.am-wpm .wpm { font-variant-numeric: tabular-nums; font-size: 18px; color: #8e8e93; }
.am-wpm .wpm strong { color: #F4F4F6; font-size: 24px; font-weight: 700; margin-right: 4px; }

/* ---------- reader demo: controls panel (not part of the app) ---------- */
.demo-panel { background: var(--bg-elev); border: 1px dashed var(--line-strong); border-radius: 18px; padding: 20px 22px 18px; }
.demo-panel-head h3 { font-size: 20px; margin: 4px 0 6px; }
.demo-panel-head p { color: var(--ink-2); font-size: 15px; }
.demo-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 16px; }
.demo-buttons { display: flex; gap: 8px; }
.demo-buttons .btn { padding: 9px 16px; font-size: 15px; }
.seg { border: 0; padding: 0; margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--ink-3); }
.seg legend { float: left; padding: 0; margin-right: 4px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-block; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink); cursor: pointer; background: var(--bg); }
.seg span:hover { border-color: var(--ink-3); }
.seg input:checked + span { background: var(--gold); border-color: var(--gold); color: #111; font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.rsvp-progress { height: 4px; background: var(--bg-sunk); border-radius: 999px; margin-top: 16px; overflow: hidden; }
.rsvp-progress span { display: block; height: 100%; width: 0; background: var(--gold); border-radius: 999px; }
.rsvp-status { font-size: 13px; color: var(--ink-3); margin-top: 8px; font-variant-numeric: tabular-nums; }
.idea-copy h3 { font-size: 20px; margin: 22px 0 6px; }
.idea-copy h3:first-child { margin-top: 0; }
.idea-copy p { color: var(--ink-2); }

/* ---------- features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
@media (max-width: 960px) { .feature-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }
.feature { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.feature .shot { background: var(--device-bg); padding: 24px 24px 0; display: flex; justify-content: center; }
.feature .shot img { width: 62%; max-width: 220px; height: auto; display: block; border-radius: 12% 12% 0 0 / 6% 6% 0 0; }
.feature .body { padding: 20px 22px 24px; }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--ink-2); font-size: 15.5px; }
.feature.wide { grid-column: span 2; }
@media (max-width: 600px) { .feature.wide { grid-column: auto; } }
.feature.text-only .body { padding-top: 26px; }
.feature .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,204,0,.16); color: var(--accent-text); margin-bottom: 14px; }
.feature .icon svg { width: 22px; height: 22px; }
.fine { font-size: 13px; color: var(--ink-3); margin-top: 10px; }

/* ---------- ipad band ---------- */
.band { background: var(--device-bg); color: #F4F4F6; border-radius: 28px; padding: 56px 40px 0; overflow: hidden; display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 40px; align-items: end; }
.band .kicker { color: var(--gold); }
.band h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; }
.band p { color: #B9B9C2; margin-top: 12px; }
.band .copy { padding-bottom: 56px; }
.band img { display: block; width: 100%; height: auto; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.5); }
@media (max-width: 880px) { .band { grid-template-columns: 1fr; padding: 40px 24px 0; } .band .copy { padding-bottom: 0; } }

/* ---------- privacy ---------- */
.privacy-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
@media (max-width: 800px) { .privacy-grid { grid-template-columns: 1fr; } }
.privacy-item { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-elev); }
.privacy-item h3 { font-size: 18px; margin-bottom: 8px; }
.privacy-item p { color: var(--ink-2); font-size: 15.5px; }

/* ---------- platforms ---------- */
.platform-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
@media (max-width: 800px) { .platform-list { grid-template-columns: 1fr; } }
.platform { padding: 20px; border-radius: 16px; background: var(--bg-sunk); }
.platform strong { display: block; font-size: 17px; margin-bottom: 4px; }
.platform span { color: var(--ink-3); font-size: 14px; }

/* ---------- pricing / cta ---------- */
.cta-panel { text-align: center; padding: 64px 24px; border-radius: 28px; background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.cta-panel::before { content: ""; position: absolute; inset: -60% -20% auto -20%; height: 120%; background: radial-gradient(50% 45% at 50% 30%, var(--glow), transparent 70%); pointer-events: none; }
.cta-panel > * { position: relative; }
.cta-panel .mark { width: 96px; height: auto; margin-bottom: 14px; }
.cta-panel h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.cta-panel .price { font-size: clamp(34px, 5vw, 52px); font-weight: 800; letter-spacing: -0.03em; margin: 18px 0 4px; font-variant-numeric: tabular-nums; }
.cta-panel .price small { font-size: .45em; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.cta-panel .terms { color: var(--ink-2); max-width: 32em; margin-inline: auto; }
.cta-panel .actions { display: flex; justify-content: center; margin-top: 26px; }
.cta-panel .fine { margin-top: 18px; }

/* ---------- footer ---------- */
.footer { padding: 40px 0 56px; color: var(--ink-3); font-size: 14px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer .links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer .links a { color: var(--ink-2); text-decoration: none; }
.footer .links a:hover { color: var(--ink); text-decoration: underline; }
.legal-note { margin-top: 16px; font-size: 12.5px; line-height: 1.6; max-width: 70em; }

/* ---------- document pages (privacy / support) ---------- */
.page-hero { padding: 64px 0 28px; }
.page-hero h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; }
.page-hero .lead { margin-top: 12px; color: var(--ink-2); font-size: 18px; max-width: 40em; }
.prose { max-width: 42em; padding-bottom: 72px; }
.prose h2 { font-size: 22px; margin: 36px 0 10px; }
.prose h3 { font-size: 18px; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--ink-2); margin-bottom: 12px; }
.prose ul { padding-left: 22px; margin: 0 0 12px; }
.prose .callout { border-left: 3px solid var(--gold); padding: 12px 16px; background: var(--bg-sunk); border-radius: 0 12px 12px 0; margin: 20px 0; }
.prose .callout p { margin: 0; color: var(--ink); }
.contact-card { display: inline-flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--line); font-weight: 600; text-decoration: none; color: var(--ink); margin: 8px 0 16px; }
.contact-card:hover { border-color: var(--ink-3); }

/* ---------- device family ---------- */
.family { position: relative; aspect-ratio: 16 / 9.4; margin: 8px auto 36px; max-width: 1040px; }
.family .dev { position: absolute; margin: 0; }
.family .screen { position: relative; overflow: hidden; background: #000; }
.family .screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
/* MacBook: screen + hinge + base */
.dev-mac { left: 26%; top: 0; width: 70%; z-index: 1; }
.dev-mac .screen { aspect-ratio: 2724 / 1716; border-radius: 1.6% / 2.6%; border: 0.9% solid #1c1c1f; box-shadow: 0 30px 60px rgba(0,0,0,.35); }
.dev-mac .screen::before { content: ""; position: absolute; top: 0; left: 50%; width: 9%; height: 2.6%; transform: translateX(-50%); background: #1c1c1f; border-radius: 0 0 8px 8px; z-index: 2; }
.dev-mac .base { height: 0; padding-top: 2.4%; margin: 0 -6% 0; background: linear-gradient(#d9d9dd, #a9a9ae); border-radius: 0 0 14px 14px / 0 0 100% 100%; position: relative; }
.dev-mac .base::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 16%; height: 30%; background: #8e8e93; border-radius: 0 0 8px 8px; opacity: .8; }
/* iPad */
.dev-ipad { left: 2%; top: 13%; width: 25%; z-index: 2; }
.dev-ipad .screen { aspect-ratio: 1668 / 2420; border-radius: 6% / 4.2%; border: 2.8% solid #1c1c1f; box-shadow: 0 30px 50px rgba(0,0,0,.35); }
/* iPhone */
.dev-iphone { left: 24%; top: 41%; width: 13%; z-index: 3; }
.dev-iphone .screen { aspect-ratio: 628 / 1376; border-radius: 15% / 7%; border: 3.5% solid #1c1c1f; box-shadow: 0 30px 50px rgba(0,0,0,.4); }
.dev-iphone .screen::before { content: ""; position: absolute; top: 2.4%; left: 50%; width: 32%; height: 3%; transform: translateX(-50%); background: #000; border-radius: 999px; z-index: 2; }
/* Apple Watch */
.dev-watch { left: 11%; top: 70%; width: 9.5%; z-index: 4; }
.dev-watch .screen { aspect-ratio: 422 / 514; border-radius: 26%; border: 5% solid #1c1c1f; box-shadow: 0 20px 40px rgba(0,0,0,.4); }
.dev-watch::before, .dev-watch::after { content: ""; position: absolute; left: 22%; width: 56%; height: 14%; background: #2a2a2e; border-radius: 6px; z-index: -1; }
.dev-watch::before { top: -10%; } .dev-watch::after { bottom: -10%; }
.dev-watch .crown { position: absolute; right: -6%; top: 30%; width: 7%; height: 16%; background: #3a3a3e; border-radius: 3px; }
@media (max-width: 640px) {
  .family { aspect-ratio: 16 / 11; }
  .dev-mac { left: 22%; width: 78%; }
  .dev-ipad { left: 0; width: 29%; top: 16%; }
  .dev-iphone { left: 26%; width: 15%; top: 44%; }
  .dev-watch { left: 9%; width: 12%; top: 72%; }
}
