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

html {
  scroll-behavior: smooth;
}

body {
  width: 100%;
  background-color: #0B0E18;
  color: #d4cfc8;
  font-family: Georgia, 'Times New Roman', serif;
}

/* ─── FOLD (poster + live text aim to fill the viewport below the nav,
   but this is a floor, not a cap — content that needs more room simply
   makes the page scroll instead of getting clipped) ──────────────── */

#fold {
  margin-top: 48px;
  min-height: calc(100vh - 48px);
  min-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
}

/* ─── POSTER SECTION ───────────────────────────────────────────── */

#poster-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  background: #0B0E18; /* matches the poster photo's own flat lower edge, so the seam with #poster-text is invisible */
}

/* Caps the photo at ~50% of the viewport below the nav, in pure CSS so it
   never depends on JS measuring the right thing at the right time on a
   real device (this used to be JS-computed and could go wrong across
   orientation changes). overflow:hidden here clips the pinch/double-click
   zoom WITHOUT touching #poster-text below, unlike before. */
#poster-frame {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

img#poster {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: calc(50vh - 24px);
  max-height: calc(50dvh - 24px);
  transform-origin: center center;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
}

img#poster.zoomed {
  cursor: zoom-out;
}

/* ─── POSTER TEXT (live continuation of the poster below the photo) ──── */

#poster-text {
  /* Mirrors the image's ~50% cap as a MINIMUM, so short content still looks
     balanced on a normal/tall screen — but on a short (e.g. landscape)
     screen where the content genuinely needs more room, this box simply
     grows and the page scrolls, instead of clipping anything. */
  min-height: calc(50vh - 24px);
  min-height: calc(50dvh - 24px);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly; /* generous, even breathing room between groups */
  align-items: center;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 24px 28px;
  text-align: center;
}

.poster-group {
  width: 100%;
}

.poster-tagline {
  font-style: italic;
  color: #c8a96e;
  font-size: clamp(1.3rem, 3.6vw, 2rem);
  line-height: 1.3;
}

.poster-subtitle {
  color: #d4cfc8;
  font-size: clamp(1.05rem, 2.6vw, 1.4rem);
  margin-top: 4px;
}

.poster-rule {
  width: 220px;
  max-width: 60%;
  margin: 0 auto;
  border: none;
  border-top: 1px solid #c8a96e;
  opacity: 0.55;
}

.poster-topics-label {
  font-family: Georgia, 'Times New Roman', serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #d4cfc8;
  font-size: clamp(0.9rem, 2vw, 1.1rem);
}

.poster-topics-italic {
  font-style: italic;
  color: #d4cfc8;
  font-size: clamp(1rem, 2.3vw, 1.25rem);
  margin-top: 6px;
}

.poster-topics-plain {
  color: #9ca3b0;
  font-size: clamp(0.8rem, 1.8vw, 1rem);
  margin-top: 4px;
}

.poster-practical {
  padding-top: 16px;
  border-top: 1px solid #1e2535;
}

.poster-dates {
  color: #d4cfc8;
  font-size: clamp(1.25rem, 3.6vw, 1.8rem);
}

.poster-dates .poster-sep {
  color: #555e72;
  margin: 0 6px;
}

.poster-dates .poster-place {
  font-family: Georgia, 'Times New Roman', serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75em;
}

.poster-times {
  margin-top: 10px;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  color: #d4cfc8;
}

.poster-times strong {
  color: #c8a96e;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72em;
  margin-right: 6px;
}

.poster-times .poster-sep {
  color: #555e72;
  margin: 0 10px;
}

.poster-venue {
  margin-top: 8px;
  font-size: clamp(1rem, 2.6vw, 1.3rem);
  color: #9ca3b0;
}

.poster-levels {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3b0;
  font-size: clamp(0.8rem, 1.8vw, 1rem);
  margin-top: 12px;
}

.poster-contact {
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
}

.poster-contact a {
  color: #c8a96e;
  text-decoration: none;
}

.poster-contact a:hover {
  text-decoration: underline;
}

.poster-contact .poster-sep {
  color: #555e72;
  margin: 0 8px;
}

.poster-cta {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3b0;
  font-size: clamp(0.75rem, 1.7vw, 0.9rem);
  margin-top: 6px;
}

/* ─── COMPACT TYPE SCALE — small phones (portrait, e.g. iPhone SE) and any
   short landscape screen, where the clamp() minimums above are still too
   large for the available room. ─────────────────────────────────────── */
@media (max-width: 420px), (orientation: landscape) and (max-height: 500px) {
  #poster-text        { padding: 14px 18px 18px; }
  .poster-tagline      { font-size: 1.05rem; }
  .poster-subtitle      { font-size: 0.9rem;  margin-top: 3px; }
  .poster-topics-label   { font-size: 0.75rem; }
  .poster-topics-italic   { font-size: 0.85rem; margin-top: 4px; }
  .poster-topics-plain     { font-size: 0.7rem;  margin-top: 2px; }
  .poster-practical         { padding-top: 10px; }
  .poster-dates              { font-size: 1.05rem; }
  .poster-times                { font-size: 0.95rem; margin-top: 6px; }
  .poster-venue                 { font-size: 0.85rem; margin-top: 4px; }
  .poster-levels                  { font-size: 0.68rem; margin-top: 6px; }
  .poster-contact                   { font-size: 0.9rem; }
  .poster-cta                        { font-size: 0.62rem; margin-top: 3px; }
}

/* ─── LANDSCAPE PHONES — side by side instead of stacked, since a short
   landscape screen has width to spare but very little height. ─────────── */
@media (orientation: landscape) and (max-height: 500px) {
  #fold {
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
    min-height: 0;
  }

  #poster-section {
    flex-direction: row;
    align-items: stretch;
    height: 100%;
  }

  #poster-frame {
    width: 50%;
    height: 100%;
    align-items: center;
  }

  img#poster {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
  }

  #poster-text {
    width: 50%;
    max-width: none;
    min-height: 0;
    height: 100%;
    overflow-y: auto; /* safety valve: scrolls within its own column rather than clipping */
    padding: 12px 20px;
  }
}

/* ─── NAV BAR ───────────────────────────────────────────────────── */

#site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 16px;
  background: rgba(11, 14, 24, 0.85);
  border-bottom: 1px solid #1e2535;
  backdrop-filter: blur(6px);
}

.nav-brand {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: #c8a96e;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-link {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3b0;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  transition: color 0.15s;
}

.nav-link:hover { color: #d4cfc8; }

.nav-link.active {
  color: #c8a96e;
}

/* ─── LANGUAGE TOGGLE (inside nav) ─────────────────────────────── */

#lang-toggle {
  display: flex;
  gap: 2px;
  background: rgba(30, 37, 53, 0.6);
  border: 1px solid #2a3140;
  border-radius: 5px;
  padding: 2px;
  flex-shrink: 0;
}

#lang-toggle button {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  background: none;
  border: none;
  color: #9ca3b0;
  padding: 4px 9px;
  border-radius: 3px;
  cursor: pointer;
}

#lang-toggle button.active {
  background: #c8a96e;
  color: #0B0E18;
}

/* ─── SCROLL HINT ──────────────────────────────────────────────── */

#scroll-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  color: #555e72;
  pointer-events: none;
  animation: bounce 2s infinite;
  line-height: 1;
  z-index: 10;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ─── LOCATION SECTION ─────────────────────────────────────────── */

#location {
  max-width: 1500px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

#location h2 {
  font-size: 1.6rem;
  font-weight: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c8a96e;
  margin-bottom: 16px;
}

.location-intro {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #9ca3b0;
  margin-bottom: 32px;
}

.location-intro strong {
  color: #d4cfc8;
}

/* ─── MAP ──────────────────────────────────────────────────────── */

#map {
  width: 100%;
  height: 680px;
  border-radius: 6px;
  margin-bottom: 36px;
  border: 1px solid #1e2535;
}

/* Shorter on mobile, and narrower with a strip of plain page on the right —
   Leaflet grabs the drag gesture to pan the map, so a full-width map traps
   the entire thumb-scroll area; this leaves a safe edge to scroll the page
   (toward the footer) instead of panning the map. */
@media (max-width: 600px) {
  #map {
    height: 340px;
    width: 80%;
    margin-right: 20%;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  #map {
    height: 280px;
    width: 80%;
    margin-right: 20%;
  }
}

/* ─── INFO GRID ────────────────────────────────────────────────── */

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

@media (min-width: 600px) {
  .info-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 860px) {
  .info-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.info-card {
  background: #111621;
  border: 1px solid #1e2535;
  border-radius: 6px;
  padding: 20px 22px;
}

.info-card h3 {
  font-size: 0.9rem;
  font-weight: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c8a96e;
  margin-bottom: 12px;
}

.info-card p,
.info-card li {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #9ca3b0;
}

.info-card p + p {
  margin-top: 10px;
}

.info-card strong {
  color: #d4cfc8;
}

.info-card ul {
  list-style: none;
  padding: 0;
}

.info-card ul li {
  padding: 4px 0;
  border-bottom: 1px solid #1a2030;
}

.info-card ul li:last-child {
  border-bottom: none;
}

p.note {
  margin-top: 12px;
  font-size: 0.8rem;
  font-style: italic;
  color: #555e72;
}

p.note a {
  color: #c8a96e;
}

/* Metro line badges */
.metro {
  display: inline-block;
  font-size: 0.72rem;
  font-family: sans-serif;
  font-weight: bold;
  border-radius: 3px;
  padding: 1px 5px;
  margin-right: 5px;
  color: #fff;
}
.metro.l3  { background: #007f40; }
.metro.l4  { background: #c8a906; color: #000; }
.metro.l11 { background: #8b8b8b; }

/* ─── CONTACT LINE ─────────────────────────────────────────────── */

.contact-line {
  text-align: center;
  font-size: 0.85rem;
  color: #555e72;
}

.contact-line a {
  color: #c8a96e;
  text-decoration: none;
}

.contact-line a:hover {
  text-decoration: underline;
}
