/* ==========================================================================
   FirSe — styles.css
   Mobile-first. Breakpoints: 640px (sm), 760px (md), 1024px (lg)
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL Open Font License — see assets/fonts) ---------- */
@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/Outfit-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../assets/fonts/DMSans-Variable.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --c-primary: #6b2be8;
  --c-primary-dark: #5b21d6;
  --c-primary-soft: #f3eeff;
  --c-primary-tint: #f4f0fe;
  --c-header: #060925;
  --c-ink: #15121f;
  --c-ink-2: #2a2540;
  --c-body: #3b3650;
  --c-muted: #5a5569;
  --c-bg: #fbfaff;
  --c-surface: #ffffff;
  --c-border: #ece6fa;
  --c-border-strong: #e3dcf5;
  --c-success: #1e9e63;
  --c-success-soft: #e6f6ee;
  --c-error: #b42318;
  --c-error-border: #d92d20;
  --c-note-bg: #fff6e5;
  --c-note-border: #f2d29b;
  --c-note-ink: #5c3d00;
  --c-gold: #f5b83d;

  --f-display: "Outfit", system-ui, sans-serif;
  --f-body: "DM Sans", system-ui, sans-serif;

  --container: 1200px;
  --container-narrow: 1120px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(56px, 7vw, 88px);

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-card: 0 10px 24px -18px rgba(76, 29, 149, 0.3);
  --shadow-panel: 0 30px 60px -40px rgba(76, 29, 149, 0.35);
  --shadow-cta: 0 14px 30px -12px rgba(107, 43, 232, 0.6);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--c-ink);
  background: var(--c-bg);
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
a { color: var(--c-primary); }
button, input, textarea { font: inherit; }

:focus-visible {
  outline: 3px solid var(--c-primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--c-surface); color: var(--c-ink);
  padding: 10px 16px; border-radius: var(--r-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

.section { padding-block: var(--section-y); }
.section--tint { background: var(--c-primary-tint); }

/* ---------- Type ---------- */
.eyebrow {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-primary);
}
.h1 {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
.h2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.3;
}
.lead { font-size: clamp(16px, 1.7vw, 19px); line-height: 1.6; color: var(--c-muted); max-width: 30em; }
.text-muted { color: var(--c-muted); }
.accent { color: var(--c-primary); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: var(--c-primary-dark); }
.btn--lg { min-height: 58px; padding: 0 36px; font-size: 17px; box-shadow: var(--shadow-cta); }
.btn--block { width: 100%; }
.btn--white { background: #fff; color: #4c1bb8; font-weight: 700; }
.btn--white:hover { background: #f3eeff; }
.btn--ghost { background: #fff; color: var(--c-ink-2); border: 1.5px solid var(--c-border-strong); }
.btn--ghost:hover { border-color: var(--c-primary); }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-header);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  min-height: 44px;
  text-decoration: none;
}
.brand__mark { height: 36px; width: auto; }
.brand__word { height: 22px; width: auto; }

.site-nav { display: none; }
.site-nav a {
  color: #d4d0e4;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  padding: 12px 0;
}
.site-nav a:hover { color: #fff; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-nav {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px var(--gutter) 16px;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a {
  display: block;
  padding: 14px 0;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: #d4d0e4;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}
.header-back:hover { color: #fff; }
.header-back svg { width: 18px; height: 18px; }

.header-cta { display: none; }

@media (min-width: 480px) {
  .header-cta { display: inline-flex; }
}
@media (min-width: 760px) {
  .site-header__bar { gap: 32px; }
  .site-nav { display: flex; gap: 32px; }
  .nav-toggle, .mobile-nav { display: none !important; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 6vw, 80px) 40px; }
.hero__grid {
  display: grid;
  gap: 48px;
  align-items: center;
}
.hero__copy { display: flex; flex-direction: column; gap: 24px; }
.hero__copy .btn--lg { align-self: stretch; }
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-size: 14px;
  color: var(--c-body);
}
.checklist li { display: flex; align-items: center; gap: 8px; }
.check-icon { width: 20px; height: 20px; flex: none; }

.hero__visual {
  display: flex;
  justify-content: center;
  padding-block: 24px 48px;
  overflow-x: clip;
}
.hero__stage { position: relative; width: min(330px, 56vw); }
/* Phone: built at the app's native 375×812 screen size, scaled to fit by main.js */
.hero__device {
  position: relative;
  z-index: 1;
  width: 92%;
  margin-inline: auto;
  aspect-ratio: 401 / 838;
  transform: perspective(1600px) rotateY(-16deg) rotateX(5deg) rotateZ(5deg);
}
.device {
  position: absolute;
  top: 0;
  left: 0;
  width: 401px;
  height: 838px;
  padding: 4px;
  border-radius: 64px;
  background: linear-gradient(150deg, #b9a2ff 0%, #5b3fc4 22%, #2a1b6e 50%, #6b4fd8 78%, #c7b5ff 100%);
  /* box-shadow, not filter: drop-shadow, so the animating screen doesn't re-run a blur every frame */
  box-shadow: 0 54px 66px -6px rgba(76, 29, 149, 0.32);
  transform: scale(var(--device-scale, 0.76));
  transform-origin: 0 0;
}
.device::before, .device::after {
  content: "";
  position: absolute;
  width: 4px;
  border-radius: 2px;
  background: #4a33a8;
}
.device::before { left: -3px; top: 180px; height: 64px; box-shadow: 0 84px 0 #4a33a8; }
.device::after  { right: -3px; top: 230px; height: 100px; }
.device__bezel {
  height: 100%;
  padding: 9px;
  border-radius: 60px;
  background: #04050f;
}

/* ---------- In-app screen (Figma: Shop detail · Café, first stamp) ---------- */
.app {
  --a-ink: #ede9f8;
  --a-card-ink: #f1edff;
  --a-soft: #d6cef7;
  --a-mute: #8a8a9c;
  --a-lilac: #d3c6ff;
  --a-green: #3fcb92;
  position: relative;
  width: 375px;
  height: 812px;
  overflow: hidden;
  border-radius: 51px;
  background: #060925;
  color: var(--a-ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  line-height: normal;
  text-align: left;
  user-select: none;
}
.app img { display: block; max-width: none; }
:where(.app) p { margin: 0; }
.app__glow {
  position: absolute;
  left: -112px;
  top: -216px;
  width: 600px;
  height: 420px;
  background: radial-gradient(closest-side, rgba(109, 79, 224, 0.32), rgba(109, 79, 224, 0));
}
.app__island {
  position: absolute;
  z-index: 3;
  top: 11px;
  left: 50%;
  width: 120px;
  height: 34px;
  margin-left: -60px;
  border-radius: 20px;
  background: #000;
}
.app__status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
  padding: 4px 30px 0 46px;
}
.app__time { font-size: 16px; font-weight: 600; letter-spacing: -0.2px; }
.app__sys { width: 66px; height: 12px; }

.app__body { position: relative; display: flex; flex-direction: column; padding: 2px 20px 128px; }
.app__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}
.app__title { margin-top: 16px; font-size: 24px; font-weight: 700; letter-spacing: -0.36px; }
.app__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--a-mute);
  white-space: nowrap;
}
.app__open { font-weight: 600; color: var(--a-green); }

.stamp-card {
  position: relative;
  margin-top: 20px;
  padding: 20px 20px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: linear-gradient(132deg, #271e63 0%, #17123f 60%, #110d33 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 16px 34px -6px rgba(3, 0, 20, 0.55);
  color: var(--a-card-ink);
  overflow: hidden;
}
.stamp-card__guilloche { position: absolute; left: 169px; top: -91px; }
.stamp-card__head { position: relative; display: flex; align-items: center; justify-content: space-between; }
.stamp-card__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.32px;
  color: rgba(241, 237, 255, 0.65);
}
.stamp-card__mono {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #b6a3ff;
  font-size: 9.5px;
  letter-spacing: 0.38px;
  color: #1a1446;
}
.stamp-card__count { font-size: 13px; font-weight: 600; opacity: 0.7; }
.stamp-card__title {
  position: relative;
  margin-top: 16px;
  font-size: 28px;
  font-weight: 700;
  line-height: 32px;
  letter-spacing: -0.42px;
}
.stamp-card__sub { position: relative; margin-top: 4px; font-size: 15px; font-weight: 500; color: var(--a-soft); }
.stamp-card__stamps { position: relative; display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.stamp-card__row { display: flex; align-items: center; justify-content: space-between; }
.stamp-card__tear { width: 295px; height: 1.2px; margin: 18px 0 14px; }
.stamp-card__notch { position: absolute; top: 248px; }
.stamp-card__notch--l { left: -12px; }
.stamp-card__notch--r { right: -12px; }
.stamp-card__ladder { position: relative; display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }

.slot { position: relative; flex: none; width: 48px; height: 48px; }
.slot > img, .slot__seal { position: absolute; }
.slot__deboss { left: 4px; top: 4px; width: 40px; height: 40px; }
.slot__ink { inset: 0; width: 48px; height: 48px; opacity: 0; transform: rotate(8deg); transition: opacity 0.4s; }
.slot__ring, .slot__halo { left: 2px; top: 2px; width: 44px; height: 44px; opacity: 0; }
.slot.is-stamped .slot__deboss { opacity: 0; }
.slot.is-stamped .slot__ink { opacity: 1; }
.slot.is-next .slot__ring { opacity: 1; }
.slot__seal { left: 1.75px; top: 2.22px; width: 44.5px; height: 43.563px; }
.slot__seal img { position: absolute; inset: -1.61% -1.57%; width: auto; height: auto; }
.slot--reward::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(245, 184, 61, 0.55), rgba(182, 163, 255, 0.25) 60%, transparent);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.4s, transform 0.4s;
}
.slot--reward.is-stamped::before { opacity: 1; transform: scale(1); }
.gift { position: absolute; left: 13px; top: 13px; width: 22px; height: 22px; }
.gift img { position: absolute; width: auto; height: auto; }
.gift__bow  { inset: 0 24.55% 64.38% 24.55%; }
.gift__knot { inset: 14.61% 42.59% 70.57% 42.59%; }
.gift__box  { inset: 26.14% 0 0 0; }
.gift__lid  { inset: 23.81% 27.45% 60.23% 27.45%; }

.tier { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.tier__badge {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 700;
  color: #c9c1ee;
  transition: background-color 0.3s, color 0.3s;
}
.tier__name { flex: 1; min-width: 0; font-weight: 500; color: #c9c1ee; }
.tier__left { font-weight: 600; color: #a79cd6; }
.tier.is-near .tier__badge { border: 0; background: var(--a-lilac); color: #1a1446; }
.tier.is-near .tier__name { color: var(--a-card-ink); }
.tier.is-near .tier__left { color: var(--a-soft); }
.tier.is-done .tier__badge { background: var(--a-green); }
.tier.is-done .tier__left { color: var(--a-green); }

.app__h2 { margin-top: 20px; font-size: 18px; font-weight: 700; }
.app__info {
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
}
.app__row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 14px 16px; }
.app__row + .app__row { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.app__ic {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}
.app__t { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.app__t span { font-size: 12.5px; font-weight: 500; color: var(--a-mute); }
.app__t b { overflow: hidden; font-size: 15px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

.app__scrim {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 170px;
  background: linear-gradient(to bottom, rgba(6, 9, 37, 0), rgba(6, 9, 37, 0.92) 55%, #060925);
}
.app__nav {
  position: absolute;
  left: 16px;
  bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 343px;
  height: 72px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: #151838;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.app__tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 52px;
  font-size: 11px;
  font-weight: 500;
  color: var(--a-mute);
}
.app__tab.is-active { font-weight: 600; color: var(--a-ink); }
.app__scan { position: relative; width: 54px; height: 54px; }
.app__scan img { position: absolute; left: -18px; top: -12px; }

/* Stamp loop (driven by main.js) */
@media (prefers-reduced-motion: no-preference) {
  .slot.is-next .slot__halo { animation: halo-pulse 2s infinite; }
  .slot.is-landing .slot__ink { animation: stamp-land 0.55s cubic-bezier(0.3, 0.7, 0.4, 1) both; }
  .slot.is-landing .slot__halo { animation: halo-burst 0.7s ease-out 0.2s both; }
  .slot--reward.is-landing .gift { animation: gift-pop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
  .slot--reward.is-landing .slot__seal { animation: seal-spin 0.9s ease-out both; }
  .stamp-card.is-thump { animation: card-thump 0.32s ease-out 0.2s; }
  .is-ticking { animation: tick-in 0.4s ease-out; }
  .hero__device { animation: device-float 6s ease-in-out infinite alternate; }
}
@keyframes halo-pulse {
  0%   { opacity: 1; transform: scale(1); animation-timing-function: ease-out; }
  70%, 100% { opacity: 0; transform: scale(1.35); }
}
@keyframes stamp-land {
  0%   { opacity: 0; transform: translateY(-18px) scale(1.9) rotate(-14deg); }
  55%  { opacity: 1; transform: scale(0.9) rotate(11deg); }
  100% { opacity: 1; transform: scale(1) rotate(8deg); }
}
@keyframes halo-burst {
  from { opacity: 0.9; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.7); }
}
@keyframes gift-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.45) rotate(-10deg); }
  100% { transform: scale(1.12) rotate(0deg); }
}
@keyframes seal-spin {
  from { transform: rotate(-90deg) scale(0.8); }
  to   { transform: rotate(0deg) scale(1); }
}
@keyframes card-thump {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(2px) scale(0.995); }
}
@keyframes tick-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes device-float {
  from { translate: 0 0; }
  to   { translate: 0 -10px; }
}
.slot--reward.is-stamped .gift { transform: scale(1.12); }
.hero__visual.is-paused * { animation-play-state: paused !important; }
.prop { position: absolute; height: auto; pointer-events: none; will-change: transform; }
.prop--ribbon  { width: 112%; left: -58%; top: 50%; z-index: 0; }
.prop--gift    { width: 30%;  left: -28%; top: 9%; }
.prop--spark-a { width: 9%;   left: -6%;  top: 3%; }
.prop--spark-b { width: 7%;   left: -30%; top: 42%; }
.prop--pin     { width: 26%;  right: -27%; top: 11%; }
.prop--spark-c { width: 8%;   right: -15%; top: 57%; }
.prop--stamp   { width: 36%;  left: -27%; bottom: -2%; z-index: 2; }

/* Gentle ambient motion — disabled for users who prefer reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .prop--gift    { animation: gift-float 3.2s ease-in-out infinite alternate; }
  .prop--pin     { animation: bob 2.6s ease-in-out -1.3s infinite alternate; }
  .prop--stamp   { animation: stamp-press 2.4s ease-in-out -0.6s infinite alternate; transform-origin: 60% 80%; }
  .prop--ribbon  { animation: drift 5s ease-in-out infinite alternate; }
  .prop--spark-a { animation: twinkle 1.8s ease-in-out infinite alternate; }
  .prop--spark-b { animation: twinkle 2.2s ease-in-out -0.9s infinite alternate-reverse; }
  .prop--spark-c { animation: twinkle 2s ease-in-out -0.4s infinite alternate; }
}
@keyframes gift-float {
  from { transform: translateY(0) rotate(-4deg); }
  to   { transform: translateY(-12px) rotate(3deg); }
}
@keyframes bob {
  from { transform: translateY(0); }
  to   { transform: translateY(-14px); }
}
@keyframes stamp-press {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-10px) rotate(-7deg); }
}
@keyframes drift {
  from { transform: translateX(0) rotate(0deg); }
  to   { transform: translateX(8px) rotate(1.5deg); }
}
@keyframes twinkle {
  from { transform: scale(0.8) rotate(0deg); opacity: 0.7; }
  to   { transform: scale(1.15) rotate(20deg); opacity: 1; }
}


@media (min-width: 640px) {
  .hero__copy .btn--lg { align-self: flex-start; }
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.1fr 1fr; }
  .hero__visual { overflow: visible; padding-left: 60px; }
  .hero__stage { width: min(310px, 100%); }
  .prop--gift { width: 34%; left: -36%; }
}
@media (min-width: 900px) and (max-width: 1099px) {
  /* The image column is narrow here, so pull the map pin in to keep it inside the viewport */
  .hero__visual { padding-left: 0; }
  .prop--pin { right: -20%; }
}

/* ---------- Category bar ---------- */
.categories {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 10px;
  overflow-x: auto;
  box-shadow: 0 12px 30px -20px rgba(76, 29, 149, 0.25);
  scrollbar-width: thin;
}
.categories ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  width: max-content;
  min-width: 100%;
}
.categories li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  font-weight: 500;
  font-size: 15px;
  white-space: nowrap;
  color: var(--c-ink-2);
}
.icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--c-primary-soft);
  color: var(--c-primary);
  flex: none;
}
.icon-tile svg { width: 20px; height: 20px; }

/* ---------- Why ---------- */
.why { padding-top: 0; }
.challenge { padding-bottom: 8px; }
.challenge__close {
  margin-top: 28px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(20px, 2.2vw, 26px);
  color: var(--c-primary);
}
.card-grid.card-grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card-grid.card-grid--5 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.who .section-head { align-items: flex-end; margin-bottom: 28px; }
.who__lead { margin-top: 12px; color: var(--c-muted); font-size: 17px; max-width: 38em; }
.who .section-head > .who__cta { flex: 0 0 auto; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 48px;
  margin-bottom: 40px;
}
.section-head > div { flex: 1 1 420px; min-width: 0; }
.section-head > p:not(.eyebrow) { flex: 1 1 340px; color: var(--c-muted); max-width: 30em; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: #f1eaff;
  color: var(--c-primary);
}
.feature-card__icon svg { width: 24px; height: 24px; }
.feature-card p { color: var(--c-muted); font-size: 15px; }

/* ---------- How it works ---------- */
.how__intro { margin-bottom: 40px; }
.how__intro .h2 { margin-bottom: 12px; }
.how__intro p:not(.eyebrow) { color: var(--c-muted); font-size: 17px; max-width: 40em; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}
.step { display: flex; flex-direction: column; gap: 16px; }
.step__head { display: flex; gap: 16px; align-items: flex-start; }
.step__num {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--c-primary);
  color: var(--c-primary);
  font-family: var(--f-display);
  font-weight: 700;
}
.step__head p { margin-top: 2px; color: var(--c-muted); font-size: 15px; }

.mini-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
}
/* Cards in a row of steps share the same height; content is centred vertically */
.step > .mini-card { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.step > .stamps-row { flex-direction: row; justify-content: space-between; align-content: center; }
.mini-card__row { display: flex; align-items: center; gap: 14px; }
.mini-card__title { font-weight: 600; font-size: 15px; }
.mini-card__sub { font-size: 13px; color: var(--c-muted); }
.mini-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex: none;
  color: #fff;
}
.mini-card__icon svg { width: 22px; height: 22px; }
.mini-card__icon--dark { background: var(--c-ink); }
.mini-card__icon--primary { background: var(--c-primary); }

.stamps-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.stamps { display: flex; gap: 8px; }
.stamp { width: 30px; height: 30px; border-radius: 50%; background: var(--c-primary); }
.stamp--empty { background: transparent; border: 2px dashed #c4b5fd; }
.mini-card__caption { flex-basis: 100%; }
.tag {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-primary);
  background: #f1eaff;
  padding: 4px 10px;
  border-radius: 8px;
}
.progress {
  height: 6px;
  margin-top: 12px;
  border-radius: 3px;
  background: #eee8fb;
  overflow: hidden;
}
.progress span { display: block; height: 100%; border-radius: 3px; background: var(--c-primary); }

/* ---------- Impact ---------- */
.impact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
  padding: clamp(28px, 4vw, 48px);
  background: var(--c-primary-tint);
  border-radius: var(--r-xl);
}
.impact__copy { flex: 1 1 340px; min-width: 0; }
.impact__copy .h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; }
.impact__value {
  margin: 12px 0 4px;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(56px, 8vw, 96px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--c-primary);
}
.impact__copy .h2 { margin-bottom: 24px; }
.impact__label {
  display: inline-block;
  padding: 4px 10px;
  border: 1px dashed #c9bdf0;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.impact__per { font-weight: 600; font-size: 17px; color: var(--c-ink-2); }
.impact__disclaimer {
  flex-basis: 100%;
  padding-top: 16px;
  border-top: 1px solid var(--c-border-strong);
  font-size: 13px;
  color: var(--c-muted);
}
.impact__formula { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.impact__formula span {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: #fff;
  border: 1px solid var(--c-border-strong);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-ink-2);
}
.impact__formula b { color: #8c869e; }
.impact__tiles {
  flex: 1 1 420px;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.benefit-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 24px -18px rgba(76, 29, 149, 0.35);
}
.benefit-tile h3 { font-family: var(--f-display); font-weight: 600; font-size: 17px; line-height: 1.25; }
.benefit-tile p { font-size: 14px; color: var(--c-muted); }
.benefit-tile__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.benefit-tile__icon svg { width: 22px; height: 22px; }
.benefit-tile__icon--violet { background: #f1eaff; color: var(--c-primary); }
.benefit-tile__icon--green  { background: #e6f6ee; color: var(--c-success); }
.benefit-tile__icon--pink   { background: #fdecf3; color: #c2185b; }
.benefit-tile__icon--amber  { background: #fff4dc; color: #b7791f; }

/* ---------- FAQ ---------- */
.faq .h2 { margin-bottom: 28px; }
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.faq-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 0 20px;
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--c-primary);
  border-bottom: 2px solid var(--c-primary);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq-item p { padding-bottom: 18px; color: var(--c-muted); font-size: 15px; }

/* ---------- CTA band ---------- */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(32px, 5vw, 56px);
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 140, 220, 0.45) 0%, rgba(255, 140, 220, 0) 42%),
    radial-gradient(circle at 8% 110%, rgba(80, 170, 255, 0.35) 0%, rgba(80, 170, 255, 0) 45%),
    linear-gradient(120deg, #3e14a8 0%, #5b21d6 45%, #8a3cf0 100%);
  box-shadow:
    0 34px 80px -28px rgba(107, 43, 232, 0.7),
    0 0 60px -10px rgba(155, 77, 255, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: var(--r-xl);
}
.cta-band { position: relative; overflow: hidden; isolation: isolate; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band::before {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 38%;
  background: linear-gradient(100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.03) 35%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.03) 65%,
    rgba(255, 255, 255, 0) 100%);
  transform: translateX(-130%) skewX(-18deg);
  pointer-events: none;
  z-index: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .cta-band::before { animation: shimmer 4.2s ease-in-out infinite; }
}
@keyframes shimmer {
  0%        { transform: translateX(-130%) skewX(-18deg); }
  55%, 100% { transform: translateX(330%) skewX(-18deg); }
}
.cta-band__copy { flex: 1 1 380px; min-width: 0; }
.cta-band .eyebrow { color: #dccfff; }
.cta-band .h2 { margin-bottom: 10px; }
.cta-band p { color: #e6ddff; font-size: 17px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid #eee8fb; }
.site-footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  padding-block: 24px;
}
.site-footer__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-right: auto;
}
.site-footer__brand img:first-child { height: 30px; width: auto; }
.site-footer__brand img:nth-child(2) { height: 18px; width: auto; }
.site-footer__brand span { color: var(--c-muted); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { padding: 12px 0; color: var(--c-muted); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--c-ink); }
.socials { display: flex; gap: 4px; }
.socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--c-body);
  border-radius: var(--r-sm);
}
.socials a:hover { color: var(--c-primary); background: var(--c-primary-soft); }
.socials svg { width: 20px; height: 20px; }

/* ---------- Early access page ---------- */
.signup {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(24px, 5vw, 64px);
  padding-block: clamp(28px, 5vw, 72px) 56px;
}
/* Small laptops (e.g. 1024×768): less top space so more of the form is above the fold */
@media (min-width: 900px) and (max-width: 1279px) {
  .signup { padding-top: max(16px, calc(5vw - 32px)); }
}
.signup__intro { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.signup__intro .h1 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.05; }
.signup__intro > p:not(.eyebrow) { color: var(--c-muted); font-size: 17px; max-width: 28em; }
.benefits {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.benefits li { display: flex; gap: 12px; align-items: flex-start; }
.benefits .check-icon { width: 22px; height: 22px; margin-top: 1px; }
@media (min-width: 760px) {
  .benefits { gap: 14px; }
}

.panel {
  flex: 1 1 460px;
  min-width: 0;
  padding: clamp(20px, 3.4vw, 36px);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 24px;
  box-shadow: var(--shadow-panel);
}

.form { display: flex; flex-direction: column; gap: 24px; }
.form[hidden] { display: none; }
.form__row { display: flex; flex-wrap: wrap; gap: 20px; }
.field { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.field label,
.fieldset legend { font-weight: 600; font-size: 14px; }
.input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1.5px solid var(--c-border-strong);
  border-radius: var(--r-sm);
  -webkit-appearance: none;
  appearance: none;
  background: #fcfbff;
  color: var(--c-ink);
  font-size: 16px;
}
.input::placeholder { color: #8c869e; }
.input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(107, 43, 232, 0.18); }

.input-group {
  display: flex;
  align-items: stretch;
  height: 52px;
  border: 1.5px solid var(--c-border-strong);
  border-radius: var(--r-sm);
  background: #fcfbff;
  overflow: hidden;
}
.input-group:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(107, 43, 232, 0.18); }
.input-group__prefix {
  display: flex;
  align-items: center;
  padding: 0 12px 0 14px;
  border-right: 1px solid var(--c-border-strong);
  color: var(--c-body);
  font-weight: 500;
}
.input-group input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-radius: 0; /* the group carries the radius */
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  padding: 0 14px;
  font-size: 16px;
  color: var(--c-ink);
}
.input-group input:focus { outline: none; }

.is-invalid .input,
.is-invalid .input-group { border-color: var(--c-error-border); }
.field__error { display: none; font-size: 13px; color: var(--c-error); }
.is-invalid .field__error { display: block; }

.fieldset { border: 0; margin: 0; padding: 0; }
.fieldset legend { padding: 0; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--c-border-strong);
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--c-ink-2);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.chip span:hover { border-color: var(--c-primary); }
.chip input:checked + span { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 600; }
/* Box-shadow ring: follows the pill shape in Safari < 16.4, where outlines are square */
.chip input:focus-visible + span { outline: none; box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--c-primary); }
.chip, .btn, a { -webkit-tap-highlight-color: transparent; }
/* Tablet: tighter chips so each group fits on one line */
@media (min-width: 600px) and (max-width: 900px) {
  .chips { gap: 6px; }
  .chip span { padding: 0 13px; }
}

.other-city { margin-top: 12px; }
.other-city[hidden] { display: none; }

.form__privacy {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--c-muted);
}
.form__privacy svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.form__privacy a { position: relative; font-weight: 600; white-space: nowrap; }
/* Invisible 44px-tall tap area; text and focus outline stay the same size */
.form__privacy a::after { content: ""; position: absolute; inset: -14px -2px; }

.success { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding-block: 12px; }
.success[hidden] { display: none; }
.success__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--c-success-soft);
  color: var(--c-success);
}
.success__icon svg { width: 32px; height: 32px; }
.success h2 { font-family: var(--f-display); font-weight: 700; font-size: 30px; letter-spacing: -0.02em; }
.success p { color: var(--c-body); font-size: 17px; }
.success__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- Legal pages ---------- */
.legal-hero {
  padding-block: clamp(36px, 6vw, 72px) clamp(24px, 4vw, 40px);
  border-bottom: 1px solid #eee8fb;
}
.legal-hero .h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; margin-bottom: 12px; }
.legal-hero .updated { color: var(--c-muted); font-size: 15px; }
.legal-hero .intro { margin-top: 16px; color: var(--c-body); font-size: 17px; max-width: 42em; }

.legal-layout {
  display: grid;
  gap: 32px;
  padding-block: 36px 64px;
}
@media (min-width: 900px) {
  .legal-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 56px; align-items: start; }
  .toc { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow-y: auto; }
}
.toc {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 16px 8px;
}
.toc p { margin: 0 12px 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-primary); }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--c-body);
  text-decoration: none;
  font-size: 14px;
}
.toc a:hover { background: var(--c-primary-soft); color: var(--c-primary); }

.legal-body { display: flex; flex-direction: column; gap: 36px; max-width: 46em; line-height: 1.65; }
.legal-body section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 90px; }
.legal-body h2 { font-family: var(--f-display); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; }
.legal-body h3 { margin-top: 8px; font-family: var(--f-display); font-weight: 600; font-size: 18px; }
.legal-body p, .legal-body ul { color: var(--c-body); }
.legal-body ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }

.draft-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--c-note-bg);
  border: 1px solid var(--c-note-border);
  border-radius: var(--r-sm);
  color: var(--c-note-ink);
  font-size: 14px;
}
.draft-note__tag {
  flex: none;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--c-gold);
  color: #3a2400;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* ---------- Scroll reveal (enabled by JS; content stays visible without it) ---------- */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.js-reveal [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Form: honeypot + submit error + loading */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__error {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #f5c2bd;
  border-radius: var(--r-sm);
  background: #fef3f2;
  color: var(--c-error);
  font-size: 14px;
}
.form__error[hidden] { display: none; }
.btn[aria-busy="true"] { opacity: 0.75; cursor: progress; }
