/* Arithmos website. Colors and fonts mirror the app (lib/core/theme). */

@font-face {
  font-family: "Nunito Sans";
  src: url("../fonts/nunito-sans-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  --violet: #6c5ce7;
  --violet-deep: #5341d6;
  --mint: #00cec9;
  --mint-deep: #00a29e;
  --amber: #fdcb6e;
  --amber-deep: #b7791f;
  --coral: #ff7675;
  --coral-deep: #d63031;

  --canvas: #f3f7fd;
  --surface: #ffffff;
  --surface-muted: #eef1f8;
  --ink: #1e2235;
  --ink-muted: #565d6e;
  --border: #e3e8f3;
  --accent-text: #5341d6;
  --tile: #ffffff;
  --tile-op: #e8ecf7;
  --tile-blank: rgba(108, 92, 231, 0.08);
  --tile-blank-border: rgba(108, 92, 231, 0.55);
  --ok-border: #00cec9;
  --ok-glow: rgba(0, 206, 201, 0.32);
  --bad-border: #ff7675;
  --bad-glow: rgba(255, 118, 117, 0.3);
  --band: rgba(108, 92, 231, 0.05);

  --shadow-sm: 0 1px 2px rgba(30, 34, 53, 0.05), 0 4px 14px rgba(30, 34, 53, 0.06);
  --shadow-lg: 0 30px 60px -24px rgba(43, 32, 140, 0.45);
  --radius: 20px;
  --radius-lg: 28px;

  --font-head: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num: "Space Grotesk", ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0f172a;
    --surface: #1b2539;
    --surface-muted: #243049;
    --ink: #e2e8f0;
    --ink-muted: #a3b0c2;
    --border: #33415c;
    --accent-text: #b2a8f7;
    --tile: #243049;
    --tile-op: #1b2539;
    --tile-blank: rgba(108, 92, 231, 0.16);
    --tile-blank-border: rgba(178, 168, 247, 0.6);
    --ok-glow: rgba(0, 206, 201, 0.26);
    --bad-glow: rgba(255, 118, 117, 0.24);
    --band: rgba(108, 92, 231, 0.07);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 30px 60px -24px rgba(0, 0, 0, 0.7);
  }
}

/* ------------------------------------------------------------- base */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

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

a {
  color: var(--accent-text);
  text-underline-offset: 3px;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  line-height: 1.12;
}

h1,
h2 {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.125rem;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.container {
  width: min(1160px, 100% - 32px);
  margin-inline: auto;
}

.container-narrow {
  width: min(780px, 100% - 32px);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--violet-deep);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-text);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.section {
  padding: 96px 0;
}

.section-band {
  background: linear-gradient(180deg, transparent, var(--band) 18%, var(--band) 82%, transparent);
}

.section h2 {
  font-size: clamp(2rem, 3.8vw, 2.875rem);
}

.section-lead {
  max-width: 40em;
  color: var(--ink-muted);
  font-size: 1.125rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 700 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.button:hover {
  border-color: var(--violet);
  transform: translateY(-1px);
}

.button-small {
  padding: 10px 18px;
  font-size: 0.9375rem;
}

.button-light {
  border-color: #fff;
  background: #fff;
  color: var(--violet-deep);
}

/* ----------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--canvas) 84%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  transition: border-color 0.2s;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font: 800 1.3rem/1 var(--font-head);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

.nav-links {
  display: flex;
  gap: 2px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-muted);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-links a:hover {
  background: var(--surface-muted);
  color: var(--ink);
}

.header-badge {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(108, 92, 231, 0.12);
  color: var(--accent-text);
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 880px) {
  .nav-links {
    display: none;
  }

  .header-badge {
    margin-left: auto;
  }
}

/* ------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: 64px 0 88px;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  top: -260px;
  right: -180px;
  width: 760px;
  height: 760px;
  background: radial-gradient(closest-side, rgba(108, 92, 231, 0.22), transparent);
}

.hero::after {
  bottom: -320px;
  left: -220px;
  width: 680px;
  height: 680px;
  background: radial-gradient(closest-side, rgba(0, 206, 201, 0.16), transparent);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
}

.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.4rem);
}

.hero h1 .accent {
  background: linear-gradient(90deg, var(--violet), var(--mint-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 33em;
  color: var(--ink-muted);
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 30px 0 34px;
}

.store-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  box-shadow: 0 12px 26px -10px rgba(83, 65, 214, 0.65);
  color: #fff;
  font-weight: 700;
}

.store-pill svg {
  flex: none;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0;
  padding: 0;
  color: var(--ink-muted);
  font-weight: 600;
  list-style: none;
}

.hero-facts strong {
  margin-right: 5px;
  color: var(--ink);
  font: 700 1.2rem var(--font-num);
}

.hero-visual {
  position: relative;
  height: 640px;
}

.phone {
  margin: 0;
  padding: 10px;
  border-radius: 46px;
  background: #0b0f1a;
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
}

.phone img {
  width: 100%;
  border-radius: 37px;
}

.hero-visual .phone {
  position: absolute;
  width: 286px;
}

.phone-front {
  z-index: 2;
  top: 6px;
  right: 2%;
  transform: rotate(3deg);
}

.phone-back {
  top: 74px;
  left: 2%;
  transform: rotate(-7deg);
}

.float-chip {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font: 700 1.05rem var(--font-num);
  animation: float 6s ease-in-out infinite;
}

.chip-ok {
  top: 24%;
  right: 0;
}

.chip-ok .check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--mint);
  color: #fff;
  font-size: 0.85rem;
}

.chip-stars {
  bottom: 9%;
  left: 12%;
  color: var(--amber-deep);
  letter-spacing: 0.1em;
  animation-delay: -3s;
}

@keyframes float {
  50% {
    transform: translateY(-10px);
  }
}

@media (max-width: 960px) {
  .hero {
    padding-top: 40px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    height: 540px;
    max-width: 520px;
    width: 100%;
    margin-inline: auto;
  }

  .hero-visual .phone {
    width: 236px;
  }

  .phone-front {
    right: 8%;
  }

  .phone-back {
    left: 8%;
  }
}

@media (max-width: 480px) {
  .store-pill {
    gap: 8px;
    padding: 13px 18px;
    font-size: 0.95rem;
  }

  .hero-visual {
    height: 440px;
  }

  .hero-visual .phone {
    width: 186px;
    padding: 7px;
    border-radius: 34px;
  }

  .hero-visual .phone img {
    border-radius: 28px;
  }

  .phone-front {
    right: 2%;
  }

  .phone-back {
    left: 2%;
  }

  .chip-ok {
    top: 16%;
    right: 0;
  }

  .chip-stars {
    left: 4%;
    bottom: 4%;
  }
}

/* -------------------------------------------------------- mini puzzle */

.play-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
}

.steps {
  display: grid;
  gap: 20px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
}

.steps h3 {
  margin-bottom: 4px;
}

.steps p {
  margin: 0;
  color: var(--ink-muted);
}

.step-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(108, 92, 231, 0.12);
  color: var(--accent-text);
  font: 700 1.15rem var(--font-num);
}

.demo {
  --cell: clamp(46px, 12.5vw, 64px);
  --gap: clamp(6px, 1.6vw, 9px);
  padding: 30px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(5, var(--cell));
  grid-template-rows: repeat(5, var(--cell));
  justify-content: center;
  gap: var(--gap);
}

.cell {
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--tile);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font: 700 calc(var(--cell) * 0.42) / 1 var(--font-num);
  transition: border-color 0.2s, box-shadow 0.25s, background 0.2s;
}

.cell.op {
  border-color: transparent;
  background: var(--tile-op);
  box-shadow: none;
  color: var(--ink-muted);
}

.cell.blank {
  border: 2px dashed var(--tile-blank-border);
  background: var(--tile-blank);
  box-shadow: none;
  color: var(--accent-text);
  cursor: pointer;
}

.cell.blank.filled {
  border-style: solid;
  background: var(--tile);
}

.cell.blank.selected,
.cell.drop-target {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
}

.cell.ok {
  border: 2px solid var(--ok-border);
  box-shadow: 0 0 0 3px var(--ok-glow), 0 0 22px var(--ok-glow);
}

.cell.bad {
  border: 2px solid var(--bad-border);
  box-shadow: 0 0 0 3px var(--bad-glow);
}

.r1 { grid-row: 1; }
.r2 { grid-row: 2; }
.r3 { grid-row: 3; }
.r4 { grid-row: 4; }
.r5 { grid-row: 5; }
.c1 { grid-column: 1; }
.c2 { grid-column: 2; }
.c3 { grid-column: 3; }
.c4 { grid-column: 4; }
.c5 { grid-column: 5; }

.demo-bank {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 26px auto 0;
  padding: 14px;
  width: fit-content;
  border-radius: 20px;
  background: var(--surface-muted);
}

.tile {
  width: var(--cell);
  height: calc(var(--cell) * 1.1);
  border: 2px solid rgba(108, 92, 231, 0.4);
  border-radius: 14px;
  background: var(--surface);
  color: var(--accent-text);
  font: 700 calc(var(--cell) * 0.42) / 1 var(--font-num);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.15s, background 0.2s, opacity 0.2s;
}

.tile[aria-pressed="true"] {
  border-color: var(--violet);
  background: var(--violet);
  color: #fff;
  transform: translateY(-4px);
}

.tile.used {
  opacity: 0.4;
  cursor: pointer;
}

.drag-ghost {
  position: fixed;
  z-index: 200;
  margin: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 14px 30px rgba(20, 16, 70, 0.3);
}

.demo-status {
  min-height: 3.2em;
  margin: 18px 0 0;
  color: var(--ink-muted);
  font-weight: 600;
  text-align: center;
}

.demo-status.win {
  color: var(--mint-deep);
}

.demo-actions {
  display: flex;
  justify-content: center;
  min-height: 46px;
}

@media (max-width: 960px) {
  .play-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ----------------------------------------------------------- modes */

.modes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 40px;
}

.mode-card {
  padding: 28px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.mode-card p {
  margin: 0;
  color: var(--ink-muted);
}

.mode-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.mode-title h3 {
  margin: 0;
  font-size: 1.25rem;
}

.mode-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 20px;
  border-radius: 17px;
  background: rgba(108, 92, 231, 0.12);
  color: var(--accent-text);
}

.mode-daily .mode-icon {
  background: rgba(0, 206, 201, 0.15);
  color: var(--mint-deep);
}

.mode-time .mode-icon {
  background: rgba(255, 118, 117, 0.16);
  color: var(--coral-deep);
}

.tag {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tag-extreme {
  background: rgba(255, 118, 117, 0.18);
  color: var(--coral-deep);
}

@media (prefers-color-scheme: dark) {
  .mode-time .mode-icon,
  .tag-extreme {
    color: var(--coral);
  }

  .mode-daily .mode-icon {
    color: var(--mint);
  }
}

/* ---------------------------------------------------------- worlds */

.worlds-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.world {
  position: relative;
  overflow: hidden;
  padding: 26px 24px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.world::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--world);
}

.world-meadow { --world: #4caf6a; }
.world-ocean { --world: #1e5aa8; }
.world-desert { --world: #c9932c; }
.world-space { --world: #7b5ce0; }
.world-volcano { --world: #f2742b; }
.world-castle { --world: #2f5bd3; }

.world-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.world-emoji {
  display: grid;
  place-items: center;
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  background: color-mix(in srgb, var(--world) 15%, transparent);
  font-size: 1.7rem;
}

.world h3 {
  margin: 0;
  font-size: 1.25rem;
}

.world-chapter {
  margin: 2px 0 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.world p {
  margin: 0;
  color: var(--ink-muted);
}

.world-num {
  position: absolute;
  top: 12px;
  right: 18px;
  color: color-mix(in srgb, var(--world) 30%, transparent);
  font: 700 2.6rem/1 var(--font-num);
}

.world-ops {
  display: flex;
  gap: 6px;
  margin-top: 16px !important;
}

.world-ops span {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--ink);
  font: 700 1.15rem var(--font-num);
}

/* --------------------------------------------------------- gallery */

.gallery-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.gallery-nav {
  display: flex;
  gap: 10px;
}

.gallery-nav button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.gallery-nav button:hover {
  border-color: var(--violet);
}

.gallery {
  display: flex;
  gap: 30px;
  margin-top: 36px;
  padding: 14px max(16px, (100% - 1160px) / 2) 34px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(16px, (100% - 1160px) / 2);
  scrollbar-width: thin;
}

.shot {
  flex: none;
  width: 236px;
  margin: 0;
  scroll-snap-align: start;
}

.shot .phone {
  padding: 8px;
  border-radius: 38px;
}

.shot .phone img {
  border-radius: 31px;
}

.shot figcaption {
  margin-top: 18px;
  color: var(--ink-muted);
  font-size: 0.95rem;
  text-align: center;
}

.shot figcaption strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
}

@media (min-width: 768px) {
  .shot {
    width: 268px;
  }
}

@media (max-width: 640px) {
  .gallery-nav {
    display: none;
  }
}

/* -------------------------------------------------------- features */

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px 36px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}

.features-grid p {
  margin: 0;
  color: var(--ink-muted);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: rgba(108, 92, 231, 0.12);
  color: var(--accent-text);
}

/* Even rows at every width: 4 modes, 6 worlds, 6 features. */
@media (min-width: 600px) {
  .modes-grid,
  .worlds-grid,
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 940px) {
  .worlds-grid,
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1000px) {
  .modes-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ------------------------------------------------------------- faq */

.faq {
  margin-top: 36px;
}

.faq details {
  margin-bottom: 12px;
  padding: 0 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--accent-text);
  font: 700 1.5rem/1 var(--font-num);
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: 0;
  padding-bottom: 20px;
  color: var(--ink-muted);
}

/* ------------------------------------------------------------- cta */

.cta {
  padding: 16px 0 96px;
}

.cta-inner {
  position: relative;
  overflow: hidden;
  padding: 60px 24px;
  border-radius: 32px;
  background: linear-gradient(135deg, var(--violet-deep), var(--violet) 45%, var(--mint-deep));
  color: #fff;
  text-align: center;
}

.cta-inner::before {
  content: "+ − × ÷ =";
  position: absolute;
  inset: auto -20px -34px auto;
  color: rgba(255, 255, 255, 0.09);
  font: 700 7rem/1 var(--font-num);
  letter-spacing: 0.12em;
  white-space: nowrap;
  pointer-events: none;
}

.cta-inner img {
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.cta-inner h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.cta-inner p {
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
}

.cta-inner .button-light {
  position: relative;
}

/* ---------------------------------------------------------- footer */

.site-footer {
  padding: 32px 0 44px;
  border-top: 1px solid var(--border);
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner .brand {
  font-size: 1.1rem;
}

.footer-inner .brand img {
  width: 28px;
  height: 28px;
}

.footer-copy {
  margin-left: auto !important;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.footer-links a {
  color: var(--ink-muted);
}

.footer-links a:hover {
  color: var(--ink);
}

/* ----------------------------------------------------------- legal */

.header-link {
  margin-left: auto;
  color: var(--ink-muted);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.header-link:hover {
  color: var(--ink);
}

.legal {
  padding: 56px 0 88px;
}

.legal h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.1rem);
}

.legal-meta {
  color: var(--ink-muted);
}

.lang-switch {
  display: inline-flex;
  gap: 4px;
  margin: 6px 0 30px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-muted);
}

.lang-switch a {
  padding: 8px 18px;
  border-radius: 999px;
  color: var(--ink-muted);
  font-weight: 700;
  text-decoration: none;
}

.lang-switch a:hover {
  background: var(--surface);
  color: var(--ink);
}

.legal-section {
  margin-bottom: 28px;
  padding: 34px 36px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.legal-section > h2 {
  margin-bottom: 0.9em;
  font-size: 1.65rem;
}

.legal-section h3 {
  margin: 1.9em 0 0.5em;
  font-size: 1.15rem;
}

.legal-section ul {
  margin: 0 0 1em;
  padding-left: 1.25em;
}

.legal-section li {
  margin-bottom: 0.5em;
}

.legal-summary {
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(108, 92, 231, 0.09);
}

@media (max-width: 600px) {
  .legal-section {
    padding: 24px 20px 16px;
  }
}

/* ------------------------------------------------------------- 404 */

.not-found {
  display: grid;
  place-items: center;
  min-height: 70vh;
  padding: 64px 0;
  text-align: center;
}

.not-found h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}

.not-found .equation {
  margin-bottom: 18px;
  color: var(--accent-text);
  font: 700 clamp(2.4rem, 7vw, 4rem) / 1 var(--font-num);
}

.not-found p {
  color: var(--ink-muted);
}

/* ---------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
