/* pepita — Luma (light) design system, as a static marketing site.
   Tokens mirror apps/mobile/src/ui/tokens.ts. Light theme only, by brand. */

:root {
  /* neutrals */
  --canvas: #f2f2f5;
  --surface: #ffffff;
  --ink: #1c1c1e;
  --muted: #6e6e73;
  --faint: #aeaeb2;
  --hairline: #e6e6ea;
  --black-a04: rgba(0, 0, 0, 0.04);
  --black-a06: rgba(0, 0, 0, 0.06);
  --black-a08: rgba(0, 0, 0, 0.08);
  --black-a12: rgba(0, 0, 0, 0.12);
  /* brand */
  --accent: #8b5cf6;
  --accent-strong: #7c3aed;
  --accent-100: #ede7fe;
  --pink: #ff4d9d;
  --green: #34c759;
  --cta: #1c1c1e;
  /* shape */
  --r-card: 24px;
  --r-tile: 16px;
  --r-pill: 999px;
  /* type */
  --font: -apple-system, "SF Pro Display", "SF Pro Text", system-ui,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* elevation */
  --shadow-sm: 0 1px 2px rgba(28, 28, 30, 0.04), 0 4px 12px rgba(28, 28, 30, 0.04);
  --shadow-md: 0 8px 30px rgba(28, 28, 30, 0.08);
  --shadow-phone: 0 30px 70px -20px rgba(76, 40, 130, 0.35);
  --maxw: 1120px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; }
.footer { flex-shrink: 0; }

a { color: inherit; text-decoration: none; }

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

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 242, 245, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.brand svg { width: 22px; height: 22px; display: block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  padding: 12px 20px;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.15s,
    background 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-cta { background: var(--cta); color: #fff; }
.btn-cta:hover { box-shadow: 0 8px 24px rgba(28, 28, 30, 0.22); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-ghost {
  background: var(--black-a06);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--black-a08); }

/* App Store badge button */
.btn-appstore {
  background: var(--cta);
  color: #fff;
  padding: 11px 22px 11px 18px;
  gap: 12px;
}
.btn-appstore svg { width: 24px; height: 24px; flex: none; }
.btn-appstore .as-txt { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.btn-appstore .as-small { font-size: 11px; font-weight: 500; opacity: 0.85; }
.btn-appstore .as-big { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100svh - 63px);
  display: flex;
  align-items: center;
  background:
    radial-gradient(1000px 640px at 22% 12%, rgba(139, 92, 246, 0.18), transparent 60%),
    radial-gradient(760px 520px at 92% 90%, rgba(255, 77, 157, 0.08), transparent 55%),
    linear-gradient(160deg, #f4f1fe 0%, var(--canvas) 70%);
}
.hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 40px 0;
}
.hero-art { order: -1; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-strong);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.18);
  padding: 6px 12px 6px 10px;
  border-radius: var(--r-pill);
  margin-bottom: 20px;
}
.eyebrow svg { width: 14px; height: 14px; }
h1.title {
  margin: 0;
  font-size: clamp(38px, 6.4vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 800;
}
h1.title .accent {
  background: linear-gradient(96deg, var(--accent) 12%, var(--accent-strong) 60%, var(--pink) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  margin: 22px 0 0;
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 33ch;
}
.cta-row {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cta-note { font-size: 13px; color: var(--faint); }

/* hero art — clustered floating phones */
.hero-art {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone {
  height: auto;
  border-radius: 40px;
  box-shadow: var(--shadow-phone);
  overflow: hidden;
}
.hero-art .phone { position: absolute; }
.hero-art .phone.front {
  z-index: 3;
  width: min(60%, 278px);
  transform: rotate(-2deg);
}
.hero-art .phone.left {
  z-index: 1;
  width: min(50%, 232px);
  transform: translate(-56%, -5%) rotate(-9deg);
}
.hero-art .phone.right {
  z-index: 2;
  width: min(50%, 232px);
  transform: translate(56%, -3%) rotate(9deg);
}
.spark {
  position: absolute;
  color: var(--accent);
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- section shell ---------- */
section.block { padding: 64px 0; }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-weight: 800;
}
.section-head p { margin: 14px 0 0; color: var(--muted); font-size: 17px; }

/* ---------- features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 26px 24px 28px;
  box-shadow: var(--shadow-sm);
}
.feature .ic {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-100);
  color: var(--accent-strong);
  margin-bottom: 16px;
}
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { margin: 0 0 7px; font-size: 18px; letter-spacing: -0.01em; font-weight: 700; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }

/* ---------- showcase rail ---------- */
.rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 22px 18px;
  margin: 0 -22px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail figure {
  flex: 0 0 auto;
  width: 230px;
  margin: 0;
  scroll-snap-align: center;
}
.rail .phone { border-radius: 34px; box-shadow: var(--shadow-md); }
.rail figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.rail figcaption span { display: block; font-weight: 400; color: var(--faint); font-size: 13px; }

/* ---------- download band ---------- */
.download-band {
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(139, 92, 246, 0.18), transparent 70%),
    linear-gradient(180deg, #efeafe, #f6f3ff);
  border: 1px solid rgba(139, 92, 246, 0.16);
  border-radius: 32px;
  text-align: center;
  padding: 56px 24px;
}
.download-band h2 {
  margin: 0 auto 10px;
  max-width: 16ch;
  font-size: clamp(26px, 3.6vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1.08;
  font-weight: 800;
}
.download-band p { margin: 0 0 26px; color: var(--muted); font-size: 17px; }
.download-band .cta-row { justify-content: center; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--hairline);
  background: var(--surface);
  margin-top: 24px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 30px 0;
}
.footer .brand { font-size: 17px; }
.footer nav { display: flex; gap: 24px; }
.footer nav a { color: var(--muted); font-size: 15px; font-weight: 500; }
.footer nav a:hover { color: var(--ink); }
.footer .copy { color: var(--faint); font-size: 13px; }
.footer-min { background: transparent; border-top: none; margin-top: 0; }
.footer-min .footer-inner { padding: 18px 0; }
.footer-min .copy { width: auto; }

/* ---------- legal pages ---------- */
.legal { max-width: 720px; margin: 0 auto; padding: 48px 0 8px; }
.legal h1 {
  font-size: clamp(30px, 5vw, 42px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 10px;
  font-weight: 800;
}
.legal .updated { color: var(--faint); font-size: 14px; margin: 0 0 30px; }
.legal section { margin: 0 0 26px; }
.legal h2 {
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  font-weight: 700;
}
.legal h3 { font-size: 16px; margin: 18px 0 4px; font-weight: 600; }
.legal p { margin: 0 0 10px; color: #3a3a3e; font-size: 16px; line-height: 1.62; }
.legal a { color: var(--accent-strong); font-weight: 500; }
.legal a:hover { text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero { min-height: 0; padding: 8px 0 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 10px; text-align: center; padding: 32px 0 0; }
  .hero-art { order: 0; min-height: 430px; margin-top: 6px; }
  .lede { margin-left: auto; margin-right: auto; }
  .hero-art .phone.front { width: min(58%, 244px); }
  .hero-art .phone.left { width: min(48%, 200px); transform: translate(-54%, -5%) rotate(-9deg); }
  .hero-art .phone.right { width: min(48%, 200px); transform: translate(54%, -3%) rotate(9deg); }
  .features { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .hero-art .phone.left, .hero-art .phone.right { opacity: 0.92; }
}
