/* ==========================================================
   THE SLOWMAD: styles
   Colors and fonts live in the :root block below.
   Change a value there and it updates across the whole site.
   ========================================================== */

/* ---- Fonts (files are stored in /assets/fonts, nothing loads from Google) ---- */
@font-face {
  font-family: "Caprasimo";
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/caprasimo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Caprasimo";
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/caprasimo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree";
  font-weight: 500 800;
  font-display: swap;
  src: url("../assets/fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-weight: 500 800;
  font-display: swap;
  src: url("../assets/fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Brand settings: the one place to adjust colors, fonts, shapes ---- */
:root {
  /* Mango */
  --mango-1: #FFF1CE;
  --mango-2: #FFE299;
  --mango:   #FFD25A;   /* main brand color */
  --mango-4: #CA9E07;
  --mango-5: #7B5F01;

  /* Teal (body text on light backgrounds) */
  --teal-1: #D9F4FA;
  --teal-2: #A0D9E4;
  --teal-3: #52ADBE;
  --teal:   #156572;
  --teal-5: #033A43;

  /* Coral (stickers, callouts, big words; one per section at most) */
  --coral-1: #FFE9E4;
  --coral-2: #FFC9BD;
  --coral:   #FF9A85;
  --coral-4: #D9563D;
  --coral-5: #892311;

  /* Lilac (soft panels behind body text) */
  --lilac-1: #F3EFFF;
  --lilac:   #E2D6FF;
  --lilac-3: #C0A8F4;
  --lilac-4: #936FD3;
  --lilac-5: #583889;

  /* Shell (page background, and text on teal) */
  --shell:   #FFF9EE;
  --shell-2: #EEE7D9;
  --shell-3: #C6BDAC;
  --shell-4: #867F73;
  --shell-5: #3E3A32;

  /* Fonts */
  --font-heading: "Caprasimo", Georgia, serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Shapes and spacing */
  --radius-card: 24px;
  --radius-pill: 999px;
  --gutter: 20px;
  --max-width: 960px;
  --tap-min: 44px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--shell);
  color: var(--teal);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;          /* Caprasimo has one weight; never fake-bold it */
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--teal);
}
h1 { font-size: clamp(2rem, 7vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1em; }

a { color: var(--teal); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--teal);
  color: var(--shell);
  padding: 10px 16px;
  border-radius: 0 0 12px 0;
  z-index: 10;
}
.skip-link:focus { left: 0; }

.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- Header band ---- */
.site-header {
  background: var(--mango);
  color: var(--teal);
  padding: 18px 0 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.brand img { width: 56px; height: 56px; display: block; }
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  line-height: 1.1;
}
.tagline {
  margin: 10px 0 0;
  font-weight: 600;
  font-size: 0.98rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--teal);
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}
.site-nav a[aria-current="page"] {
  background: var(--teal);
  color: var(--mango);
}

/* ---- Buttons ---- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 0 26px;
  border-radius: var(--radius-pill);
  background: var(--teal);
  color: var(--mango);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 0;
}
.button:hover { background: var(--teal-5); }

/* ---- Sections ---- */
main { padding-bottom: 48px; }
.section { padding: 40px 0 0; }

.hero { padding-top: 40px; }
.hero p { max-width: 38em; font-size: 1.15rem; }
.hero-actions { margin-top: 24px; }

/* Coral sticker: one per section at most */
.sticker {
  display: inline-block;
  background: var(--coral);
  color: var(--teal);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  transform: rotate(-3deg);
  margin-bottom: 18px;
}

.panel {
  background: var(--lilac);
  color: var(--teal);
  border-radius: var(--radius-card);
  padding: 28px 24px;
}
.panel p:last-child { margin-bottom: 0; }

/* ---- Footer ---- */
.site-footer {
  background: var(--teal);
  color: var(--shell);
  padding: 28px 0;
  font-size: 0.95rem;
}
.site-footer a { color: var(--shell); }
.site-footer p { margin: 0 0 0.5em; }

/* ---- Larger screens ---- */
@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .site-header .wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px 24px;
  }
  .tagline { margin: 0; grid-column: 1; }
  .site-nav { margin: 0; grid-column: 2; grid-row: 1 / span 2; }
  .panel { padding: 36px 40px; }
}

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

.filter-label {
  margin: 0 0 8px;
  font-weight: 600;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.chip {
  min-height: var(--tap-min);
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--teal);
  background: var(--shell);
  color: var(--teal);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}
.chip[aria-pressed="true"] {
  background: var(--teal);
  color: var(--mango);
}
.result-count {
  margin: 4px 0 16px;
  font-weight: 600;
}

.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
.city-card {
  background: var(--mango-1);
  color: var(--teal);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.city-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.city-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}
.city-body h3 { margin-bottom: 0.15em; }
.city-place {
  margin: 0 0 12px;
  font-weight: 600;
}
.city-dates { margin: 0 0 18px; }
.city-dates strong { font-weight: 800; }
.city-body .button { margin-top: auto; }

.empty { font-weight: 600; }

.tips {
  margin: 0 0 1em;
  padding-left: 1.3em;
}
.tips li { margin-bottom: 0.4em; }
.note {
  font-size: 0.95rem;
  margin-top: 1.25em;
}

@media (min-width: 720px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (min-width: 960px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Flag ticker ---- */
.ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--teal);
  padding: 10px 0 10px var(--gutter);
}
.ticker-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.ticker-track {
  display: flex;
  gap: 18px;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: ticker-scroll var(--ticker-seconds, 90s) linear infinite;
}
.ticker-track li {
  display: block;
  flex: none;
  line-height: 0;
}
.ticker-track img {
  display: block;
  width: 36px;
  height: 27px;
  border-radius: 4px;
  object-fit: cover;
}
/* Moves left by exactly half the track (one full copy of the list) */
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 9px)); }
}
.ticker:hover .ticker-track,
.ticker:focus-within .ticker-track,
.ticker.is-paused .ticker-track {
  animation-play-state: paused;
}
.ticker-toggle {
  flex: none;
  min-height: var(--tap-min);
  min-width: 72px;
  margin-right: var(--gutter);
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--shell);
  background: transparent;
  color: var(--shell);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}
/* For visitors who ask their device to reduce motion: no animation, scroll by hand */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker-viewport { overflow-x: auto; }
  .ticker-track li[aria-hidden="true"] { display: none; }
  .ticker-toggle { display: none; }
  .ticker { padding-right: var(--gutter); }
}

/* ---- World map ---- */
.world-svg {
  display: block;
  width: 100%;
  height: auto;
  background: var(--teal-1);
  border-radius: var(--radius-card);
}
.land {
  fill: var(--lilac);
  stroke: var(--lilac-3);
  stroke-width: 0.75;
  vector-effect: non-scaling-stroke;
}
.pin { cursor: pointer; outline: none; }
.pin-hit { fill: transparent; }
.pin:focus-visible .pin-hit {
  stroke: var(--teal);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.pin-ring {
  fill: none;
  stroke: var(--teal);
  opacity: 0;
}
.pin[aria-pressed="true"] .pin-ring { opacity: 1; }
.pin-map .pin-shape { fill: var(--teal); stroke: var(--shell); }
.pin-soon .pin-shape { fill: var(--mango); stroke: var(--teal); }

.legend {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-weight: 600;
  font-size: 0.95rem;
}
.legend li { display: flex; align-items: center; gap: 8px; }

.map-detail {
  background: var(--mango-1);
  border-radius: var(--radius-card);
  padding: 20px 24px;
  margin-top: 16px;
  min-height: 96px;
}
.map-detail p:last-child { margin-bottom: 0; }
.map-detail .city-place { margin-bottom: 10px; }
.map-detail .sticker { margin-bottom: 12px; }


/* ---- Map zoom buttons ---- */
.world-map { position: relative; }
.world-svg.is-zoomed { cursor: grab; }
.world-svg.is-zoomed:active { cursor: grabbing; }
.world-svg { user-select: none; -webkit-user-select: none; }
.map-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.zoom-button {
  width: var(--tap-min);
  height: var(--tap-min);
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--teal);
  color: var(--mango);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.zoom-button:hover:not(:disabled) { background: var(--teal-5); }
.zoom-button:disabled {
  background: var(--teal-2);
  color: var(--teal-5);
  cursor: default;
}
.map-hint {
  margin: 10px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
}

/* ---- Resources page ---- */
.disclosure {
  font-weight: 800;
  margin: 0 0 18px;
}
