/* Colors, font and shapes of the Seofi app mockups (src/theme/tokens.ts in the app repo). */
:root {
  --primary: #5b47f5;
  --primary-shadow: #3f2fc4;
  --primary-dark: #4a37e0;
  --tint: #f5f3ff;
  --tint-active: #eeebff;
  --halo: #e1dcff;
  --text: #1c1b33;
  --muted: #5f5d78;
  --border: #e3e0f2;
  --border-soft: #eceaf5;
  --streak: #ff7a1a;
  --streak-bg: #fff6ee;
  --streak-border: #ffe0c7;
  --energy-dark: #c98a00;
  --correct-dark: #0b6b3a;
  --correct-bg: #e8f6ee;
  --correct-border: #bfe6cf;
  --pink: #e8467c;
  --blue: #2b8ce6;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: #fff;
  color: var(--text);
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary-dark); font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Language: the page shows one language at a time; without JavaScript both show. */
html[data-lang='en'] [lang='fr'],
html[data-lang='fr'] [lang='en'] { display: none !important; }

/* Top bar */
.top {
  max-width: 1040px; margin: 0 auto; padding: 18px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 900; font-size: 22px; }
.tile {
  display: grid; place-items: center;
  background: var(--primary); color: #fff; font-weight: 900;
  border-radius: 28%; box-shadow: 0 0.09em 0 var(--primary-shadow);
}
.brand .tile { width: 38px; height: 38px; font-size: 24px; box-shadow: 0 3px 0 var(--primary-shadow); }
.lang-switch { display: flex; background: var(--tint); border: 2px solid var(--border); border-radius: 999px; padding: 3px; }
.lang-switch button {
  font: inherit; font-weight: 900; font-size: 14px; letter-spacing: 0.04em;
  border: 0; background: none; color: var(--muted); padding: 6px 14px; border-radius: 999px; cursor: pointer;
}
.lang-switch button[aria-pressed='true'] { background: #fff; color: var(--primary-dark); box-shadow: 0 2px 0 var(--border); }

/* Home hero: the welcome screen (mockup 03) */
.hero-panel {
  position: relative; overflow: hidden;
  max-width: 1040px; margin: 0 auto;
  background: var(--tint);
  border-radius: 0 0 48px 48px;
  height: clamp(340px, 52vw, 460px);
}
.hero-panel .tile {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: clamp(120px, 18vw, 160px); height: clamp(120px, 18vw, 160px);
  font-size: clamp(80px, 12vw, 108px); box-shadow: 0 10px 0 var(--primary-shadow);
}
.chip {
  position: absolute; white-space: nowrap;
  font-weight: 900; font-size: clamp(14px, 1.9vw, 17px);
  padding: 12px 18px; border-radius: 18px; border: 2px solid var(--border);
  background: #fff; box-shadow: 0 4px 0 var(--border);
  animation: float 5s ease-in-out infinite;
}
.chip.c1 { left: 8%; top: 16%; --r: -5deg; }
.chip.c2 { right: 9%; top: 28%; --r: 6deg; color: var(--energy-dark); background: var(--streak-bg); border-color: var(--streak-border); box-shadow: 0 4px 0 var(--streak-border); animation-delay: -1.2s; }
.chip.c3 { left: 10%; bottom: 18%; --r: 3deg; color: var(--correct-dark); background: var(--correct-bg); border-color: var(--correct-border); box-shadow: 0 4px 0 var(--correct-border); animation-delay: -2.4s; }
.chip.c4 { right: 13%; bottom: 14%; --r: -3deg; color: var(--primary-dark); animation-delay: -3.6s; }
@keyframes float {
  0%, 100% { transform: rotate(var(--r)) translateY(0); }
  50% { transform: rotate(var(--r)) translateY(-8px); }
}
.confetti { position: absolute; width: 14px; height: 7px; border-radius: 3px; animation: float 6s ease-in-out infinite; }

.intro { max-width: 620px; margin: 0 auto; padding: 36px 16px 0; text-align: center; }
.intro h1 { font-weight: 900; font-size: clamp(34px, 5.5vw, 52px); line-height: 1.12; letter-spacing: -0.01em; }
.intro p { color: var(--muted); font-size: clamp(18px, 2.2vw, 21px); margin-top: 14px; }
.soon {
  display: inline-block; margin-top: 28px;
  background: var(--primary); color: #fff; font-weight: 900; font-size: 18px;
  padding: 16px 32px; border-radius: 18px; box-shadow: 0 5px 0 var(--primary-shadow);
}

/* Three cards (mockup 16's stat cards) */
.cards {
  max-width: 820px; margin: 56px auto 0; padding: 0 16px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.card {
  background: #fff; border: 2px solid var(--border); border-radius: 20px;
  box-shadow: 0 4px 0 var(--border-soft); padding: 20px 16px; text-align: center;
}
.card .big { font-weight: 900; font-size: 34px; color: var(--primary-dark); line-height: 1.1; }
.card .label { font-weight: 900; font-size: 13px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 6px; }
.card p { color: var(--muted); font-size: 15px; margin-top: 6px; }
.streak-card {
  max-width: 788px; margin: 14px auto 0; display: flex; align-items: center; gap: 16px;
  background: var(--streak-bg); border: 2px solid var(--streak-border); border-radius: 20px; padding: 18px 22px;
}
.streak-card .flame { font-size: 30px; }
.streak-card strong { display: block; font-weight: 900; font-size: 18px; }
.streak-card span { color: var(--muted); font-size: 15px; }
.streak-wrap { padding: 0 16px; }

/* Legal pages */
.page-head {
  max-width: 1040px; margin: 0 auto; background: var(--tint);
  border-radius: 0 0 40px 40px; padding: 40px 16px 36px; text-align: center;
}
.page-head h1 { font-weight: 900; font-size: clamp(32px, 5vw, 44px); line-height: 1.15; }
.page-head .updated { color: var(--muted); margin-top: 6px; font-weight: 700; }
.doc { max-width: 720px; margin: 0 auto; padding: 32px 16px 24px; }
.doc > section > p:first-child { font-size: 18px; }
.doc h2 { font-weight: 900; font-size: 21px; margin: 36px 0 10px; }
.doc p + p { margin-top: 10px; }
.doc ul { list-style: none; padding: 0; display: grid; gap: 10px; margin-top: 4px; }
.doc li {
  background: #fff; border: 2px solid var(--border-soft); border-radius: 16px; padding: 12px 16px;
}
.doc ul + p { margin-top: 14px; }

/* Footer */
footer {
  max-width: 1040px; margin: 72px auto 0; padding: 24px 16px 40px;
  border-top: 2px solid var(--border-soft);
  display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center;
  color: var(--muted); font-size: 15px;
}
footer .copy { margin-left: auto; font-weight: 700; }

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .chip { padding: 9px 13px; border-radius: 14px; }
  .chip.c1 { left: 4%; top: 9%; }
  .chip.c2 { right: 4%; top: 24%; }
  .chip.c3 { left: 4%; bottom: 13%; }
  .chip.c4 { right: 6%; bottom: 6%; }
  footer .copy { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .chip, .confetti { animation: none; transform: rotate(var(--r, 0deg)); }
}
