/* ===== YAPS · Design tokens & base ===== */

:root {
  /* Brand gradient stops */
  --yaps-magenta: #A8347D;
  --yaps-violet: #8B3D9E;
  --yaps-indigo: #7B4FD8;
  --yaps-gold: #FFD700;

  /* Neutrals — warm-cool white */
  --bg: #ffffff;
  --bg-soft: #fafaf9;
  --bg-sunken: #f4f4f6;
  --ink: #1a1a1a;
  --ink-2: #4a5568;
  --ink-3: #8a8f99;
  --line: rgba(20, 20, 30, 0.08);
  --line-strong: rgba(20, 20, 30, 0.14);

  /* Gradients */
  --grad-brand: linear-gradient(180deg, #A8347D 0%, #8B3D9E 50%, #7B4FD8 100%);
  --grad-brand-h: linear-gradient(92deg, #A8347D 0%, #8B3D9E 48%, #7B4FD8 100%);
  --grad-brand-soft: linear-gradient(135deg, rgba(168,52,125,0.10), rgba(123,79,216,0.10));

  /* Type */
  --font-sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  /* Subtle off-white that reads as pure white but warms photos a hair */
  background: radial-gradient(1200px 800px at 50% -10%, #fbf9ff 0%, #ffffff 60%);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }

::selection {
  background: rgba(139, 61, 158, 0.22);
  color: var(--ink);
}

/* Brand text gradient utility */
.grad-text {
  background: var(--grad-brand-h);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Fallback for browsers without clip support */
  -webkit-text-fill-color: transparent;
}

/* Reusable container */
.wrap {
  width: min(1240px, 100% - 48px);
  margin-inline: auto;
}

@media (max-width: 640px) {
  .wrap { width: min(1240px, 100% - 32px); }
}

/* Section rhythm */
.section {
  padding-block: clamp(72px, 10vw, 140px);
}

/* Headline scale */
.h1 {
  font-size: clamp(44px, 7.2vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
.h3 {
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 600;
  margin: 0;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.lead {
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
  text-wrap: pretty;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 220ms var(--ease-out), background 220ms, box-shadow 220ms, border-color 220ms;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad-brand-h);
  color: #fff;
  box-shadow: 0 6px 24px -8px rgba(139, 61, 158, 0.55), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -8px rgba(139, 61, 158, 0.65), inset 0 1px 0 rgba(255,255,255,0.25); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--bg-sunken); }

/* Hide scrollbars on the prototype shell */
html { scrollbar-gutter: stable; }

/* === Loader === */
.loader-shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #fff;
  z-index: 9999;
  transition: opacity 600ms var(--ease-out), visibility 0s linear 600ms;
}
.loader-shell.hidden {
  opacity: 0;
  visibility: hidden;
}

/* === Page transition portal === */
.portal {
  position: fixed;
  inset: 0;
  pointer-events: none;
  perspective: 1400px;
  z-index: 1000;
}
.portal-card {
  position: absolute;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(255,255,255,0.92), rgba(255,255,255,0.7));
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -20px rgba(60, 30, 100, 0.25), 0 1px 0 rgba(255,255,255,0.6) inset;
  backdrop-filter: blur(8px);
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

/* === Stat counters === */
.stat-num {
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 600;
  font-feature-settings: "tnum" 1;
}

/* === Phone mockup === */
.phone {
  width: 240px;
  aspect-ratio: 9 / 19.5;
  border-radius: 36px;
  background: #0e0e12;
  padding: 8px;
  box-shadow:
    0 40px 80px -30px rgba(40, 20, 80, 0.35),
    0 0 0 1px rgba(20,20,30,0.06),
    inset 0 0 0 1.5px rgba(255,255,255,0.06);
  position: relative;
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  background: linear-gradient(170deg, #fbfaff, #f1edff 60%, #ece5ff);
  overflow: hidden;
  position: relative;
}
.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 22px;
  border-radius: 999px;
  background: #0e0e12;
  z-index: 2;
}

/* Generic placeholder rule (striped) */
.placeholder {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(20,20,30,0.04) 0 8px,
    rgba(20,20,30,0.07) 8px 16px
  );
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

/* === Card === */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform 280ms var(--ease-out), box-shadow 280ms, border-color 280ms;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px -28px rgba(60, 30, 100, 0.18);
  border-color: var(--line-strong);
}
@media (max-width: 720px) {
  .card { padding: 22px; }
}

/* === Reveal on scroll === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Hero 3D canvas absolutely positioned behind text */
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Small chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--grad-brand-h);
}

/* Lang switcher */
.lang {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 200ms, color 200ms;
}
.lang button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(20,20,30,0.08);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  background: rgba(255,255,255,0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 240ms, background 240ms;
}
.header.scrolled {
  border-bottom-color: var(--line);
  background: rgba(255,255,255,0.85);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Desktop nav links */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  position: relative;
  padding: 8px 4px;
  margin: 0 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  border-radius: 0;
  white-space: nowrap;
  transition: color 200ms var(--ease-out);
}
.nav a > span {
  position: relative;
  display: inline-block;
}
.nav a > span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-brand-h);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 280ms var(--ease-out);
}
.nav a:hover { color: var(--yaps-violet); }
.nav a:hover > span::after,
.nav a.current > span::after { transform: scaleX(1); }
.nav a.current { color: var(--yaps-violet); }

/* Hamburger — hidden on desktop */
.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0;
  transition: background 200ms;
}
.hamburger:hover { background: var(--bg-sunken); }
.hamburger span {
  display: block;
  width: 18px;
  height: 1.8px;
  background: var(--ink);
  border-radius: 2px;
}

/* Mobile nav transition: hide desktop nav and CTA, show hamburger */
@media (max-width: 1023px) {
  .nav { display: none; }
  .header-cta-desktop { display: none; }
  .hamburger { display: inline-flex; }
}
@media (max-width: 480px) {
  .header-inner { gap: 12px; }
}

/* === Mobile menu (full-screen slide-in from right) === */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  visibility: hidden;
}
.mobile-menu.is-open { pointer-events: auto; visibility: visible; }
.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 14, 40, 0.36);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 280ms var(--ease-out);
}
.mobile-menu.is-open .mobile-menu-backdrop { opacity: 1; }
.mobile-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(420px, 100%);
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px -20px rgba(60, 30, 100, 0.18);
  transform: translateX(100%);
  transition: transform 320ms var(--ease-out);
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-menu.is-open .mobile-menu-panel { transform: translateX(0); }
.mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.mobile-menu-close {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-2);
}
.mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  flex: 1;
  overflow-y: auto;
}
.mobile-menu-list li {
  opacity: 0;
  transform: translateX(20px);
}
.mobile-menu.is-open .mobile-menu-list li {
  animation: mobile-item-in 360ms var(--ease-out) forwards;
  animation-delay: calc(80ms + var(--i, 0) * 50ms);
}
@keyframes mobile-item-in {
  to { opacity: 1; transform: translateX(0); }
}
.mobile-menu-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
  border-bottom: 1px solid var(--line);
}
.mobile-menu-list a:hover,
.mobile-menu-list a.current {
  background: linear-gradient(90deg, rgba(168,52,125,0.06), transparent);
  color: var(--yaps-violet);
}
.mobile-menu-bottom {
  padding: 20px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.mobile-menu-cta .btn {
  width: 100%;
  height: 52px;
  font-size: 15px;
}
.mobile-menu-cta > * { width: 100%; }

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: clamp(40px, 6vw, 80px) 0 80px;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; }
.hero h1 { margin-bottom: 26px; }
.hero .lead { margin: 0 auto 36px; }
.hero-ctas {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

/* Hero responsive — mobile gets the 3D as a 280px banner above the text */
@media (max-width: 767px) {
  .hero {
    display: flex;
    flex-direction: column;
    min-height: auto;
    padding: 0 0 56px;
    overflow: visible;
  }
  .hero-canvas {
    position: relative;
    height: 280px;
    width: 100%;
    inset: auto;
  }
  .hero-inner {
    padding: 24px 0 0;
  }
  .h1 {
    font-size: clamp(36px, 9vw, 44px);
  }
  .hero .lead {
    font-size: 15px;
    margin-bottom: 28px;
  }
  .hero-ctas {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0 24px;
    gap: 12px;
  }
  .hero-ctas > div { /* StoreBadges wrapper */
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }
  .hero-ctas .badge-store {
    width: 100%;
    justify-content: center;
  }
  .scroll-cue { display: none; }
  /* eyebrow chip allowed to wrap on 2 lines */
  .hero-inner > .chip {
    white-space: normal;
    line-height: 1.5;
    text-align: center;
    max-width: 90%;
  }
}

/* Store badges */
.badge-store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 14px;
  background: #0e0e12;
  color: #fff;
  transition: transform 220ms var(--ease-out), background 220ms;
  min-height: 54px;
}
.badge-store:hover {
  transform: translateY(-1px);
  background: #1a1a22;
}
.badge-store svg { flex-shrink: 0; }
.badge-store .meta { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.badge-store .meta .top { font-size: 10px; letter-spacing: 0.08em; opacity: 0.78; font-family: var(--font-mono); text-transform: uppercase; }
.badge-store .meta .bot { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; margin-top: 2px; }

/* App preview grid — desktop 3-up, mobile horizontal carousel with snap */
.preview-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: end;
}
.preview-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.preview-item .copy { max-width: 26ch; }
.preview-dots {
  display: none;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}
.preview-dots button {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(20, 20, 30, 0.18);
  cursor: pointer;
  transition: background 220ms, width 220ms;
}
.preview-dots button.active {
  background: var(--grad-brand-h);
  width: 22px;
}
@media (max-width: 720px) {
  .preview-track {
    display: flex;
    grid-template-columns: none;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 0 12px;
    margin: 0 -16px;
  }
  .preview-track::-webkit-scrollbar { display: none; }
  .preview-item {
    flex: 0 0 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    padding: 0 16px;
  }
  .preview-dots { display: flex; }
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat {
  padding: 32px 28px;
  border-top: 1px solid var(--line);
}
@media (max-width: 920px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .stat { padding: 24px 18px; }
}
@media (max-width: 380px) {
  .stats-grid { gap: 8px; }
  .stat { padding: 20px 12px; }
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 80px 0 40px;
  margin-top: 80px;
  background: linear-gradient(180deg, #fff, #fbfaff);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 60px;
}
@media (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }
}
@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 16px;
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--ink-2); font-size: 14px; }
.footer ul a:hover { color: var(--ink); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12px;
  font-family: var(--font-mono);
}
@media (max-width: 640px) {
  .footer-bottom { flex-direction: column; gap: 16px; }
}

/* Values cards */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 920px) {
  .values { grid-template-columns: 1fr; }
}
.value-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--grad-brand-soft);
  color: var(--yaps-violet);
  margin-bottom: 18px;
}

/* === Phase 2 components === */

/* Feature card grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 980px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
}
.feature-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  overflow: hidden;
  transition: transform 320ms var(--ease-out), box-shadow 320ms, border-color 320ms;
}
.feature-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--grad-brand-h);
  opacity: 0;
  transition: opacity 320ms;
  z-index: 0;
  padding: 1px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -28px rgba(60, 30, 100, 0.22);
}
.feature-card:hover::before { opacity: 1; }
.feature-card > * { position: relative; z-index: 1; }
.feature-card .feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--grad-brand-soft);
  color: var(--yaps-violet);
  margin-bottom: 18px;
}

/* Pricing cards */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 980px;
  margin: 0 auto;
}
@media (max-width: 820px) {
  .pricing-grid { grid-template-columns: 1fr; }
}
.plan-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 36px;
  display: flex;
  flex-direction: column;
}
.plan-card.featured {
  border-color: transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--grad-brand-h) border-box;
  border: 2px solid transparent;
  box-shadow: 0 40px 80px -30px rgba(139, 61, 158, 0.35);
  transform: translateY(-6px);
}
@media (max-width: 820px) {
  .plan-card.featured { transform: none; }
}
.plan-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-sunken);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
  align-self: flex-start;
}
.plan-card.featured .plan-badge {
  background: var(--grad-brand-h);
  color: #fff;
}
.plan-popular {
  position: absolute;
  top: -12px;
  right: 24px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--yaps-gold);
  color: #1a1100;
  font-size: 10.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  font-weight: 600;
  text-transform: uppercase;
  box-shadow: 0 8px 24px -10px rgba(255, 215, 0, 0.65);
}
.plan-price {
  font-size: clamp(56px, 7vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 600;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0 6px;
}
.plan-price .per {
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--ink-3);
  font-weight: 500;
}
.plan-sub {
  color: var(--ink-3);
  font-size: 13.5px;
  margin: 0 0 26px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.plan-features {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.45;
}
.plan-features .check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  margin-top: 1px;
}
.plan-features .check-free { background: #1aa85b; }
.plan-features .check-pro { background: var(--grad-brand-h); }

/* FAQ accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
  overflow: hidden;
  transition: border-color 220ms;
}
.faq-item.open { border-color: var(--line-strong); }
.faq-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  letter-spacing: -0.005em;
}
.faq-q:hover { color: var(--yaps-violet); }
.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--bg-sunken);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--ink-2);
  transition: transform 260ms var(--ease-out), background 220ms, color 220ms;
}
.faq-item.open .faq-icon {
  background: var(--grad-brand-h);
  color: #fff;
  transform: rotate(45deg);
}
.faq-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 320ms var(--ease-out);
}
.faq-item.open .faq-body { grid-template-rows: 1fr; }
.faq-body > div { overflow: hidden; }
.faq-body p {
  margin: 0;
  padding: 0 24px 22px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Sciences sources */
.science-disclaimer {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: linear-gradient(180deg, #fffaeb, #fff7d6);
  border: 1px solid #f6e2a0;
  border-radius: var(--r-md);
  padding: 18px 22px;
}
.science-disclaimer .ic {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--yaps-gold);
  color: #1a1100;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 700;
}
.science-disclaimer p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: #5b4a10;
}
.science-section { margin-bottom: 56px; }
.science-section h3 {
  margin: 0 0 8px;
}
.science-intro {
  color: var(--ink-2);
  font-size: 16px;
  margin: 0 0 22px;
  max-width: 70ch;
}
.sources-list {
  display: grid;
  gap: 12px;
}
.source-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  background: linear-gradient(180deg, #fff, #fbfaff);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color 220ms, transform 220ms var(--ease-out);
  text-decoration: none;
  color: var(--ink);
}
.source-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.source-card .src-ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--grad-brand-soft);
  color: var(--yaps-violet);
}
.source-card .src-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.source-card .src-title {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.source-card .src-org {
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}
.source-card .src-go {
  color: var(--ink-3);
  flex-shrink: 0;
}
.source-card:hover .src-go { color: var(--yaps-violet); }
@media (max-width: 540px) {
  .source-card { grid-template-columns: 36px 1fr; }
  .source-card .src-go { display: none; }
}

/* Download columns */
.store-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 920px;
  margin: 0 auto;
}
@media (max-width: 820px) {
  .store-columns { grid-template-columns: 1fr; }
}
.store-column {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 36px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.store-column h3 { margin: 0; font-size: 26px; letter-spacing: -0.015em; }
.store-column .req {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}
.store-qr {
  width: 200px;
  height: 200px;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 12px;
  background: #fff;
  display: grid;
  place-items: center;
}

/* Tech details strip */
.tech-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  max-width: 920px;
  margin: 0 auto;
}
.tech-strip > div {
  padding: 22px;
  text-align: center;
  border-right: 1px solid var(--line);
}
.tech-strip > div:last-child { border-right: 0; }
.tech-strip .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.tech-strip .v { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
@media (max-width: 720px) {
  .tech-strip { grid-template-columns: repeat(2, 1fr); }
  .tech-strip > div:nth-child(2n) { border-right: 0; }
  .tech-strip > div:nth-child(1),
  .tech-strip > div:nth-child(2) { border-bottom: 1px solid var(--line); }
}

/* Contact mail card */
.mail-card {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 28px;
  background: linear-gradient(135deg, #fff 0%, #faf5ff 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  max-width: 720px;
  margin: 0 auto;
}
.mail-card .mail-ic {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--grad-brand-h);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.mail-card .mail-body { flex: 1; min-width: 0; }
.mail-card a {
  font-size: 18px;
  font-weight: 600;
  color: var(--yaps-violet);
  letter-spacing: -0.01em;
  word-break: break-all;
}
.mail-card .mail-hint {
  color: var(--ink-3);
  font-size: 13px;
  margin-top: 4px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
@media (max-width: 560px) {
  .mail-card { flex-direction: column; text-align: center; padding: 24px; }
}

/* Dashboard */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 880px) {
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
}
.dash-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 22px;
}
.dash-card .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.dash-card .v {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.dash-card .v .of {
  color: var(--ink-3);
  font-weight: 500;
  font-size: 14px;
  margin-left: 4px;
}
.dash-bar {
  margin-top: 12px;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-sunken);
  overflow: hidden;
}
.dash-bar > i {
  display: block;
  height: 100%;
  background: var(--grad-brand-h);
  border-radius: 999px;
}

.meals-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.meals-list .meal {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.meals-list .meal .ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, #ffd2bd 0%, #c79bff 100%);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 14px;
  color: rgba(255,255,255,0.95);
  font-weight: 600;
  text-transform: uppercase;
}
.meals-list .meal .name { font-weight: 500; }
.meals-list .meal .time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
.meals-list .meal .kcal {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
@media (max-width: 520px) {
  .meals-list .meal { grid-template-columns: 36px 1fr auto; }
  .meals-list .meal .time { display: none; }
}

/* Auth modal sizing — reuse modal styles but allow narrower body */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  margin-top: 8px;
}
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.auth-form input {
  appearance: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink);
  font-family: var(--font-sans);
  letter-spacing: -0.005em;
  transition: border-color 200ms, box-shadow 200ms;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--yaps-violet);
  box-shadow: 0 0 0 3px rgba(139, 61, 158, 0.15);
}
.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}
.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.auth-links a {
  color: var(--yaps-violet);
  text-decoration: underline;
  text-decoration-color: rgba(139, 61, 158, 0.3);
  text-underline-offset: 3px;
}

/* Sparkline chart */
.sparkline {
  width: 100%;
  height: 90px;
}

/* Modal keyframes (shared by DownloadModal and AuthModal) */
@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
} {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--grad-brand-soft);
  color: var(--yaps-violet);
  margin-bottom: 18px;
}

/* About hero */
.about-hero {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  align-items: center;
  padding-top: 60px;
}
@media (max-width: 720px) {
  .about-hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 28px;
    padding-top: 24px;
    justify-items: center;
  }
  .about-hero .lead { margin-left: auto; margin-right: auto; }
  .founder { width: 200px; height: 200px; }
}
.founder {
  width: 240px;
  height: 240px;
  border-radius: 999px;
  position: relative;
  background:
    radial-gradient(120% 120% at 30% 25%, #f1ebfb 0%, transparent 60%),
    radial-gradient(120% 120% at 75% 80%, #f6e4f0 0%, transparent 60%),
    #ece8f3;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(80, 30, 130, 0.25);
  overflow: hidden;
  flex-shrink: 0;
}
.founder::after {
  /* Soft silhouette fallback — only visible if real img fails / not yet provided */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 38%, rgba(120, 90, 160, 0.35) 0 26px, transparent 27px),
    radial-gradient(ellipse 78px 64px at 50% 100%, rgba(120, 90, 160, 0.32) 0 60%, transparent 62%);
  z-index: 0;
}

/* Prose */
.prose p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 1.1em;
  max-width: 64ch;
  text-wrap: pretty;
}

/* Decorative scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  z-index: 3;
}
.scroll-cue::before {
  content: "";
  width: 1px;
  height: 18px;
  background: linear-gradient(180deg, transparent, var(--ink-3));
}

/* No-cursor on body while portal animates */
.routing { cursor: progress; }
