/* Tokens mirror app/(tabs)/styles/styles.tsx */
:root {
  --PRIMARY: #fbbf24;
  --PRIMARY_LIGHT: #f5d76e;
  --PRIMARY_DARK: #c9a830;
  --PRIMARY_FLAT: #fbbf241a;
  --PRIMARY_SHADOW: #fbbf244d;
  --SECONDARY: #6d28d9;
  --SECONDARY_FLAT: #6d28d914;
  --DARK: #1a0f2b;
  --LIGHT: #ffffff;
  --DARK_FLAT: #f2f2f2;
  --DARK_YELLOW: #b45309;
  --RED: #ef4444;
  --DARK_RED: #b91c1c;

  --INK_MUTED: #4a3f5c;
  --LINE: #1a0f2b14;
  --SHADOW_BOTTOM: 0 1px 5px #80808026;
  --SHADOW_RAISED: 0 18px 40px -18px #1a0f2b40, 0 2px 6px #1a0f2b14;

  --RADIUS: 15px;
  --RADIUS_SMALL: 5px;
  --GAP: 5px;
  --SPACING: 15px;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #1a0f2b40 var(--LIGHT);
}

body {
  background: var(--LIGHT);
  color: var(--DARK);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

::selection {
  background: var(--PRIMARY);
  color: var(--DARK);
}

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

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

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

strong {
  font-weight: 700;
}

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 100;
  background: var(--DARK);
  color: var(--LIGHT);
  padding: 8px 14px;
  border-radius: 8px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffffe6;
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--LINE);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.site-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 400;
}
.site-nav a {
  text-decoration: none;
  color: var(--INK_MUTED);
  transition: color 0.2s;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--DARK);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--RADIUS);
  font:
    700 15px/1 "Inter",
    sans-serif;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out),
    background 0.2s;
}
.btn-primary {
  background: var(--PRIMARY);
  color: var(--DARK);
  box-shadow: var(--SHADOW_BOTTOM);
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: var(--PRIMARY_LIGHT);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px -6px #1a0f2b4d;
  }
}
/* Press feedback: a quick sink under the finger, on touch and mouse alike. */
.btn:active,
.store:active {
  transform: scale(0.97);
  transition-duration: 0.16s;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  padding: 11px 20px 11px 16px;
  border-radius: var(--RADIUS);
  background: var(--DARK);
  color: var(--LIGHT);
  text-decoration: none;
  box-shadow: var(--SHADOW_RAISED);
  transition:
    transform 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .store:hover {
    transform: translateY(-2px);
    box-shadow:
      0 22px 40px -16px #1a0f2b66,
      0 2px 6px #1a0f2b1f;
  }
}
.store img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.store span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.store small {
  font-size: 11px;
  opacity: 0.75;
}
.store b {
  font-size: 18px;
  letter-spacing: -0.01em;
}

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(40px, 7vw, 96px) clamp(48px, 7vw, 88px);
  /* the lilac slab behind the phone bleeds 6% sideways; keep it off the page width */
  overflow-x: hidden; /* fallback: Safari < 16 ignores clip */
  overflow-x: clip;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.hero h1 {
  font-size: clamp(2.75rem, 6.4vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 700;
  text-wrap: balance;
}

.mark {
  background: linear-gradient(
    transparent 62%,
    var(--PRIMARY) 62%,
    var(--PRIMARY) 92%,
    transparent 92%
  );
  padding-inline: 0.04em;
}

.hero-lede {
  margin-top: 24px;
  max-width: 34ch;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--INK_MUTED);
}

.hero .stores {
  margin-top: 36px;
}

.sports {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  list-style: none;
}
.sports li {
  font-size: 14px;
  font-weight: 400;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--PRIMARY);
  color: var(--DARK_YELLOW);
  background: var(--PRIMARY_FLAT);
}

/* First-visit entrance: the hero builds top to bottom, then the sport chips,
   then the phone settles in. CSS so it stays smooth while
   the page is still loading. */
.hero h1,
.hero-lede,
.hero .stores,
.sports {
  animation: rise 0.7s var(--ease-out) both;
}
.hero-lede {
  animation-delay: 0.07s;
}
.hero .stores {
  animation-delay: 0.14s;
}
.sports {
  animation-delay: 0.24s;
}
.hero-visual {
  animation: settle 0.9s var(--ease-out) 0.1s both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 8% -6% 4%;
  border-radius: 32px;
  background: var(--SECONDARY_FLAT);
}

/* ---------- Phone ---------- */
.phone {
  position: relative;
  width: var(--phone-w, 300px);
  aspect-ratio: 945 / 2048;
  padding: 10px;
  border-radius: 44px;
  background: var(--DARK);
  box-shadow:
    0 40px 80px -30px #1a0f2b73,
    0 0 0 1px #1a0f2b,
    inset 0 0 0 2px #3a2d4f;
}
.phone .screen-stack {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 35px;
  overflow: hidden;
  background: var(--DARK_FLAT);
}
.phone img,
.phone video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero .phone {
  --phone-w: clamp(240px, 24vw, 310px);
}

/* ---------- Alert strip ---------- */
.alerts {
  border-block: 1px solid var(--LINE);
  padding-block: 22px;
  overflow: hidden;
}
.alerts .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
}
.alerts p {
  flex: none;
  font-size: 14px;
  font-weight: 700;
  max-width: 15ch;
  line-height: 1.3;
}
.alerts-list {
  flex: 1;
}
.alerts ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}
.alerts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 10px;
  border-radius: 999px;
  background: var(--LIGHT);
  border: 1px solid var(--LINE);
  font-size: 14px;
  white-space: nowrap;
}
.alerts li i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
}

/* ---------- Story (sticky phone) ---------- */
.section-head {
  max-width: 22ch;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.story {
  padding-block: clamp(72px, 10vw, 136px) clamp(40px, 6vw, 80px);
}
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(40px, 7vw, 112px);
  margin-top: clamp(24px, 4vw, 48px);
}

.steps {
  list-style: none;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 12vh;
  bottom: 12vh;
  width: 2px;
  background: var(--SECONDARY_FLAT);
}

.step {
  position: relative;
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 52px;
  max-width: 560px;
}
.step::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--LIGHT);
  border: 2px solid #6d28d966;
  transition:
    background 0.4s var(--ease-out),
    border-color 0.4s var(--ease-out),
    transform 0.4s var(--ease-out);
}
.step.is-active::before {
  background: var(--SECONDARY);
  border-color: var(--SECONDARY);
  transform: rotate(-45deg) scale(1.25);
}

.step h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-wrap: balance;
  transition: color 0.4s;
}
.step p {
  margin-top: 16px;
  color: var(--INK_MUTED);
  max-width: 46ch;
}
.step .facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
  list-style: none;
}
.step .facts li {
  font-size: 13px;
  font-weight: 400;
  color: var(--SECONDARY);
  background: var(--SECONDARY_FLAT);
  padding: 5px 10px;
  border-radius: var(--RADIUS_SMALL);
}

.step-shot {
  display: none;
}

.story-phone {
  position: sticky;
  top: calc(50vh - min(320px, 39vh) + 34px);
  align-self: start;
  margin-top: 10vh;
}
.story-phone .phone {
  --phone-w: calc(min(640px, 78vh) * 0.4614);
}
.story-phone .screen-stack > * {
  opacity: 0;
  /* outgoing screen stays visible under the incoming wipe, then hides */
  transition: opacity 0s 0.8s;
}
.story-phone .screen-stack > .is-active {
  opacity: 1;
  transition: none;
  z-index: 1;
  animation: wipe 0.8s var(--ease-out);
}
.phone video {
  object-fit: contain;
  background: #21122d;
}
.story-phone .sound {
  display: flex;
  margin: 20px auto 0;
  background: var(--SECONDARY_FLAT);
  color: var(--SECONDARY);
}
.story-phone .sound[hidden] {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .story-phone .sound:hover {
    background: #6d28d926;
  }
}
.train-film {
  margin-top: 40px;
}
.train-film .phone {
  --phone-w: min(62vw, 260px);
}
@keyframes wipe {
  from {
    clip-path: inset(100% 0 0 0 round 0);
    transform: scale(1.04);
  }
  to {
    clip-path: inset(0 0 0 0 round 0);
    transform: none;
  }
}

/* ---------- Progress ---------- */
.train {
  padding-block: clamp(64px, 9vw, 120px);
  background: var(--DARK_FLAT);
}
.train .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.train-intro p {
  margin-top: 20px;
  color: var(--INK_MUTED);
  max-width: 42ch;
}
.path {
  list-style: none;
  display: grid;
  gap: 0;
}
.path li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  padding-block: 22px;
  border-top: 1px solid var(--LINE);
}
.path li:last-child {
  border-bottom: 1px solid var(--LINE);
}
.path svg {
  width: 48px;
  height: 48px;
  padding: 12px;
  border-radius: var(--RADIUS);
  background: var(--LIGHT);
  color: var(--SECONDARY);
  box-shadow: var(--SHADOW_BOTTOM);
}
.path h3 {
  font-size: 19px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.path p {
  margin-top: 4px;
  font-size: 16px;
  color: var(--INK_MUTED);
}

.train.coach {
  background: var(--LIGHT);
}

/* ---------- Manifesto ---------- */
.manifesto {
  background: var(--SECONDARY);
  color: var(--LIGHT);
  padding-block: clamp(72px, 11vw, 150px);
}
.manifesto blockquote {
  font-size: clamp(1.9rem, 4.6vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 20ch;
  text-wrap: balance;
}
.manifesto blockquote em {
  font-style: normal;
  color: var(--PRIMARY);
}
.manifesto p {
  margin-top: 28px;
  max-width: 52ch;
  font-size: clamp(17px, 1.5vw, 20px);
  color: #ede6fb;
}

/* ---------- Final CTA ---------- */
.cta {
  background: var(--PRIMARY);
  padding-block: clamp(64px, 9vw, 120px);
}
.cta .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: center;
}
.cta h2 {
  font-size: clamp(2.4rem, 5.6vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.cta p {
  margin-top: 16px;
  font-size: 19px;
  max-width: 36ch;
}
.cta .stores {
  flex-direction: column;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 48px 40px;
  font-size: 15px;
  color: var(--INK_MUTED);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 40px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-left: auto;
}
.site-footer a {
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--DARK);
  text-decoration: underline;
}
.site-footer .fine {
  flex-basis: 100%;
  font-size: 13px;
  padding-top: 20px;
  border-top: 1px solid var(--LINE);
}

/* ---------- Document pages ---------- */
.doc {
  padding-block: clamp(48px, 8vw, 96px) clamp(64px, 9vw, 120px);
}
.doc .wrap {
  max-width: 760px;
}
.doc h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.doc .meta {
  margin-top: 12px;
  font-size: 14px;
  color: var(--INK_MUTED);
}
.doc .intro {
  margin-top: 20px;
  font-size: 19px;
  color: var(--INK_MUTED);
}
.doc h2 {
  margin-top: 56px;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.doc p,
.doc ul {
  margin-top: 12px;
  max-width: 68ch;
}
.doc ul {
  padding-left: 20px;
}
.doc li + li {
  margin-top: 6px;
}
.doc li::marker {
  color: var(--SECONDARY);
}
.doc a {
  color: var(--SECONDARY);
  font-weight: 400;
}
.danger {
  color: var(--DARK_RED);
  font-weight: 700;
}

.note {
  margin-top: 32px;
  padding: 18px 20px;
  border-radius: var(--RADIUS);
  background: var(--SECONDARY_FLAT);
  color: var(--SECONDARY);
}
.note a {
  color: inherit;
  font-weight: 700;
}

.faq {
  margin-top: 32px;
  border-top: 1px solid var(--LINE);
}
.faq details {
  border-bottom: 1px solid var(--LINE);
}
.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 22px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  cursor: pointer;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--SECONDARY);
  border-bottom: 2px solid var(--SECONDARY);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.3s var(--ease-out);
}
.faq details[open] summary::after {
  transform: rotate(-135deg) translateY(-3px);
}
.faq details > div {
  padding-bottom: 22px;
}
.faq details > div p:first-child {
  margin-top: 0;
}

.tuto {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 32px);
  margin-top: 28px;
  list-style: none;
}
.tuto .phone {
  --phone-w: 100%;
  padding: 7px;
  border-radius: 28px;
}
.tuto .phone .screen-stack {
  border-radius: 22px;
}
.tuto p {
  margin-top: 16px;
  font-size: 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap,
  .train .wrap,
  .cta .wrap {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    margin-top: 8px;
  }
  .hero .phone {
    --phone-w: min(68vw, 280px);
  }
  .story-grid {
    grid-template-columns: 1fr;
  }
  .story-phone {
    display: none;
  }
  .steps::before {
    top: 24px;
    bottom: 24px;
  }
  .step {
    min-height: 0;
    padding-block: 32px;
  }
  .step::before {
    top: 44px;
  }
  .step-shot {
    display: block;
    margin-top: 28px;
  }
  .step-shot .phone {
    --phone-w: min(62vw, 250px);
    padding: 7px;
    border-radius: 32px;
  }
  .step-shot .phone .screen-stack {
    border-radius: 26px;
  }
  .cta .stores {
    flex-direction: row;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .site-nav {
    display: none;
  }
  .site-header .btn {
    margin-left: auto;
  }
  .store {
    flex: 1 1 100%;
  }
  .alerts .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .alerts p {
    max-width: none;
  }
  .site-footer nav {
    margin-left: 0;
  }
  .tuto {
    grid-template-columns: 1fr;
    max-width: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  /* Gentler, not zero: the hero still fades in, without any movement. */
  .hero h1,
  .hero-lede,
  .hero .stores,
  .sports,
  .hero-visual {
    animation: fade 0.4s ease both !important;
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
