/* Chippercrewparad — soft modern frosted-glass theme
   Palette: plum, ivory, soft gray, muted mauve, warm beige */
:root {
  --plum: #4a2545;
  --plum-deep: #3b1d38;
  --plum-soft: #6b3f63;
  --mauve: #9c7a91;
  --mauve-soft: #c9b3c1;
  --ivory: #faf6ef;
  --beige: #e8dccb;
  --beige-deep: #d8c7b0;
  --gray: #d9d4d0;
  --text-muted: #5e4a5a;
  --line: rgba(74, 37, 69, 0.14);
  --glass: rgba(250, 246, 239, 0.66);
  --glass-strong: rgba(250, 246, 239, 0.88);
  --shadow: 0 24px 60px -32px rgba(59, 29, 56, 0.45);
  --shadow-soft: 0 12px 32px -20px rgba(59, 29, 56, 0.35);
  --radius: 28px;
  --header-h: 60px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--plum-deep);
  background-color: var(--ivory);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, rgba(201, 179, 193, 0.55), transparent 42%),
    radial-gradient(circle at 88% 30%, rgba(232, 220, 203, 0.9), transparent 45%),
    radial-gradient(circle at 50% 95%, rgba(217, 212, 208, 0.8), transparent 50%),
    var(--ivory);
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--plum-deep);
  overflow-wrap: anywhere;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2.1rem, 5.4vw, 4.4rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.75rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { margin: 0 0 16px; }
a { color: var(--plum); text-decoration-color: rgba(74, 37, 69, 0.4); text-underline-offset: 3px; }
a:hover { color: var(--plum-soft); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; border-radius: 6px; }
ul, ol { padding-left: 24px; margin: 0 0 16px; }
li { margin-bottom: 8px; }

.container { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.skip-link {
  position: absolute; left: 16px; top: 8px; z-index: 200;
  padding: 8px 16px; border-radius: 999px;
  background: var(--plum); color: var(--ivory);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); color: var(--ivory); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.panel-stack { display: flex; flex-direction: column; gap: 24px; }
.panel-stack > * { margin: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px;
  font: inherit; font-size: 0.9rem; font-weight: 600; letter-spacing: 0.02em;
  text-decoration: none; cursor: pointer;
  border: 1px solid var(--plum);
  background: var(--plum); color: var(--ivory);
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
  max-width: 100%; text-align: center;
}
.btn:hover { background: var(--plum-soft); color: var(--ivory); transform: translateY(-1px); }
.btn--primary { background: var(--plum); color: var(--ivory); }
.btn--ghost { background: transparent; color: var(--plum); }
.btn--ghost:hover { background: rgba(74, 37, 69, 0.08); color: var(--plum-deep); }
.btn--light { background: var(--ivory); color: var(--plum-deep); border-color: var(--ivory); }
.btn--light:hover { background: var(--beige); color: var(--plum-deep); }
.btn--outline-light { background: transparent; color: var(--ivory); border-color: rgba(250, 246, 239, 0.7); }
.btn--outline-light:hover { background: rgba(250, 246, 239, 0.16); color: var(--ivory); }
.btn--small { padding: 8px 16px; font-size: 0.85rem; }
.btn:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }
.btn--light:focus-visible, .btn--outline-light:focus-visible { outline-color: var(--ivory); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(250, 246, 239, 0.9);
  color: var(--plum-deep);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  min-width: 0;
  color: var(--plum-deep); text-decoration: none;
  font-family: var(--serif); font-size: 1.2rem; letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}
.brand:hover { color: var(--plum); }
.brand__mark { width: 28px; height: 28px; flex: none; }
.brand__name { min-width: 0; overflow-wrap: anywhere; line-height: 1.1; }
.site-nav__list { display: flex; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; }
.site-nav__list li { margin: 0; min-width: 0; }
.site-nav a {
  display: inline-block; padding: 8px 0;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--plum-deep); text-decoration: none;
  border-bottom: 1px solid transparent;
  overflow-wrap: anywhere;
}
.site-nav a:hover { color: var(--plum); border-bottom-color: var(--mauve); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--plum); color: var(--plum); }
.site-nav__mobile-cta { display: none; }
.header-cta {
  flex: none;
  padding: 8px 16px; border-radius: 999px;
  background: var(--plum); color: var(--ivory);
  font-size: 0.8rem; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color 0.3s ease;
}
.header-cta:hover { background: var(--plum-soft); color: var(--ivory); }
.nav-toggle { display: none; }

@media (max-width: 1100px) {
  .site-nav__list { gap: 16px; }
  .site-nav a { font-size: 0.72rem; letter-spacing: 0.08em; }
}

@media (max-width: 960px) {
  .header-cta { display: none; }
  .nav-toggle {
    position: relative; z-index: 2;
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    width: 44px; height: 44px; flex: none;
    border: 1px solid var(--line); border-radius: 999px;
    background: var(--glass-strong); color: var(--plum-deep);
    cursor: pointer;
  }
  .nav-toggle__bar {
    display: block; width: 18px; height: 1.5px; border-radius: 2px;
    background: var(--plum-deep);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  /* Dropdown menu below the header */
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    z-index: 1;
    display: none;
    padding: 8px 24px 24px;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    background: var(--ivory);
    color: var(--plum-deep);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(59, 29, 56, 0.45);
  }
  .site-nav.is-open { display: block; animation: nav-drop 0.3s ease both; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; max-width: 520px; margin-inline: auto; }
  .site-nav a {
    display: block; padding: 14px 0;
    font-family: var(--serif); font-size: 1.25rem; font-weight: 500; letter-spacing: 0; text-transform: none;
    border-bottom: 1px solid var(--line);
  }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--plum); font-weight: 600; }
  .site-nav__mobile-cta { display: block; margin-top: 16px !important; }
  .site-nav__mobile-cta a {
    text-align: center;
    padding: 12px 24px;
    border: 0; border-radius: 999px;
    background: var(--plum); color: var(--ivory);
    font-family: var(--sans); font-size: 0.95rem; font-weight: 600;
  }
  .site-nav__mobile-cta a:hover { background: var(--plum-soft); color: var(--ivory); }
}

@keyframes nav-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
  :root { --header-h: 56px; }
  .site-header__inner { gap: 16px; }
  .brand { font-size: 1.05rem; }
  .brand__mark { width: 24px; height: 24px; }
  .nav-toggle { width: 40px; height: 40px; }
  .site-nav { padding: 8px 16px 20px; }
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(580px, 92vh, 920px);
  display: flex; align-items: flex-end;
  color: var(--ivory);
  background-color: var(--plum-deep);
}
.hero__media { position: absolute; inset: 0; z-index: -3; }
.hero__image {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.14) translate3d(0, var(--parallax, 0px), 0);
  will-change: transform;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg, rgba(59, 29, 56, 0.25) 0%, rgba(59, 29, 56, 0.55) 60%, rgba(59, 29, 56, 0.8) 100%),
    radial-gradient(circle at 80% 20%, rgba(156, 122, 145, 0.35), transparent 50%);
}
.hero__particles { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__particles span {
  position: absolute; bottom: 0;
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(250, 246, 239, 0.75);
  opacity: 0;
  animation: particle-drift 18s linear infinite;
}
.hero__particles span:nth-child(1) { left: 6%; animation-delay: 0s; }
.hero__particles span:nth-child(2) { left: 14%; animation-delay: 3s; width: 4px; height: 4px; }
.hero__particles span:nth-child(3) { left: 23%; animation-delay: 7s; }
.hero__particles span:nth-child(4) { left: 31%; animation-delay: 1.5s; width: 3px; height: 3px; }
.hero__particles span:nth-child(5) { left: 42%; animation-delay: 10s; }
.hero__particles span:nth-child(6) { left: 51%; animation-delay: 5s; width: 5px; height: 5px; }
.hero__particles span:nth-child(7) { left: 60%; animation-delay: 12s; width: 4px; height: 4px; }
.hero__particles span:nth-child(8) { left: 68%; animation-delay: 2s; }
.hero__particles span:nth-child(9) { left: 76%; animation-delay: 8s; width: 3px; height: 3px; }
.hero__particles span:nth-child(10) { left: 84%; animation-delay: 14s; }
.hero__particles span:nth-child(11) { left: 91%; animation-delay: 4s; width: 5px; height: 5px; }
.hero__particles span:nth-child(12) { left: 97%; animation-delay: 9s; width: 3px; height: 3px; }
@keyframes particle-drift {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.5; }
  100% { transform: translate3d(24px, -85vh, 0); opacity: 0; }
}
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 40px;
  align-items: end;
  padding: 120px 0 64px;
}
.hero__inner > * { min-width: 0; }
.hero__title-panel {
  padding: 40px;
  border-radius: 32px;
  background: rgba(59, 29, 56, 0.52);
  color: var(--ivory);
  border: 1px solid rgba(250, 246, 239, 0.24);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: var(--shadow);
}
.hero__title-panel h1 { color: var(--ivory); }
.hero__eyebrow {
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600;
  color: var(--beige);
}
.hero__lead { font-size: 1.12rem; color: var(--ivory); max-width: 620px; }
.hero__floats { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.float-panel {
  display: flex; flex-direction: column; gap: 12px;
  width: 100%; max-width: 280px;
  padding: 24px;
  border-radius: 24px;
  background: var(--glass-strong);
  color: var(--plum-deep);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
  animation: float-y 8s ease-in-out infinite;
}
.float-panel--offset { margin-right: 40px; animation-delay: -3s; }
.float-panel__value { font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--plum); }
.float-panel__label { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.anim-up { animation: fade-up 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.anim-delay-1 { animation-delay: 0.15s; }
.anim-delay-2 { animation-delay: 0.35s; }
.anim-delay-3 { animation-delay: 0.55s; }
.anim-delay-4 { animation-delay: 0.75s; }
@keyframes fade-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

/* Reveal */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.9s ease, transform 0.9s ease; }
.js [data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* Sections */
.section { padding-block: 64px; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head p:last-child { color: var(--text-muted); margin-bottom: 0; }

/* Explore */
.explore { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-start; }
.explore__statement { flex: 1 1 380px; min-width: 0; }
.explore__statement h2 { font-size: clamp(1.9rem, 3.8vw, 3.1rem); }
.explore__body { flex: 1 1 340px; min-width: 0; color: var(--text-muted); padding-top: 32px; }
.explore__notes { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; min-width: 0; }
.explore__notes > * { flex: 1 1 240px; min-width: 0; }

.glass-note {
  padding: 24px;
  border-radius: 24px;
  background: var(--glass);
  color: var(--plum-deep);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
}
.glass-note--shift { margin-top: 40px; }
.glass-note h3 { font-size: 1.3rem; }
.glass-note ul { margin: 0; }

/* Country explorer (vertical navigation) */
.country-explorer {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.country-explorer > * { min-width: 0; }
.country-rail {
  position: sticky; top: calc(var(--header-h) + 24px);
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px;
  border-radius: 24px;
  background: var(--glass);
  color: var(--plum-deep);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
}
.country-rail__btn {
  display: flex; align-items: baseline; gap: 16px;
  width: 100%; min-width: 0;
  padding: 12px 16px;
  border: 0; border-radius: 16px;
  background: transparent; color: var(--plum-deep);
  font: inherit; font-size: 1rem; text-align: left;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.country-rail__btn:hover { background: rgba(74, 37, 69, 0.08); color: var(--plum-deep); }
.country-rail__btn[aria-selected="true"] { background: var(--plum); color: var(--ivory); }
.country-rail__num { font-size: 0.72rem; letter-spacing: 0.12em; font-weight: 600; }
.country-rail__name { font-family: var(--serif); font-size: 1.15rem; overflow-wrap: anywhere; min-width: 0; }
.country-panels { display: flex; flex-direction: column; gap: 40px; }
.country-panel { min-height: 520px; }

/* Glass overlay card (the single card style) */
.glass-card {
  position: relative;
  isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 480px;
  padding: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--plum-deep);
  color: var(--plum-deep);
  text-decoration: none;
  box-shadow: var(--shadow);
  min-width: 0;
}
.glass-card__media {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.glass-card:hover .glass-card__media { transform: scale(1.05); }
.glass-card__index {
  position: absolute; top: 24px; right: 24px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--glass-strong); color: var(--plum-deep);
  font-family: var(--serif); font-size: 1.1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.glass-card__panel {
  position: relative;
  display: flex; flex-direction: column; gap: 24px;
  max-width: 580px;
  padding: 24px;
  border-radius: 22px;
  background: rgba(250, 246, 239, 0.86);
  color: var(--plum-deep);
  border: 1px solid rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--shadow-soft);
  min-width: 0;
}
.glass-card__panel > * { margin: 0; }
.glass-card__panel p { color: var(--text-muted); }
.glass-card__panel .eyebrow { color: var(--text-muted); }
.glass-card--compact { min-height: 380px; }
.glass-card--compact .glass-card__panel { padding: 24px; }
.glass-card--compact h3 { font-size: 1.35rem; }
a.glass-card:focus-visible { outline: 3px solid var(--plum); outline-offset: 4px; }
.card-link { font-weight: 600; color: var(--plum); text-decoration: none; }
a.card-link:hover { color: var(--plum-soft); text-decoration: underline; }
a.glass-card:hover .card-link { text-decoration: underline; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tag {
  margin: 0;
  padding: 4px 12px; border-radius: 999px;
  background: rgba(74, 37, 69, 0.08); color: var(--plum-deep);
  border: 1px solid var(--line);
  font-size: 0.8rem; font-weight: 500;
}

/* Editorial stack (non-grid staggered layout) */
.editorial-stack { display: flex; flex-direction: column; gap: 64px; }
.editorial-stack > .glass-card { width: min(100%, 880px); }
.editorial-stack > .glass-card:nth-child(odd) { align-self: flex-start; }
.editorial-stack > .glass-card:nth-child(even) { align-self: flex-end; }
.editorial-stack > .glass-card:nth-child(even) .glass-card__panel { align-self: flex-end; }
.editorial-stack > .glass-card:nth-child(even) .glass-card__index { right: auto; left: 24px; }

.card-pair { display: flex; flex-wrap: wrap; gap: 24px; margin: 40px 0 0; }
.card-pair > * { flex: 1 1 260px; min-width: 0; }

/* Page hero */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 440px;
  display: flex; align-items: flex-end;
  padding: 64px 0;
  background-color: var(--plum-deep);
  color: var(--plum-deep);
}
.page-hero > .container { width: min(1200px, calc(100% - 48px)); }
.page-hero__media { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(59, 29, 56, 0.1), rgba(59, 29, 56, 0.55));
}
.page-hero--soft {
  min-height: 340px;
  background: linear-gradient(135deg, var(--beige) 0%, var(--mauve-soft) 55%, var(--mauve) 100%);
  color: var(--plum-deep);
}
.page-hero--soft::after { background: radial-gradient(circle at 80% 20%, rgba(250, 246, 239, 0.5), transparent 55%); }
.page-hero__panel {
  max-width: 760px;
  padding: 40px;
  border-radius: var(--radius);
  background: rgba(250, 246, 239, 0.88);
  color: var(--plum-deep);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  animation: fade-up 1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.page-hero__panel p { color: var(--text-muted); }
.breadcrumb { font-size: 0.85rem; letter-spacing: 0.04em; }
.breadcrumb a { color: var(--plum); }

/* Chapter layout with vertical rail */
.chapter-layout {
  display: grid;
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  padding-block: 64px;
}
.chapter-layout > * { min-width: 0; }
.chapter-rail {
  position: sticky; top: calc(var(--header-h) + 24px);
  padding: 24px;
  border-radius: 24px;
  background: var(--glass);
  color: var(--plum-deep);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
}
.chapter-rail__title { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; color: var(--text-muted); margin-bottom: 16px; }
.chapter-rail ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--line); }
.chapter-rail li { margin: 0; min-width: 0; }
.chapter-rail a {
  display: block; padding: 8px 16px;
  color: var(--plum-deep); text-decoration: none; font-size: 0.92rem;
  border-left: 2px solid transparent;
  overflow-wrap: anywhere;
  transition: border-color 0.3s ease, color 0.3s ease;
}
.chapter-rail a:hover { color: var(--plum); border-left-color: var(--mauve); }
.chapter-rail a.is-active { color: var(--plum); border-left-color: var(--plum); font-weight: 600; }

.prose { max-width: 760px; }
.prose p, .prose li { color: var(--plum-deep); }
.prose h3 { margin-top: 40px; }
.prose .glass-note h3, .prose .glass-card h3 { margin-top: 0; }
.chapter { margin-bottom: 64px; scroll-margin-top: calc(var(--header-h) + 24px); }
.chapter:last-child { margin-bottom: 0; }
.chapter > .eyebrow { margin-bottom: 8px; }
.chapter > .glass-note { margin: 24px 0; }

.pros-cons { display: flex; flex-wrap: wrap; gap: 24px; margin: 24px 0; }
.pros-cons > * { flex: 1 1 220px; min-width: 0; }
.itinerary-list { display: flex; flex-direction: column; gap: 24px; margin-top: 24px; }
.itinerary-list > .glass-note:nth-child(even) { margin-left: 40px; }

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--glass-strong);
  color: var(--plum-deep);
  box-shadow: var(--shadow-soft);
}
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
caption { text-align: left; padding: 16px 16px 8px; font-family: var(--serif); font-size: 1.1rem; color: var(--plum-deep); }
th, td { padding: 12px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
th { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.faq-item {
  border-radius: 20px;
  background: var(--glass);
  color: var(--plum-deep);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 24px;
  font-family: var(--serif); font-size: 1.15rem;
  cursor: pointer; list-style: none;
  border-radius: 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: none; font-family: var(--sans); font-size: 1.4rem; color: var(--plum); transition: transform 0.3s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; }
.faq-item p { padding: 0 24px 24px; margin: 0; }

/* Contact */
.contact-layout { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.contact-form { flex: 1.3 1 360px; min-width: 0; padding: 40px; border-radius: var(--radius); background: var(--glass); color: var(--plum-deep); border: 1px solid rgba(255, 255, 255, 0.7); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--shadow); }
.contact-aside { flex: 1 1 300px; min-width: 0; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { font-weight: 600; font-size: 0.92rem; }
.form-field input[type="text"], .form-field input[type="email"], .form-field select, .form-field textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid #b3a4ae;
  background: rgba(255, 255, 255, 0.78);
  color: var(--plum-deep);
  font: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-field textarea { resize: vertical; min-height: 140px; }
.form-field input:focus-visible, .form-field select:focus-visible, .form-field textarea:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; border-color: var(--plum); }
.form-field.is-invalid input, .form-field.is-invalid select, .form-field.is-invalid textarea { border-color: #8a1f33; box-shadow: 0 0 0 3px rgba(138, 31, 51, 0.12); }
.form-error { margin: 0; color: #8a1f33; font-size: 0.85rem; font-weight: 600; }
.form-success { padding: 16px 24px; border-radius: 16px; background: var(--beige); color: var(--plum-deep); font-weight: 600; }
.check-row { display: flex; align-items: flex-start; gap: 12px; font-weight: 400; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin-top: 4px; flex: none; accent-color: var(--plum); }
.check-row input:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; }
.form-field--check label { font-weight: 400; }

.map-block {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 320px;
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(0deg, rgba(74, 37, 69, 0.04) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(74, 37, 69, 0.04) 0 1px, transparent 1px 32px),
    linear-gradient(135deg, var(--beige) 0%, #efe6da 50%, var(--gray) 100%);
  color: var(--plum-deep);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  display: flex; align-items: flex-end;
  padding: 24px;
}
.map-block__roads { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.map-block__pin { position: absolute; top: 34%; left: 50%; width: 36px; height: 50px; transform: translate(-50%, -50%); animation: pin-bob 3s ease-in-out infinite; }
.map-block__pin svg { width: 100%; height: 100%; }
@keyframes pin-bob { 0%, 100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, -60%); } }
.map-block__label {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px 24px;
  border-radius: 18px;
  background: var(--glass-strong);
  color: var(--plum-deep);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  min-width: 0;
}
.map-block__label p { margin: 0; }

/* Footer */
.site-footer {
  margin-top: 64px;
  padding: 64px 0 40px;
  background: var(--plum-deep);
  color: var(--ivory);
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 40px; }
.footer-brand { flex: 1.4 1 260px; min-width: 0; }
.footer-brand p { color: var(--beige); margin-top: 16px; max-width: 340px; }
.brand--light { color: var(--ivory); }
.brand--light:hover { color: var(--beige); }
.footer-col { flex: 1 1 160px; min-width: 0; }
.footer-heading { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; color: var(--beige); margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col a, .footer-legal a { color: var(--ivory); text-decoration-color: rgba(250, 246, 239, 0.4); }
.footer-col a:hover, .footer-legal a:hover { color: var(--beige); }
.site-footer :focus-visible { outline-color: var(--ivory); }
.footer-button {
  padding: 0; border: 0;
  background: transparent; color: var(--ivory);
  font: inherit; text-decoration: underline; text-decoration-color: rgba(250, 246, 239, 0.4); text-underline-offset: 3px;
  cursor: pointer;
}
.footer-button:hover { background: transparent; color: var(--beige); }
.footer-legal { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(250, 246, 239, 0.18); font-size: 0.88rem; color: var(--beige); }
.footer-legal p { margin: 0 0 8px; overflow-wrap: anywhere; }

/* Cookie banner */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 110;
  display: flex; flex-direction: column; gap: 16px;
  max-width: 760px; margin-inline: auto;
  padding: 24px;
  border-radius: 24px;
  background: rgba(250, 246, 239, 0.94);
  color: var(--plum-deep);
  border: 1px solid rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.cookie-banner__body p { margin: 0 0 8px; font-size: 0.92rem; }
.cookie-banner__title { font-family: var(--serif); font-size: 1.2rem; }
.cookie-prefs { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; background: rgba(232, 220, 203, 0.55); color: var(--plum-deep); }
.cookie-prefs .btn { align-self: flex-start; }

/* Responsive */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); padding-top: 96px; }
  .hero__floats { flex-direction: row; flex-wrap: wrap; align-items: stretch; }
  .float-panel { flex: 1 1 180px; max-width: none; }
  .float-panel--offset { margin-right: 0; }
}

@media (max-width: 768px) {
  .section { padding-block: 64px; }
  .country-explorer { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .country-rail { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px; padding: 16px; }
  .country-rail__btn { width: auto; padding: 8px 16px; gap: 8px; border: 1px solid var(--line); border-radius: 999px; }
  .country-rail__name { font-size: 1rem; }
  .country-panel { min-height: 460px; }
  .chapter-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .chapter-rail { position: static; }
  .chapter-rail ol { flex-direction: row; flex-wrap: wrap; gap: 8px; border-left: 0; }
  .chapter-rail a { border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; }
  .chapter-rail a:hover { border-color: var(--mauve); }
  .chapter-rail a.is-active { border-color: var(--plum); background: var(--plum); color: var(--ivory); }
  .editorial-stack { gap: 40px; }
  .editorial-stack > .glass-card { width: 100%; }
  .glass-note--shift { margin-top: 0; }
  .itinerary-list > .glass-note:nth-child(even) { margin-left: 0; }
  .hero__title-panel, .page-hero__panel, .contact-form { padding: 24px; }
  .glass-card { min-height: 420px; padding: 16px; }
  .glass-card__index { top: 16px; right: 16px; }
  .editorial-stack > .glass-card:nth-child(even) .glass-card__index { left: 16px; }
  .page-hero { min-height: 380px; padding: 40px 0; }
  .explore__body { padding-top: 0; }
}

@media (max-width: 400px) {
  body { font-size: 1rem; }
  .container, .page-hero > .container { width: calc(100% - 32px); }
  .brand { font-size: 0.95rem; gap: 8px; }
  .hero__inner { padding: 80px 0 40px; gap: 24px; }
  .hero__title-panel, .page-hero__panel, .contact-form, .glass-note { padding: 16px; }
  .glass-card { padding: 8px; min-height: 400px; }
  .glass-card__panel { padding: 16px; }
  .float-panel { padding: 16px; }
  .button-row .btn { width: 100%; }
  .cookie-banner { left: 8px; right: 8px; bottom: 8px; padding: 16px; }
  .map-block { padding: 16px; }
  .map-block__label { padding: 16px; }
  th, td { padding: 8px 12px; }
  .faq-item summary { padding: 16px; }
  .faq-item p { padding: 0 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .hero__particles span { animation: none !important; opacity: 0; }
}