/* Rail Bloom — un sol full d'estil, cap script propi.
 *
 * La idea: la pàgina és la MAQUETA del joc vista de dalt. El fons és el tauler
 * de gespa, amb illes una mica més clares; sota el hero hi passa una via de
 * veritat (balast, travesses i carrils) i hi circula un tren dels colors del
 * joc. Els panells són crema amb relleu, com les finestres del joc, i cada punt
 * porta el senyal d'una estació: cada color té la SEVA forma (cercle vermell,
 * quadrat blau, triangle verd), com al joc. En fosc, la mateixa maqueta de nit,
 * amb els fanals encesos. Títols en Fredoka, la lletra del joc (subconjunt
 * llatí, OFL 1.1); el cos, la pila arrodonida del sistema.
 */

@font-face {
  font-family: 'Fredoka';
  src: url('/assets/fonts/fredoka-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;

  /* el tauler: gespa i illes */
  --board: #e4eecb;
  --board-2: #d5e5ae;
  --block: rgba(255, 255, 255, 0.35);

  /* la via */
  --ballast: #e6dcc2;
  --sleeper: #9a7650;
  --rail: #4b5263;

  /* panells crema amb relleu */
  --panel: #fffdf5;
  --panel-2: #f6f1df;
  --edge: #e1d8bb;
  --relief: #c7bb95;

  /* tinta i botons (els del joc: «Torna-hi» blau, «Següent» verd) */
  --ink: #26303f;
  --ink-soft: #566170;
  --title: #2a3550;
  --title-relief: #b4cd84;
  --blue: #2f74d0;
  --blue-deep: #1f4f99;
  --green: #36a35a;
  --green-deep: #237340;
  --gold: #f2c230;
  --gold-deep: #c4931a;

  /* les estacions: color i forma */
  --st-red: #e5483b;
  --st-blue: #2f6fd0;
  --st-green: #36a35a;

  --link: #1f5fb4;
  --radius: 22px;
  --shadow: 0 18px 40px -24px rgba(38, 48, 63, 0.45);
  --display: 'Fredoka', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;
  --body: ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --board: #172038;
    --board-2: #1d2945;
    --block: rgba(255, 214, 120, 0.05);

    --ballast: #2b3754;
    --sleeper: #5c4a39;
    --rail: #a9b4c9;

    --panel: #212c48;
    --panel-2: #283556;
    --edge: #33416a;
    --relief: #0d1324;

    --ink: #eef1f7;
    --ink-soft: #b9c2d6;
    --title: #fff6df;
    --title-relief: #c4931a;
    --blue: #5b9bf0;
    --blue-deep: #2f5fa8;
    --green: #56c27a;
    --green-deep: #2c7a48;
    --gold: #f5c542;
    --gold-deep: #b98712;

    --st-red: #ff6b5c;
    --st-blue: #5b9bf0;
    --st-green: #56c27a;

    --link: #8cbcff;
    --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7);
  }
}

/* Japonès, coreà i xinès: la Fredoka (subconjunt llatí) no porta aquests
 * glifs. Cap font web nova: la del sistema de cada llengua, com el joc
 * (Hiragino, Apple SD Gothic Neo, PingFang), i Noto CJK a Android i Linux.
 * El nom «Rail Bloom» i les xifres segueixen en Fredoka. */
html:lang(ja) {
  --display: 'Fredoka', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Noto Sans CJK JP', 'Noto Sans JP', 'Yu Gothic', Meiryo, sans-serif;
  --body: ui-rounded, 'SF Pro Rounded', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans CJK JP', 'Noto Sans JP', 'Yu Gothic', Meiryo, sans-serif;
}
html:lang(ko) {
  --display: 'Fredoka', 'Apple SD Gothic Neo', 'Noto Sans CJK KR', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --body: ui-rounded, 'SF Pro Rounded', 'Apple SD Gothic Neo', 'Noto Sans CJK KR', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}
html:lang(zh-Hans) {
  --display: 'Fredoka', 'PingFang SC', 'Noto Sans CJK SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --body: ui-rounded, 'SF Pro Rounded', 'PingFang SC', 'Noto Sans CJK SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
}
html:lang(zh-Hant) {
  --display: 'Fredoka', 'PingFang TC', 'Noto Sans CJK TC', 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  --body: ui-rounded, 'SF Pro Rounded', 'PingFang TC', 'Noto Sans CJK TC', 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
}
html:is(:lang(ja), :lang(ko), :lang(zh)) :is(.h1, .h2, .h3, .wordmark, .foot-brand, .qa-q, .button, figcaption, .soon) {
  letter-spacing: normal;
}
html:is(:lang(ja), :lang(zh)) body {
  line-break: strict;
}
/* Talla per frases on el navegador ho sap fer (Chrome); Safari ho ignora. */
html:lang(ja) body {
  word-break: auto-phrase;
}
/* Les taules d'etiqueta i valor (特定商取引法): que l'etiqueta no quedi d'un caràcter per línia en mòbil. */
html:is(:lang(ja), :lang(ko), :lang(zh)) .prose :is(td, th):first-child {
  min-width: 6.5em;
}
html:is(:lang(ja), :lang(zh)) .prose td {
  overflow-wrap: anywhere;
}
html:lang(ko) body {
  word-break: keep-all;
}

/* ------------------------------------------------------------------ base */

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

html {
  /* El tauler de la maqueta: gespa, amb illes més clares escampades. */
  background-color: var(--board);
  background-image:
    radial-gradient(ellipse 340px 220px at 12% 18%, var(--block), transparent 70%),
    radial-gradient(ellipse 420px 260px at 88% 46%, var(--block), transparent 70%),
    radial-gradient(ellipse 380px 240px at 20% 78%, var(--block), transparent 70%),
    linear-gradient(180deg, var(--board) 0, var(--board-2) 100%);
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  overflow-x: hidden;
}

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

a {
  color: var(--link);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--blue);
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.shell-narrow {
  width: min(760px, 100% - 32px);
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--panel);
  color: var(--ink);
  border-radius: 12px;
  font-weight: 700;
}

.skip:focus {
  top: 12px;
}

/* ------------------------------------------------------------- tipografia */

.h1,
.h2,
.h3,
.wordmark,
.foot-brand,
.qa-q,
.button,
figcaption,
.soon {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.005em;
}

.h1 {
  margin: 0;
  font-size: clamp(3.1rem, 9vw, 5.8rem);
  line-height: 0.95;
  color: var(--title);
  text-shadow: 0 5px 0 var(--title-relief);
}

.h1-small {
  font-size: clamp(2.4rem, 7vw, 3.6rem);
}

.h2 {
  margin: 0 0 24px;
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  line-height: 1.1;
  color: var(--title);
}

.h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  line-height: 1.2;
}

.copy,
.lead {
  margin: 0 0 12px;
}

.lead {
  font-size: 1.2rem;
}

.fine {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------ capçalera */

.top {
  padding: 14px 0 0;
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  color: var(--title);
  text-decoration: none;
}

.wordmark img {
  border-radius: 8px;
  box-shadow: 0 2px 0 var(--relief);
}

.sections {
  margin-left: auto;
}

.sections ul {
  display: flex;
  margin: 0;
  padding: 4px;
  list-style: none;
  gap: 2px;
  background: var(--panel);
  border: 2px solid var(--edge);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--relief);
}

.sections a {
  display: block;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}

.sections a:hover {
  background: var(--panel-2);
  color: var(--ink);
}

.langs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
}

.langs a,
.langs .here {
  padding: 4px 6px;
  border-radius: 8px;
}

.langs a {
  color: inherit;
  text-decoration: none;
  opacity: 0.8;
}

.langs a:hover {
  opacity: 1;
  text-decoration: underline;
}

.langs .here {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 2px 0 var(--relief);
}

/* El selector de la capçalera: tretze llengües plegades en un <details>, sense JS. */
.lang-menu {
  position: relative;
}

.lang-menu summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--panel);
  border: 2px solid var(--edge);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--relief);
  cursor: pointer;
  list-style: none;
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

/* Un globus petit dibuixat amb vores, sense imatge ni font d'icones. */
.lang-menu summary::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
  box-shadow: inset 4px 0 0 -2px currentColor, inset -4px 0 0 -2px currentColor;
}

.lang-menu summary::after {
  content: '';
  width: 7px;
  height: 7px;
  margin: -3px 0 0 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.lang-menu[open] summary::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}

.lang-menu ul {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 5;
  min-width: 220px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--panel);
  border: 3px solid var(--edge);
  border-radius: 18px;
  box-shadow: 0 5px 0 var(--relief), var(--shadow);
}

.lang-menu li a,
.lang-menu li .here {
  display: block;
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.lang-menu li a:hover {
  background: var(--panel-2);
}

.lang-menu li .here {
  background: var(--panel-2);
  box-shadow: inset 4px 0 0 var(--st-red);
}

.langs .sep {
  opacity: 0.5;
}

@media (max-width: 899px) {
  .sections {
    order: 3;
    width: 100%;
    margin: 0;
  }

  .sections ul {
    justify-content: space-between;
  }

  .sections li {
    flex: 1;
    text-align: center;
  }

  .sections a {
    padding: 7px 4px;
    font-size: 0.88rem;
  }

  .lang-menu {
    margin-left: auto;
  }
}

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

.hero {
  position: relative;
  padding: 40px 0 0;
}

.hero-grid {
  display: grid;
  gap: 28px;
  align-items: center;
  justify-items: center;
  text-align: center;
  padding-bottom: 40px;
}

/* La icona damunt d'una illa de gespa, com una estació de la maqueta. */
.hero-stop {
  position: relative;
  display: grid;
  place-items: center;
  width: 240px;
  aspect-ratio: 1;
}

.hero-stop::before {
  content: '';
  position: absolute;
  inset: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--block) 0 45%, transparent 70%);
}

@media (prefers-color-scheme: dark) {
  /* De nit, la icona brilla com un fanal. */
  .hero-stop::before {
    background: radial-gradient(circle, rgba(245, 197, 66, 0.28) 0 30%, rgba(245, 197, 66, 0.08) 52%, transparent 70%);
  }
}

.hero-icon {
  position: relative;
  width: 168px;
  border-radius: 38px;
  box-shadow: 0 6px 0 var(--relief), var(--shadow);
}

.hero-copy {
  display: grid;
  justify-items: center;
  gap: 16px;
}

.tagline {
  margin: 0;
  max-width: 32ch;
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}

.cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge {
  width: 156px;
  height: 52px;
}

.badge-still {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.soon {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--gold);
  color: #2a2410;
  font-size: 0.95rem;
  box-shadow: 0 3px 0 var(--gold-deep);
}

.note {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

@media (min-width: 900px) {
  .hero {
    padding-top: 56px;
  }

  .hero-grid {
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
    gap: 56px;
    padding-inline: 24px;
  }

  .hero-copy {
    justify-items: start;
  }

  .hero-stop {
    width: 300px;
  }

  .hero-icon {
    width: 240px;
    border-radius: 54px;
  }
}

/* ---------------------------------------------------------------- la via */

/* Una via vista de dalt, de punta a punta: balast, travesses i dos carrils,
 * tot amb fons de CSS (cap imatge). Hi circula un tren de tres colors, cada
 * cotxe amb la seva forma, d'esquerra a dreta. */
.track {
  position: relative;
  height: 64px;
  overflow: hidden;
  background:
    linear-gradient(var(--rail), var(--rail)) 0 19px / 100% 5px no-repeat,
    linear-gradient(var(--rail), var(--rail)) 0 40px / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, var(--sleeper) 0 10px, transparent 10px 26px) 0 9px / 100% 46px no-repeat,
    linear-gradient(var(--ballast), var(--ballast)) 0 4px / 100% 56px no-repeat;
}

.train {
  position: absolute;
  top: 10px;
  left: 0;
  width: 236px;
  height: 44px;
  animation: run 22s linear infinite;
  will-change: transform;
}

@keyframes run {
  from {
    transform: translateX(-260px);
  }
  to {
    transform: translateX(calc(100vw + 40px));
  }
}

/* ----------------------------------------------------------------- bandes */

.band {
  padding: 56px 0;
  scroll-margin-top: 12px;
}

.band-first {
  padding-top: 40px;
}

.panel {
  background: var(--panel);
  border: 3px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--relief), var(--shadow);
}

/* ---------------------------------------------------------------- captures */

.shots {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shot figure {
  margin: 0;
  padding: 8px 8px 0;
  background: var(--panel);
  border: 3px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--relief), var(--shadow);
}

.shot img {
  width: 100%;
  border-radius: 14px;
}

.shot figcaption {
  padding: 10px 8px 12px;
  font-size: 1.1rem;
  color: var(--ink);
}

@media (min-width: 720px) {
  .shots {
    grid-template-columns: 1fr 1fr;
  }

  .shot:first-child {
    grid-column: 1 / -1;
  }

  .shot:first-child figure {
    padding: 12px 12px 0;
  }

  .shot:first-child figcaption {
    font-size: 1.3rem;
  }
}

/* ------------------------------------------------------------------ punts */

.points {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.point {
  position: relative;
  padding: 24px 24px 20px;
}

/* El senyal de cada punt: la forma i el color d'una estació del joc. */
.point .h3 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.point .h3::before {
  content: '';
  flex: none;
  width: 22px;
  height: 22px;
  background: var(--st-red);
  border-radius: 50%;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18);
}

.point:nth-child(2) .h3::before {
  background: var(--st-blue);
  border-radius: 4px;
}

.point:nth-child(3) .h3::before {
  width: 24px;
  height: 22px;
  background: var(--st-green);
  border-radius: 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  box-shadow: none;
}

.point .copy {
  margin: 0;
}

@media (min-width: 900px) {
  .points {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* -------------------------------------------------------------- preguntes */

.qas {
  padding: 6px 24px;
}

.qa + .qa {
  border-top: 2px dashed var(--edge);
}

.qa-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-size: 1.15rem;
  cursor: pointer;
  list-style: none;
}

.qa-q::-webkit-details-marker {
  display: none;
}

.qa-q::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  box-shadow: 0 3px 0 var(--blue-deep);
  transition: transform 0.2s ease;
}

.qa[open] .qa-q::after {
  transform: rotate(45deg);
}

.qa-a {
  margin: 0 0 18px;
  max-width: 68ch;
  color: var(--ink-soft);
}

@media (prefers-color-scheme: dark) {
  .qa-q::after {
    color: #0d1730;
  }
}

/* ----------------------------------------------------------------- suport */

.split {
  display: grid;
  gap: 28px;
  padding: 28px 24px;
}

.split .h2 {
  color: var(--ink);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1.1fr;
    gap: 48px;
    padding: 40px;
  }
}

.form {
  margin: 0;
}

.field {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
}

.field label {
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--panel-2);
  border: 2px solid var(--edge);
  border-radius: 14px;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: 3px solid var(--blue);
  outline-offset: 1px;
}

.hp {
  position: absolute;
  left: -9999px;
}

/* El botó verd del joc («Següent»). */
.button {
  justify-self: start;
  padding: 12px 30px;
  font-size: 1.15rem;
  color: #fff;
  background: var(--green-deep);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 5px 0 #17502c;
  cursor: pointer;
}

.button:hover {
  filter: brightness(1.08);
}

.button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #17502c;
}

/* ------------------------------------------------------- legals i gràcies */

.prose {
  padding: 32px 24px;
  overflow-wrap: break-word;
}

/* Els compostos alemanys i neerlandesos («Datenschutzerklärung») no caben sencers
 * al mòbil; la resta de llengües no es parteix (ni «Rail-bloom» ni els títols). */
html:is(:lang(de), :lang(nl)) .prose :is(p, li, td) {
  hyphens: auto;
}

@media (min-width: 720px) {
  .prose {
    padding: 44px 48px;
  }
}

.prose .h1 {
  margin-bottom: 20px;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--ink);
  text-shadow: none;
  line-height: 1.1;
}

.prose h2 {
  margin: 32px 0 10px;
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1.25;
}

.prose p,
.prose li {
  max-width: 72ch;
}

.prose ul {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 4px;
}

.prose code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

/* Una taula ampla (els destinataris, la de transferències de la privacitat coreana)
 * es desplaça dins el panell en comptes d'eixamplar la pàgina. */
.prose .table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

/* Quatre columnes no caben en un mòbil: la taula guarda una amplada llegible i llisca. */
.prose .table-scroll table:has(th:nth-child(4)) {
  min-width: 34rem;
}

.prose table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 0.97rem;
}

.prose th,
.prose td {
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  border-bottom: 2px solid var(--edge);
}

.thanks {
  padding: 36px 28px;
  text-align: center;
}

.thanks-icon {
  margin: 0 auto 16px;
  border-radius: 22px;
  box-shadow: 0 4px 0 var(--relief);
}

.thanks .h1 {
  color: var(--ink);
  text-shadow: none;
  margin-bottom: 12px;
}

/* --------------------------------------------------------------------- peu */

/* El peu és l'andana: una franja de llambordes fosques al final de la maqueta. */
.foot {
  margin-top: 24px;
  padding: 48px 0 40px;
  color: #eef1f7;
  background: #2c3446;
}

@media (prefers-color-scheme: dark) {
  .foot {
    background: #0e1527;
  }
}

.foot a {
  color: inherit;
}

.foot-grid {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.foot-brand {
  margin: 0;
  font-size: 1.5rem;
}

.foot .langs {
  flex-wrap: wrap;
}

.foot .langs .here {
  background: #eef1f7;
  color: #26303f;
  box-shadow: none;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-fine,
.foot-mail {
  margin: 0;
  font-size: 0.92rem;
}

.foot-fine {
  opacity: 0.85;
}

/* -------------------------------------------------------- avís de galetes */

/* L'avís de galetes (`analytics/static`, mode avís): una llosa més de l'andana del peu, amb el botó verd del joc. Va just
 * abans de </body> i és `sticky` a baix: mentre es llegeix, flota a la vora de la
 * pantalla; en arribar al final, es queda a continuació del peu, del mateix color, i
 * no el tapa. No fa saltar res: surt amagat (`hidden`) i, en mostrar-se, s'afegeix
 * al final de la pàgina, sota el que es veu. */
.cookie-consent {
  position: sticky;
  bottom: 0;
  z-index: 20;
  color: #eef1f7;
  background: #2c3446;
  border-top: 1px solid rgba(238, 241, 247, 0.16);
  box-shadow: 0 -12px 28px -16px rgba(0, 0, 0, 0.55);
}

.cookie-consent[hidden] {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .cookie-consent {
    background: #0e1527;
  }
}

.cookie-consent-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
  padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px));
}

.cookie-consent-text {
  flex: 1 1 24rem;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.cookie-consent-link {
  color: inherit;
  font-weight: 700;
  white-space: nowrap;
}

.cookie-consent-link:hover {
  color: inherit;
  text-decoration-thickness: 3px;
}

.cookie-consent-actions {
  display: flex;
  gap: 12px;
}

/* El botó verd del joc, una mica més petit. */
.cookie-consent-button {
  min-height: 44px;
  padding: 8px 28px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  background: var(--green-deep);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 4px 0 #17502c;
  cursor: pointer;
}

.cookie-consent-button:hover {
  filter: brightness(1.08);
}

.cookie-consent-button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #17502c;
}

/* Sobre el fons fosc, el contorn del focus en groc, que es veu més que el blau. */
.cookie-consent :focus-visible {
  outline-color: var(--gold);
}

/* A la política de galetes, l'enllaç que reobre l'avís fa de botó. */
.prose .consent-manage a {
  display: inline-block;
  padding: 8px 22px;
  font-family: var(--display);
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: var(--green-deep);
  border-radius: 14px;
  box-shadow: 0 4px 0 #17502c;
}

.prose .consent-manage a:hover {
  color: #fff;
  filter: brightness(1.08);
}

/* Mòbil: el botó ocupa tota l'amplada, fàcil de tocar amb el polze. */
@media (max-width: 479px) {
  .cookie-consent-inner {
    gap: 10px;
    padding-top: 12px;
  }

  .cookie-consent-text {
    font-size: 0.9rem;
  }

  .cookie-consent-actions,
  .cookie-consent-button {
    flex: 1 1 100%;
  }
}

/* ---------------------------------------------------------------- el blog */
/* ADR 014. El llistat, una pila de panells crema com els punts; l'article, el panell dels
 * legals (`.prose`), amb el senyal vermell de l'estació a l'avís «és nostre» i la crida al
 * joc com una andana (crema fosc, el badge i «Coming soon»). Sobri: cap animació. */

.blog-eyebrow {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-deep);
}

.blog-eyebrow a {
  color: inherit;
  text-decoration: none;
}

.blog-eyebrow a:hover {
  text-decoration: underline;
}

.blog-index .lead {
  margin-top: 16px;
}

.blog-list {
  display: grid;
  gap: 22px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.blog-card {
  padding: 22px 24px;
}

.blog-card .h3 {
  margin-top: 6px;
}

.blog-card .h3 a {
  color: var(--title);
  text-decoration: none;
}

.blog-card .h3 a:hover {
  color: var(--link);
  text-decoration: underline;
}

.blog-card .copy {
  margin: 0;
}

.blog-card-img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 16px;
  border-radius: 14px;
}

.blog-meta {
  margin: 12px 0 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.blog-card .blog-meta {
  margin-top: 0;
}

.blog-rss {
  margin-top: 28px;
}

.blog-post .lead {
  margin-top: 4px;
}

.blog-post h3 {
  margin: 22px 0 6px;
  font-family: var(--display);
  font-size: 1.12rem;
  line-height: 1.3;
}

.blog-post a {
  color: var(--link);
}

.blog-cover,
.blog-post p > img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 24px;
  border-radius: 14px;
}

.blog-label {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
}

.blog-toc {
  margin-top: 28px;
  padding: 16px 20px;
  background: var(--panel-2);
  border: 2px solid var(--edge);
  border-radius: 16px;
  max-width: 72ch;
}

.blog-toc ol {
  margin: 8px 0 0;
  padding-left: 1.4em;
}

.blog-toc li + li {
  margin-top: 4px;
}

/* «Rail Bloom és nostre»: el senyal vermell de l'estació (el cercle) a la vora. */
.blog-ours {
  position: relative;
  margin-top: 28px;
  padding: 14px 18px 14px 46px;
  background: var(--panel-2);
  border: 2px solid var(--edge);
  border-radius: 16px;
  max-width: 72ch;
}

.blog-ours::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 17px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--st-red);
}

.blog-ours .blog-label {
  color: var(--st-red);
}

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

.blog-faq h3 {
  margin-top: 20px;
}

.blog-cta {
  margin-top: 40px;
  padding: 24px;
  background: var(--panel-2);
  border: 3px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: 0 5px 0 var(--relief);
  max-width: 72ch;
}

.blog-cta-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--title);
}

.blog-cta-text p {
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.blog-cta .cta {
  margin-top: 18px;
  flex-wrap: wrap;
}

.blog-back {
  margin: 36px 0 0;
  font-family: var(--display);
  font-weight: 700;
}

.blog-back a {
  color: var(--link);
  text-decoration: none;
}

.blog-back a:hover {
  text-decoration: underline;
}

/* El mode de mostra (`BLOG_DRAFTS=1`, només previews): el que encara no és publicat, amb el
 * groc del «Coming soon». */
.blog-draft {
  margin: 0 0 20px;
  padding: 8px 14px;
  border: 2px dashed var(--gold-deep);
  border-radius: 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: color-mix(in srgb, var(--gold) 22%, transparent);
}

.blog-draft-tag {
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--gold);
  color: #2a2410;
}

/* ------------------------------------------------------------ moviment */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  /* El tren s'atura a l'andana. */
  .train {
    animation: none;
    transform: translateX(12vw);
  }

  .qa-q::after {
    transition: none;
  }
}

/* El crèdit de la imatge de portada del blog (`imageCredit`): discret, sota la imatge. */
.blog-credit { margin-top: 6px; font-size: 12px; line-height: 1.4; opacity: 0.75; }
.blog-credit a { color: inherit; text-decoration: underline; }
