/*
 * MintChip — website design system.
 *
 * Values are taken from the app's own tokens (src/theme/tokens.ts) rather than
 * re-picked by eye, so the site and the app cannot drift apart:
 *   - background        homePalette.background* (the mint-sky-aqua recipe)
 *   - card + shadow     homeRadius.card / homeShadowV2.card
 *   - text              homePaletteV2.textPrimary / textSecondary
 *   - accents           homePalette.accent*
 * Type scale is NOT copied from homeFontSizeV2 — those are device-point values
 * for a 402pt phone frame and read microscopic on a desktop viewport. The
 * relative hierarchy is preserved, the absolute sizes are re-based for web.
 */

:root {
  /* Surfaces — homePalette */
  --bg-base: #f6fbfb;
  --bg-mint: 161, 233, 215;
  --bg-sky: 152, 206, 255;
  --bg-teal: 179, 242, 233;
  --bg-blue: 197, 228, 255;
  --card: #ffffff;

  /* Text — homePaletteV2 */
  --ink: #2e316b;
  --ink-soft: #696981;
  --ink-faint: #9a9184;

  /* Accents — homePalette */
  --accent: #5085da;
  --accent-soft: #8bc1ea;
  --green: #07c709;
  --orange: #e54621;
  --mint-fill: #d5f9f1;
  --divider: #d6d6d6;
  --track: #ededed;

  /* Geometry — homeRadius / homeShadowV2 */
  --r-card: 15px;
  --r-lg: 24px;
  --r-pill: 999px;
  --shadow-card: 0 4px 4px rgba(0, 0, 0, 0.03);
  --shadow-lift: 0 10px 30px rgba(46, 49, 107, 0.08);

  --measure: 42rem;
  --gutter: clamp(1.25rem, 5vw, 2rem);

  /* SF Pro on Apple platforms (the app's iOS face), Inter elsewhere (the app's
     Android/web face) — same pairing as homeFontStyle() in src/theme/index.ts. */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI",
    Roboto, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------------------------------------------------------------------------
   The mint-sky-aqua background.

   The app paints this with react-native-svg: a base fill, four overlapping
   radial gradients, then a linear fade to solid by ~70% height. CSS stacks
   the same recipe in one background shorthand — first layer is topmost, so
   the fade is listed first and the base colour last.
   --------------------------------------------------------------------------- */
.aurora {
  position: absolute;
  inset: 0 0 auto 0;
  height: min(190vh, 1500px);
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(246, 251, 251, 0) 0%,
      rgba(246, 251, 251, 0.55) 45%,
      rgba(246, 251, 251, 1) 72%
    ),
    radial-gradient(
      62% 55% at 12% 6%,
      rgba(var(--bg-mint), 0.85) 0%,
      rgba(var(--bg-mint), 0) 100%
    ),
    radial-gradient(
      58% 52% at 92% 10%,
      rgba(var(--bg-sky), 0.75) 0%,
      rgba(var(--bg-sky), 0) 100%
    ),
    radial-gradient(
      70% 48% at 50% 34%,
      rgba(var(--bg-teal), 0.7) 0%,
      rgba(var(--bg-teal), 0) 100%
    ),
    radial-gradient(
      64% 50% at 8% 62%,
      rgba(var(--bg-blue), 0.6) 0%,
      rgba(var(--bg-blue), 0) 100%
    ),
    var(--bg-base);
}

/* --- Layout ------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wrap--narrow {
  max-width: var(--measure);
}

section {
  padding: clamp(3.5rem, 9vw, 6.5rem) 0;
}

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

.site-head {
  padding: 1.5rem 0;
}

.site-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: var(--shadow-card);
}

.site-head nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.site-head nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-head nav a:hover {
  color: var(--ink);
}

@media (max-width: 34rem) {
  .site-head nav {
    display: none;
  }
}

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

.hero {
  padding-top: clamp(2rem, 6vw, 4rem);
  text-align: center;
}

.hero__icon {
  width: clamp(88px, 18vw, 116px);
  height: auto;
  border-radius: 26px;
  box-shadow: var(--shadow-lift);
  margin-bottom: 1.75rem;
}

h1 {
  font-size: clamp(2.25rem, 6.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}

.hero__sub {
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34rem;
  margin: 0 auto 2.25rem;
  text-wrap: pretty;
}

.hero__note {
  font-size: 0.9rem;
  color: var(--ink-faint);
  margin-top: 1.25rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  border-radius: var(--r-pill);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn--primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-lift);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(46, 49, 107, 0.16);
}

.btn--mint {
  background: var(--mint-fill);
  color: #2b6a5c;
}

.btn--mint:hover {
  transform: translateY(-1px);
}

.btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

/* --- Cards -------------------------------------------------------------- */

.card {
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
}

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.card__icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
  font-size: 1.15rem;
}

.card h3 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* --- Section headings --------------------------------------------------- */

.sec-head {
  max-width: 40rem;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
  text-align: center;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}

.sec-head p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin: 0;
  text-wrap: pretty;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

/* --- Steps -------------------------------------------------------------- */

.steps {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  counter-reset: step;
}

.step {
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 1.75rem 1.5rem;
}

.step__num {
  counter-increment: step;
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  background: var(--mint-fill);
  color: #2b6a5c;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.step__num::before {
  content: counter(step);
}

.step h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  letter-spacing: -0.015em;
}

.step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* --- "What it isn't" list ----------------------------------------------- */

.nots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.not {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(46, 49, 107, 0.07);
  border-radius: var(--r-pill);
  padding: 0.55rem 1.1rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.not span {
  color: var(--orange);
  font-weight: 600;
  margin-right: 0.35rem;
}

/* --- Closing CTA -------------------------------------------------------- */

.cta {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lift);
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter);
  text-align: center;
}

.cta h2 {
  margin-bottom: 0.75rem;
}

.cta p {
  color: var(--ink-soft);
  max-width: 30rem;
  margin: 0 auto 2rem;
}

/* --- Footer ------------------------------------------------------------- */

.site-foot {
  border-top: 1px solid rgba(46, 49, 107, 0.08);
  padding: 2.5rem 0 3.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.site-foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-foot a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-foot a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ---------------------------------------------------------------------------
   Legal / prose pages
   --------------------------------------------------------------------------- */

.prose {
  padding-top: clamp(2rem, 5vw, 3.5rem);
}

.prose h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  text-align: left;
  margin-bottom: 0.35rem;
}

.prose .meta {
  color: var(--ink-faint);
  font-size: 0.92rem;
  margin: 0 0 2.5rem;
}

.prose h2 {
  font-size: 1.35rem;
  margin: 2.75rem 0 0.6rem;
  text-align: left;
}

.prose h3 {
  font-size: 1.08rem;
  margin: 1.75rem 0 0.4rem;
  letter-spacing: -0.01em;
}

.prose p,
.prose li {
  color: #3f4266;
  text-wrap: pretty;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid rgba(46, 49, 107, 0.1);
  vertical-align: top;
}

.prose th {
  font-weight: 600;
  white-space: nowrap;
}

.note {
  background: var(--card);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-card) var(--r-card) 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  box-shadow: var(--shadow-card);
}

.note p {
  margin: 0;
}

/* A placeholder that must be filled before launch. Deliberately loud — this
   should be impossible to miss on a published page. */
.todo {
  background: #fff4e5;
  border: 1px dashed var(--orange);
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
  font-weight: 600;
  color: #a33512;
}

.dl {
  margin: 1rem 0 0;
}

.dl dt {
  font-weight: 600;
  margin-top: 1rem;
}

.dl dd {
  margin: 0.15rem 0 0;
  color: #3f4266;
}

/* Skip link — visible only on keyboard focus. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--r-card) 0;
  z-index: 10;
}

.skip:focus {
  left: 0;
}

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