:root {
  --cream: #faf3ea;
  --paper: #fffaf4;
  --terracotta: #b5563a;
  --terracotta-dark: #8a3f28;
  --blush: #f3c9c0;
  --ink: #2b2420;
  --ink-soft: #5a5048;
  --brown: #6b4a3a;
  --teal: #4f6b63;
  --line: #e4d8c8;
  --radius: 18px;
  --shadow: 0 10px 30px -14px rgba(43, 36, 32, 0.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  margin: 0 0 0.4em;
  color: var(--ink);
}

.accent { color: var(--terracotta); font-style: italic; font-weight: 500; }

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: inherit; }

/* subtle paper grain overlay */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* NAV */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 2rem;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--line);
}
.nav-logo { font-family: 'Fraunces', serif; font-style: italic; }
.nav-status strong { color: var(--terracotta-dark); }

/* HERO */
.hero {
  position: relative;
  text-align: center;
  padding: 5rem 1.5rem 6rem;
  max-width: 820px;
  margin: 0 auto;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--terracotta-dark);
  font-weight: 600;
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  line-height: 1.05;
  margin: 0.3em 0 0.5em;
}
.hero-sub { font-size: 1.15rem; color: var(--ink); }
.hero-note { font-size: 0.95rem; color: var(--ink-soft); max-width: 520px; margin: 1.2em auto 2em; }

.btn {
  display: inline-block;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { transform: translateY(-2px); background: var(--ink); color: var(--paper); }

.stamp {
  position: absolute;
  top: 1.5rem;
  right: 2vw;
  width: 120px;
  height: 120px;
  border: 3px solid var(--terracotta);
  border-radius: 50%;
  color: var(--terracotta);
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: rotate(-16deg);
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* SECTIONS */
.section {
  max-width: 920px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  border-top: 1px solid var(--line);
}
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--terracotta-dark);
  margin-bottom: 0.6em;
}
.section h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.lead { font-size: 1.15rem; color: var(--ink); }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* FUNNEL */
.funnel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.funnel-step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  position: relative;
}
.funnel-n {
  display: inline-block;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.6rem;
  color: var(--blush);
  -webkit-text-stroke: 1.5px var(--terracotta);
  margin-bottom: 0.5em;
}
.funnel-step p { color: var(--ink); font-size: 0.95rem; margin: 0; }

/* EXHIBITS */
.exhibits {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 2.5rem 0 1.5rem;
}
.exhibit {
  margin: 0;
  background: var(--paper);
  padding: 0.8rem 0.8rem 1.1rem;
  border-radius: 10px;
  box-shadow: var(--shadow);
  width: 260px;
  transform: rotate(-3deg);
}
.exhibit:nth-child(2) { transform: rotate(2deg); }
.exhibit img {
  width: 100%;
  border-radius: 6px;
  display: block;
}
.exhibit figcaption {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.7em;
  text-align: center;
}
.tag {
  display: inline-block;
  background: var(--terracotta);
  color: var(--paper);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  margin-right: 0.4em;
  text-transform: uppercase;
}
.verdict {
  text-align: center;
  font-size: 1.05rem;
  margin-top: 1rem;
}
.source-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-soft);
  opacity: 0.75;
  font-style: italic;
  margin-top: 0.6rem;
}

/* ANALYSIS REPORT (terminal) */
.analysis-report {
  background: var(--ink);
  border-radius: 14px;
  padding: 1.6rem 1.8rem 1.4rem;
  max-width: 640px;
  margin: 2rem auto 0;
  box-shadow: var(--shadow);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}
.report-title {
  color: #e9ddcd;
  font-size: 0.85rem;
  margin: 0 0 1em;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.dot-r { background: #e0645a; }
.dot-y { background: #e8c468; }
.dot-g { background: #7fb88a; }
.report-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
}
.report-lines li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4em 0;
  border-bottom: 1px dashed rgba(233, 221, 205, 0.15);
  color: #cdbfaf;
}
.report-lines li span:first-child { color: #cdbfaf; }
.report-lines li .ok { color: #9fd3a8; text-align: right; }
.report-lines li .warn { color: #e8c468; text-align: right; }
.report-result {
  color: #9fd3a8;
  font-weight: 700;
  font-size: 0.95rem;
  margin: 1em 0 0;
}

/* NERD HIGHLIGHT */
.nerd-highlight {
  background: var(--blush);
  border-radius: var(--radius);
  padding: 1.8rem 2rem;
  margin: 2rem 0;
  transform: rotate(-1deg);
}
.nerd-highlight h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--terracotta-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.7em;
}
.nerd-highlight ul { margin: 0; padding-left: 1.2rem; }
.nerd-highlight li {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 0.5em;
}

/* CV */
.cv {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.cv-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
}
.cv-card h3 {
  font-size: 1.05rem;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  color: var(--terracotta-dark);
}
.cv-card ul { margin: 0; padding-left: 1.1rem; color: var(--ink-soft); font-size: 0.95rem; }
.cv-card li { margin-bottom: 0.6em; }

/* HIRONO */
.hirono-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.hirono-media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hirono-text .lead { font-size: 1.1rem; }

/* MATCH VISUEL */
.match {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.5rem;
  margin: 2.5rem 0 1.5rem;
  flex-wrap: wrap;
}
.match-card {
  margin: 0;
  text-align: center;
}
.match-card img {
  width: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}
.match-her img { height: 300px; }
.match-dean img { height: 380px; }
.match-card figcaption {
  margin-top: 0.8em;
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  color: var(--ink);
}
.match-card figcaption .tag { margin-right: 0.5em; }
.match-vs {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--terracotta);
  text-align: center;
  line-height: 1.3;
  padding-bottom: 2.6rem;
}

/* QUIZ */
.quiz-q {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.6rem;
  margin-bottom: 1.2rem;
}
.quiz-question { font-family: 'Fraunces', serif; font-size: 1.15rem; color: var(--ink); margin-bottom: 0.9em; }
.quiz-opts { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.quiz-opt {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.quiz-opt:hover { background: var(--ink); color: var(--paper); }
.quiz-opt.selected { background: var(--terracotta); border-color: var(--terracotta); color: var(--paper); }
.quiz-opt:disabled { cursor: default; opacity: 0.55; }
.quiz-opt:disabled.selected { opacity: 1; }
.quiz-opt:disabled:hover { background: transparent; color: var(--ink); }
.quiz-opt:disabled.selected:hover { background: var(--terracotta); color: var(--paper); }
.quiz-feedback {
  margin: 0.8em 0 0;
  font-size: 0.9rem;
  color: var(--terracotta-dark);
  font-style: italic;
  min-height: 1.2em;
}
.quiz-result {
  text-align: center;
  margin-top: 2rem;
  padding: 2rem;
  background: var(--blush);
  border-radius: var(--radius);
}
.quiz-result p { color: var(--ink); font-weight: 600; margin-bottom: 0.3em; }
.score {
  font-family: 'Fraunces', serif;
  font-size: 3rem;
  font-weight: 600;
  color: var(--terracotta-dark);
  transition: all 0.4s ease;
}
.quiz-result-btns {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}
.quiz-reset-btn, .quiz-copy-btn {
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  border: 1.5px solid var(--terracotta-dark);
  background: transparent;
  color: var(--terracotta-dark);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.quiz-reset-btn:hover, .quiz-copy-btn:hover { background: var(--terracotta-dark); color: var(--paper); }
.quiz-copy-btn { background: var(--terracotta-dark); color: var(--paper); border-color: var(--terracotta-dark); }
.quiz-copy-btn:hover { background: var(--terracotta); border-color: var(--terracotta); }
.quiz-copy-hint {
  margin: 0.7em 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* CTA */
/* FOOTER */
.footer {
  position: relative;
  padding: 4rem 1.5rem;
  text-align: center;
  overflow: hidden;
  color: var(--paper);
}
.footer-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.35) saturate(0.9);
  z-index: 0;
}
.footer p {
  position: relative;
  z-index: 1;
  font-size: 0.85rem;
  color: #f0e6da;
  max-width: 480px;
  margin: 0 auto;
}

/* CONFETTI CANVAS */
#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}

/* RESPONSIVE */
@media (max-width: 760px) {
  .funnel, .cv { grid-template-columns: 1fr; }
  .hirono-section { grid-template-columns: 1fr; }
  .stamp { position: static; margin: 2rem auto 0; }
  .exhibits { gap: 1.5rem; }
  .match-card img { width: 160px; }
  .match-her img { height: 220px; }
  .match-dean img { height: 280px; }
  .match-vs { padding-bottom: 1rem; }
  .report-lines li { flex-direction: column; gap: 0.2rem; }
  .report-lines li .ok, .report-lines li .warn { text-align: left; }
  .analysis-report { padding: 1.4rem 1.2rem; }
}
