/* MyMoooolah — design tokens ported from the app.
   Source of truth: MyMoooolah/ThemeColorTokens.swift (blue theme).
   Variable names match the CSS names the Swift tokens are commented with. */

:root {
  --a:       #3B82F6;   /* accent            */
  --aS:      #2563EB;   /* accentStrong      */
  --a2:      #60A5FA;   /* accent2           */
  --a3:      #93C5FD;   /* accent3           */
  --tint:    #E3EDFD;
  --bg:      #F3F4F6;
  --card:    #FFFFFF;
  --card2:   #F8FAFC;
  --hero:    #1F242E;
  --text:    #1F242E;
  --text2:   #6B7280;
  --line:    rgba(31, 36, 46, 0.10);
  --onA:     #FFFFFF;
  --good:    #15803D;
  --bad:     #C62828;
  --goodbg:  #E7F3EB;
  --badbg:   #FBEAEA;

  /* The brand gradient is fixed: it follows the theme, never light/dark.
     BrandColourway.forTheme(.blue), CSS 160deg, stops 0 / 0.62 / 1. */
  --brand-gradient: linear-gradient(160deg, #60A5FA 0%, #3B82F6 62%, #2563EB 100%);

  --radius:    22px;
  --radius-sm: 14px;
  --maxw:      1080px;
  --header-h:  64px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --a:      #60A5FA;
    --aS:     #93C5FD;
    --a2:     #3B82F6;
    --a3:     #93C5FD;
    --tint:   rgba(96, 165, 250, 0.16);
    --bg:     #13161D;
    --card:   #1F242E;
    --card2:  #262C38;
    --hero:   #262C38;
    --text:   #F4F6FA;
    --text2:  rgba(244, 246, 250, 0.62);
    --line:   rgba(255, 255, 255, 0.10);
    --onA:    #0B1220;
    --good:   #34D399;
    --bad:    #F87171;
    --goodbg: rgba(52, 211, 153, 0.14);
    --badbg:  rgba(248, 113, 113, 0.14);
  }
}

/* ---------- base ---------- */

*, *::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: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.12; margin: 0; letter-spacing: -0.035em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
p  { margin: 0; }

a { color: var(--aS); }

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--a);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 16px; }

section { padding-block: clamp(48px, 8vw, 88px); }
section > .wrap > * + * { margin-top: 24px; }

/* Anchors must clear the sticky header. */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text2);
}

.lede { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--text2); max-width: 62ch; }

.skip {
  position: absolute; left: -9999px;
  background: var(--card); color: var(--text);
  padding: 12px 18px; border-radius: var(--radius-sm); z-index: 100;
}
.skip:focus { left: 16px; top: 12px; }

/* ---------- brand lockup ---------- */

.mark { display: block; border-radius: 22.55%; }

.wordmark {
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text);
  white-space: nowrap;
}
.wordmark .trio { color: var(--aS); }

.lockup { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-header .wordmark { font-size: 1.12rem; }

.nav { display: flex; align-items: center; gap: 22px; }
.nav a {
  color: var(--text2); text-decoration: none;
  font-weight: 600; font-size: 0.95rem;
}
.nav a:hover { color: var(--text); }

@media (max-width: 560px) {
  .nav { gap: 16px; }
  .nav a.hide-sm { display: none; }
}

/* ---------- hero ---------- */

.hero {
  background: var(--brand-gradient);
  color: #fff;
  text-align: center;
  padding-block: clamp(56px, 9vw, 104px);
}
.hero h1 { color: #fff; max-width: 16ch; margin-inline: auto; text-wrap: balance; }
.hero .sub {
  margin-top: 20px; margin-inline: auto;
  max-width: 54ch;
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.92);
}

.cta-row { margin-top: 30px; display: flex; justify-content: center; }

.cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700; font-size: 1rem;
  background: #fff; color: var(--aS);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}
.cta.pending {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: none;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  cursor: default;
}
.cta-note { margin-top: 14px; font-size: 0.88rem; color: rgba(255, 255, 255, 0.78); }

.hero-shot { margin-top: clamp(36px, 6vw, 56px); }
.hero-shot img {
  width: min(272px, 70vw); height: auto;
  border-radius: 15% / 7%;
  box-shadow: 0 30px 70px rgba(10, 20, 40, 0.34);
}

/* ---------- fact pills ---------- */

.facts { padding-block: clamp(32px, 5vw, 48px); }
/* An equal-width grid rather than wrapping flex: six pills of different
   lengths wrapped five-and-one, which read as misaligned. Three columns
   breaks them into two even rows, two columns into three, one on a phone. */
.pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 860px;
  margin-inline: auto;
}
@media (max-width: 799px) { .pills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 539px) { .pills { grid-template-columns: 1fr; max-width: 360px; } }
.pill {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  text-align: center;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 650; font-size: 0.92rem;
  color: var(--text);
}
.pill .tick { color: var(--good); font-weight: 800; }

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

.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
}
.grid.two-up { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.card h3 { margin-bottom: 10px; }
.card p  { color: var(--text2); font-size: 0.97rem; }

.card ul { margin: 12px 0 0; padding-left: 0; list-style: none; }
.card li {
  position: relative; padding-left: 20px; margin-top: 8px;
  color: var(--text2); font-size: 0.95rem;
}
.card li::before {
  content: ""; position: absolute; left: 0; top: 0.6em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--a);
}

.icon-tile {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--tint); color: var(--aS);
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.icon-tile svg { width: 24px; height: 24px; display: block; }

/* ---------- dark feature card ---------- */

.slab {
  background: var(--hero);
  color: #F4F6FA;
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 52px);
}
.slab h2 { color: #fff; max-width: 20ch; }
.slab p  { color: rgba(244, 246, 250, 0.72); margin-top: 18px; max-width: 64ch; }
.slab .eyebrow { color: var(--a3); }
.slab ul { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.slab li {
  position: relative; padding-left: 22px;
  color: rgba(244, 246, 250, 0.82); font-size: 0.98rem;
}
.slab li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--a2);
}

/* ---------- screenshot scroller ---------- */

.shots {
  display: flex; gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 16px 20px;
  margin-inline: -16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.shots img {
  flex: 0 0 auto;
  width: 240px; height: auto;
  border-radius: 20px;
  scroll-snap-align: center;
  border: 1px solid var(--line);
}

/* ---------- theme swatches ---------- */

.themes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.theme {
  border-radius: var(--radius-sm);
  padding: 18px;
  color: #fff;
  font-weight: 700;
  min-height: 92px;
  display: flex; align-items: flex-end;
}
.theme.blue  { background: linear-gradient(160deg, #60A5FA 0%, #3B82F6 62%, #2563EB 100%); }
.theme.green { background: linear-gradient(160deg, #34D399 0%, #10B981 62%, #047857 100%); }
.theme.amber { background: linear-gradient(160deg, #FBBF24 0%, #F59E0B 62%, #B45309 100%); color: #18181B; }
.theme.pink  { background: linear-gradient(160deg, #F472B6 0%, #EC4899 62%, #BE185D 100%); }

/* ---------- prose (privacy / support) ---------- */

.page-head {
  background: var(--brand-gradient);
  color: #fff;
  padding-block: clamp(40px, 7vw, 72px);
}
.page-head h1 { color: #fff; }
.page-head .updated { margin-top: 14px; color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; }

.prose { max-width: 72ch; }
.prose h2 {
  font-size: 1.35rem; font-weight: 800;
  margin-top: 44px; padding-top: 4px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 28px; }
.prose p, .prose li { color: var(--text2); font-size: 1rem; }
.prose p { margin-top: 14px; }
.prose ul { margin-top: 14px; padding-left: 22px; }
.prose li { margin-top: 8px; }
.prose strong { color: var(--text); font-weight: 700; }

.callout {
  margin-top: 22px;
  background: var(--tint);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
}
.callout p { color: var(--text); margin-top: 0; }
.callout p + p { margin-top: 12px; }

.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 24px;
}
.contact-card .email {
  display: inline-block; margin-top: 10px;
  font-size: clamp(1.05rem, 3.2vw, 1.4rem);
  font-weight: 800; letter-spacing: -0.02em;
  color: var(--aS); text-decoration: none;
  word-break: break-all;
}

details.faq {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin-top: 12px;
}
details.faq summary {
  cursor: pointer; font-weight: 700; color: var(--text);
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--a); font-weight: 800; font-size: 1.3rem; line-height: 1; }
details.faq[open] summary::after { content: "\2212"; }
details.faq p { color: var(--text2); margin-top: 12px; }
details.faq p + p { margin-top: 10px; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 40px;
  background: var(--card2);
}
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: 18px;
  align-items: center; justify-content: space-between;
}
.site-footer .links { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--text2); text-decoration: none; font-weight: 600; font-size: 0.93rem; }
.site-footer a:hover { color: var(--text); }
.site-footer .wrap.legal {
  display: block;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--line);
}
.site-footer .legal p { color: var(--text2); font-size: 0.8rem; line-height: 1.6; max-width: 88ch; }
.site-footer .legal p + p { margin-top: 8px; }
.site-footer .legal .copyright { color: var(--text); font-weight: 600; }
.site-footer .legal .copyright a { margin-left: 6px; font-size: 0.8rem; text-decoration: underline; text-underline-offset: 2px; }
