/* ==========================================================================
 *  site.css - the public pages (landing page and wonder pages).
 *
 *  The look follows jijan.eu: paper-white background, near-black ink, a wide
 *  heavy display face, pill buttons, and cards outlined in ink with a hard
 *  offset shadow. Every colour and size is a variable below; change them
 *  here rather than in the rules.
 *
 *  jijan.eu uses the commercial "Chicoree Em." face, which has no Cyrillic
 *  and cannot be reused, so the display face here is Unbounded (Google
 *  Fonts, OFL, full Cyrillic). Body text is Inter, as on jijan.eu.
 * ========================================================================== */

:root {
  color-scheme: only light;

  --ink: #111111;
  --white: #ffffff;
  --paper: #f9f9f9;
  --mute: #5f6560;
  --line: #e3e5e1;
  --soft: #f4f5f2;
  --border: #cfd3cd;
  --faint: #9a9e98;

  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Inter", system-ui, "Segoe UI", Roboto, Arial, sans-serif;

  --fs-label: .8rem;
  --fs-small: .9rem;
  --fs-medium: 1.05rem;
  --fs-lead: 1.15rem;
  --fs-title: 1.2rem;
  --fs-large: clamp(1.5rem, 1.3rem + 1.3vw, 2.3rem);
  --fs-xl: clamp(2rem, 1.6rem + 2.4vw, 3.4rem);

  --radius: 18px;
  --shadow: 0 5px 0 var(--ink);
  --shadow-up: 0 8px 0 var(--ink);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --page: min(1180px, 88%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--fs-small)/1.6 var(--body);
  overflow-x: clip;
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.01em;
  margin: 0;
}
h1 { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-large); }
h3 { font-size: var(--fs-title); font-weight: 700; }

a { color: var(--ink); transition: color .25s var(--ease); }

.prose a,
.link {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.prose a:hover,
.link:hover { text-decoration-color: var(--ink); }

.page { width: var(--page); margin: 0 auto; }
@media (max-width: 760px) { .page { width: calc(100% - 32px); } }

.section-title { margin: 6rem 0 1.2rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--white);
  padding: .6em 1em; border-radius: 999px;
}
.skip:focus { top: 8px; }

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

/* ---- header ------------------------------------------------------------- */

.head {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 16px max(16px, 4vw);
  background: var(--white);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s var(--ease);
}
.head.is-stuck { box-shadow: 0 6px 18px rgba(17, 17, 17, .06); }

.wordmark {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  letter-spacing: -.02em;
  display: inline-flex;
  flex-direction: column;
  transform: skewX(-8deg);
}
.wordmark small {
  font-size: .62em;
  font-weight: 700;
  letter-spacing: .02em;
}

.nav { display: flex; gap: 1.6rem; }
.nav a {
  position: relative;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-label);
  text-decoration: none;
}
.nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover::after,
.nav a.is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  border: 0; background: none; padding: 4px; cursor: pointer;
}
.nav-toggle svg { width: 30px; height: 30px; display: block; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.4rem max(16px, 4vw) 1.8rem;
    background: var(--white);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { font-size: var(--fs-lead); }
}

/* ---- buttons, tags, filter tabs ----------------------------------------- */

.btn,
.tabs button {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-label);
  line-height: 1.2;
  padding: .85em 1.6em;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background .25s var(--ease), color .25s var(--ease);
}
.btn:hover,
.tabs button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(17, 17, 17, .14);
}
.btn--outline,
.tabs button[aria-pressed="false"] {
  background: transparent;
  color: var(--ink);
}

.btns { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.4rem; }

.tag {
  display: inline-block;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  font-size: var(--fs-label);
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: .35em .95em;
  margin: 0 0 .9rem;
}
.tag--soft { background: var(--soft); color: var(--ink); border: 1px solid var(--border); }

.eyebrow {
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 .4rem;
}

.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.8rem; }

/* ---- hero --------------------------------------------------------------- */

.hero {
  text-align: center;
  padding: clamp(3rem, 7vw, 5.5rem) 0 3.5rem;
}
.hero__logo {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.6rem, 1.4rem + 6vw, 6.2rem);
  line-height: .92;
  letter-spacing: -.035em;
  margin: 0 auto 2.6rem;
  transform: skewX(-8deg);
}
.hero__logo span { display: block; }
.hero__logo span + span { font-size: .55em; letter-spacing: -.01em; }
.hero h2 { font-size: var(--fs-large); margin-bottom: .8rem; }
.hero p { font-size: var(--fs-lead); max-width: 60ch; margin: 0 auto; }
.hero .btns { justify-content: center; }

/* ---- stats band --------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: 860px;
  margin: 0 auto;
  padding: 1.6rem 1rem;
  background: var(--soft);
  border-radius: 20px;
}
.stat { text-align: center; padding: 0 .8rem; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat__n {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--fs-large);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat__l {
  margin-top: .45rem;
  font-size: var(--fs-label);
  line-height: 1.35;
  color: var(--mute);
}
@media (max-width: 781px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.8rem; }
  .stat + .stat { border-left: 0; }
  .stat:last-child { grid-column: 1 / -1; }
}

/* ---- outlined cards ("what you get") ----------------------------------- */

.do {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 6rem;
}
.box {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.box:hover { transform: translateY(-3px); box-shadow: var(--shadow-up); }
.box h3 { margin: 0 0 .4rem; }
.box p { margin: 0; line-height: 1.6; }
@media (max-width: 900px) { .do { grid-template-columns: 1fr; } }

/* ---- wonder cards ------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .grid { grid-template-columns: 1fr; } }

.card {
  position: relative;
  height: 100%;
  background: var(--soft);
  border-radius: 16px;
  padding: 1.4rem;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(17, 17, 17, .08);
}
.card[hidden] { display: none; }

.frame {
  display: block;
  position: relative;
  margin: 0 0 1.1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--white);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform .9s var(--ease);
}
.card:hover .frame { transform: translateY(-3px); box-shadow: var(--shadow-up); }
.card:hover .frame img { transform: scale(1.04); }

.stop {
  position: absolute;
  top: 12px; left: 12px;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--ink);
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--fs-small);
}

.card .eyebrow { margin-bottom: .35rem; }
.card h3 { margin: 0 0 .4rem; }
.card h3 a { text-decoration: none; }
/* the whole card is the link target */
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.card p { margin: .3rem 0 .8rem; }
.more {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--fs-label);
}

/* ---- tour --------------------------------------------------------------- */

.tour {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 900px) { .tour { grid-template-columns: 1fr; } }

.tour__map {
  height: 560px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--soft);
  z-index: 0;
}
@media (max-width: 900px) { .tour__map { height: 420px; } }

.tour__summary { margin: 0 0 1rem; color: var(--mute); }
.tour__summary strong { color: var(--ink); }

.stops { list-style: none; margin: 0; padding: 0; }
.stops li + li { border-top: 1px solid var(--line); }
.stops button {
  display: flex;
  align-items: center;
  gap: .9rem;
  width: 100%;
  padding: .75rem .4rem;
  font: inherit;
  color: inherit;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s var(--ease);
}
.stops button:hover,
.stops button.is-active { background: var(--soft); }
.stops__n {
  flex: none;
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--white);
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--fs-label);
}
.stops button.is-active .stops__n { background: var(--ink); color: var(--white); }
.stops__name { font-weight: 600; display: block; }
.stops__leg { font-size: var(--fs-label); color: var(--mute); display: block; }

/* map pins and popups, shared with the wonder page mini map */
.wpin { background: none; border: 0; }
.wpin span {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 0 3px 0 var(--ink);
  font: 800 13px/1 var(--display);
  color: var(--ink);
  transition: transform .2s var(--ease), background .2s, color .2s;
}
.wpin.is-hot span,
.wpin:hover span { background: var(--ink); color: var(--white); transform: translateY(-2px); }

.leaflet-popup-content-wrapper {
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.leaflet-popup-tip { border: 2px solid var(--ink); }
.leaflet-popup-content { margin: 12px 16px; font: var(--fs-small)/1.45 var(--body); }
.popup__name { font: 700 var(--fs-small)/1.3 var(--display); margin: 0 0 .5rem; }
.popup a { font-weight: 700; }
.leaflet-container a.btn { color: var(--white); }

/* ---- wonder page -------------------------------------------------------- */

.crumbs { margin: 2rem 0 0; font-size: var(--fs-label); color: var(--mute); }
.crumbs a { color: var(--mute); }

.w-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: 2rem 0 1rem;
}
@media (max-width: 860px) { .w-hero { grid-template-columns: 1fr; } }
.w-hero h1 { margin: .2rem 0 1rem; }
.w-hero .when { font-size: var(--fs-lead); font-weight: 700; margin: 0 0 .4rem; }
.w-hero .where { color: var(--mute); margin: 0; }
.w-hero .frame { margin: 0; }
.w-hero .frame img { aspect-ratio: 4 / 3; }

.w-body {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 4rem;
  align-items: start;
}
@media (max-width: 860px) { .w-body { grid-template-columns: 1fr; } }

.prose { font-size: var(--fs-medium); line-height: 1.75; }
.prose p { margin: 0 0 1.1em; max-width: 65ch; }

.aside { display: grid; gap: 1.25rem; }
.aside .box h3 { margin-bottom: .6rem; }
.aside .btn { margin-top: 1rem; }
.facts { margin: 0; display: grid; gap: .6rem; }
.facts dt { font-size: var(--fs-label); color: var(--mute); }
.facts dd { margin: 0; font-weight: 600; }

.idea { background: var(--ink); color: var(--white); }
.idea .tag { background: var(--white); color: var(--ink); }
.idea p:not(.tag) { margin: 0; font-family: var(--display); font-weight: 700; font-size: var(--fs-title); line-height: 1.35; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.6rem 1.25rem;
  margin: 0;
}
.gallery figure { margin: 0; }
.gallery .frame { margin-bottom: .6rem; }
.gallery .frame img { aspect-ratio: 4 / 3; }
.gallery .frame:hover { transform: translateY(-3px); box-shadow: var(--shadow-up); }
.gallery figcaption,
.credit {
  font-size: var(--fs-label);
  color: var(--mute);
  line-height: 1.45;
}
.gallery figcaption a,
.credit a { color: var(--mute); }

.w-map { height: 320px; }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 6rem;
}
.pager a { text-decoration: none; display: block; }
.pager .box { height: 100%; }
.pager .next { text-align: right; grid-column: 2; }
.pager h3 { margin: 0; }
@media (max-width: 620px) {
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: auto; }
}

/* ---- about -------------------------------------------------------------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
.about ul { margin: 0; padding-left: 1.1rem; }
.about li { margin: .35rem 0; }

/* ---- footer ------------------------------------------------------------- */

.foot {
  margin-top: 6rem;
  padding: 56px max(16px, 4vw) 40px;
  background: var(--soft);
  border-top: 1px solid var(--line);
}
.foot__cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 760px) { .foot__cols { grid-template-columns: 1fr; } }
.foot h3 {
  font-family: var(--body);
  font-size: var(--fs-label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 .6rem;
}
.foot p { margin: .25rem 0; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: .25rem 0; }
.foot__fine {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-label);
  color: var(--mute);
}

/* ---- reveal on scroll --------------------------------------------------- */

@keyframes up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.js .rv { opacity: 0; }
.js .rv.is-in { animation: up .7s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv { opacity: 1; }
}
