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

:root {
  --paper: #f5f0e8;
  --paper-dark: #ede7d6;
  --ink: #1a1612;
  --ink-mid: #3d3530;
  --ink-light: #6b5f55;
  --ink-faint: #a8998a;
  --red: #8b2020;
  --rule: #c4b8a4;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 17px;
  line-height: 1.75;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* ── Demo Banner ── */
.demo-banner {
  /* position: sticky; */
  top: 0;
  z-index: 100;
  text-align: center;
  padding: 13px 20px 11px;
  background: linear-gradient(90deg,
      #ff4e4e, #ff9a3c, #ffe040, #5de87a,
      #4db8ff, #a367f0, #ff4e98, #ff4e4e);
  background-size: 300% auto;
  /* animation: rainbow-move 5s linear infinite; */
  box-shadow: 0 0 28px rgba(160, 80, 255, 0.35), 0 2px 6px rgba(0, 0, 0, 0.25);
}

.demo-banner span {
  font-family: 'Courier Prime', monospace;
  font-size: clamp(13px, 2.8vw, 21px);
  font-weight: bold;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.9),
    0 0 28px rgba(255, 255, 255, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.35);
}

@keyframes rainbow-move {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 300% center;
  }
}

/* ── Language Switcher ── */
.lang-switcher {
  position: fixed;
  top: 62px;
  right: 16px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lang-btn {
  background: var(--paper);
  border: 1px solid var(--rule);
  font-size: 22px;
  line-height: 1;
  padding: 5px 7px;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.15s, border-color 0.15s, box-shadow 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-btn:hover {
  opacity: 0.8;
  border-color: var(--ink-light);
}

.lang-btn.active {
  opacity: 1;
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

/* ── Layout ── */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 28px;
}

hr.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 48px 0;
}

hr.rule.thick {
  border-top-width: 2px;
  border-color: var(--ink);
}

/* ── Masthead ── */
.masthead {
  border-bottom: 2px solid var(--ink);
  padding: 52px 0 36px;
  text-align: center;
}

.masthead .kicker {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 18px;
}

.masthead h1 {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: clamp(38px, 8vw, 72px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.masthead h1 span {
  display: block;
  font-size: 0.45em;
  font-style: italic;
  color: var(--ink-light);
  margin-top: 6px;
  letter-spacing: 0.01em;
}

.masthead .subhead {
  margin-top: 20px;
  font-style: italic;
  color: var(--ink-mid);
  font-size: 15px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.nav-pills {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.nav-pills a {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-mid);
  padding: 6px 14px;
  border: 1px solid var(--rule);
  transition: background 0.18s, color 0.18s;
}

.nav-pills a:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ── Sections ── */
section {
  padding: 52px 0;
}

.section-label {
  font-family: 'Courier Prime', monospace;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::after {
  content: '';
  display: block;
  height: 1px;
  background: var(--red);
  opacity: 0.35;
  flex: 1;
}

h2 {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: clamp(26px, 5vw, 40px);
  line-height: 1.2;
  margin-bottom: 20px;
}

h3 {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 22px;
  margin-bottom: 8px;
  margin-top: 32px;
}

p {
  margin-bottom: 16px;
  color: var(--ink-mid);
}

p:last-child {
  margin-bottom: 0;
}

/* ── Intro block ── */
.intro-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 600px) {
  .intro-block {
    grid-template-columns: 1fr;
  }
}

.pull-quote {
  border-left: 3px solid var(--ink);
  padding-left: 20px;
  font-family: 'IM Fell English', Georgia, serif;
  font-style: italic;
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink);
}

.pull-quote cite {
  display: block;
  font-size: 12px;
  font-style: normal;
  font-family: 'Courier Prime', monospace;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin-top: 12px;
  text-transform: uppercase;
}

/* ── Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  border: 1px solid var(--rule);
  margin-top: 28px;
}

.card {
  padding: 24px 22px;
  border-right: 1px solid var(--rule);
  background: var(--paper);
}

.card:last-child {
  border-right: none;
}

.card .card-icon {
  font-size: 22px;
  margin-bottom: 10px;
}

.card h4 {
  font-family: 'IM Fell English', Georgia, serif;
  font-size: 17px;
  margin-bottom: 6px;
}

.card p {
  font-size: 13.5px;
  line-height: 1.6;
}

/* ── Eat list ── */
.eat-list {
  list-style: none;
  margin-top: 24px;
}

.eat-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px dotted var(--rule);
}

.eat-list li:last-child {
  border-bottom: none;
}

.eat-name {
  font-family: 'IM Fell English', serif;
  font-size: 18px;
}

.eat-meta {
  font-size: 13px;
  color: var(--ink-light);
  font-style: italic;
}

.eat-tag {
  font-family: 'Courier Prime', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--paper-dark);
  border: 1px solid var(--rule);
  padding: 3px 7px;
  white-space: nowrap;
  color: var(--ink-mid);
}

/* ── Tour section ── */
.tour-box {
  border: 1px solid var(--ink);
  padding: 32px;
  background: var(--paper-dark);
  position: relative;
}

.tour-box::before {
  content: attr(data-label);
  position: absolute;
  top: -10px;
  left: 24px;
  background: var(--paper-dark);
  padding: 0 8px;
  font-family: 'Courier Prime', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-light);
}

.route-stops {
  display: flex;
  gap: 0;
  margin: 20px 0 28px;
  flex-wrap: wrap;
}

.stop {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Courier Prime', monospace;
  font-size: 12px;
  color: var(--ink-mid);
}

.stop-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
  flex-shrink: 0;
}

.stop-line {
  width: 28px;
  height: 1px;
  background: var(--ink);
  opacity: 0.4;
}

#tour-output {
  min-height: 90px;
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-mid);
  padding: 18px 0 0;
  border-top: 1px solid var(--rule);
  white-space: pre-wrap;
}

.tour-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.stop-btn {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid var(--ink);
  background: transparent;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.15s, color 0.15s;
}

.stop-btn:hover,
.stop-btn.active {
  background: var(--ink);
  color: var(--paper);
}

.loading-dots::after {
  content: '...';
  animation: dots 1.2s steps(4, end) infinite;
}

@keyframes dots {

  0%,
  20% {
    content: '.';
  }

  40% {
    content: '..';
  }

  60%,
  100% {
    content: '...';
  }
}

/* ── Practical info ── */
.info-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}

@media (max-width: 520px) {
  .info-cols {
    grid-template-columns: 1fr;
  }
}

.info-block h4 {
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}

.info-block ul {
  list-style: none;
  font-size: 14px;
  color: var(--ink-mid);
}

.info-block ul li {
  padding: 4px 0;
}

.info-block ul li::before {
  content: '— ';
  color: var(--ink-faint);
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 40px 0;
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  border-top: 1px solid var(--rule);
}

footer strong {
  color: var(--ink-mid);
}


@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1a1714;
    --paper-dark: #211e1a;
    --ink: #f0ebe0;
    --ink-mid: #c9bfb0;
    --ink-light: #9a8f82;
    --ink-faint: #5c5249;
    --red: #c94f4f;
    --rule: #3a342c;
  }

  body {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  }
}