/* Palette and type come from the game: walnut UI, parchment, the logo's gold, the scene's sky and moss; Nunito. */
@font-face { font-family: Nunito; font-weight: 600; font-display: swap; src: url(fonts/nunito-SemiBold.woff2) format("woff2"); }
@font-face { font-family: Nunito; font-weight: 700; font-display: swap; src: url(fonts/nunito-Bold.woff2) format("woff2"); }
@font-face { font-family: Nunito; font-weight: 800; font-display: swap; src: url(fonts/nunito-ExtraBold.woff2) format("woff2"); }

:root {
  --walnut: #261d14;
  --walnut-2: #33271b;
  --walnut-3: #46362a;
  --parchment: #f3e3bf;
  --parchment-2: #e7d2a2;
  --paper: #fbf4e2;
  --ink: #2f2418;
  --ink-soft: #66543f;
  --gold: #f6bd22;
  --gold-deep: #b97f07;
  --sky: #4f7f8c;
  --sky-deep: #2d5f6e;
  --moss: #6f8138;
  --cream: #fff6df;
  --font: Nunito, "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --page: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--walnut);
  color: var(--cream);
  font: 600 18px/1.6 var(--font);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-weight: 800; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 48px);
  margin-inline: auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

/* Top bar: floats over the scene, solid on the reading pages. */
.bar { position: absolute; inset: 0 0 auto; z-index: 5; }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; text-decoration: none; color: var(--cream); }
.brand svg { width: 26px; height: 29px; flex: none; }
.nav { display: flex; gap: 22px; font-weight: 700; font-size: 16px; }
.nav a { text-decoration: none; color: var(--cream); padding-block: 4px; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--gold); }
.bar--solid { position: static; background: var(--walnut); }

/* The scene */
.scene {
  position: relative;
  min-height: min(82vh, 56vw + 120px);
  background: var(--sky) url(img/scene.webp) center 62% / cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  isolation: isolate;
}
.scene::before { /* keeps the title readable over the sky */
  content: "";
  position: absolute;
  inset: 0 0 45%;
  z-index: -1;
  background: linear-gradient(rgba(25, 45, 52, 0.34), rgba(25, 45, 52, 0));
}
.scene::after { /* the land sinks into the walnut below */
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 16%;
  z-index: -1;
  background: linear-gradient(rgba(38, 29, 20, 0), var(--walnut));
}
.scene__text { padding-top: clamp(92px, 11vw, 130px); padding-bottom: 24px; }
.scene h1 {
  font-size: clamp(50px, 9.6vw, 128px);
  color: var(--cream);
  text-shadow: 0 3px 0 rgba(38, 29, 20, 0.55), 0 12px 34px rgba(25, 45, 52, 0.45);
}
.scene__lead { margin-top: 12px; font-size: clamp(19px, 2vw, 25px); font-weight: 700; max-width: 26em; text-shadow: 0 1px 10px rgba(25, 45, 52, 0.75); }

/* The route: the games as stops on one road, the Scout riding down it as the page scrolls. */
.route { position: relative; padding-block: 56px 96px; }
.route__line { position: absolute; top: 0; bottom: 56px; left: max(24px, calc((100vw - var(--page)) / 2)); width: 96px; pointer-events: none; }
.route__line svg { width: 100%; height: 100%; display: block; overflow: visible; }
.route__line path { fill: none; stroke: var(--parchment-2); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 2 17; vector-effect: non-scaling-stroke; opacity: 0.7; }
.route__scout { position: absolute; left: 0; top: 0; width: 104px; margin: -86px 0 0 -52px; will-change: transform; filter: drop-shadow(0 7px 5px rgba(0, 0, 0, 0.4)); }
.stop { position: relative; padding-left: 132px; }
.stop + .stop { margin-top: 112px; }
.stop__kind { color: var(--gold); font-weight: 800; font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; }

.game { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; margin-top: 18px; }
.game__logo { width: min(100%, 460px); margin-left: -6px; }
.game__text { margin-top: 18px; font-size: 20px; max-width: 30em; }
.game__status { margin-top: 12px; color: var(--parchment-2); font-size: 16px; }
.button {
  display: inline-block; margin-top: 26px; padding: 13px 26px 14px; border-radius: 14px;
  background: var(--gold); color: var(--walnut); font-weight: 800; text-decoration: none;
  box-shadow: 0 5px 0 var(--gold-deep); transition: transform 0.12s, box-shadow 0.12s;
}
.button:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--gold-deep); }
.button:active { transform: translateY(5px); box-shadow: none; }

/* Three board tiles, placed as they lie on the map. */
.tiles { position: relative; aspect-ratio: 1 / 0.82; }
.tiles img { position: absolute; width: 56%; filter: drop-shadow(0 16px 14px rgba(0, 0, 0, 0.42)); transition: transform 0.25s; }
.tiles img:hover { transform: translateY(-8px); }
.tiles .t1 { left: 0; top: 19%; }
.tiles .t2 { right: 0; top: 19%; z-index: 1; }
.tiles .t3 { left: 22%; top: 42%; z-index: 2; }
.tiles .t0 { left: 22%; top: 0; }

/* Still under the clouds */
.fog { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; margin-top: 18px; }
.fog h2 { font-size: clamp(32px, 4vw, 48px); }
.fog p { margin-top: 14px; max-width: 26em; color: var(--parchment); }
.fog__clouds { position: relative; aspect-ratio: 1 / 0.5; }
.fog__clouds img { position: absolute; width: 44%; animation: drift 7s ease-in-out infinite alternate; }
.fog__clouds img:nth-child(1) { left: 2%; top: 8%; }
.fog__clouds img:nth-child(2) { left: 30%; top: 0; z-index: 1; animation-delay: -3s; }
.fog__clouds img:nth-child(3) { right: 0; top: 12%; animation-delay: -5s; }
@keyframes drift { to { transform: translateX(10px) translateY(-5px); } }

/* Game page */
.scene--game { min-height: min(84vh, 56vw + 60px); align-items: center; }
.scene--game::before { display: none; }
.scene__logo { width: min(82vw, 640px); margin-top: clamp(84px, 8vw, 112px); filter: drop-shadow(0 16px 22px rgba(25, 30, 25, 0.35)); }
.section { padding-block: clamp(64px, 8vw, 104px); }
.section--paper { background: var(--parchment); color: var(--ink); }
.section--sky { background: var(--sky-deep); }
.intro { font-size: clamp(25px, 3.2vw, 38px); font-weight: 800; line-height: 1.25; max-width: 24em; text-wrap: balance; }
.h2 { font-size: clamp(32px, 4.4vw, 54px); }
.sub { margin-top: 12px; max-width: 34em; font-size: 19px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 48px 0 0; padding: 0; list-style: none; }
.steps img { height: 196px; width: 100%; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 12px 10px rgba(47, 36, 24, 0.3)); }
.steps h3 { margin-top: 20px; font-size: 26px; }
.steps p { margin-top: 8px; color: var(--ink-soft); font-size: 18px; }

.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 44px; }
.mode { overflow: hidden; border-radius: 22px; background: var(--walnut-2); border: 2px solid var(--walnut-3); }
.mode img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.mode div { padding: 22px 26px 28px; }
.mode h3 { font-size: 30px; }
.mode p { margin-top: 8px; color: var(--parchment); }

.monuments { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 60px; padding-bottom: 18px; border-bottom: 4px dotted var(--parchment-2); }
.monuments img { min-width: 0; flex: 1 1 0; object-fit: contain; max-height: 190px; filter: drop-shadow(0 10px 8px rgba(0, 0, 0, 0.35)); transition: transform 0.2s; }
.monuments img:hover { transform: translateY(-6px); }

.daily { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; margin-top: 40px; }
.daily h3 { font-size: 24px; color: var(--gold); }
.daily p { margin-top: 8px; }
.langs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; padding: 0; list-style: none; }
.langs li { padding: 5px 14px 6px; border-radius: 99px; background: rgba(255, 246, 223, 0.13); font-weight: 700; font-size: 16px; }
.cta { text-align: center; }
.cta img { width: 112px; margin: 0 auto 22px; border-radius: 25px; box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4); }
.cta p { margin-top: 10px; color: var(--parchment); }

/* Reading pages */
.reading { background: var(--paper); color: var(--ink); padding-block: clamp(44px, 6vw, 76px) 96px; }
.reading .wrap { display: grid; grid-template-columns: 220px minmax(0, 700px); gap: 56px; justify-content: center; align-items: start; }
.reading__side { position: sticky; top: 24px; font-size: 15px; font-weight: 700; }
.reading__side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.reading__side a { color: var(--ink-soft); text-decoration: none; }
.reading__side a:hover { color: var(--sky-deep); text-decoration: underline; }
.reading h1 { font-size: clamp(38px, 5vw, 58px); }
.reading__meta { margin-top: 12px; color: var(--ink-soft); font-size: 16px; }
.reading__lang { display: inline-block; margin-top: 10px; font-weight: 800; font-size: 16px; color: var(--sky-deep); }
.reading__body { min-width: 0; }
.reading__body > .lead { margin-top: 26px; font-size: 21px; font-weight: 700; line-height: 1.5; }
.reading h2 { margin-top: 46px; font-size: 27px; scroll-margin-top: 20px; }
.reading h3 { margin-top: 24px; font-size: 20px; }
.reading p, .reading ul.text { margin: 12px 0 0; }
.reading ul.text { padding-left: 22px; }
.reading ul.text li + li { margin-top: 6px; }
.reading strong { font-weight: 800; }
.reading a { color: var(--sky-deep); font-weight: 700; }
.table { margin-top: 18px; overflow-x: auto; border: 2px solid var(--parchment-2); border-radius: 14px; }
.table table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 16px; line-height: 1.45; background: #fffaf0; }
.table th, .table td { padding: 12px 14px; text-align: left; vertical-align: top; }
.table th { background: var(--parchment); font-weight: 800; }
.table tr + tr td { border-top: 2px solid var(--parchment); }
.mailbox { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 24px; padding: 22px 24px; border-radius: 16px; background: var(--walnut); color: var(--cream); }
.mailbox a { color: var(--gold); font-size: clamp(19px, 3vw, 24px); font-weight: 800; overflow-wrap: anywhere; }
.faq { margin-top: 12px; border-bottom: 2px solid var(--parchment-2); }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 800; font-size: 19px; }
.faq p { margin: 0 0 16px; }

/* Footer */
.foot { background: #1b140d; font-size: 16px; color: var(--parchment-2); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 32px; padding-block: 30px 34px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--cream); text-decoration: none; font-weight: 700; }
.foot a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  body { font-size: 17px; }
  .scene { min-height: 620px; background-position: 42% 100%; background-size: auto 78%; background-color: #5b8791; }
  .scene--game { min-height: 500px; background-size: auto 100%; }
  .stop { padding-left: 0; }
  .route { padding-block: 40px 72px; }
  .route__line { display: none; }
  .stop + .stop { margin-top: 72px; }
  .game, .fog { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .steps, .modes, .daily { grid-template-columns: minmax(0, 1fr); }
  .steps img { height: 170px; }
  .monuments { flex-wrap: wrap; justify-content: center; }
  .monuments img { flex: 0 1 29%; max-height: 118px; }
  .reading .wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .reading__side { display: none; }
  /* The data table reads as stacked rows on a phone, with nothing to scroll sideways. */
  .table table { min-width: 0; display: block; }
  .table thead { display: none; }
  .table tbody, .table tr, .table td { display: block; }
  .table td { padding: 2px 16px; }
  .table td:first-child { padding-top: 14px; font-weight: 800; }
  .table td:last-child { padding-bottom: 14px; color: var(--ink-soft); font-size: 15px; }
  .table tr + tr td { border-top: 0; }
  .table tr + tr { border-top: 2px solid var(--parchment); }
}
@media (max-width: 460px) {
  .nav { gap: 14px; font-size: 15px; }
  .brand { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
