/* ===================================================================
   FESTORA | Styles
   Themes: crimson (default), midnight, sandstone
   =================================================================== */

/* ---------- Theme tokens ---------- */
:root,
[data-theme="crimson"] {
  --red: #9b1c2e;
  --red-dark: #6e1220;
  --gold: #dcc089;
  --gold-light: #f1e3c2;
  --ink: #1d1517;
  --muted: #6b5a5e;
  --paper: #fbf7f1;
  --card: #ffffff;
  --field: #fffdf9;
  --tint: #fffaf2;
  --line: #eadfd1;
  --nav-bg: rgba(251, 247, 241, 0.86);
  --shadow: 0 20px 50px -20px rgba(110, 18, 32, 0.35);
  --glow: rgba(155, 28, 46, 0.25);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --band: #f6e7cf;
  color-scheme: light;
}

[data-theme="midnight"] {
  --red: #c8364a;
  --red-dark: #e87a8a;
  --gold: #e2c48f;
  --gold-light: #3a2b2e;
  --ink: #f6eee6;
  --muted: #b9aaa9;
  --paper: #14100f;
  --card: #1f1819;
  --field: #2a2123;
  --tint: #1b1516;
  --line: #3a2c2e;
  --nav-bg: rgba(20, 16, 15, 0.85);
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.75);
  --glow: rgba(200, 54, 74, 0.4);
  --band: #2a1f22;
  color-scheme: dark;
}

[data-theme="sandstone"] {
  --red: #8a4b2a;
  --red-dark: #5f2f17;
  --gold: #c8a165;
  --gold-light: #efe2cb;
  --ink: #2b2119;
  --muted: #7a6a5a;
  --paper: #f4ead9;
  --card: #fffaf1;
  --field: #fffdf8;
  --tint: #efe3cf;
  --line: #e2d3bd;
  --nav-bg: rgba(244, 234, 217, 0.88);
  --shadow: 0 20px 50px -22px rgba(95, 47, 23, 0.35);
  --glow: rgba(138, 75, 42, 0.28);
  --band: #e9d7b8;
  color-scheme: light;
}

/* Smooth colour change when the theme is switched */
html.theme-switching,
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition: background-color 0.6s ease, color 0.6s ease, border-color 0.6s ease, box-shadow 0.6s ease !important;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
}
section, footer { overflow-x: clip; }

img { max-width: 100%; display: block; }
a { color: inherit; }
dl { margin: 0; }
dt { color: var(--muted); font-size: 0.85rem; }
dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }

h1, h2, h3, h4 {
  font-family: Fraunces, Georgia, serif;
  line-height: 1.1;
  margin: 0 0 0.5em;
}
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h3 { font-size: 1.4rem; }

.section {
  padding: 96px 6vw;
  max-width: 1200px;
  margin: 0 auto;
}
.section.alt {
  background: linear-gradient(180deg, var(--card), var(--tint));
  max-width: none;
}
.section.alt > * { max-width: 1200px; margin-left: auto; margin-right: auto; }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--red);
  margin: 0 0 12px;
}
.lead { font-size: 1.1rem; color: var(--muted); }
.muted { color: var(--muted); font-size: 0.92rem; }

[hidden] { display: none !important; }

/* ---------- Scroll progress bar ---------- */
.scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--red));
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  z-index: 80;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 6vw;
  z-index: 50;
  transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}
.nav.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px -12px rgba(0, 0, 0, 0.25);
  padding: 10px 6vw;
}
.nav nav { display: flex; gap: 22px; align-items: center; }
.nav nav a:not(.btn) {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}
.nav nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1));
}
.nav nav a:not(.btn):hover::after { transform: scaleX(1); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: Fraunces, serif;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--red-dark);
}
.brand img { height: 42px; width: auto; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink);
  padding: 7px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.3s;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--red); }
.theme-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--gold));
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  padding: 140px 6vw 80px;
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }

.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em) rotateX(-50deg);
  transform-origin: 50% 100%;
  animation: wordIn 0.9s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 80ms + 250ms);
}
@keyframes wordIn { to { opacity: 1; transform: none; } }

h1 em {
  font-style: normal;
  color: var(--red);
  position: relative;
  z-index: 0;
}
h1 em::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 0.08em;
  height: 0.18em;
  background: var(--gold);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  animation: underline 0.9s 1.3s var(--ease) forwards;
}
@keyframes underline { to { transform: scaleX(1); } }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 22px;
}
.chip img { height: 32px; width: 32px; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  height: min(560px, 80vw);
}
.hero-visual::before {
  content: "";
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 70%);
  animation: pulse 5s ease-in-out infinite;
}
.parallax { will-change: transform; position: absolute; inset: 0; display: grid; place-items: center; }
.logo-wrap { position: relative; }
.hero-visual .float {
  width: min(380px, 80%);
  position: relative;
  z-index: 1;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 30px 40px var(--glow));
}
.ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed var(--glow);
}
.r1 { width: 88%; aspect-ratio: 1; animation: spin 40s linear infinite; }
.r2 { width: 64%; aspect-ratio: 1; border-color: var(--gold); animation: spin 26s linear infinite reverse; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(1.5deg); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

/* ---------- Marquee ---------- */
.marquee-wrap {
  overflow: hidden;
  width: 100%;
  padding: 26px 0 10px;
}
.marquee {
  background: var(--band);
  color: var(--red-dark);
  box-shadow: 0 10px 30px -18px var(--glow);
  padding: 14px 0;
  transform: rotate(-1.2deg);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
  font-family: Fraunces, serif;
  font-size: 1.2rem;
  font-weight: 600;
}
.marquee-track span { padding: 0 28px; white-space: nowrap; }
.marquee-track span::after { content: "✦"; margin-left: 56px; color: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Scroll reveal (direction variants) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.9s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1)),
    transform 0.9s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1));
  transition-delay: var(--d, 0ms);
}
.reveal[data-reveal="left"]  { transform: translateX(-60px); }
.reveal[data-reveal="right"] { transform: translateX(60px); }
.reveal[data-reveal="zoom"]  { transform: scale(0.9); }
.reveal[data-reveal="fade"]  { transform: none; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Cards & tilt ---------- */
.card {
  background: var(--card);
  border-radius: 18px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.35s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1)), box-shadow 0.35s;
  transform-style: preserve-3d;
}
.tilt:hover { box-shadow: 0 30px 60px -20px var(--glow); }
.card p { color: var(--muted); margin: 0; }
.step-num {
  font-family: Fraunces, serif;
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 8px;
}

/* ---------- Timeline (scroll-linked) ---------- */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  --p: 0;
}
.steps::before,
.steps::after {
  content: "";
  position: absolute;
  top: 44px;
  left: 0;
  height: 2px;
}
.steps::before { right: 0; background: var(--line); }
.steps::after {
  width: calc(var(--p) * 100%);
  background: linear-gradient(90deg, var(--gold), var(--red));
  transition: width 0.2s linear;
}
.steps > * { position: relative; z-index: 1; }

/* ---------- Quotes ---------- */
.quotes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
}
.quote-box {
  background: var(--card);
  border-radius: 18px;
  padding: 36px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.quote-box h3 { margin: 0; color: var(--red); }
.quote-stack { display: grid; }
.quote {
  grid-area: 1 / 1;
  margin: 0;
  font-family: Fraunces, serif;
  font-size: 1.35rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1)), transform 0.7s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1));
}
.quote.active { opacity: 1; transform: none; }
.dots { display: flex; gap: 8px; }
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--line);
  cursor: pointer;
  transition: transform 0.3s, background 0.3s;
}
.dot.active { background: var(--red); transform: scale(1.3); }

.helplines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.helpline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--gold-light);
  border-radius: 14px;
  padding: 18px 22px;
  color: var(--ink);
}
.helpline strong { font-size: 0.95rem; }
.helpline span { font-family: Fraunces, serif; font-size: 1.4rem; font-weight: 800; color: var(--red); white-space: nowrap; }

/* ---------- Rules ---------- */
.rules {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 14px;
  max-width: 820px;
  margin: 0 auto;
  counter-reset: rule;
}
.rules li {
  counter-increment: rule;
  background: var(--card);
  border-radius: 14px;
  padding: 18px 22px 18px 72px;
  position: relative;
  box-shadow: 0 6px 18px -12px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1));
}
.rules li:hover { transform: translateX(6px); }
.rules li::before {
  content: counter(rule, decimal-leading-zero);
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-family: Fraunces, serif;
  font-weight: 800;
  color: var(--red);
  font-size: 1.1rem;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--red);
  color: #fff;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  border: 0;
  cursor: pointer;
  box-shadow: 0 12px 24px -12px var(--red);
  transition: transform 0.2s, box-shadow 0.3s, background 0.3s;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-120%);
}
.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px -12px var(--red);
}
.btn:hover:not(:disabled)::after {
  transform: translateX(120%);
  transition: transform 0.8s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1));
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn.ghost {
  background: transparent;
  color: var(--red-dark);
  box-shadow: inset 0 0 0 1.5px var(--red);
}
.btn.ghost:hover:not(:disabled) { background: var(--gold-light); }
.btn.danger { color: #c0392b; box-shadow: inset 0 0 0 1.5px #c0392b; background: transparent; }
.btn.danger:hover:not(:disabled) { background: rgba(192, 57, 43, 0.08); }
.btn-small { padding: 9px 18px; font-size: 0.9rem; }
.btn-block { width: 100%; }

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: ripple 0.6s linear forwards;
  pointer-events: none;
}
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* ---------- Form ---------- */
.form { max-width: 820px; margin: 0 auto; display: grid; gap: 22px; }
.form-fields { display: grid; gap: 22px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.field input,
.field select {
  font: inherit;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 4px var(--glow);
}
.field.invalid input,
.field.invalid select {
  border-color: #c0392b;
  background: #fff5f4;
}

.block {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  margin: 0;
  background: var(--tint);
  animation: fadeUp 0.5s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1));
}
.block legend {
  font-family: Fraunces, serif;
  font-weight: 800;
  color: var(--red);
  padding: 0 8px;
  font-size: 1.05rem;
}
.block-head { position: relative; }
.member-remove {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: 0;
  color: #c0392b;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.members-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.members-head h3 { margin: 0 0 4px; }
.members { display: grid; gap: 18px; }

.dropzone {
  border: 2px dashed var(--line);
  border-radius: 18px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  display: grid;
  gap: 6px;
  justify-items: center;
  background: var(--tint);
  transition: border-color 0.3s, transform 0.3s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1)), background 0.3s;
}
.dropzone:hover,
.dropzone.drag {
  border-color: var(--red);
  transform: scale(1.01);
  background: var(--card);
}
.dz-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-6px); } }
.dropzone small { color: var(--muted); }
.file-name { font-weight: 600; color: var(--red-dark); word-break: break-all; }

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.92rem;
  color: var(--muted);
  cursor: pointer;
}
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--red); flex-shrink: 0; }

.progress {
  position: relative;
  height: 44px;
  border-radius: 999px;
  background: var(--gold-light);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.progress[hidden] { display: none; }
.progress .bar {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--red));
  transition: width 0.25s linear;
}
.progress span { position: relative; font-weight: 600; color: var(--ink); }

.actions { display: grid; gap: 12px; }
.form-note { text-align: center; min-height: 1.4em; color: var(--muted); margin: 0; }
.form-note.error { color: #c0392b; }

.preview { max-width: 820px; margin: 0 auto 24px; border-left: 4px solid var(--gold); }
.preview:not([hidden]) { animation: fadeUp 0.6s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1)); }
.preview h3 { margin: 0 0 14px; }
.preview dl,
.review-list { display: grid; gap: 10px; }
.preview dl > div,
.review-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
}

.review {
  padding: 24px;
  border-radius: 18px;
  background: var(--tint);
  border: 1.5px solid var(--gold);
  display: grid;
  gap: 18px;
  animation: fadeUp 0.5s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1));
}
.review h3 { margin: 0; }
.review h4 { color: var(--red); margin: 0 0 10px; font-size: 1.1rem; }

/* ---------- Success ---------- */
.success { text-align: center; padding: 48px 24px; animation: fadeUp 0.7s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1)); }
.success h2 { margin-bottom: 0.3em; }
.success p { color: var(--muted); }
.check-mark {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--red);
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  animation: pop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1);
  box-shadow: 0 0 0 12px var(--glow);
}
.check-mark svg {
  width: 44px;
  height: 44px;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.6s 0.4s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1)) forwards;
}

/* ---------- Generic entrance keyframes ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { transform: scale(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Footer & toast ---------- */
footer {
  padding: 48px 6vw 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px 40px;
  align-items: center;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { height: 56px; width: 56px; }
.footer-brand strong { color: var(--ink); display: block; }
.footer-inner p { margin: 0; }
.footer-note { text-align: right; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 160%);
  background: var(--ink);
  color: var(--paper);
  padding: 14px 22px;
  border-radius: 14px;
  z-index: 90;
  max-width: 90vw;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.toast.show { transform: translate(-50%, 0); }

/* ===================================================================
   Owner dashboard
   =================================================================== */
body.dash-body { background: var(--paper); }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); text-align: center; animation: fadeUp 0.7s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1)); }
.login-logo { width: 90px; margin: 0 auto 14px; }
.login-card h2 { margin-bottom: 20px; }
.form-simple { display: grid; gap: 16px; text-align: left; }
.hint { font-size: 0.85rem; color: var(--muted); margin-top: 18px; }

.dash-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 4vw;
  background: var(--card);
  box-shadow: 0 2px 12px -8px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 20;
}
.dash-top .brand { text-decoration: none; }
.dash-user { display: flex; gap: 14px; align-items: center; font-size: 0.9rem; color: var(--muted); }

.dash-main { padding: 32px 4vw 80px; max-width: 1300px; margin: 0 auto; }
.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.dash-head h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin: 0; }
.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat {
  background: var(--card);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.6s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1)) both;
}
.stat strong {
  display: block;
  font-family: Fraunces, serif;
  font-size: 2rem;
  color: var(--red);
  line-height: 1.1;
}
.stat span { font-size: 0.85rem; color: var(--muted); }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar input { flex: 1 1 260px; }
.toolbar input,
.toolbar select,
.drawer input,
.drawer textarea {
  font: inherit;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--ink);
}

.table-wrap { padding: 0; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 1000px; }
th, td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--tint);
}
tbody tr { cursor: pointer; transition: background 0.2s; }
tbody tr:hover { background: var(--tint); }
tbody tr { animation: fadeUp 0.5s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1)) both; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.badge.pending { background: var(--gold-light); color: #8a6a2c; }
.badge.verified { background: #e3f4e8; color: #1d6b3a; }
.badge.rejected { background: #fbe3e1; color: #9b1c2e; }
.empty { text-align: center; padding: 40px; color: var(--muted); }

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 8, 0.5);
  z-index: 40;
  animation: fadeIn 0.3s ease;
}
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(580px, 100vw);
  background: var(--paper);
  z-index: 41;
  box-shadow: -20px 0 60px -20px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  animation: slideIn 0.45s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1));
}
@keyframes slideIn { from { transform: translateX(100%); } }
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 2;
}
.drawer-head h2 { margin: 0; font-size: 1.6rem; }
.drawer-body { padding: 24px 28px 48px; display: grid; gap: 24px; }
.icon-btn { background: none; border: 0; font-size: 2rem; line-height: 1; cursor: pointer; color: var(--muted); }

.detail-list { display: grid; gap: 10px; }
.detail-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 8px;
}
.member-row {
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 6px 18px -14px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 4px;
  animation: fadeUp 0.45s var(--ease, cubic-bezier(0.2, 0.7, 0.2, 1)) both;
}
.member-row small { color: var(--muted); }
.role {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--gold-light);
  color: var(--red-dark);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

.video-box {
  background: #16101a;
  border-radius: 18px;
  overflow: hidden;
  min-height: 220px;
  display: grid;
  place-items: center;
}
.video-box video { width: 100%; display: block; max-height: 360px; }
.placeholder { color: #f1e3c2; padding: 32px; text-align: center; font-size: 0.92rem; }
.placeholder.error { color: #ffb4ab; }

.grade {
  background: var(--card);
  border-radius: 18px;
  padding: 22px;
  display: grid;
  gap: 16px;
  box-shadow: var(--shadow);
}
.grade h3 { margin: 0; }
.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.total-pill {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  background: var(--gold-light);
  border-radius: 999px;
  padding: 10px;
}
.total-pill strong { font-family: Fraunces, serif; font-size: 1.8rem; color: var(--red); }
.grade-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.grade-actions .btn { flex: 1 1 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .quotes-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-note { text-align: left; }
}
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 120px; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .chip { justify-content: center; }
  .hero-visual { height: 320px; }
  .grid-2 { grid-template-columns: 1fr; }
  .nav nav a:not(.btn) { display: none; }
  .score-grid { grid-template-columns: 1fr; }
  .dash-user span { display: none; }
  .helpline { flex-direction: column; text-align: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal, .word { opacity: 1; transform: none; }
  .quote { opacity: 1; }
  .quote:not(.active) { display: none; }
  .marquee-track { animation: none; }
}

.members-list { display: grid; gap: 12px; margin-top: 12px; }
.drawer-body h3 { margin-bottom: 0; }
small { font-size: 0.85rem; }

/* ---------- Partner logos (footer) ---------- */
.footer-logos {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-logos img {
  height: 72px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  border-radius: 12px;
}
.footer-logos img[alt^="Malla"],
.footer-logos img[alt^="National"] { background: #fff; padding: 6px; }
