/* Sum Rockets – one stylesheet for every page. No external fonts, no
   frameworks. Colours are the app's own (Theme.swift, SpaceBackground). */

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --space-1: #2256a5;
  --space-2: #6045a8;
  --space-3: #8b58b6;
  --ink: #24304a;
  --muted: #5d6679;
  --cream: #fffaf2;
  --card: #ffffff;
  --line: #e8e8ef;
  --brand: #5b5bd6;
  --brand-edge: #3d3da8;
  --brand-text: #4747c2;
  --yellow: #ffc94f;
  --yellow-edge: #d99a1e;
  --green: #1b7f4f;
  --green-soft: #e3f5ec;
  --radius: 22px;
  --shadow: 0 4px 0 rgba(36, 48, 74, 0.12);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f4fa;
    --muted: #b3bad0;
    --cream: #141a2e;
    --card: #232a45;
    --line: #333b5c;
    --brand-text: #a9a9f5;
    --green: #5fd39a;
    --green-soft: #173b2c;
    --shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
  }
}

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

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

body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}

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

a { color: var(--brand-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--card); color: var(--ink);
  padding: 10px 16px; border-radius: 12px; z-index: 10;
  font-weight: 800;
}
.skip-link:focus { top: 12px; }

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

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 900; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 8.6vw, 4.2rem); text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); }
h3 { font-size: 1.25rem; }

/* Space sections: the app's purple-blue gradient with soft stars. */
.space {
  position: relative;
  color: #fff;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,.9) 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 72%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(2px 2px at 46% 30%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 86%, rgba(255,255,255,.6) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 78% 12%, rgba(255,255,255,.85) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 58%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 6% 88%, rgba(255,255,255,.6) 50%, transparent 51%),
    linear-gradient(135deg, var(--space-1), var(--space-2) 55%, var(--space-3));
}
.space a:not(.btn) { color: #fff; }

/* Header */
.site-header { padding: 14px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 900; font-size: 1.2rem; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a { color: #fff; text-decoration: none; font-weight: 800; padding: 6px 2px; }
.site-nav a:hover { text-decoration: underline; }

/* Chunky buttons, like the app's ChunkyButtonStyle. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 14px 26px;
  border-radius: 18px; border: 2px solid #fff;
  font: inherit; font-weight: 900; font-size: 1.1rem; text-decoration: none;
  color: #fff; background: var(--brand);
  box-shadow: 0 6px 0 var(--brand-edge);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--brand-edge); }

/* Before launch: our own button – never Apple's badge. */
.btn--soon { color: #24304a; background: var(--yellow); box-shadow: 0 6px 0 var(--yellow-edge); }
.btn--soon:active { box-shadow: 0 2px 0 var(--yellow-edge); }
.btn--static { cursor: default; }
.btn--static:active { transform: none; box-shadow: 0 6px 0 var(--yellow-edge); }
.download { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.download__caption { margin: 0; font-size: 0.95rem; font-weight: 700; opacity: 0.95; }
.download--centre { align-items: center; text-align: center; }
.app-store-badge { height: 54px; width: auto; }

/* Hero */
.hero { padding: 8px 0 72px; overflow: hidden; }
.hero__grid { display: grid; gap: 32px; align-items: center; }
.hero__copy p.lede { font-size: clamp(1.15rem, 2.6vw, 1.4rem); font-weight: 700; margin: 0 0 28px; max-width: 34ch; }
.hero__art { position: relative; display: flex; justify-content: center; min-height: 420px; }
.hero__mascot { position: absolute; left: -10%; top: -30px; width: min(76%, 400px); z-index: 2; }
@media (prefers-reduced-motion: no-preference) {
  .hero__mascot { animation: float 5s ease-in-out infinite; }
}
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(1deg); } }

.phone {
  position: relative;
  width: min(260px, 70vw);
  padding: 10px;
  border-radius: 46px;
  background: #1b1f33;
  border: 2px solid rgba(255,255,255,.2);
  box-shadow: 0 24px 50px rgba(15, 18, 50, .45);
}
.phone img { border-radius: 36px; width: 100%; }
.hero .phone { margin-top: 110px; margin-left: 30%; }

@media (min-width: 860px) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; }
  .hero { padding-bottom: 96px; }
  .hero .phone { margin-top: 40px; margin-left: 35%; }
}

/* Sections */
.section { padding: 72px 0; }
.section__intro { max-width: 60ch; margin: 0 0 32px; color: var(--muted); font-size: 1.15rem; }

.features { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column;
}
.card__img { aspect-ratio: 760 / 564; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.nowrap { white-space: nowrap; }
.card__body { padding: 18px 20px 22px; }
.card__icon { display: block; color: var(--brand-text); margin-bottom: 10px; }
.card__body p { margin: 0; color: var(--muted); }

/* Screenshot strip: CSS scroll-snap only. */
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(240px, 70vw);
  gap: 16px; overflow-x: auto; padding: 8px 4px 20px;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
}
.strip figure { margin: 0; scroll-snap-align: start; }
.strip img { border-radius: 18px; box-shadow: var(--shadow); }
.strip:focus-visible { outline-offset: 6px; }

/* Pricing and privacy */
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(22px, 4vw, 40px);
}
.price { font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 800; margin: 0; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: baseline; }
.ticks li::before { content: "✓"; font-weight: 900; color: var(--green); }

.two-col { display: grid; gap: 18px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; } }

.cta { text-align: center; padding: 80px 0; }
.cta p { font-size: 1.2rem; font-weight: 700; margin: 0 0 26px; }

/* Footer */
.site-footer { padding: 36px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: grid; gap: 10px; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { font-weight: 800; }
.site-footer p { margin: 0; }

/* Text pages (privacy, support) */
.page-head { padding: 8px 0 48px; }
.page-head p { margin: 0; font-weight: 700; opacity: .95; }
.prose { max-width: 72ch; padding: 48px 0 64px; }
.prose h2 { font-size: 1.5rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose li { margin-bottom: 6px; }
.prose table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 0.98rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 900; }
.table-scroll { overflow-x: auto; }
.callout { background: var(--green-soft); border-radius: 16px; padding: 16px 20px; font-weight: 700; }

/* FAQ accordion: <details>, no JS. */
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  margin-bottom: 12px; box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 48px 16px 20px;
  font-weight: 900; font-size: 1.08rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--brand-text);
}
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 20px 18px; }
.faq .answer p:first-child { margin-top: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
