/* Veiron Fit — M3 Expressive web theme (purple palette, mirrors core:ui:api/theme/colors/purple) */

:root {
  --primary: #7e2dcd;
  --on-primary: #ffffff;
  --primary-container: #984be8;
  --on-primary-container: #fffbff;
  --secondary-container: #d8b1ff;
  --on-secondary-container: #603f84;
  --tertiary: #a91c78;
  --tertiary-container: #c93a92;
  --on-tertiary-container: #fffbff;
  --background: #fff7ff;
  --on-background: #1f1a23;
  --surface-container-low: #fbf0fe;
  --surface-container: #f5eaf8;
  --surface-container-high: #efe5f2;
  --surface-container-highest: #e9dfed;
  --on-surface-variant: #4c4353;
  --outline-variant: #cfc2d6;

  --shape-xl: 28px;
  --shape-xxl: 48px;
  --shape-full: 999px;
  --spring: cubic-bezier(0.42, 1.67, 0.21, 0.9); /* expressive fast spatial */
  --ease: cubic-bezier(0.2, 0, 0, 1); /* emphasized */

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #dcb8ff;
    --on-primary: #480082;
    --primary-container: #b46eff;
    --on-primary-container: #200040;
    --secondary-container: #58377b;
    --on-secondary-container: #cba5f2;
    --tertiary: #ffafd6;
    --tertiary-container: #ed58b0;
    --on-tertiary-container: #2e001d;
    --background: #16121a;
    --on-background: #e9dfed;
    --surface-container-low: #1f1a23;
    --surface-container: #231e27;
    --surface-container-high: #2d2832;
    --surface-container-highest: #38333d;
    --on-surface-variant: #cfc2d6;
    --outline-variant: #4c4353;
    color-scheme: dark;
  }
}

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

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--on-background);
  font-family: "Roboto Flex", "Google Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: clip;
}

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

/* ── Ambient "aura" background ─────────────────────────────── */
.aura {
  position: fixed;
  inset: -20vmax;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40vmax 40vmax at 20% 15%, color-mix(in srgb, var(--primary-container) 38%, transparent), transparent 70%),
    radial-gradient(35vmax 35vmax at 85% 30%, color-mix(in srgb, var(--tertiary-container) 28%, transparent), transparent 70%),
    radial-gradient(45vmax 45vmax at 50% 95%, color-mix(in srgb, var(--secondary-container) 40%, transparent), transparent 70%);
  filter: blur(20px);
  animation: breathe 14s var(--ease) infinite alternate;
}

@keyframes breathe {
  from { transform: scale(1) rotate(0deg); }
  to { transform: scale(1.08) rotate(6deg); }
}

/* ── Layout ────────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ── Top app bar ───────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--on-background);
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  font-variation-settings: "wdth" 120;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--on-primary);
  background: var(--primary);
  clip-path: url(#cookie);
  font-size: 18px;
  font-weight: 900;
}

.nav { display: flex; gap: 4px; flex-wrap: wrap; }

.nav a {
  padding: 10px 16px;
  border-radius: var(--shape-full);
  color: var(--on-surface-variant);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: background 200ms var(--ease), border-radius 300ms var(--spring);
}

.nav a:hover { background: var(--surface-container-high); }

.nav a[aria-current="page"] {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  border-radius: 14px;
}

/* ── Typography ────────────────────────────────────────────── */
.display {
  margin: 0;
  font-size: clamp(40px, 12vw, 148px);
  line-height: 0.88;
  font-weight: 900;
  font-variation-settings: "wdth" 151, "opsz" 144;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.display .accent { color: var(--primary); }

.headline {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.05;
  font-weight: 800;
  font-variation-settings: "wdth" 125;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 34ch;
  margin: 24px 0 0;
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.35;
  color: var(--on-surface-variant);
}

.label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 48px 0 64px;
}

.hero-shape {
  position: absolute;
  right: -40px;
  top: 8px;
  width: clamp(160px, 32vw, 360px);
  aspect-ratio: 1;
  background: var(--tertiary-container);
  clip-path: url(#burst);
  opacity: 0.9;
  z-index: -1;
  animation: spin 40s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* ── Buttons (shape-morphing) ──────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--shape-full);
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: border-radius 350ms var(--spring), transform 350ms var(--spring), background 200ms var(--ease);
}

.btn:hover { border-radius: 18px; }
.btn:active { transform: scale(0.96); border-radius: 12px; }

.btn-filled { background: var(--primary); color: var(--on-primary); }
.btn-tonal { background: var(--secondary-container); color: var(--on-secondary-container); }

.btn:focus-visible, .nav a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

/* ── Bento cards ───────────────────────────────────────────── */
.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 8px 0 64px;
}

@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .span-2 { grid-column: span 2; }
  .span-3 { grid-column: span 3; }
  .span-4 { grid-column: span 4; }
}

.card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: var(--shape-xl);
  background: var(--surface-container);
  transition: border-radius 400ms var(--spring), transform 400ms var(--spring);
}

.card:hover { border-radius: var(--shape-xxl); transform: translateY(-2px); }

.card h3 {
  margin: 16px 0 6px;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
  font-variation-settings: "wdth" 115;
}

.card p { margin: 0; color: var(--on-surface-variant); }

.card.primary { background: var(--primary-container); color: var(--on-primary-container); }
.card.primary p, .card.primary .label { color: inherit; opacity: 0.85; }
.card.tertiary { background: var(--tertiary-container); color: var(--on-tertiary-container); }
.card.tertiary p, .card.tertiary .label { color: inherit; opacity: 0.85; }
.card.secondary { background: var(--secondary-container); color: var(--on-secondary-container); }
.card.secondary p, .card.secondary .label { color: inherit; opacity: 0.85; }

.card .big {
  display: block;
  margin-top: 20px;
  font-size: clamp(40px, 8vw, 80px);
  line-height: 0.9;
  font-weight: 900;
  font-variation-settings: "wdth" 151;
  letter-spacing: -0.03em;
}

.icon-shape {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  clip-path: url(#cookie);
}

.card.primary .icon-shape, .card.tertiary .icon-shape {
  background: color-mix(in srgb, currentColor 18%, transparent);
  color: inherit;
}

.icon-shape svg { width: 26px; height: 26px; }

/* ── Editorial numbered rows (matches the in-app privacy screen) ─ */
.rows { margin: 0 0 48px; padding: 0; list-style: none; }

.row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 4px 16px;
  padding: 24px 0;
  border-top: 1px solid var(--outline-variant);
}

@media (min-width: 720px) {
  .row { grid-template-columns: 80px 220px 1fr; align-items: baseline; }
}

.row .num {
  font-size: 32px;
  font-weight: 900;
  font-variation-settings: "wdth" 151;
  color: var(--primary);
  line-height: 1;
}

.row .value {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 800;
  font-variation-settings: "wdth" 120;
}

.row .desc {
  grid-column: 2;
  margin: 0;
  color: var(--on-surface-variant);
}

@media (min-width: 720px) { .row .desc { grid-column: 3; } }

/* ── Prose (policy text) ───────────────────────────────────── */
.prose {
  max-width: 72ch;
  padding: 32px 24px;
  margin: 0 0 64px;
  border-radius: var(--shape-xl);
  background: var(--surface-container-low);
}

@media (min-width: 720px) { .prose { padding: 48px; } }

.prose h2 {
  margin: 36px 0 8px;
  font-size: 22px;
  font-weight: 800;
  font-variation-settings: "wdth" 115;
}

.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--on-surface-variant); }
.prose ul { padding-left: 20px; }

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--outline-variant);
  color: var(--on-surface-variant);
  font-size: 14px;
}

.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer a { color: inherit; text-decoration: none; font-weight: 600; }
.footer a:hover { color: var(--primary); }

/* ── Enter animation ───────────────────────────────────────── */
.rise { animation: rise 700ms var(--spring) both; }
.rise:nth-child(2) { animation-delay: 60ms; }
.rise:nth-child(3) { animation-delay: 120ms; }
.rise:nth-child(4) { animation-delay: 180ms; }
.rise:nth-child(5) { animation-delay: 240ms; }
.rise:nth-child(6) { animation-delay: 300ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Hidden SVG holding the M3 Expressive shape clip-paths */
.shapes { position: absolute; width: 0; height: 0; }

@media (max-width: 480px) {
  .topbar { padding: 16px 0; }
  .nav a { padding: 8px 12px; }
  .hero-shape { right: -24px; }
}
