@font-face {
  font-family: "Carter One";
  src: url("../fonts/CarterOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --yellow: #fed330;
  --yellow-deep: #f5c518;
  --cream: #f3f0e9;
  --badge: #f0e5ac;
  --card-front: #fbfaf5;
  --card-depth: #fffce4;
  --black: #0d0d0d;
  --black-soft: rgba(13, 13, 13, 0.72);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  --shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.1);
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --font-display: "Carter One", Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --max-width: 1120px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--yellow);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container {
  width: min(var(--max-width), calc(100% - 40px));
  margin-inline: auto;
}

/* ── Header ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--yellow) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
}

.logo span {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.2s;
}

.nav-links a:hover {
  background: rgba(0, 0, 0, 0.06);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.2s;
}

.lang-switch a:hover {
  background: rgba(0, 0, 0, 0.08);
}

.lang-switch a.active {
  background: var(--black);
  color: var(--yellow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--black);
  color: var(--yellow);
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background: #222;
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--cream);
  color: var(--black);
  box-shadow: var(--shadow-soft);
}

.btn-secondary:hover {
  background: #fff;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 0.88rem;
}

/* ── Hero ── */

.hero {
  padding: 56px 0 88px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 14px;
  background: var(--badge);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: rotate(-1.5deg);
}

.hero h1 {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin: 0 0 28px;
  max-width: 34ch;
  font-size: 1.12rem;
  color: var(--black-soft);
  font-weight: 500;
}

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

.hero-visual {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-stack {
  position: relative;
  width: min(100%, 340px);
  height: 400px;
}

.quiz-card {
  position: absolute;
  inset: 0;
  background: var(--card-front);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
}

.quiz-card.depth-2 {
  transform: translate(18px, 22px) rotate(2.5deg);
  background: var(--card-depth);
  z-index: 1;
}

.quiz-card.depth-1 {
  transform: translate(9px, 11px) rotate(1.2deg);
  background: #fcf2c1;
  z-index: 2;
}

.quiz-card.top {
  z-index: 3;
  animation: card-float 5s ease-in-out infinite;
}

@keyframes card-float {
  0%, 100% { transform: translateY(0) rotate(-0.5deg); }
  50% { transform: translateY(-6px) rotate(0.5deg); }
}

.card-badge {
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 6px 12px;
  background: var(--badge);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.card-question {
  margin: 0 0 auto;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
}

.card-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.card-option {
  padding: 14px 16px;
  background: var(--cream);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
}

.card-option.highlight {
  background: var(--yellow-deep);
}

.mustache-float {
  position: absolute;
  width: 72px;
  opacity: 0.9;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
  animation: mustache-drift 8s ease-in-out infinite;
}

.mustache-float.one {
  top: -12px;
  right: -8px;
  transform: rotate(8deg);
}

.mustache-float.two {
  bottom: 40px;
  left: -24px;
  width: 48px;
  transform: rotate(-12deg) scaleX(-1);
  animation-delay: -3s;
}

@keyframes mustache-drift {
  0%, 100% { transform: rotate(8deg) translateY(0); }
  50% { transform: rotate(12deg) translateY(-8px); }
}

/* ── Sections ── */

section {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.section-head {
  margin-bottom: 36px;
}

.section-head h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  max-width: 52ch;
  color: var(--black-soft);
  font-weight: 500;
}

.section-centered .section-head {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

.section-centered .section-head p {
  margin-inline: auto;
}

.modes {
  padding: 0 0 88px;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 960px;
  margin-inline: auto;
}

.section-centered .mode-card {
  text-align: center;
}

.section-centered .mode-icon {
  margin-inline: auto;
}

.mode-card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-soft);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mode-card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: var(--shadow);
}

.mode-card:nth-child(1) { --tilt: -1.8deg; }
.mode-card:nth-child(2) { --tilt: 1.2deg; }
.mode-card:nth-child(3) { --tilt: -0.8deg; }

.mode-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  background: var(--yellow-deep);
  border-radius: 12px;
}

.mode-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--black);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mode-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 800;
}

.mode-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--black-soft);
  font-weight: 500;
}

.categories {
  padding: 88px 0;
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.category-chip {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.92rem;
  box-shadow: var(--shadow-soft);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.2s ease;
}

.category-chip:hover {
  transform: rotate(0deg) scale(1.04);
}

.category-chip .count {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.65;
}

.faq {
  padding: 0 0 88px;
}

.faq-intro {
  margin: 0;
  font-size: 1.05rem;
  color: var(--black-soft);
  font-weight: 500;
}

.faq-list {
  max-width: 720px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--cream);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

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

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--badge);
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.2s ease, background 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
  background: var(--yellow-deep);
}

.faq-item summary h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

.faq-answer {
  padding: 0 22px 22px;
}

.faq-answer p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--black-soft);
  font-weight: 500;
}

.faq-answer p + p,
.faq-answer p + ul {
  margin-top: 12px;
}

.faq-answer ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--black-soft);
  font-weight: 500;
}

.faq-answer li + li {
  margin-top: 6px;
}

.cta-band {
  padding: 56px 0 96px;
}

.section-centered .cta-inner {
  max-width: 720px;
  margin-inline: auto;
}

.cta-inner {
  position: relative;
  overflow: hidden;
  padding: 48px 40px;
  background: var(--black);
  color: var(--yellow);
  border-radius: calc(var(--radius-lg) + 4px);
  box-shadow: var(--shadow);
  text-align: center;
}

.cta-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(254, 211, 48, 0.15), transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(245, 197, 24, 0.12), transparent 45%);
  pointer-events: none;
}

.cta-inner h2 {
  position: relative;
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: var(--yellow);
}

.cta-inner p {
  position: relative;
  margin: 0 auto 28px;
  max-width: 40ch;
  color: rgba(254, 211, 48, 0.82);
  font-weight: 500;
}

.cta-inner .btn-primary {
  position: relative;
  background: var(--yellow);
  color: var(--black);
}

.cta-inner .btn-primary:hover {
  background: var(--yellow-deep);
}

.cta-mustache {
  position: absolute;
  width: 120px;
  opacity: 0.12;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ── Footer ── */

.site-footer {
  padding: 32px 0 40px;
  border-top: 2px solid rgba(0, 0, 0, 0.06);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.footer-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--black-soft);
  font-weight: 500;
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1;
}

/* ── Legal pages ── */

.legal-page {
  padding: 48px 0 80px;
}

.legal-card {
  max-width: 680px;
  margin-inline: auto;
  padding: 40px 36px;
  background: var(--cream);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.legal-card h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.legal-updated {
  margin: 0 0 32px;
  font-size: 0.9rem;
  color: var(--black-soft);
  font-weight: 600;
}

.legal-card h2 {
  margin: 32px 0 12px;
  font-size: 1.05rem;
  font-weight: 800;
}

.legal-card h2:first-of-type {
  margin-top: 0;
}

.legal-card p {
  margin: 0 0 14px;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--black-soft);
  font-weight: 500;
}

.legal-card ul {
  margin: 0 0 14px;
  padding-left: 1.25rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--black-soft);
  font-weight: 500;
}

.legal-card li + li {
  margin-top: 6px;
}

.legal-card a {
  color: var(--black);
  font-weight: 700;
}

.legal-card hr {
  margin: 32px 0;
  border: none;
  border-top: 2px solid rgba(0, 0, 0, 0.08);
}

.legal-contact {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--black-soft);
  font-weight: 500;
}

.legal-back {
  display: inline-flex;
  margin-bottom: 24px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.legal-back:hover {
  opacity: 1;
}

@media (max-width: 520px) {
  .legal-card {
    padding: 28px 22px;
  }
}

/* ── Responsive ── */

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

  .hero-visual {
    order: -1;
    min-height: 360px;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .nav-links li:not(.lang-switch):not(:last-child) {
    display: none;
  }
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding-top: 32px;
  }

  .card-stack {
    height: 360px;
  }

  .cta-inner {
    padding: 36px 24px;
  }
}

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

  .quiz-card.top,
  .mustache-float {
    animation: none;
  }
}
