/* Black Cat Mom. Palette: cat-black ink with a plum sheen, moonlit paper, eye gold, green-eye emerald, sun-rusted fur. */
:root {
  --ink: #17121F; --paper: #F3EFF8; --mist: #E2DAEE; --gold: #E3A72F; --emerald: #2F7D5B; --rust: #9A5531;
  --bg: var(--paper); --surface: #FFFFFF; --text: var(--ink); --soft: #4A4256; --line: #CFC4DF;
  --display: 'Bricolage Grotesque', 'Arial Narrow', sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #120E18; --surface: #1E1826; --text: #EDE7F5; --soft: #B9AEC9; --line: #3A3048; --mist: #2A2234; color-scheme: dark; } }
:root[data-theme="dark"] { --bg: #120E18; --surface: #1E1826; --text: #EDE7F5; --soft: #B9AEC9; --line: #3A3048; --mist: #2A2234; color-scheme: dark; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.2rem/1.6 var(--body); overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2 { font-family: var(--display); font-weight: 800; font-stretch: 75%; line-height: .95; letter-spacing: -.01em; margin: 0 0 .4em; text-wrap: balance; }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); }
p { max-width: 66ch; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--gold); color: var(--ink); padding: .5em 1em; }
section { padding: clamp(56px, 9vw, 120px) var(--gutter); }
.sec-head p, .note { color: var(--soft); }
.note { font-size: 1rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 1.4em; border-radius: 999px; border: 2px solid currentColor; font: 700 1.1rem var(--body); text-decoration: none; cursor: pointer; background: none; color: inherit; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.ghost { color: #fff; }
.btn.ink { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn:hover { filter: brightness(1.08); }

/* Header */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 1.5rem; padding: 10px var(--gutter); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; font: 800 1.5rem var(--display); font-stretch: 75%; }
.brand .eyes { width: 54px; height: 18px; }
.top nav { display: flex; gap: 1.2rem; margin-left: auto; font-size: 1.05rem; }
.top nav a { text-decoration: none; color: var(--soft); } .top nav a:hover { color: var(--text); }
.tools { display: flex; gap: .6rem; align-items: center; }
.lang, .lights { min-height: 44px; padding: 0 1em; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font: 700 1rem var(--body); text-decoration: none; display: inline-flex; align-items: center; cursor: pointer; }
.lights { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.lights[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); }
@media (max-width: 1080px) { .top nav { display: none; } .tools { margin-left: auto; } }
@media (max-width: 440px) { .brand span { display: none; } .lang, .lights { padding: 0 .8em; font-size: .95rem; } }

/* Eyes: the one memorable thing. They track the pointer and blink. */
.eye .lid { transform-box: fill-box; transform-origin: center; animation: blink 7s infinite; }
.eye:nth-child(3) .lid { animation-delay: .04s; }
.pupil, .glint { transition: transform .12s ease-out; }
@keyframes blink { 0%, 95%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.08); } }
@media (prefers-reduced-motion: reduce) { .eye .lid { animation: none; } html { scroll-behavior: auto; } }

/* Hero */
.hero { position: relative; min-height: min(92vh, 900px); display: grid; align-content: end; padding-top: 120px; color: #fff; background: radial-gradient(120% 90% at 80% 20%, #3B2A52, var(--ink) 70%); overflow: hidden; isolation: isolate; }
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(23,18,31,.92) 0%, rgba(23,18,31,.6) 45%, rgba(23,18,31,.15) 100%), linear-gradient(0deg, rgba(23,18,31,.85), transparent 45%); }
.hero h1 { font-size: clamp(3rem, 8.4vw, 8rem); max-width: 12ch; }
.lede { font-size: clamp(1.2rem, 1.8vw, 1.45rem); max-width: 44ch; color: #E6DDF2; }
.ctas { display: flex; flex-wrap: wrap; gap: .8rem; }
.eyes.big { position: absolute; right: var(--gutter); top: 18%; width: clamp(180px, 26vw, 420px); height: auto; filter: drop-shadow(0 0 24px rgba(227,167,47,.45)); }
@media (max-width: 720px) { .eyes.big { top: 92px; right: 16px; width: 150px; } }

/* Lights off: the page drops to near-black and only the eyes glow. */
:root[data-theme="dark"] .eyes { filter: drop-shadow(0 0 18px rgba(255,214,102,.8)); }

/* Direct answer, written to be quoted */
.answer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2rem 4rem; align-items: start; background: var(--mist); }
.answer p { font-size: clamp(1.25rem, 1.8vw, 1.5rem); margin: 0; }
@media (max-width: 860px) { .answer { grid-template-columns: 1fr; } }

/* Facts: flip tiles in four coat-and-eye colors */
.fact-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-flow: dense; gap: 16px; margin-top: 2rem; perspective: 1200px; }
.fact { position: relative; min-height: 230px; border: 0; padding: 0; background: none; cursor: pointer; text-align: left; font: inherit; color: inherit; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.3,.7,.3,1); }
.fact[aria-pressed="true"] { transform: rotateY(180deg); }
.front, .back { position: absolute; inset: 0; padding: 22px; border-radius: 20px; backface-visibility: hidden; display: flex; flex-direction: column; }
.front { justify-content: flex-end; font: 800 1.85rem/1 var(--display); font-stretch: 80%; }
.back { transform: rotateY(180deg); background: var(--surface); color: var(--text); border: 2px solid var(--line); font-size: 1.08rem; line-height: 1.45; justify-content: center; }
.fact-n { position: absolute; top: 16px; left: 20px; font-size: 3.2rem; opacity: .35; }
.f0 .front { background: var(--ink); color: var(--gold); }
.f1 .front { background: var(--gold); color: var(--ink); }
.f2 .front { background: var(--emerald); color: #fff; }
.f3 .front { background: var(--rust); color: #fff; }
:root[data-theme="dark"] .f0 .front { box-shadow: inset 0 0 0 2px var(--line); }
.fact-art { grid-column: -3 / -1; grid-row: 1 / span 2; width: 100%; height: 100%; min-height: 230px; contain: size; object-fit: cover; border-radius: 20px; }
@media (max-width: 1100px) { .fact-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .fact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .fact-grid { grid-template-columns: 1fr; } .fact-art { grid-column: auto; grid-row: auto; height: auto; contain: none; } }
@media (prefers-reduced-motion: reduce) { .fact { transition: none; } }

/* Quiz */
.quiz-card { margin-top: 2rem; max-width: 820px; padding: clamp(24px, 4vw, 48px); border-radius: 28px; background: var(--ink); color: var(--paper); }
:root[data-theme="dark"] .quiz-card { background: var(--surface); border: 2px solid var(--line); }
.q-count { color: var(--gold); font-weight: 700; margin: 0; }
.q-text { font: 800 clamp(1.8rem, 3.6vw, 2.8rem)/1.05 var(--display); font-stretch: 80%; margin: .3em 0 .8em; }
.q-actions { display: flex; gap: .8rem; }
.q-actions .btn[disabled] { opacity: .45; cursor: default; }
.q-actions .btn.picked { opacity: 1; outline: 3px solid var(--gold); }
.q-feedback { min-height: 1.6em; font-size: 1.2rem; }
.quiz-card[data-result="right"] .q-feedback { color: #8FE0B5; }
.quiz-card[data-result="wrong"] .q-feedback { color: #FFB38A; }

/* Age calculator */
.age-box { margin-top: 2rem; max-width: 820px; }
.age-box label { font-weight: 700; font-size: 1.2rem; }
.age-box output { font: 800 1.6rem var(--display); color: var(--rust); }
#cat-age { width: 100%; height: 44px; margin: 12px 0; accent-color: var(--gold); --p: 8%; }
.age-result { font: 800 clamp(1.7rem, 3.4vw, 2.6rem)/1.1 var(--display); font-stretch: 80%; }
.age-stage { display: inline-block; vertical-align: middle; font: 700 1rem var(--body); padding: .2em .8em; border-radius: 999px; background: var(--emerald); color: #fff; }

/* Shop */
.shop { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 3rem; background: var(--surface); }
.shop-art img { position: sticky; top: 90px; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 28px; }
.disclosure { font-size: 1rem; font-weight: 700; padding: .6em 1em; border-left: 4px solid var(--gold); background: var(--mist); }
.shop ul { list-style: none; padding: 0; margin: 1.5rem 0; border-top: 1.5px solid var(--line); }
.shop li a { display: grid; grid-template-columns: 1fr auto; gap: 0 1rem; padding: 18px 4px; border-bottom: 1.5px solid var(--line); text-decoration: none; }
.shop li strong { font: 800 1.5rem var(--display); font-stretch: 85%; }
.shop li span { grid-column: 1; color: var(--soft); font-size: 1.05rem; }
.shop li em { grid-column: 2; grid-row: 1 / 3; align-self: center; font-style: normal; font-weight: 700; color: var(--rust); white-space: nowrap; }
.shop li a:hover strong { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
:root[data-theme="dark"] .shop li em { color: var(--gold); }
@media (max-width: 860px) { .shop { grid-template-columns: 1fr; } .shop-art img { position: static; aspect-ratio: 16 / 9; } }
@media (max-width: 480px) { .shop li a { grid-template-columns: 1fr; } .shop li em { grid-column: 1; grid-row: auto; } }

/* Black cat days */
.day { position: relative; display: grid; color: #fff; background: var(--ink); isolation: isolate; min-height: 560px; align-content: center; }
.day-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.day::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(23,18,31,.92), rgba(23,18,31,.35)); }
.day-copy { max-width: 640px; }
.day-copy p { color: #E6DDF2; }
.dates { display: flex; gap: 2.5rem; font-size: 1.15rem; }
.dates b { display: block; font: 800 clamp(4rem, 9vw, 7rem)/.9 var(--display); color: var(--gold); }

/* Gallery */
.gallery { padding-right: 0; }
.strip { list-style: none; margin: 1.5rem 0 0; padding: 0 var(--gutter) 12px 0; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(240px, 30vw, 420px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; }
.strip li { scroll-snap-align: start; }
.strip img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 18px; }
.strip li:nth-child(even) img { aspect-ratio: 4 / 5; margin-top: 40px; }

/* Community */
.community { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: center; background: var(--mist); }
.com-art { width: 100%; border-radius: 28px 28px 28px 120px; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 860px) { .community { grid-template-columns: 1fr; } }

/* FAQ */
.faq-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 0 3rem; margin-top: 1.5rem; }
details { border-bottom: 1.5px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 20px 2.2rem 20px 0; position: relative; font: 800 1.45rem/1.15 var(--display); font-stretch: 85%; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 2rem; color: var(--gold); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 0 0 20px; color: var(--soft); }

/* Footer */
.foot { padding: 48px var(--gutter); background: var(--ink); color: #CFC4DF; font-size: 1rem; }
.foot a { color: #fff; }
.foot .disclosure { background: transparent; color: #fff; }
