/* HOLA! Hikers' Local — one-page site
   Design canvas: 1722px wide (source/Hola-Web-Home.jpg). Pixel values below are
   measured on that canvas; the map and bubbles scale as percentages of it, and
   calc(N / 1722 * 100vw) scales a canvas value N with the screen.

   Breakpoints (Tailwind scale, min-width): sm 640 · md 768 · lg 1024 · xl 1280 · 2xl 1536.
   Media queries can't read custom properties, so write the number; "below lg" = max-width: 1023px.
   --map-min (1000) is a content rule, not a breakpoint: the width where bubble text stops being readable. */

/* Nunito Regular, self-hosted (SIL OFL, fonts/LICENSE-nunito.txt). Google Fonts' two Latin subsets: the
   browser fetches latin-ext only when the text uses it (e.g. Turkish ğ ş İ). Chosen over the PSD's Palatino. */
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-regular-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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: "Nunito";
  src: url("../fonts/nunito-regular-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  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;
}

:root {
  --yellow: #e5d541;
  --ink: #111;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --map-min: 1000px; /* below this the map scrolls sideways; keeps bubble text readable */
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.container {
  width: min(1378px, 100% - 32px);
  margin-inline: auto;
}

/* Header ------------------------------------------------------------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-block: clamp(16px, calc(32 / 1722 * 100vw), 32px) 6px;
}

.site-header__logo {
  /* mockup 515; 15% smaller by request. Floor 280 keeps the tagline in the PNG ~10px, the
     legible minimum; the floor takes over below ~1100px. */
  width: clamp(280px, calc(438 / 1722 * 100vw), 438px);
  /* Optical centring: the visible ink (rows 24–116 of 147) sits 3.5px above the PNG's centre. */
  transform: translateY(2.4%);
}

.site-header__funders {
  /* mockup 370; 20% bigger by request (PNG is 370 wide, so it's upscaled above that).
     Floor 288 (240 × 1.2); 240 already kept "Co-funded by…" ~10px. */
  width: clamp(288px, calc(444 / 1722 * 100vw), 444px);
  /* Optical centring: the visible ink (rows 28–96 of 118) sits 3px below the PNG's centre. */
  transform: translateY(-2.5%);
}

/* Below sm: stack the logos. They'd fit on one line down to 624px; sm is the agreed switch. */
@media (max-width: 639px) {
  .site-header {
    flex-direction: column;
    align-items: center;
    gap: 0;
    translate: 4px 0; /* nudged right of true centre for visual balance, by request */
  }

  /* Optical centring adds an x shift: each PNG has more empty space on its left than its right. */
  .site-header__logo {
    transform: translate(-1.3%, 2.4%);
  }

  /* -18px pulls the logos' visible edges to ~16px apart; the PNGs' empty space alone leaves ~35. */
  .site-header__funders {
    margin-top: -18px;
    transform: translate(-0.7%, -2.5%);
  }
}

/* Trail map + bubbles ------------------------------------------------ */

.trail {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.trail__map {
  position: relative;
  min-width: var(--map-min);
}

.trail__img {
  width: 100%;
}

/* Positions measured on the 1722×931 map: left/top/width as % of it. */
.bubble {
  position: absolute;
}

.bubble--tentfix   { left: 48.780%; top: 12.997%; width: 17.886%; }
.bubble--locker    { left: 19.280%; top: 34.372%; width: 19.686%; }
.bubble--plastic   { left: 46.748%; top: 32.331%; width: 18.002%; }
.bubble--snacks    { left: 29.094%; top: 49.302%; width: 17.770%; }
.bubble--ukulele   { left: 62.253%; top: 45.005%; width: 18.525%; }
.bubble--eco-hotel { left: 50.407%; top: 53.921%; width: 18.873%; }

/* About band ---------------------------------------------------------- */

.about {
  position: relative;
  background: var(--yellow);
}

/* Inverted arch on the band's top edge: the sides rise 80px into the map's plain blue (at 1722, scales
   with the width) and the centre dips to the band's top. A parabola; the fill repeats --yellow because a data URI can't read CSS variables.
   It overlaps the band by 1px so no hairline shows between them. */
.about::before {
  content: "";
  position: absolute;
  bottom: calc(100% - 1px);
  left: 0;
  width: 100%;
  height: calc(80 / 1722 * 100vw);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0Q50 200 100 0V100H0Z' fill='%23e5d541'/%3E%3C/svg%3E") 0 0 / 100% 100%;
}

.about__inner {
  --lh: 32px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 456px) minmax(0, 480px); /* mockup column widths */
  column-gap: clamp(32px, calc(95 / 1722 * 100vw), 95px);
  padding: 72px 0 119px min(calc(180 / 1722 * 100vw), 180px);
  font-size: 21px; /* Nunito reads larger than the mockup's 24px Palatino */
  line-height: var(--lh);
}

.about__ring {
  position: absolute;
  top: 47px;
  left: min(calc(83 / 1722 * 100vw), 83px);
  width: clamp(40px, calc(62 / 1722 * 100vw), 62px);
}

.about__col p {
  margin: 0 0 var(--lh);
}

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

/* Footer -------------------------------------------------------------- */

.site-footer {
  height: 35px;
}

/* Below lg (phones, tablets): one column, ring above the text ---------- */

@media (max-width: 1023px) {
  .about__inner {
    --lh: 30px;
    grid-template-columns: minmax(0, 34em); /* readable line length on tablets */
    justify-content: center;
    row-gap: var(--lh);
    padding: 40px 0 56px;
    font-size: 19px;
  }

  .about__ring {
    position: static;
  }
}
