/* x-train3d.com - the look of the game itself: Luckiest Guy and Baloo, the question board (cream, salmon frame,
   a solid drop), the teal pills, the colours of the train. The live 3D ride (js/ride.js) is behind everything. */

@font-face { font-family: 'Luckiest Guy'; src: url('../fonts/luckiestguy.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Baloo'; src: url('../fonts/baloo.woff2') format('woff2'); font-display: swap; }

:root {
  --ink: #1f3f66;          /* body text */
  --blue: #2a5fa8;         /* the game's question blue */
  --cream: #fff6e6;        /* the question board */
  --salmon: #ee8e72; --salmonD: #b85f48;
  --teal: #7dbfcb; --tealL: #9fd3da; --tealD: #4f8f9b;
  --yellow: #f6cf3f; --yellowD: #b98a10;
  --night: #17324f;        /* the departure board */
  --display: 'Luckiest Guy', Impact, 'Arial Black', sans-serif;
}

html { scroll-behavior: smooth; }
body {
  margin: 0; background: #e4f3f8; color: var(--ink);
  font-family: 'Baloo', 'Trebuchet MS', Arial, sans-serif; font-size: 18px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:focus-visible, .btn:focus-visible { outline: 4px solid var(--yellow); outline-offset: 4px; border-radius: 12px; }

/* the ride behind the page; without WebGL a still picture */
#ride { position: fixed; left: 0; top: 0; width: 100%; height: 100%; display: block; z-index: 0; }
#still { position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 0; display: none;
  background: #bfe3f0 url('../images/robin-train.webp') 62% 40% / cover no-repeat; }
html.noRide #ride { display: none; }
html.noRide #still { display: block; }

/* ---------- the top bar: the game's HUD ---------- */
.top {
  position: fixed; left: 0; top: 0; right: 0; z-index: 10; pointer-events: none;
  display: flex; align-items: center; padding: 12px 18px;
}
.top > * { pointer-events: auto; }
/* (r66) the logo badge (images/x-train3d-logo-*.webp, from the game's images/x-train3d-logo.png) in place of the
   words: small in the top bar, big in the hero, where it rolls in like a wheel - as in the game's intro */
.brand { display: block; line-height: 0; text-decoration: none; }
.brand img { width: 58px; height: 58px; filter: drop-shadow(0 3px 6px rgba(20, 50, 100, 0.35)); transition: transform 0.2s; }
.brand:hover img { transform: rotate(-8deg) scale(1.05); }
.top .brand { transition: opacity 0.3s; }
.top.heroUp .brand { opacity: 0; pointer-events: none; }   /* (js/site.js: while the hero's badge shows) */
.top .brand { margin-right: auto; }
.top nav a {
  display: inline-block; margin-left: 8px; padding: 8px 15px 5px 15px; border-radius: 30px; text-decoration: none;
  font-family: var(--display); font-size: 16px; color: #fff; background: var(--teal);
  border: 3px solid #fff; box-shadow: 0 4px 0 var(--tealD); text-shadow: 0 2px 0 var(--tealD);
}
.top nav a:hover { background: #8fcad5; }
.top nav a:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--tealD); }
.top .btn.small { margin-left: 14px; }

/* ★★ THE GAME'S SWITCH (3 Dec 2026 - Leon: the game goes online once it has registration). Until then every Play
   link (.playLink: the top bars, the hero's button, the golden ticket) says "Coming soon" and does nothing - js/site.js
   takes its link away too. THE DAY THE GAME IS IN play/: DELETE THIS BLOCK, then bump css/site.css?v= in index.html
   and privacy.html. (Each link holds both words: .go = the Play words, .soonTxt = "Coming soon".) */
.playLink { pointer-events: none; cursor: default; }
.playLink .go { display: none; }
.playLink .soonTxt { display: inline; }
a.btn.playLink { background: var(--cream); color: var(--salmonD); text-shadow: none; border: 3px dashed var(--salmon); box-shadow: none; }
.ticket.playLink .tBig.soonTxt { display: block; }
/* (end of the switch) */
.soonTxt { display: none; }   /* (always: "Coming soon" hidden unless the switch above shows it) */

/* ---------- buttons: the game's big button ---------- */
.btn {
  display: inline-block; cursor: pointer; text-decoration: none; padding: 13px 32px 8px 32px; border-radius: 50px;
  font-family: var(--display); font-size: 26px; line-height: 1.1; color: #fff; letter-spacing: 0.5px;
  background: var(--salmon); border: 5px solid var(--tealL); box-shadow: 0 6px 0 var(--salmonD); text-shadow: 0 3px 0 var(--salmonD);
}
.btn:hover { background: #f29d82; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--salmonD); }
.btn.quiet { background: #fff; color: var(--blue); border-color: var(--tealL); box-shadow: 0 6px 0 var(--tealD); text-shadow: none; }
.btn.quiet:hover { background: #f1fafc; }
.btn.small { font-size: 18px; padding: 8px 20px 5px 20px; border-width: 3px; box-shadow: 0 4px 0 var(--salmonD); text-shadow: 0 2px 0 var(--salmonD); }

/* ---------- the page over the ride ---------- */
main { position: relative; z-index: 1; }
main > section {
  position: relative; box-sizing: border-box; min-height: 100vh; padding: 110px 6vw 90px 6vw;
  display: flex; align-items: center;
}
h1, h2 { font-family: var(--display); font-weight: normal; letter-spacing: 1px; }
h2 { color: var(--blue); font-size: 44px; line-height: 1; margin: 0 0 14px 0; }

/* the question board */
.board {
  box-sizing: border-box; background: var(--cream); border: 6px solid var(--salmon); border-radius: 26px;
  box-shadow: 0 8px 0 var(--salmonD), 0 18px 34px rgba(25, 60, 95, 0.28); padding: 26px 30px;
}
.board p { margin: 0 0 12px 0; }
.board p:last-child { margin-bottom: 0; }

/* ---------- hero ---------- */
.hero { align-items: flex-start; padding-top: 17vh; }
.heroText { max-width: 600px; }
.hero h1.heroLogo { margin: -4vh 0 18px -6px; line-height: 0; }
.heroLogo img { width: 300px; height: 300px; filter: drop-shadow(0 10px 18px rgba(20, 50, 100, 0.4));
  animation: heroRoll 1.35s cubic-bezier(0.2, 0.8, 0.3, 1.06) 0.15s both; }
@keyframes heroRoll { 0% { opacity: 0; transform: translateX(70vw) rotate(720deg); } 12% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .heroLogo img { animation: none; } }
/* the glass bubble behind the words under the logo (Leon: "so the text will be readable") - like the coach's
   bubble windows: clear glass, the world blurred behind it, a white rim and a glint */
.glass {
  position: relative; overflow: hidden; padding: 24px 28px 22px 28px; border-radius: 32px;
  background: rgba(255, 255, 255, 0.58);
  background-image: linear-gradient(155deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.42) 55%, rgba(225, 243, 250, 0.5) 100%);
  -webkit-backdrop-filter: blur(10px) saturate(1.25); backdrop-filter: blur(10px) saturate(1.25);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.95), inset 0 -10px 24px rgba(125, 191, 203, 0.22), 0 14px 34px rgba(20, 60, 110, 0.22);
}
.glass::before {   /* the glint */
  content: ''; position: absolute; left: 16px; top: 9px; width: 46%; height: 16px; border-radius: 20px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
  transform: rotate(-2deg); pointer-events: none;
}
.glass > * { position: relative; }
.lead { margin: 0 0 22px 0; font-size: 25px; line-height: 1.4; color: #16365d; }
.heroBtns { margin: 0 0 12px 0; }
.heroBtns .btn { margin: 0 12px 12px 0; }
.fine { margin: 0; font-size: 16px; color: #24456b; }
.scrollHint {
  position: absolute; left: 50%; bottom: 26px; width: 46px; height: 46px; margin-left: -23px; border-radius: 50%;
  background: #fff; box-shadow: 0 4px 0 var(--tealD);
}
.scrollHint span {
  position: absolute; left: 15px; top: 11px; width: 12px; height: 12px;
  border-right: 4px solid var(--blue); border-bottom: 4px solid var(--blue); transform: rotate(45deg);
}

/* ---------- departures ---------- */
.departures { justify-content: flex-end; }
.board.dep {
  max-width: 780px; width: 100%; background: var(--night); color: #dbe8f3; border-color: var(--teal);
  box-shadow: 0 8px 0 #0e2236, 0 18px 34px rgba(10, 30, 55, 0.35);
}
.dep h2 { color: var(--yellow); text-shadow: 0 3px 0 #8a6408; font-size: 52px; }
.depNote { color: #b9cfe2; }
.depList { list-style: none; margin: 18px 0 0 0; padding: 0; }
.depList li + li { border-top: 2px dashed rgba(159, 211, 218, 0.25); }
.depList a {
  display: grid; grid-template-columns: 50px 190px 110px 1fr; align-items: center; column-gap: 12px;
  padding: 13px 10px; border-radius: 12px; text-decoration: none; color: inherit;
}
.depList a:hover { background: rgba(255, 255, 255, 0.07); }
.depList .no {
  width: 38px; height: 38px; border-radius: 50%; background: var(--yellow); color: var(--night);
  font-family: var(--display); font-size: 22px; line-height: 44px; text-align: center;
}
.depList .nm { font-family: var(--display); font-size: 25px; color: #fff; letter-spacing: 1px; }
.depList .via { color: var(--tealL); font-size: 17px; }
.depList .what { color: #c4d6e6; font-size: 16px; line-height: 1.35; }

/* ---------- the lines: a station sign on posts above the board ---------- */
.line { min-height: 125vh; }
.station { width: 100%; max-width: 560px; }
.line.right .station { margin-left: auto; }
.sign { position: relative; display: inline-block; margin: 0 0 0 36px; padding-bottom: 34px; }
.sign span {
  position: relative; z-index: 1; display: block; padding: 11px 26px 4px 26px;
  font-family: var(--display); font-size: 38px; line-height: 1.1; color: var(--blue); letter-spacing: 1px;
  background: var(--cream); border: 6px solid var(--salmon); border-radius: 14px; box-shadow: 0 6px 0 var(--salmonD);
}
.sign::before, .sign::after {
  content: ''; position: absolute; bottom: -4px; width: 13px; height: 60px; border-radius: 6px;
  background: #f6ecdc; box-shadow: inset -4px 0 0 #dccbb0;
}
.sign::before { left: 22%; }
.sign::after { right: 22%; }
.station .board { position: relative; z-index: 1; }
/* (3 Dec, r67 - Leon: "screenshots from every subject, not the maps"): each line's picture = the game itself, a stop
   with its question (images/lines/<line>.webp - the maps were there before) */
.shot { display: block; width: 100%; border-radius: 16px; border: 4px solid #fff; box-shadow: 0 3px 0 rgba(120, 80, 40, 0.18); margin: 0 0 16px 0; }

/* the five stations of a line, as a route */
.route { list-style: none; display: flex; margin: 18px 0 0 0; padding: 0; }
.route li { position: relative; flex: 1 1 0; padding: 24px 2px 0 2px; text-align: center; font-size: 14px; line-height: 1.2; color: var(--ink); }
.route li::before {
  content: ''; position: absolute; z-index: 1; left: 50%; top: 0; width: 12px; height: 12px; margin-left: -10px;
  border-radius: 50%; background: #fff; border: 4px solid var(--salmon);
}
.route li + li::after { content: ''; position: absolute; left: -50%; top: 8px; width: 100%; height: 4px; background: var(--salmon); }

/* ---------- at the stations: a coach, the pictures in its windows ---------- */
.stops { flex-direction: column; align-items: stretch; }
.stopsHead { max-width: 660px; margin: 0 auto 46px auto; text-align: center; }
.coach {
  position: relative; max-width: 1180px; margin: 0 auto 40px auto; padding: 30px 30px 34px 30px; box-sizing: border-box;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
  background: #f2a391; border-radius: 34px; box-shadow: 0 10px 0 #c9735f, 0 22px 40px rgba(25, 60, 95, 0.3);
}
.coach::before {   /* the roof */
  content: ''; position: absolute; left: -14px; right: -14px; top: -22px; height: 30px; border-radius: 30px 30px 10px 10px;
  background: var(--tealL); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.08);
}
.coach::after {    /* the wheels */
  content: ''; position: absolute; left: 6%; right: 6%; bottom: -44px; height: 40px;
  background:
    radial-gradient(circle at 20px 20px, #f6ecdc 7px, #e8735a 8px, #e8735a 19px, transparent 20px) 0 0 / 50% 40px repeat-x;
}
.coach figure {
  margin: 0; overflow: hidden; border-radius: 22px; background: var(--cream);
  border: 6px solid #f6ecdc; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.05), 0 4px 0 #c9735f;
}
.coach img { display: block; width: 100%; }
.coach figcaption { padding: 9px 14px 7px 14px; font-family: var(--display); font-size: 17px; line-height: 1.2; color: var(--blue); }

/* ---------- Robin ---------- */
.robin { justify-content: center; }
.robinPic { flex: 0 1 62%; position: relative; z-index: 0; }
.robinPic img { display: block; width: 100%; border-radius: 28px; border: 6px solid #fff; box-shadow: 0 8px 0 var(--tealD), 0 18px 34px rgba(25, 60, 95, 0.3); }
.robinText { flex: 0 1 440px; position: relative; z-index: 1; margin-left: -70px; }

/* ---------- parents and teachers ---------- */
.facts { max-width: 700px; }
.facts dl { margin: 6px 0 0 0; display: grid; grid-template-columns: 200px 1fr; column-gap: 22px; row-gap: 14px; }
.facts dt { font-family: var(--display); font-size: 19px; line-height: 1.25; color: var(--salmonD); padding-top: 3px; }
.facts dd { margin: 0; }

/* ---------- the golden ticket ---------- */
.ticketSec { justify-content: flex-start; min-height: 90vh; padding-left: 8vw; }
.ticket {
  position: relative; display: block; width: 640px; max-width: 92vw; text-decoration: none;
  transform: rotate(-5deg); transition: transform 0.25s cubic-bezier(0.3, 1.4, 0.6, 1);
  filter: drop-shadow(0 18px 24px rgba(25, 60, 95, 0.35));
}
.ticket:hover, .ticket:focus-visible { transform: rotate(-1deg) scale(1.04); }
.ticket img { display: block; width: 100%; }
.tText {
  position: absolute; left: 19%; right: 6%; top: 0; bottom: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
}
.tBig { font-family: var(--display); font-size: 50px; line-height: 1; color: #7a4a00; text-shadow: 0 2px 0 #ffe999; margin: 8px 0 10px 0; }
.tSmall { font-size: 18px; color: #8a5a00; }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 1; background: var(--night); color: #c4d6e6; text-align: center; padding: 34px 6vw; font-size: 16px; }
.foot p { margin: 4px 0; }
.foot a { color: var(--yellow); }

/* ---------- the privacy page ---------- */
.page { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 110px 6vw 70px 6vw; }
.page h1 { color: var(--blue); font-size: 48px; line-height: 1; margin: 0 0 18px 0; }
.page h2 { font-size: 26px; margin: 26px 0 8px 0; }
.page .board { padding: 30px 34px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .heroLogo img { width: 250px; height: 250px; }
  .depList a { grid-template-columns: 46px 170px 1fr; }
  .depList .what { grid-column: 2 / 4; }
  .robin { flex-direction: column; }
  .robinPic { flex-basis: auto; width: 100%; max-width: 820px; }
  .robinText { margin: -60px 0 0 0; max-width: 620px; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .top { padding: 10px 12px; }
  .top nav { display: none; }
  main > section { padding: 88px 16px 70px 16px; }
  .hero { padding-top: 92px; }
  .heroLogo img { width: 190px; height: 190px; }
  .hero h1.heroLogo { margin-top: 0; }
  .brand img { width: 46px; height: 46px; }
  .lead { font-size: 20px; }
  .glass { padding: 18px 18px 16px 18px; border-radius: 26px; }
  .btn { font-size: 21px; padding: 11px 24px 6px 24px; }
  h2 { font-size: 36px; }
  .dep h2 { font-size: 40px; }
  .board { padding: 20px 18px; border-width: 5px; border-radius: 22px; }
  .depList a { grid-template-columns: 42px 1fr; padding: 12px 4px; }
  .depList .via { grid-column: 2; }
  .depList .what { grid-column: 2; }
  .line { min-height: 110vh; align-items: flex-end; }
  .sign { margin-left: 18px; }
  .sign span { font-size: 30px; }
  .route li { font-size: 12px; }
  .coach { grid-template-columns: 82% 82% 82% 82% 82% 82%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 20px; gap: 16px; border-radius: 26px; }
  .coach figure { scroll-snap-align: center; }
  .coach::before { left: -6px; right: -6px; }
  .coach::after { display: none; }
  .facts dl { grid-template-columns: 1fr; row-gap: 2px; }
  .facts dd { margin-bottom: 12px; }
  .ticketSec { justify-content: center; padding-left: 16px; }
  .tBig { font-size: 30px; }
  .tSmall { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticket { transition: none; }
}
#still.always { display: block; }
