/* ============================================================
   Retained Access Program — Matcha Flip, glass edition
   Colors are taken straight from the app's Matcha Flip theme:
   green background, cream tiles, ink text, stone accents.
   ============================================================ */

:root {
  /* Matcha Flip palette (exact values from the app) */
  --matcha: #A3B18A;        /* app background */
  --matcha-deep: #5C6B47;   /* app "green dark" */
  --matcha-pale: #C3CDAF;
  --sage: #DCDCC2;
  --cream: #FAF3E0;         /* app tiles and buttons */
  --cream-band: #F0E6CC;    /* app table banding */
  --cream-dark: #8C8467;
  --ink: #2B2B26;           /* app text */
  --stone: #8C877E;         /* app nested groups */

  --color-focus: var(--ink);

  /* Surfaces */
  --surface-brand: var(--matcha);
  --surface-page: var(--matcha);
  --surface-card: rgba(250, 243, 224, 0.72);
  --surface-sunken: var(--stone);

  /* Text */
  --text-on-brand: var(--ink);
  --text-primary: var(--ink);
  --text-muted: #45463D;
  --text-on-dark: var(--cream);

  /* Glass */
  --glass-bg: rgba(250, 243, 224, 0.52);
  --glass-bg-strong: rgba(250, 243, 224, 0.8);
  --glass-tint-dark: rgba(43, 43, 38, 0.32);
  --glass-edge: rgba(255, 255, 255, 0.58);
  --glass-blur: blur(26px) saturate(170%);
  --glass-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -1px 1px rgba(43, 43, 38, 0.06),
    0 1px 2px rgba(43, 43, 38, 0.06),
    0 22px 44px -22px rgba(43, 43, 38, 0.38);

  /* Buttons — app convention: cream fill, ink text */
  --btn-bg: var(--cream);
  --btn-bg-hover: #ffffff;
  --btn-text: var(--ink);
  --btn-outline-border: var(--ink);

  /* Type scale */
  --text-xs: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.84rem + 0.15vw, 0.9375rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1.06rem + 0.3vw, 1.25rem);
  --text-xl: clamp(1.375rem, 1.25rem + 0.6vw, 1.75rem);
  --text-2xl: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  --text-3xl: clamp(2.25rem, 1.7rem + 2.4vw, 3.75rem);
  --text-hero: clamp(2.9rem, 1.9rem + 4.4vw, 5.75rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --space-10: 4rem;
  --space-12: 5rem;
  --space-16: 7rem;

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 34px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(43, 43, 38, 0.08);
  --shadow-md: 0 8px 24px -8px rgba(43, 43, 38, 0.22);
  --shadow-lg: 0 30px 60px -28px rgba(43, 43, 38, 0.5);

  --border-soft: rgba(43, 43, 38, 0.12);
  --border-soft-on-brand: rgba(43, 43, 38, 0.18);

  --ease-golden: cubic-bezier(0.22, 1, 0.36, 1);
  --container-max: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);

  color-scheme: light;
}

/* ============================================================
   Global
   ============================================================ */

html { background: var(--matcha); }

body {
  position: relative;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  font-feature-settings: 'cv11', 'ss01';
  overflow-x: hidden;
}

/* Soft pools of light behind everything, so the glass has something to blur */
body::before {
  content: "";
  position: fixed;
  inset: -10vmax;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(32vmax 26vmax at 12% 8%, rgba(250, 243, 224, 0.55), transparent 70%),
    radial-gradient(30vmax 24vmax at 88% 26%, rgba(220, 220, 194, 0.7), transparent 70%),
    radial-gradient(36vmax 30vmax at 70% 92%, rgba(92, 107, 71, 0.38), transparent 70%),
    radial-gradient(26vmax 22vmax at 6% 70%, rgba(140, 135, 126, 0.32), transparent 70%),
    var(--matcha);
}

h1, h2, h3, h4 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}

h1 { font-size: var(--text-hero); font-weight: 700; letter-spacing: -0.045em; line-height: 0.98; }
h2 { font-size: var(--text-3xl); letter-spacing: -0.04em; }
h3 { font-size: var(--text-xl); letter-spacing: -0.02em; }
h4 { font-size: var(--text-lg); letter-spacing: -0.01em; }

p { max-width: 65ch; color: var(--text-muted); }
p.lede { font-size: var(--text-lg); color: var(--ink); line-height: 1.55; }
strong { color: var(--ink); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
section.tight { padding-block: clamp(2rem, 4vw, 3.5rem); }

.mt-0 { margin-top: 0; }

/* ============================================================
   Glass
   ============================================================ */

.glass,
.site-header > .container,
.main-nav.is-open,
.tool-card,
.cta-banner,
.contact-card,
.glass-stage,
.glass-chip,
.steps-card,
.prose-card,
.download-card,
.site-footer .footer-shell,
.segmented {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
}

/* Specular sheen along the top edge, like Apple's glass */
.glass::after,
.tool-card::after,
.cta-banner::after,
.contact-card::after,
.glass-stage::after,
.steps-card::after,
.prose-card::after,
.download-card::after,
.site-footer .footer-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 38%);
  mix-blend-mode: soft-light;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass, .site-header > .container, .main-nav.is-open, .tool-card, .cta-banner, .contact-card,
  .glass-stage, .glass-chip, .steps-card, .prose-card, .download-card, .site-footer .footer-shell, .segmented {
    background: var(--glass-bg-strong);
  }
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--text-base);
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease-golden), box-shadow 0.25s var(--ease-golden), background 0.2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 #fff, 0 10px 24px -12px rgba(43, 43, 38, 0.45);
}
.btn-primary:hover { background: var(--btn-bg-hover); transform: translateY(-2px); box-shadow: inset 0 1px 0 #fff, 0 16px 30px -14px rgba(43, 43, 38, 0.5); }
.btn-primary:active { transform: translateY(0) scale(0.98); }

.btn-outline {
  color: var(--ink);
  background: rgba(250, 243, 224, 0.28);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn-outline:hover { background: rgba(250, 243, 224, 0.5); transform: translateY(-2px); }

.btn-on-cream, .btn-ink {
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 12px 24px -12px rgba(43, 43, 38, 0.6);
}
.btn-on-cream:hover, .btn-ink:hover { background: #3a3a33; transform: translateY(-2px); }

/* ============================================================
   Header — floating glass bar
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px var(--gutter) 0;
}
.site-header > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  max-width: var(--container-max);
  padding: 8px 8px 8px 12px;
  border-radius: var(--radius-pill);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 650;
  font-size: var(--text-base);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand img, .footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(43, 43, 38, 0.18);
}
.brand svg { width: 34px; height: 34px; }

.main-nav { display: flex; align-items: center; gap: 2px; }
.main-nav a {
  font-size: var(--text-sm);
  font-weight: 550;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-pill);
  color: var(--ink);
  transition: background 0.2s ease;
}
.main-nav a:hover { background: rgba(43, 43, 38, 0.07); }
.main-nav a[aria-current="page"] { background: var(--ink); color: var(--cream); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(43, 43, 38, 0.06);
  color: var(--ink);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-2);
    border-radius: var(--radius-lg);
  }
  .main-nav.is-open { display: flex; position: absolute; background: rgba(250, 243, 224, 0.9); }
  .main-nav a { padding: 0.85rem 1rem; font-size: var(--text-base); }
}

/* ============================================================
   Phone frames — real app screenshots
   ============================================================ */

.phone {
  position: relative;
  width: min(300px, 72vw);
  padding: 9px;
  border-radius: 48px;
  background: #1c1c19;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 0 0 3px #2d2d29,
    0 50px 80px -40px rgba(43, 43, 38, 0.7),
    0 18px 30px -18px rgba(43, 43, 38, 0.45);
  flex-shrink: 0;
}
.phone img {
  width: 100%;
  height: auto;
  border-radius: 39px;
  display: block;
  background: var(--matcha);
}
.phone.is-small { width: min(230px, 60vw); border-radius: 40px; padding: 7px; }
.phone.is-small img { border-radius: 33px; }

/* ============================================================
   Hero
   ============================================================ */

.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem); }
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-copy h1 { margin-bottom: var(--space-5); }
.hero-copy .lede { margin-bottom: var(--space-6); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-6);
}
.hero-facts span, .req-chip, .tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  background: rgba(250, 243, 224, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--ink);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.hero-facts svg { width: 14px; height: 14px; }

.eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--matcha-deep);
  margin-bottom: var(--space-3);
  letter-spacing: -0.005em;
}

.hero-visual {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-visual .phone-back {
  position: absolute;
  right: 2%;
  top: 6%;
  transform: rotate(6deg);
  opacity: 0.96;
}
.hero-visual .phone-front {
  position: relative;
  transform: translateX(-18%) rotate(-3deg);
  z-index: 2;
}

.glass-chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.7rem 1rem 0.7rem 0.75rem;
  border-radius: 20px;
  font-size: var(--text-sm);
  color: var(--ink);
  animation: chip-float 7s ease-in-out infinite;
}
.glass-chip strong { display: block; font-size: var(--text-base); line-height: 1.2; letter-spacing: -0.02em; }
.glass-chip span { display: block; font-size: var(--text-xs); color: var(--text-muted); line-height: 1.3; }
.glass-chip .chip-icon {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--cream);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px rgba(43, 43, 38, 0.06);
  flex-shrink: 0;
}
.glass-chip .chip-icon svg { width: 20px; height: 20px; }
.hero-visual .chip-a { left: -2%; bottom: 16%; }
.hero-visual .chip-b { right: -2%; top: 2%; animation-delay: -3.5s; }
.hero-visual .chip-c { right: 4%; bottom: 4%; animation-delay: -1.7s; }

@keyframes chip-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { min-height: 520px; margin-top: var(--space-4); }
}
@media (max-width: 560px) {
  .hero-visual { min-height: 470px; }
  .hero-visual .phone { width: 62vw; }
  .hero-visual .phone-back { right: 0; top: 4%; }
  .hero-visual .phone-front { transform: translateX(-16%) rotate(-3deg); }
  .hero-visual .chip-a { left: -1%; bottom: 10%; }
  .hero-visual .chip-b { right: -1%; top: -2%; }
  .hero-visual .chip-c { display: none; }
}

/* ============================================================
   Showcase rows — copy beside a glass stage holding the phone
   ============================================================ */

.showcase-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.showcase-row.reverse .showcase-copy { order: 2; }
.showcase-copy h2 { margin: var(--space-4) 0 var(--space-5); }
.showcase-copy p + p { margin-top: var(--space-4); }
.showcase-copy .note {
  margin-top: var(--space-5);
  font-size: var(--text-sm);
  color: var(--ink);
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  background: rgba(43, 43, 38, 0.08);
}
.showcase-copy .note svg { width: 16px; height: 16px; flex: none; }

.glass-stage {
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 4vw, 3rem);
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  overflow: hidden;
}
.glass-stage .phone { z-index: 1; }
.glass-stage .phone + .phone { margin-left: -16%; margin-top: 18%; }
.glass-stage .glass-chip { position: absolute; }
.stage-chip-tl { left: 6%; top: 8%; }
.stage-chip-br { right: 6%; bottom: 8%; animation-delay: -3s; }

.segmented {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(250, 243, 224, 0.62);
}
.segmented button {
  border: 0;
  background: transparent;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  transition: background 0.25s var(--ease-golden), color 0.25s ease;
}
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }

.swap-frame { position: relative; }
.swap-frame img + img { position: absolute; inset: 9px; width: calc(100% - 18px); opacity: 0; transition: opacity 0.35s ease; }
.swap-frame.show-alt img + img { opacity: 1; }

@media (max-width: 900px) {
  .showcase-row { grid-template-columns: 1fr; }
  .showcase-row.reverse .showcase-copy { order: 0; }
  .glass-stage { min-height: 480px; }
}
@media (max-width: 560px) {
  .glass-stage { padding: 1.75rem 1rem 4.75rem; min-height: 0; }
  .glass-stage .phone { width: 58vw; }
  .stage-chip-tl { left: 4%; top: 4%; }
  .stage-chip-br { right: 4%; bottom: 76px; }
}

/* ============================================================
   Tools grid
   ============================================================ */

.section-head { max-width: 680px; margin-bottom: var(--space-8); }
.section-head h2 { margin-bottom: var(--space-4); }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-4);
}
.tool-card {
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform 0.35s var(--ease-golden), background 0.25s ease;
}
.tool-card:hover { transform: translateY(-4px); background: rgba(250, 243, 224, 0.68); }
.tool-card h3 { font-size: var(--text-lg); margin: var(--space-4) 0 var(--space-2); letter-spacing: -0.02em; }
.tool-card p { font-size: var(--text-sm); }
.tool-icon {
  width: 46px;
  height: 46px;
  padding: 11px;
  border-radius: 14px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(43, 43, 38, 0.06), 0 6px 14px -8px rgba(43, 43, 38, 0.35);
}
.tool-card .tool-tag {
  display: inline-block;
  margin-left: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--matcha-deep);
  vertical-align: middle;
}
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-6 { grid-column: span 6; }

@media (max-width: 900px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .span-2, .span-3 { grid-column: span 1; }
  .span-6 { grid-column: span 2; }
}
@media (max-width: 560px) {
  .tools-grid { grid-template-columns: 1fr; }
  .span-2, .span-3, .span-6 { grid-column: span 1; }
  .tool-card { padding: var(--space-5); }
}

/* ============================================================
   Screen gallery — horizontal strip of app screenshots
   ============================================================ */

.gallery-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.gallery-head h2 { max-width: 16ch; }
.gallery-arrows { display: flex; gap: var(--space-2); }
.gallery-arrows button {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink);
}
.gallery-arrows button svg { width: 20px; height: 20px; }

.gallery-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 232px;
  gap: var(--space-6);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: var(--space-4) var(--gutter) var(--space-8);
  margin-inline: calc(var(--gutter) * -1);
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-item { scroll-snap-align: start; }
.gallery-item .phone { width: 100%; }
.gallery-item figcaption { margin-top: var(--space-4); padding-inline: var(--space-2); }
.gallery-item figcaption strong { display: block; font-size: var(--text-base); letter-spacing: -0.02em; }
.gallery-item figcaption span { display: block; font-size: var(--text-sm); color: var(--text-muted); line-height: 1.45; }

/* ============================================================
   Bands, CTA
   ============================================================ */

.band-brand { background: transparent; }

.band-sunken { background: transparent; }
.band-sunken .glass-stage,
.feature-panel {
  border-radius: var(--radius-xl);
}
.feature-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
}
.feature-panel .phone-wrap { display: flex; justify-content: center; position: relative; }
.feature-panel h2 { margin: var(--space-4) 0 var(--space-5); }
.feature-panel p + p { margin-top: var(--space-4); }
@media (max-width: 900px) {
  .feature-panel { grid-template-columns: 1fr; }
}

.cta-banner {
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 3.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}
.cta-banner .cta-copy { display: flex; align-items: center; gap: var(--space-5); }
.cta-banner .cta-copy img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 10px 24px -10px rgba(43, 43, 38, 0.5); flex-shrink: 0; }
.cta-banner h2 { font-size: var(--text-2xl); margin-bottom: var(--space-2); }
.cta-banner p { margin: 0; }
@media (max-width: 560px) {
  .cta-banner .cta-copy { flex-direction: column; align-items: flex-start; }
  .cta-banner .btn { width: 100%; }
}

/* ============================================================
   Inner pages
   ============================================================ */

.page-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 3vw, 2rem); }
.page-hero h1 { font-size: var(--text-3xl); margin-bottom: var(--space-4); max-width: 18ch; }
.page-hero .lede { max-width: 58ch; }

.download-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: stretch;
}
.download-card {
  border-radius: var(--radius-xl);
  padding: clamp(1.75rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.download-card .app-row { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-6); }
.download-card .app-row img { width: 76px; height: 76px; border-radius: 20px; box-shadow: 0 10px 22px -10px rgba(43, 43, 38, 0.5); }
.download-card .app-row strong { display: block; font-size: var(--text-lg); letter-spacing: -0.02em; }
.download-card .app-row span { font-size: var(--text-sm); color: var(--text-muted); }
.download-card h2 { font-size: var(--text-2xl); margin-bottom: var(--space-3); }
.download-card .lede { margin-bottom: var(--space-6); }
.download-card .btn { align-self: flex-start; }
.requirements-list { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-6); }
.download-grid .glass-stage { min-height: 520px; }
@media (max-width: 900px) {
  .download-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .download-card .btn { align-self: stretch; }
}

.steps-card { border-radius: var(--radius-xl); padding: clamp(1.75rem, 4vw, 3rem); max-width: 820px; margin-inline: auto; }
.steps-card h2 { font-size: var(--text-2xl); margin-bottom: var(--space-3); }
.steps-list { counter-reset: step; display: grid; gap: var(--space-3); margin-top: var(--space-6); }
.step-item {
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--space-4);
  align-items: start;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: rgba(250, 243, 224, 0.55);
}
.step-item::before {
  content: counter(step);
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--cream);
  font-weight: 700;
}
.step-item p { margin: 0; align-self: center; color: var(--ink); }

.prose-section { padding-top: var(--space-4); }
.prose-card {
  border-radius: var(--radius-xl);
  padding: clamp(1.75rem, 5vw, 4rem);
  max-width: 860px;
  margin-inline: auto;
  background: rgba(250, 243, 224, 0.68);
}
.prose-card h2 { font-size: var(--text-xl); margin: var(--space-8) 0 var(--space-3); }
.prose-card h2:first-of-type { margin-top: var(--space-5); }
.prose-card p, .prose-card li { color: #3b3c34; }
.prose-card p + p { margin-top: var(--space-3); }
.prose-card ul { margin: var(--space-3) 0; display: grid; gap: var(--space-2); }
.prose-card li { position: relative; padding-left: var(--space-5); }
.prose-card li::before {
  content: "";
  position: absolute; left: 4px; top: 0.65em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--matcha-deep);
}
.prose-card a { color: var(--matcha-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.updated-date {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  background: rgba(43, 43, 38, 0.07);
  color: var(--ink);
}

.contact-card {
  border-radius: var(--radius-xl);
  padding: clamp(1.75rem, 5vw, 3.5rem);
  max-width: 760px;
}
.contact-card h2 { font-size: var(--text-2xl); }
.contact-card p { margin-top: var(--space-2); }
.contact-email {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-6) 0 var(--space-5);
  font-size: clamp(1.05rem, 0.9rem + 1vw, 1.6rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
  word-break: break-word;
}
.contact-email svg {
  width: 48px; height: 48px; padding: 12px; border-radius: 14px;
  background: var(--cream); flex-shrink: 0;
}
.contact-meta { display: grid; gap: var(--space-3); margin-top: var(--space-8); }
.contact-meta-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: rgba(250, 243, 224, 0.5);
}
.contact-meta-item svg { width: 22px; height: 22px; margin-top: 2px; }
.contact-meta-item p { margin: 0; font-size: var(--text-sm); }

/* ============================================================
   Footer
   ============================================================ */

.site-footer { padding: var(--space-10) 0 var(--space-6); }
.site-footer .footer-shell { border-radius: var(--radius-xl); padding: clamp(1.75rem, 4vw, 3rem); }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.3fr;
  gap: var(--space-8);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 650;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: var(--space-3);
}
.footer-brand svg { width: 36px; height: 36px; }
.footer-col h4 { font-size: var(--text-sm); margin-bottom: var(--space-3); color: var(--ink); }
.footer-col ul { display: grid; gap: var(--space-2); }
.footer-col a { font-size: var(--text-sm); color: var(--text-muted); transition: color 0.2s ease; word-break: break-word; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(43, 43, 38, 0.12);
  font-size: var(--text-xs);
  color: var(--text-muted);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* When the footer is not wrapped in .footer-shell (game pages), keep it tidy */
.site-footer > .container > .footer-bottom:first-child { margin-top: 0; }

/* ============================================================
   Motion
   ============================================================ */

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease-golden), transform 0.8s var(--ease-golden); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .glass-chip { animation: none; }
}
main { overflow-x: clip; }

/* ============================================================
   Shared glass for new sections
   ============================================================ */

.kp-teaser, .rm-teaser, .pack-card, .kp-install, .kp-note, .rm-card, .rm-panel {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .kp-teaser, .rm-teaser, .pack-card, .kp-install, .kp-note, .rm-card, .rm-panel { background: var(--glass-bg-strong); }
}

/* Status pills (roadmap + packs) */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  line-height: 1.3;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-done     { background: var(--ink); color: var(--cream); }
.status-progress { background: var(--cream); color: var(--matcha-deep); box-shadow: inset 0 0 0 1px rgba(92, 107, 71, 0.35); }
.status-next     { background: rgba(92, 107, 71, 0.18); color: #3f4a31; }
.status-planned  { background: rgba(250, 243, 224, 0.45); color: var(--text-muted); box-shadow: inset 0 0 0 1px rgba(43, 43, 38, 0.15); }
.status-explore  { background: transparent; color: var(--text-muted); border: 1px dashed rgba(43, 43, 38, 0.35); }
.status-done::before { background: #b9cf93; }

.btn-disabled {
  background: rgba(43, 43, 38, 0.08);
  color: var(--text-muted);
  cursor: not-allowed;
  border-color: rgba(43, 43, 38, 0.08);
}

/* ============================================================
   Home: Knowledge Packs teaser + roadmap teaser
   ============================================================ */

.kp-teaser {
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.kp-teaser h2 { margin: var(--space-4) 0 var(--space-5); max-width: 18ch; }
.kp-teaser .hero-actions { margin-top: var(--space-6); }

.kp-flow { list-style: none; display: grid; gap: var(--space-3); padding: 0; margin: 0; position: relative; }
.kp-flow li {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  background: rgba(250, 243, 224, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.kp-flow li > span {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--cream);
  font-weight: 650; font-size: var(--text-sm);
}
.kp-flow strong { display: block; font-size: var(--text-base); }
.kp-flow p { font-size: var(--text-sm); margin: 2px 0 0; }

.rm-teaser {
  border-radius: var(--radius-xl);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr) auto;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.rm-teaser h2 { font-size: var(--text-2xl); }
.rm-teaser .eyebrow { margin-bottom: var(--space-2); }
.rm-teaser-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.rm-teaser-list li { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.rm-teaser-list strong { font-weight: 600; font-size: var(--text-base); }

@media (max-width: 960px) {
  .kp-teaser { grid-template-columns: 1fr; }
  .rm-teaser { grid-template-columns: 1fr; }
  .rm-teaser .btn { justify-self: start; }
}

/* ============================================================
   Knowledge Packs page
   ============================================================ */

.kp-hero h1 { font-size: clamp(2.6rem, 1.7rem + 3.8vw, 5rem); }
.kp-visual { min-height: 560px; }
.kp-visual .phone-front { transform: rotate(2deg); }
.kp-visual .chip-a { left: 0; bottom: 14%; }
.kp-visual .chip-b { right: 0; top: 10%; animation-delay: -3s; }
@media (max-width: 560px) {
  .kp-visual { min-height: 0; }
  .kp-visual .phone-front { transform: none; }
}

.kp-icon {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: inset 0 1px 0 #fff, 0 4px 10px -4px rgba(43, 43, 38, 0.3);
  flex: none;
}
.kp-icon svg { width: 22px; height: 22px; }

.kp-audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin-top: var(--space-8); }
.kp-audience .tool-card p { font-size: var(--text-base); }
@media (max-width: 900px) { .kp-audience { grid-template-columns: 1fr; } }

.kp-how { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.kp-how-copy { position: sticky; top: 120px; }
.kp-how-copy h2 { margin-bottom: var(--space-5); }
.kp-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); }
.kp-steps li {
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: rgba(250, 243, 224, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.kp-step-num { font-size: var(--text-3xl); font-weight: 700; letter-spacing: -0.05em; color: rgba(43, 43, 38, 0.18); line-height: 1; display: block; margin-bottom: var(--space-3); }
.kp-steps h3 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
@media (max-width: 900px) {
  .kp-how { grid-template-columns: 1fr; }
  .kp-how-copy { position: static; }
}

.kp-platform h2 { margin: var(--space-4) 0 var(--space-5); }
.kp-platform p + p { margin-top: var(--space-4); }
.kp-facts { margin: 0; display: grid; border-radius: var(--radius-lg); overflow: hidden; background: rgba(250, 243, 224, 0.7); border: 1px solid rgba(255,255,255,0.6); }
.kp-facts > div { display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-5); }
.kp-facts > div + div { border-top: 1px solid var(--border-soft); }
.kp-facts dt { color: var(--text-muted); font-size: var(--text-sm); }
.kp-facts dd { margin: 0; font-weight: 600; text-align: right; font-size: var(--text-sm); }

.pack-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); margin-top: var(--space-8); }
.pack-card {
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: var(--space-5);
  transition: transform 0.35s var(--ease-golden);
}
.pack-card:hover { transform: translateY(-4px); }
.pack-cover {
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--cream);
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-4);
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 30px -18px rgba(43, 43, 38, 0.7);
}
.pack-cover::after {
  content: "";
  position: absolute;
  inset: auto -30% -40% auto;
  width: 120%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(163, 177, 138, 0.55), transparent 65%);
}
.pack-cover-cat { font-size: 2rem; font-weight: 700; letter-spacing: -0.04em; line-height: 1; position: relative; z-index: 1; }
.pack-cover-year { font-size: var(--text-sm); font-weight: 600; color: #c9d4b4; position: relative; z-index: 1; }
.pack-card.is-soon .pack-cover { background: var(--matcha-deep); }
.pack-body { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.pack-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.pack-id { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); letter-spacing: 0.02em; }
.pack-body h3 { font-size: var(--text-xl); }
.pack-body p { font-size: var(--text-sm); margin: 0; }
.pack-meta { list-style: none; padding: 0; margin: 0; display: flex; gap: var(--space-2); flex-wrap: wrap; }
.pack-meta li { font-size: var(--text-xs); font-weight: 600; padding: 0.3rem 0.7rem; border-radius: var(--radius-pill); background: rgba(43, 43, 38, 0.07); }
.pack-body .btn { align-self: flex-start; margin-top: auto; }
@media (max-width: 980px) { .pack-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .pack-card { grid-template-columns: 1fr; }
  .pack-cover { aspect-ratio: auto; min-height: 120px; flex-direction: row; align-items: flex-end; }
  .pack-body .btn { align-self: stretch; }
}

.kp-install { margin-top: var(--space-5); border-radius: var(--radius-xl); padding: clamp(1.5rem, 4vw, 2.5rem); }
.kp-install h3 { margin-bottom: var(--space-4); }
.kp-install ol { padding: 0; margin: 0 0 var(--space-4); list-style: none; counter-reset: kpi; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.kp-install li { counter-increment: kpi; position: relative; padding: var(--space-4) var(--space-4) var(--space-4) 3.25rem; border-radius: var(--radius-md); background: rgba(250, 243, 224, 0.6); font-size: var(--text-sm); color: var(--text-muted); }
.kp-install li::before { content: counter(kpi); position: absolute; left: var(--space-4); top: var(--space-4); width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--cream); font-size: 0.75rem; font-weight: 700; display: grid; place-items: center; }
.kp-install > p { font-size: var(--text-sm); margin: 0; }
@media (max-width: 860px) { .kp-install ol { grid-template-columns: 1fr; } }

.kp-notes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.kp-note { border-radius: var(--radius-xl); padding: clamp(1.5rem, 4vw, 2.5rem); display: flex; gap: var(--space-5); align-items: flex-start; }
.kp-note h3 { font-size: var(--text-xl); margin: var(--space-2) 0; }
.kp-note p { font-size: var(--text-sm); margin: 0; }
.kp-note-dark { background: rgba(43, 43, 38, 0.88); border-color: rgba(255, 255, 255, 0.12); }
.kp-note-dark h3 { color: var(--cream); }
.kp-note-dark p { color: #d9d4c3; }
.kp-note-dark a { color: var(--cream); text-decoration: underline; text-underline-offset: 3px; }
.kp-note-dark .status-explore { color: #d9d4c3; border-color: rgba(250, 243, 224, 0.4); }
@media (max-width: 860px) { .kp-notes { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .kp-note { flex-direction: column; } }

/* ============================================================
   Roadmap page
   ============================================================ */

.roadmap { display: grid; grid-template-columns: 300px 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.rm-aside { position: sticky; top: 110px; }
.rm-panel { border-radius: var(--radius-xl); padding: var(--space-6); }
.rm-panel-label { font-size: var(--text-xs); font-weight: 600; color: var(--matcha-deep); margin: 0 0 var(--space-1); }
.rm-count { font-size: var(--text-base); color: var(--ink); margin: 0 0 var(--space-3); }
.rm-count strong { font-size: var(--text-2xl); letter-spacing: -0.04em; margin-right: 2px; }
.rm-meter { height: 8px; border-radius: 99px; background: rgba(43, 43, 38, 0.1); overflow: hidden; }
.rm-meter span { display: block; height: 100%; border-radius: inherit; background: var(--ink); }
.rm-current { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--border-soft); }
.rm-current-title { font-weight: 650; font-size: var(--text-lg); color: var(--ink); line-height: 1.3; margin: 0; min-height: 2.6em; }
#rmCurrentNum { color: rgba(43, 43, 38, 0.35); margin-right: 4px; font-variant-numeric: tabular-nums; }
.rm-legend { list-style: none; padding: 0; margin: var(--space-5) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.rm-aside-note { font-size: var(--text-sm); margin: var(--space-5) 0 0; }
.rm-aside-note a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.rm-track-wrap { position: relative; padding-left: 56px; }
.rm-line { position: absolute; left: 19px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: rgba(43, 43, 38, 0.12); }
.rm-fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; border-radius: inherit; background: var(--ink); transition: height 0.12s linear; }
.rm-track { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-6); }
.rm-item { position: relative; }
.rm-dot {
  position: absolute; left: -45px; top: 30px;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--matcha); border: 3px solid rgba(43, 43, 38, 0.25);
  transition: background 0.4s var(--ease-golden), border-color 0.4s var(--ease-golden), transform 0.4s var(--ease-golden);
}
.rm-item.is-passed .rm-dot { background: var(--ink); border-color: var(--ink); }
.rm-item.is-current .rm-dot { background: var(--cream); border-color: var(--ink); transform: scale(1.35); box-shadow: 0 0 0 6px rgba(250, 243, 224, 0.45); }

.rm-card {
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  opacity: 0.55;
  transform: translateX(14px) scale(0.985);
  transition: opacity 0.6s var(--ease-golden), transform 0.6s var(--ease-golden), background 0.4s ease;
}
.no-js .rm-card, html:not(.js) .rm-card { opacity: 1; transform: none; }
.rm-item.is-passed .rm-card, .rm-item.is-current .rm-card { opacity: 1; transform: none; }
.rm-item.is-current .rm-card { background: rgba(250, 243, 224, 0.72); }
.rm-card-top { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }
.rm-num { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.05em; color: rgba(43, 43, 38, 0.22); line-height: 1; font-variant-numeric: tabular-nums; margin-right: var(--space-1); }
.rm-when { margin-left: auto; font-size: var(--text-sm); font-weight: 600; color: var(--text-muted); }
.rm-card h3 { font-size: var(--text-2xl); letter-spacing: -0.035em; margin-bottom: var(--space-3); }
.rm-card p { margin: 0; }
.rm-bullets { list-style: none; padding: 0; margin: var(--space-5) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.rm-bullets li { font-size: var(--text-xs); font-weight: 600; padding: 0.35rem 0.8rem; border-radius: var(--radius-pill); background: rgba(250, 243, 224, 0.55); border: 1px solid rgba(255, 255, 255, 0.6); color: var(--ink); }
.rm-explore .rm-card { border-style: dashed; border-color: rgba(43, 43, 38, 0.25); }

@media (max-width: 900px) {
  .roadmap { grid-template-columns: 1fr; }
  .rm-aside { position: sticky; top: 76px; z-index: 5; }
  .rm-panel { padding: var(--space-4) var(--space-5); border-radius: var(--radius-lg); display: grid; grid-template-columns: 1fr; gap: var(--space-2); }
  .rm-panel > .rm-panel-label, .rm-legend, .rm-aside-note { display: none; }
  .rm-count { display: none; }
  .rm-current { margin: 0; padding: 0; border: 0; display: flex; align-items: baseline; gap: var(--space-2); }
  .rm-current .rm-panel-label { display: none; }
  .rm-current-title { min-height: 0; font-size: var(--text-base); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rm-meter { height: 5px; order: 2; }
  .rm-track-wrap { padding-left: 40px; }
  .rm-line { left: 11px; }
  .rm-dot { left: -37px; }
  .rm-when { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .rm-card { transition: none; opacity: 1; transform: none; }
  .rm-fill { transition: none; }
}
