/* Oráculo. One theme on purpose: a night sky (the result reveal is light on darkness).
   Shape rule: buttons pill, cards 22px, answer options 16px. One accent: moonlight silver-blue. */
@font-face { font-family: "Outfit"; src: url("/fonts/outfit-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("/fonts/cinzel-latin-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }

:root {
  color-scheme: dark;
  --f-sans: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --f-mono: ui-monospace, Consolas, monospace;
  --bg: #070912; --surface: #0f1322; --surface-2: #0b0f1c; --field: #0d1120;
  --ink: #edf2ff; --muted: #9ea8c4; --line: #1d2338; --line-strong: #323b5a;
  --accent: #d7e7ff; --accent-hover: #ffffff; --accent-ink: #080b18; --accent-text: #c9dcff;
  --danger: #f97066; --r-s: 16px; --r-m: 22px; --r-btn: 999px;
  --shadow: 0 30px 80px -30px rgb(0 0 0 / .8);
  --house: #d7e7ff;
}
body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgb(80 110 200 / .18), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgb(120 80 200 / .12), transparent 60%),
    var(--bg);
}
/* Static starfield on a fixed, non-interactive layer (no repaint on scroll). */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .7;
  background-image:
    radial-gradient(1px 1px at 10% 20%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 30% 70%, #cfe 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 35%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 75% 80%, #dde 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 15%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 20% 90%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 65% 55%, #bcd 50%, transparent 51%), radial-gradient(1px 1px at 45% 10%, #fff 50%, transparent 51%);
  background-size: 420px 420px, 380px 380px, 560px 560px, 300px 300px, 470px 470px, 610px 610px, 350px 350px, 520px 520px;
}
@media (prefers-reduced-motion: no-preference) { body::before { animation: twinkle 6s ease-in-out infinite alternate; } @keyframes twinkle { to { opacity: .4; } } }
h1, h2 { font-family: var(--f-display); font-weight: 600; letter-spacing: 0; line-height: 1.08; }
h1 em, h2 em { font-style: normal; color: var(--accent-text); text-shadow: 0 0 30px rgb(160 200 255 / .45); }
h3 { font-weight: 600; }
.lg-bg { fill: #1b2240; } .lg-fg { fill: var(--accent); }
.btn-xl { min-height: 58px; padding: 0 30px; font-size: 1.08rem; }
.btn-solid { box-shadow: 0 0 0 0 rgb(215 231 255 / .0); transition: box-shadow .4s, transform .18s, background .2s; }
.btn-solid:hover { box-shadow: 0 0 40px -6px rgb(215 231 255 / .55); }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 50ch; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.sec { padding-block: 96px 0; }
.sec h2 { font-size: clamp(1.8rem, 3.8vw, 2.8rem); margin-bottom: 28px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--accent-text); font-weight: 600; text-decoration: none; }

/* ------------------------------------------------------------------ home */
.hero { padding-block: 28px 0; }
.hero-grid { display: grid; gap: 8px; align-items: center; min-height: min(78dvh, 720px); }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 6fr 5fr; gap: 40px; } }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 4.8rem); margin-bottom: .35em; }
.hero-morph { width: 100%; aspect-ratio: 1; max-width: 520px; justify-self: center; order: -1; }
.morph-wrap { position: relative; justify-self: center; width: 100%; max-width: 520px; order: -1; }
@media (min-width: 960px) { .morph-wrap { order: 0; } }
.morph-pause { position: absolute; right: 6px; bottom: 6px; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgb(7 9 18 / .6); color: var(--ink); cursor: pointer; display: grid; place-items: center; opacity: .55; transition: opacity .2s; }
.morph-pause:hover, .morph-pause:focus-visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .morph-pause { display: none; } }
@media (min-width: 960px) { .hero-morph { order: 0; } }
@media (max-width: 959px) { .hero-morph { max-width: 300px; margin-bottom: -10px; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .9s cubic-bezier(.16,1,.3,1) both; }
  .hero-copy > :nth-child(2) { animation-delay: .1s; } .hero-copy > :nth-child(3) { animation-delay: .2s; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }
}
.duo { display: grid; gap: 18px; padding-top: 24px; }
@media (min-width: 900px) { .duo { grid-template-columns: 1fr 1fr; } }
.duo-card { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: center; padding: 28px; border-radius: var(--r-m); border: 1px solid var(--line);
  background: linear-gradient(160deg, rgb(255 255 255 / .04), transparent 60%), var(--surface); text-decoration: none; overflow: hidden; transition: transform .45s cubic-bezier(.16,1,.3,1), border-color .3s; }
.duo-card::after { content: ""; position: absolute; inset: -40%; background: radial-gradient(circle at 30% 30%, rgb(215 231 255 / .14), transparent 40%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.duo-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.duo-card:hover::after { opacity: 1; }
.duo-card h2 { font-size: 1.5rem; margin-bottom: .35em; }
.duo-card p { color: var(--muted); margin: 0 0 12px; }
.duo-go { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-text); font-weight: 600; }
.duo-art svg { width: 100%; height: auto; fill: var(--accent); filter: drop-shadow(0 0 18px rgb(160 200 255 / .5)); transition: transform .6s cubic-bezier(.16,1,.3,1); }
.duo-card:hover .duo-art svg { transform: scale(1.06) rotate(-3deg); }
.duo-house .duo-art svg { fill: #e8743b; filter: drop-shadow(0 0 18px rgb(232 116 59 / .5)); }
@media (max-width: 520px) { .duo-card { grid-template-columns: 1fr; } .duo-art { width: 96px; } }

.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 18px; width: max-content; padding: 6px 0; }
@media (prefers-reduced-motion: no-preference) { .marquee-track { animation: slide 40s linear infinite; } .marquee:hover .marquee-track { animation-play-state: paused; } @keyframes slide { to { transform: translateX(-50%); } } }
.mq-item { display: grid; justify-items: center; gap: 10px; width: 150px; padding: 20px 10px; border: 1px solid var(--line); border-radius: var(--r-m); text-decoration: none; background: var(--surface); transition: border-color .3s, transform .3s; }
.mq-item:hover { border-color: var(--accent); transform: translateY(-3px); }
.mq-item svg { width: 72px; height: 72px; fill: var(--accent); opacity: .9; }
.mq-item span { font-weight: 600; }

.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.faq summary { cursor: pointer; padding: 18px 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { transition: transform .3s cubic-bezier(.16,1,.3,1); flex: none; }
.faq details[open] summary .i { transform: rotate(45deg); }
.faq details > div { padding: 0 20px 18px; color: var(--muted); }

/* ------------------------------------------------------------------ quiz */
.quiz { padding-block: 24px 0; scroll-margin-top: 72px; }
.q-stage { position: relative; min-height: min(80dvh, 760px); display: grid; }
.q-screen { grid-area: 1 / 1; opacity: 0; transform: translateY(14px); transition: opacity .5s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1); }
.q-screen.is-on { opacity: 1; transform: none; }
.q-intro { align-self: center; max-width: 720px; padding-block: 40px; }
.q-intro h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); margin-bottom: .3em; }
.q-lead { color: var(--muted); font-size: 1.15rem; max-width: 46ch; margin-bottom: 28px; }
.q-meta { color: var(--muted); font-size: .9rem; margin-top: 14px; }

.q-ask { max-width: 760px; width: 100%; justify-self: center; padding-block: 24px 40px; }
.q-top { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; margin-bottom: 40px; }
.q-back { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-strong); background: none; color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: border-color .2s, opacity .2s; }
.q-back:disabled { opacity: .3; cursor: default; }
.q-back:not(:disabled):hover { border-color: var(--ink); }
.q-progress { height: 3px; border-radius: 3px; overflow: hidden; }
.q-bar { display: block; height: 100%; background: linear-gradient(90deg, rgb(215 231 255 / .4), var(--accent)); transform-origin: left; transform: scaleX(0); transition: transform .6s cubic-bezier(.16,1,.3,1); box-shadow: 0 0 12px rgb(215 231 255 / .7); }
.q-count { font-family: var(--f-mono); font-size: .85rem; color: var(--muted); min-width: 4.5ch; text-align: right; }
.q-question { font-size: clamp(1.6rem, 4vw, 2.5rem); margin-bottom: 28px; min-height: 2.2em; }
.q-options { display: grid; gap: 12px; }
@media (min-width: 700px) { .q-options { grid-template-columns: 1fr 1fr; } }
.q-opt { position: relative; display: flex; align-items: center; gap: 14px; text-align: left; min-height: 74px; padding: 16px 18px; border-radius: var(--r-s); border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, rgb(255 255 255 / .03), transparent), var(--surface); color: var(--ink); cursor: pointer; font-size: 1.02rem; overflow: hidden;
  transition: border-color .25s, transform .25s cubic-bezier(.16,1,.3,1), background .25s; }
.q-opt::before { content: ""; position: absolute; inset: 0; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgb(215 231 255 / .12), transparent 60%); opacity: 0; transition: opacity .3s; }
.q-opt:hover { border-color: var(--accent); transform: translateY(-2px); }
.q-opt:hover::before { opacity: 1; }
.q-opt:active { transform: scale(.985); }
.q-opt kbd { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-strong); font: 600 .8rem var(--f-mono); color: var(--muted); }
.q-opt.is-picked { border-color: var(--accent); background: rgb(215 231 255 / .12); }
.q-opt.is-picked kbd { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.q-hint { color: var(--muted); font-size: .85rem; margin-top: 18px; }
@media (hover: none) { .q-hint, .q-opt kbd { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  .q-card.in .q-question { animation: qin .55s cubic-bezier(.16,1,.3,1) both; }
  .q-card.in .q-opt { animation: qin .55s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(80ms + var(--i) * 55ms); }
  @keyframes qin { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } }
}

.q-result { justify-self: center; width: 100%; max-width: 980px; padding-block: 8px 40px; text-align: center; }
.q-canvas { width: min(78vw, 440px); aspect-ratio: 1; display: block; margin: 0 auto -8px; }
.q-res-body { opacity: 0; transform: translateY(10px); transition: opacity .9s ease, transform .9s cubic-bezier(.16,1,.3,1); }
.q-res-body.is-on { opacity: 1; transform: none; }
.q-kicker { color: var(--muted); letter-spacing: .02em; margin: 0; }
.q-name { font-size: clamp(2.6rem, 8vw, 5rem); margin: .1em 0 .15em; text-shadow: 0 0 40px color-mix(in srgb, var(--house) 55%, transparent); }
.q-short { font-size: 1.2rem; color: var(--accent-text); margin-bottom: 36px; }
.q-detail { display: grid; gap: 24px; text-align: left; align-items: center; padding: 28px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); }
@media (min-width: 760px) { .q-detail:has(.q-radar:not([hidden])) { grid-template-columns: 1fr 220px; } }
.q-radar { justify-self: center; }
.q-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
.q-dl dt { font-size: .82rem; color: var(--muted); }
.q-dl dd { margin: 2px 0 0; font-weight: 600; }
.q-alt { color: var(--muted); margin: 0; }
.q-alt a { color: var(--accent-text); }
.q-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.q-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--accent-text); font-weight: 600; text-decoration: none; }
.q-flash { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; padding: 10px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; transition: opacity .35s cubic-bezier(.16,1,.3,1), transform .35s cubic-bezier(.16,1,.3,1); pointer-events: none; }
.q-flash.on { opacity: 1; transform: translate(-50%, 0); }
.page-quiz .site-foot { margin-top: 120px; }

/* ------------------------------------------------------------------ lists & animal pages */
.list-head { padding-block: 48px 30px; max-width: 820px; }
.list-head h1 { font-size: clamp(2.3rem, 5.4vw, 3.8rem); margin-bottom: .3em; }
.zoo { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.zoo-card { display: grid; gap: 8px; padding: 22px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: transform .4s cubic-bezier(.16,1,.3,1), border-color .3s; }
.zoo-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.zoo-card svg { width: 84px; height: 84px; fill: var(--accent); filter: drop-shadow(0 0 14px rgb(160 200 255 / .35)); transition: transform .5s cubic-bezier(.16,1,.3,1); }
.zoo-card:hover svg { transform: scale(1.08) rotate(-4deg); }
.zoo-card h2 { font-size: 1.3rem; margin: 6px 0 0; }
.zoo-card p { margin: 0; color: var(--muted); font-size: .95rem; }

.ap-hero { display: grid; gap: 24px; align-items: center; padding-block: 40px 20px; }
@media (min-width: 900px) { .ap-hero { grid-template-columns: 5fr 7fr; gap: 56px; } }
.ap-figure svg { width: 100%; max-width: 380px; margin: 0 auto; fill: var(--accent); filter: drop-shadow(0 0 40px rgb(160 200 255 / .45)); }
@media (prefers-reduced-motion: no-preference) { .ap-figure svg { animation: float 7s ease-in-out infinite; } @keyframes float { 50% { transform: translateY(-10px); } } }
.ap-head h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); margin-bottom: .2em; }
.ap-short { font-size: 1.25rem; color: var(--accent-text); }
.ap-body { display: grid; gap: 32px; padding-top: 24px; }
@media (min-width: 900px) { .ap-body { grid-template-columns: 7fr 4fr; align-items: start; } }
.ap-side { display: grid; gap: 14px; }
.ap-side > div { padding: 20px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); }
.ap-side p { margin: 0; }
.ap-label { color: var(--muted); font-size: .82rem; margin-bottom: 4px !important; }
.ap-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 56px; flex-wrap: wrap; }
.ap-nav a { display: inline-flex; align-items: center; gap: 10px; color: var(--accent-text); text-decoration: none; font-weight: 600; }
.ap-nav svg.mini { width: 36px; height: 36px; fill: var(--accent); }

.houses { display: grid; gap: 18px; }
.house { display: grid; gap: 24px; align-items: center; padding: 28px; border-radius: var(--r-m); border: 1px solid var(--line); background: linear-gradient(140deg, color-mix(in srgb, var(--house) 12%, transparent), transparent 55%), var(--surface); scroll-margin-top: 90px; }
@media (min-width: 760px) { .house { grid-template-columns: 180px 1fr; } }
.house h2 { font-size: 2rem; margin-bottom: .2em; }
.motto { color: var(--house); font-style: italic; }
.crest { position: relative; width: 160px; aspect-ratio: 1; display: grid; place-items: center; }
.crest::before { content: ""; position: absolute; inset: 0; background: var(--house); opacity: .9;
  clip-path: path("M80 7 L141 24 C141 78 125 122 80 152 C35 122 19 78 19 24 Z"); -webkit-mask: none; }
.crest::after { content: ""; position: absolute; inset: 4px; background: var(--bg); clip-path: path("M76 9 L133 25 C133 75 118 116 76 144 C34 116 19 75 19 25 Z"); transform: translateX(4px); }
.crest svg.crest-animal { position: relative; z-index: 1; width: 58%; fill: var(--house); margin-top: -12px; filter: drop-shadow(0 0 16px color-mix(in srgb, var(--house) 60%, transparent)); }
.duo-art.crest { width: 120px; --house: #e8743b; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 12px 0 0; }
.pills li { padding: 4px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--house) 60%, transparent); color: var(--house); font-size: .88rem; }
