/* ==========================================================================
   MathMaker — unified stylesheet
   Shared by the landing pages (/index.html, /tr/index.html) and the legal
   pages (support / privacy-policy / terms-of-service in EN + TR).
   Colours mirror the app's design tokens (src/styles/base/_tokens.scss).
   ========================================================================== */

/* Exo — self-hosted (SIL OFL, see /fonts/OFL-Exo.txt). latin + latin-ext
   cover English and Turkish; Greek Σ/ε fall back to the system font. */
@font-face {
  font-family: "Exo";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/exo-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Exo";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/exo-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Exo";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/exo-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Exo";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/exo-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Exo";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/exo-latin-ext-800-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Exo";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/exo-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
  --color-accent: #ff6d00;
  --color-accent-strong: #e25f00;
  --color-accent-soft: rgba(255, 109, 0, 0.16);
  --color-sky: #4fa8ff;
  --color-sky-light: #80d0ff;
  --color-bg: #151f2b;
  --color-bg-deep: #0f1620;
  --color-surface: #1c2839;
  --color-surface-alt: #243349;
  --color-border: rgba(255, 255, 255, 0.1);
  --color-text: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.74);
  --color-text-muted: rgba(255, 255, 255, 0.5);
  --color-correct: #2bd589;
  --color-wrong: #ff1a09;
  --color-timer-warn: #ffc107;
  --color-heart: #f44336;
  --font-sans: "Exo", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial,
    sans-serif;
  --radius-md: 12px;
  --radius-lg: 20px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-sky-light);
}

/* Navigation ------------------------------------------------------------- */
nav {
  background: rgba(15, 22, 32, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.logo img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin-left: auto;
}

.nav-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
}

.lang-select {
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

/* Hero ------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
}

.hero::before {
  /* the app icon's diagonal grid, as a faint backdrop */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(128, 208, 255, 0.05) 0 1px, transparent 1px 70px),
    repeating-linear-gradient(-45deg, rgba(128, 208, 255, 0.05) 0 1px, transparent 1px 70px);
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 4rem;
}

.hero-content {
  flex: 1;
  max-width: 540px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 1rem;
  background: linear-gradient(120deg, #ffffff 30%, var(--color-sky-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline {
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.75rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.store-badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.store-badge {
  position: relative;
  display: inline-flex;
  border-radius: 10px;
  transition: transform 0.2s;
}

.store-badge img {
  width: 160px;
  display: block;
}

.store-badge:hover {
  transform: translateY(-2px);
}

.store-badge--soon img {
  opacity: 0.55;
  filter: grayscale(0.4);
}

.badge-ribbon {
  position: absolute;
  top: -9px;
  right: -8px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Phone mock-up of the game screen ------------------------------------- */
.hero-mockup {
  flex-shrink: 0;
}

.phone-frame {
  width: 290px;
  height: 590px;
  background: #05080c;
  border-radius: 44px;
  padding: 12px;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.06),
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 90px rgba(79, 168, 255, 0.12);
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--color-bg);
  border-radius: 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 1.6rem 1rem 1rem;
  gap: 0.9rem;
}

.mock-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.mock-hearts {
  color: var(--color-heart);
  letter-spacing: 1px;
}

.mock-category {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-sky-light);
}

.mock-timer {
  --p: 72;
  width: 92px;
  height: 92px;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--color-correct) calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0);
  display: grid;
  place-items: center;
}

.mock-timer span {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--color-bg);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 800;
}

.mock-question {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.1rem 0.5rem;
  text-align: center;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.mock-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.mock-answer {
  background: var(--color-surface-alt);
  border-radius: 12px;
  padding: 0.7rem 0;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
}

.mock-answer.is-correct {
  background: var(--color-correct);
  color: #062b1a;
}

.mock-powerups {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  margin-top: auto;
}

.mock-powerup {
  flex: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.4rem 0;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--color-text-secondary);
}

.mock-score {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 800;
}

.mock-score .sigma {
  color: var(--color-sky-light);
}

.mock-score .epsilon {
  color: var(--color-timer-warn);
}

/* Sections --------------------------------------------------------------- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
}

.section h2 {
  font-size: 2.1rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.6rem;
}

.section-lead {
  text-align: center;
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

/* full-width tinted band around a .section */
.band {
  background: var(--color-bg-deep);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 109, 0, 0.45);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 800;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  margin-bottom: 0.9rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.feature-card p {
  color: var(--color-text-secondary);
  font-size: 0.93rem;
}

/* Categories */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.category-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.25rem 1.1rem;
  overflow: hidden;
}

.category-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(var(--color-sky-light), var(--color-sky));
}

.category-num {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
}

.category-card h3 {
  font-size: 1.05rem;
  margin: 0.15rem 0 0.3rem;
}

.category-card p {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
}

.category-unlock {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-sky-light);
  background: rgba(79, 168, 255, 0.12);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.category-unlock.is-free {
  color: var(--color-correct);
  background: rgba(43, 213, 137, 0.12);
}

/* How to play */
.how-to-play {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  counter-reset: step;
}

.step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-accent);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 0.9rem;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.step-description {
  font-size: 0.93rem;
  color: var(--color-text-secondary);
}

.formula {
  margin: 2rem auto 0;
  max-width: 760px;
  text-align: center;
  background: var(--color-surface);
  border: 1px dashed rgba(128, 208, 255, 0.35);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

.formula strong {
  color: var(--color-sky-light);
}

/* Playable demo --------------------------------------------------------- */
.demo {
  max-width: 520px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 1.5rem;
  text-align: center;
}

.demo-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

.demo-hud .sigma {
  color: var(--color-sky-light);
}

.demo-hud .epsilon {
  color: var(--color-timer-warn);
}

.demo-timer {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.demo-timer-bar {
  height: 100%;
  width: 100%;
  background: var(--color-correct);
  border-radius: inherit;
  transition: width 0.25s linear, background-color 0.25s;
}

.demo-timer-bar.is-warn {
  background: var(--color-timer-warn);
}

.demo-timer-bar.is-danger {
  background: var(--color-wrong);
}

.demo-question {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  min-height: 3.6rem;
}

.demo-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.demo-answer {
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-text);
  background: var(--color-surface-alt);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 0.85rem 0;
  cursor: pointer;
  transition: transform 0.12s, background-color 0.2s, border-color 0.2s;
}

.demo-answer:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(255, 109, 0, 0.6);
}

.demo-answer:disabled {
  cursor: default;
}

.demo-answer.is-correct {
  background: var(--color-correct);
  color: #062b1a;
}

.demo-answer.is-wrong {
  background: var(--color-wrong);
}

.demo-status {
  min-height: 1.6em;
  margin-top: 1rem;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.demo-status.is-good {
  color: var(--color-correct);
}

.demo-status.is-bad {
  color: #ff6b5e;
}

.demo-start,
.demo-cta a {
  display: inline-block;
  margin-top: 1rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-strong));
  border: none;
  border-radius: 12px;
  padding: 0.8rem 1.8rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(255, 109, 0, 0.3);
}

.demo-cta[hidden],
.demo-start[hidden] {
  display: none;
}

/* Footer ----------------------------------------------------------------- */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.footer-links {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--color-text-secondary);
  text-decoration: none;
  margin: 0 0.7rem;
  transition: color 0.2s;
}

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

/* Legal / article pages -------------------------------------------------- */
.content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.content h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.content .updated {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.content h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.5rem;
  color: var(--color-sky-light);
}

.content p,
.content li {
  color: var(--color-text-secondary);
}

.content p {
  margin-bottom: 1rem;
}

.content ul {
  margin: 0 0 1.25rem 1.4rem;
}

.content li {
  margin-bottom: 0.45rem;
}

.content strong {
  color: var(--color-text);
}

.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

.contact-card h2 {
  margin-top: 0;
}

.contact-card p {
  margin-bottom: 0;
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
    padding-top: 3rem;
  }

  .hero-stats,
  .store-badges {
    justify-content: center;
  }

  .how-to-play {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-container {
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    padding: 0.75rem 1rem;
  }

  .nav-links {
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 1rem;
    font-size: 0.9rem;
    overflow-x: auto;
  }

  .lang-select {
    margin-left: auto;
  }

  .hero h1 {
    font-size: 2.6rem;
  }

  .hero-stats {
    gap: 1.25rem;
  }

  .phone-frame {
    width: 260px;
    height: 530px;
  }

  .section {
    padding: 3.5rem 1rem;
  }

  .demo-question {
    font-size: 2rem;
  }

  .content h1 {
    font-size: 2rem;
  }
}

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

  .feature-card,
  .store-badge,
  .demo-answer,
  .demo-timer-bar {
    transition: none;
  }
}
