/* ---------- Tokens ---------- */
:root {
  --bg: #ffe4ec;
  --ink: #1d1a2e;
  --ink-soft: #4a4560;
  --card: #ffffff;
  --border-idle: #f0a6c0;
  --blush: #ff8fab;

  --mint: #c8f1d8;
  --lilac: #e4d9ff;
  --peach: #ffd9b8;
  --sky: #cfe8ff;

  --font-display: Fredoka, system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

h1, h2, p { margin: 0; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 24px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  text-decoration: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--card);
  font-weight: 700;
  font-size: 14px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 8vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.lead {
  font-size: 20px;
  line-height: 1.5;
  max-width: 560px;
}

/* ---------- Quiz ---------- */
.quiz {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding: 16px 0 72px;
  align-items: stretch;
}

.options {
  flex: 1 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.question {
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
}

.option {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 76px;
  padding: 14px 20px;
  background: var(--card);
  border: 3px solid var(--border-idle);
  border-radius: 22px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.option:hover { transform: translateY(-2px); border-color: var(--ink); }

.option[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--selected, var(--card));
}

.letter {
  flex: 0 0 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
}

/* ---------- Result card ---------- */
.result {
  flex: 1 1 380px;
  min-width: 0;
  min-height: 440px;
  padding: 36px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 32px;
  box-shadow: 10px 10px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.result-empty,
.result-full {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.result-full[hidden],
.result-empty[hidden] { display: none; }

.almond-empty { width: 120px; }

.almond-face {
  width: 150px;
  animation: pop 320ms cubic-bezier(.2, 1.4, .4, 1);
}

@keyframes pop {
  from { transform: scale(0.6) rotate(-10deg); opacity: 0; }
  to   { transform: scale(1) rotate(0); opacity: 1; }
}

.result-title-sm {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
}

.result-hint { font-size: 16px; color: var(--ink-soft); }

.eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.result-full h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1;
}

.result-desc {
  font-size: 18px;
  line-height: 1.5;
  max-width: 340px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.btn {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}

.btn-dark {
  background: var(--ink);
  color: #ffffff;
  border: 2px solid var(--ink);
}

.btn-light {
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--ink);
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 0 40px;
  border-top: 2px solid var(--ink);
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Fit to one screen (desktop) ---------- */
@media (min-width: 769px) {
  .container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }

  main { flex: 1; }

  .nav { padding: clamp(10px, 2vh, 24px) 0; }

  .hero {
    padding: clamp(8px, 2.5vh, 56px) 0 clamp(8px, 2vh, 40px);
    gap: clamp(6px, 1.2vh, 18px);
  }

  .hero h1 { font-size: clamp(36px, min(8vw, 7.5vh), 104px); }

  .lead { font-size: clamp(16px, 2.2vh, 20px); }

  .quiz { padding: clamp(8px, 1.5vh, 16px) 0 clamp(16px, 2.5vh, 72px); }

  .options { gap: clamp(8px, 1.2vh, 14px); }

  .option {
    min-height: clamp(44px, 6.5vh, 76px);
    padding: clamp(4px, 1vh, 14px) 20px;
  }

  .letter {
    flex-basis: clamp(32px, 4.5vh, 40px);
    height: clamp(32px, 4.5vh, 40px);
  }

  .result {
    min-height: 0;
    padding: clamp(18px, 3vh, 36px);
  }

  .result-empty,
  .result-full { gap: clamp(8px, 1.2vh, 18px); }

  .almond-empty { width: auto; height: clamp(80px, 13vh, 160px); }

  .almond-face { width: auto; height: clamp(80px, 13vh, 200px); }

  .result-full h2 { font-size: clamp(28px, 4vh, 40px); }

  .result-desc { font-size: clamp(16px, 1.9vh, 18px); }

  .result-actions { margin-top: 0; }

  .footer { padding: clamp(10px, 2vh, 24px) 0 clamp(10px, 2.5vh, 40px); }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hero { padding: 32px 0 28px; }
  .lead { font-size: 18px; }
  .quiz { gap: 32px; padding-bottom: 56px; }
}

@media (max-width: 480px) {
  .option { font-size: 16px; padding: 12px 16px; }
  .result { padding: 28px 20px; min-height: 0; box-shadow: 6px 6px 0 var(--ink); }
  .result-full h2 { font-size: 32px; }
  .btn { flex: 1 1 auto; }
}
