/* ============================================================
   The Tudor Project — Stylesheet
   Palette: wine, gold, parchment
   ============================================================ */

:root {
  --wine: #5a1020;
  --wine-deep: #2e0710;
  --wine-mid: #7a1c2e;
  --wine-soft: #8f3346;
  --gold: #c49a2c;
  --gold-soft: #e3c777;
  --gold-pale: #f0dfae;
  --parchment: #f6eddc;
  --parchment-deep: #ecdcbf;
  --paper: #fffaf0;
  --ink: #251a15;
  --ink-soft: #675448;
  --line: #e4d6bf;
  --green: #2f4f3e;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 4px 16px rgba(46, 7, 16, 0.06);
  --shadow-md: 0 18px 50px rgba(46, 7, 16, 0.12);
  --shadow-lg: 0 30px 70px rgba(46, 7, 16, 0.2);

  --container: 1180px;
  --header-h: 78px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--parchment);
  background-image:
    radial-gradient(ellipse at 12% 8%, rgba(196, 154, 44, 0.08), transparent 45%),
    radial-gradient(ellipse at 88% 92%, rgba(90, 16, 32, 0.06), transparent 50%);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--wine-deep);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Progress bar ---------- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--wine-mid));
  z-index: 200;
  transition: width 0.1s linear;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(246, 237, 220, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.site-header.scrolled {
  background: rgba(246, 237, 220, 0.96);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 30px rgba(46, 7, 16, 0.07);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--wine-deep);
  flex: none;
}

.brand-mark {
  color: var(--wine);
  display: grid;
  place-items: center;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--wine-deep);
}

.brand-text span {
  color: var(--wine-mid);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  position: relative;
  display: inline-block;
  padding: 9px 11px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 8px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 4px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-list a:hover,
.nav-list a.is-active {
  color: var(--wine);
}

.nav-list a:hover::after,
.nav-list a.is-active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 12px 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  background: var(--wine-deep);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
  will-change: transform;
}

.btn-primary {
  background: var(--wine);
  color: #fff;
  box-shadow: 0 12px 28px rgba(90, 16, 32, 0.28);
}

.btn-primary:hover {
  background: var(--wine-deep);
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(46, 7, 16, 0.34);
}

.btn-ghost {
  background: transparent;
  color: var(--wine-deep);
  border-color: rgba(46, 7, 16, 0.22);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 40px) 0 70px;
  overflow: hidden;
  background: linear-gradient(160deg, #fdf8ee 0%, #f3e7d2 52%, #ecdcc0 100%);
}

.hero-rose {
  position: absolute;
  top: 50%;
  right: -10%;
  width: min(58vw, 760px);
  height: min(58vw, 760px);
  transform: translateY(-50%);
  color: var(--wine);
  opacity: 0.08;
  z-index: 0;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 78% 26%, rgba(196, 154, 44, 0.2), transparent 55%),
    radial-gradient(ellipse at 12% 88%, rgba(90, 16, 32, 0.1), transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--wine-mid);
  margin: 0 0 18px;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5.8rem);
  font-weight: 600;
  line-height: 0.98;
  margin: 0 0 26px;
  color: var(--wine-deep);
}

.hero-title em {
  font-style: italic;
  font-weight: 500;
  color: var(--wine-mid);
}

.hero-sub {
  max-width: 560px;
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  color: var(--ink-soft);
  line-height: 1.75;
  margin: 0 0 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 54px;
}

.hero-stats {
  display: flex;
  gap: 44px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 600;
  color: var(--wine-deep);
  line-height: 1;
}

.stat-label {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(46, 7, 16, 0.28);
  border-radius: 16px;
  display: grid;
  place-items: start center;
  padding-top: 7px;
}

.scroll-cue span {
  width: 4px;
  height: 8px;
  border-radius: 3px;
  background: var(--gold);
  animation: scrollDot 1.8s infinite var(--ease);
}

@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* ---------- Sections ---------- */
.section {
  padding: 110px 0;
  position: relative;
}

.section-head {
  max-width: 740px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0 0 18px;
}

.section-desc {
  font-size: 1.06rem;
  color: var(--ink-soft);
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ---------- Intro ---------- */
.intro {
  background: var(--parchment);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 64px;
  align-items: start;
}

.intro-text .lead {
  font-size: 1.25rem;
  color: var(--wine-deep);
  line-height: 1.6;
  margin-bottom: 22px;
}

.intro-text p {
  color: var(--ink-soft);
}

.intro-cards {
  display: grid;
  gap: 18px;
}

.mini-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  padding: 22px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.mini-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(196, 154, 44, 0.55);
}

.mini-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(196, 154, 44, 0.2), rgba(90, 16, 32, 0.08));
  color: var(--wine);
}

.mini-card h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin: 4px 0 2px;
  color: var(--wine-deep);
}

.mini-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ---------- Monarchs ---------- */
.monarchs {
  background: linear-gradient(180deg, #f8efdf 0%, var(--parchment) 100%);
}

.monarch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.monarch-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.monarch-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(196, 154, 44, 0.55);
}

.monarch-card--disputed {
  border-color: rgba(196, 154, 44, 0.6);
}

.monarch-portrait {
  position: relative;
  height: 178px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(227, 199, 119, 0.22), transparent 55%),
    linear-gradient(160deg, var(--wine-mid), var(--wine-deep));
  overflow: hidden;
}

.monarch-portrait::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(227, 199, 119, 0.32);
  border-radius: 50% 50% 0 0;
}

.monarch-portrait::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -46px;
  width: 240px;
  height: 120px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(227, 199, 119, 0.18), transparent 70%);
}

.monarch-reign {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 2;
  padding: 5px 11px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--wine-deep);
  background: var(--gold-pale);
  border-radius: 999px;
}

.monarch-flag {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  padding: 5px 10px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wine-deep);
  background: transparent;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
}

.monarch-medallion {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: radial-gradient(circle at 35% 30%, var(--wine-soft), var(--wine-deep));
  box-shadow: 0 0 0 6px rgba(196, 154, 44, 0.14);
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--gold-soft);
}

.monarch-body {
  padding: 26px 28px 28px;
}

.monarch-body h3 {
  font-size: 1.65rem;
  margin: 0 0 4px;
}

.monarch-epithet {
  margin: 0 0 16px;
  font-size: 0.86rem;
  font-style: italic;
  color: var(--wine-mid);
}

.monarch-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.monarch-facts li {
  position: relative;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.monarch-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- Timeline ---------- */
.timeline-section {
  background: var(--parchment);
}

.era-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 44px;
}

.era-filter {
  padding: 9px 16px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.era-filter:hover {
  color: var(--wine);
  border-color: rgba(196, 154, 44, 0.6);
}

.era-filter.is-active {
  color: #fff;
  background: var(--wine);
  border-color: var(--wine);
  box-shadow: 0 8px 20px rgba(90, 16, 32, 0.22);
}

.timeline {
  position: relative;
  max-width: 940px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 92px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(196, 154, 44, 0.65) 8%, rgba(196, 154, 44, 0.65) 92%, transparent);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 34px;
  padding-bottom: 26px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-year {
  padding-top: 20px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--wine);
  text-align: right;
  line-height: 1;
}

.timeline-dot {
  position: absolute;
  left: 84px;
  top: 26px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--parchment);
  box-shadow: 0 0 0 2px var(--gold);
  z-index: 1;
}

.timeline-content {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.timeline-content:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(196, 154, 44, 0.5);
}

.timeline-content h3 {
  font-size: 1.35rem;
  margin: 0 0 6px;
}

.timeline-content p {
  margin: 0 0 12px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.timeline-tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wine-mid);
  background: rgba(196, 154, 44, 0.14);
  border-radius: 999px;
}

/* ---------- Reformation ---------- */
.reformation {
  background:
    radial-gradient(ellipse at 85% 12%, rgba(196, 154, 44, 0.12), transparent 45%),
    linear-gradient(160deg, var(--wine-deep), #3d0a15 55%, var(--wine-deep));
  color: #f5e9d2;
}

.reformation .eyebrow {
  color: var(--gold-soft);
}

.reformation .section-head h2 {
  color: #fff8e8;
}

.reformation .section-desc {
  color: rgba(245, 233, 210, 0.72);
}

.ref-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(227, 199, 119, 0.22);
  border-radius: 14px;
  margin-bottom: 30px;
}

.ref-tab {
  padding: 11px 18px;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  color: rgba(245, 233, 210, 0.72);
  background: transparent;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.ref-tab:hover {
  color: #fff8e8;
  background: rgba(227, 199, 119, 0.1);
}

.ref-tab.is-active {
  color: var(--wine-deep);
  background: var(--gold-soft);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.ref-panel {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(227, 199, 119, 0.22);
  border-radius: var(--radius);
  padding: 44px 48px;
  box-shadow: var(--shadow-lg);
}

.ref-panel.is-active {
  display: block;
  animation: fadeUp 0.5s var(--ease);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.ref-tag {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 8px;
}

.ref-panel h3 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: #fff8e8;
  margin: 0 0 16px;
}

.ref-panel p {
  color: rgba(245, 233, 210, 0.78);
  max-width: 78ch;
}

.check-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  color: rgba(245, 233, 210, 0.8);
  font-size: 0.95rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: inset 0 0 0 3px var(--wine-deep), 0 0 0 1px var(--gold-soft);
}

/* ---------- Culture ---------- */
.culture {
  background: var(--parchment);
}

.culture-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.culture-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.culture-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(196, 154, 44, 0.55);
}

.culture-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(196, 154, 44, 0.18), rgba(90, 16, 32, 0.08));
  color: var(--wine);
  margin-bottom: 20px;
}

.culture-card h3 {
  font-size: 1.32rem;
  margin: 0 0 10px;
}

.culture-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.myth-strip {
  margin-top: 54px;
  padding-top: 44px;
  border-top: 1px solid var(--line);
}

.myth-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.myth-card {
  padding: 24px 26px;
  background: rgba(196, 154, 44, 0.08);
  border: 1px solid rgba(196, 154, 44, 0.3);
  border-radius: var(--radius-sm);
}

.myth-card h3 {
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--wine);
}

.myth-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ---------- Gallery ---------- */
.gallery {
  background:
    radial-gradient(ellipse at 15% 10%, rgba(196, 154, 44, 0.14), transparent 45%),
    linear-gradient(160deg, #24060d, var(--wine-deep) 60%, #1c0409);
  color: #f5e9d2;
}

.gallery .eyebrow {
  color: var(--gold-soft);
}

.gallery .section-head h2 {
  color: #fff8e8;
}

.gallery .section-desc {
  color: rgba(245, 233, 210, 0.72);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-card {
  margin: 0;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(227, 199, 119, 0.24);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}

.gallery-card:hover {
  transform: translateY(-5px);
  border-color: rgba(227, 199, 119, 0.55);
  background: rgba(255, 255, 255, 0.07);
}

.gallery-art {
  height: 210px;
  display: grid;
  place-items: center;
  padding: 22px;
  color: var(--gold-soft);
  background:
    radial-gradient(circle at 50% 40%, rgba(227, 199, 119, 0.16), transparent 60%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.1));
  border-bottom: 1px solid rgba(227, 199, 119, 0.18);
}

.gallery-art svg {
  width: 100%;
  max-width: 210px;
  height: auto;
}

.gallery-card figcaption {
  padding: 24px 26px 26px;
}

.gallery-card h3 {
  font-size: 1.35rem;
  color: #fff8e8;
  margin: 0 0 8px;
}

.gallery-card p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(245, 233, 210, 0.72);
}

/* ---------- Quiz ---------- */
.quiz {
  background:
    radial-gradient(ellipse at 80% 0%, rgba(196, 154, 44, 0.14), transparent 45%),
    linear-gradient(160deg, var(--wine-deep), #3d0a15);
}

.quiz .eyebrow {
  color: var(--gold-soft);
}

.quiz .section-head h2 {
  color: #fff8e8;
}

.quiz .section-desc {
  color: rgba(245, 233, 210, 0.72);
}

.quiz-container {
  max-width: 840px;
}

.quiz-card {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(227, 199, 119, 0.24);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(6px);
}

.quiz-progress {
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
}

.quiz-progress-bar {
  height: 100%;
  width: 16.6%;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  border-radius: 0 3px 3px 0;
  transition: width 0.4s var(--ease);
}

.quiz-body {
  padding: 40px 44px 34px;
}

.quiz-count {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 233, 210, 0.6);
  margin: 0 0 14px;
}

.quiz-question {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  color: #fff8e8;
  margin: 0 0 28px;
  line-height: 1.3;
}

.quiz-options {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 0.97rem;
  text-align: left;
  color: #f5e9d2;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(227, 199, 119, 0.22);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.2s var(--ease);
}

.quiz-option:hover:not(:disabled) {
  background: rgba(196, 154, 44, 0.14);
  border-color: rgba(227, 199, 119, 0.65);
  transform: translateX(4px);
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-option .opt-badge {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
  font-size: 0.82rem;
  color: #fff8e8;
}

.quiz-option.correct {
  background: rgba(46, 160, 110, 0.22);
  border-color: #2ea06e;
}

.quiz-option.correct .opt-badge {
  background: #2ea06e;
}

.quiz-option.wrong {
  background: rgba(214, 84, 84, 0.2);
  border-color: #d65454;
}

.quiz-option.wrong .opt-badge {
  background: #d65454;
}

.quiz-feedback {
  min-height: 24px;
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 14px;
}

.quiz-feedback.good { color: #8fe0b8; }
.quiz-feedback.bad { color: #f0a3a3; }

.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(227, 199, 119, 0.18);
  padding-top: 24px;
}

.quiz-score {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(245, 233, 210, 0.72);
}

.quiz-result {
  padding: 48px 44px;
  text-align: center;
  animation: fadeUp 0.5s var(--ease);
}

.result-ring {
  width: 150px;
  height: 150px;
  margin: 0 auto 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--gold) 0deg, rgba(255, 255, 255, 0.1) 0deg);
  position: relative;
  transition: background 0.5s var(--ease);
}

.result-ring::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: #320813;
}

.result-ring span {
  position: relative;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  color: #fff8e8;
}

.quiz-result h3 {
  color: #fff8e8;
  font-size: 1.7rem;
  margin: 0 0 10px;
}

.quiz-result p {
  color: rgba(245, 233, 210, 0.72);
  max-width: 440px;
  margin: 0 auto 26px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #1b050b;
  color: rgba(245, 233, 210, 0.7);
  padding: 60px 0 30px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .brand-text {
  color: #fff8e8;
}

.footer-brand .brand-text span {
  color: var(--gold-soft);
}

.footer-brand p {
  margin: 14px 0 0;
  max-width: 340px;
  font-size: 0.9rem;
  color: rgba(245, 233, 210, 0.55);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  align-items: flex-start;
}

.footer-nav a {
  font-size: 0.9rem;
  color: rgba(245, 233, 210, 0.7);
  transition: color 0.25s var(--ease);
}

.footer-nav a:hover {
  color: var(--gold-soft);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 26px;
  font-size: 0.82rem;
  color: rgba(245, 233, 210, 0.45);
}

.footer-bottom p {
  margin: 0;
}

/* ---------- Chat launch ---------- */
.chat-launch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff8e8;
  white-space: nowrap;
  background: var(--wine);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(90, 16, 32, 0.24);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.chat-launch:hover {
  background: var(--wine-deep);
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(46, 7, 16, 0.32);
}

.chat-launch svg {
  flex: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-list a {
    padding: 9px 8px;
    font-size: 0.82rem;
  }
}

@media (max-width: 960px) {
  .intro-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .monarch-grid,
  .culture-grid,
  .gallery-grid,
  .myth-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 84px 0;
  }
}

@media (max-width: 860px) {
  .nav-list {
    position: absolute;
    top: calc(var(--header-h) + 8px);
    right: 20px;
    left: 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px;
    background: rgba(246, 237, 220, 0.98);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    transform: translateY(-12px) scale(0.98);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  }

  .nav-list.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav-list a {
    padding: 13px 16px;
    font-size: 0.98rem;
  }

  .nav-list a::after {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .chat-launch {
    margin-left: auto;
  }
}

@media (max-width: 700px) {
  :root {
    --header-h: 66px;
  }

  .hero-stats {
    gap: 26px;
  }

  .timeline::before {
    left: 8px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-left: 34px;
  }

  .timeline-year {
    text-align: left;
    padding-top: 0;
  }

  .timeline-dot {
    left: 0;
    top: 6px;
  }

  .ref-panel {
    padding: 30px 26px;
  }

  .quiz-body {
    padding: 30px 24px 26px;
  }

  .quiz-result {
    padding: 40px 24px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 20px;
  }

  .monarch-grid,
  .culture-grid,
  .gallery-grid,
  .myth-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1;
  }

  .hero-stats {
    gap: 22px;
  }

  .stat-num {
    font-size: 1.6rem;
  }

  .chat-launch {
    padding: 10px;
    border-radius: 12px;
  }

  .chat-launch span {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
  }

  .quiz-footer {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 14px;
  }

  .quiz-footer .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
