/* ════════════════════════════════════════════════════════════════════════
   landing-sections.css — the landing's longer sections (store/index.html)

   · the competition journey: three phases on a rail, each with a
     «¿Quieres saber más…?» panel that unfolds a grid of feature cards;
   · the modalities strip, the club and shooter sections, the FAQ.
   Loaded after landing.css and uses its tokens. Without JavaScript every
   panel is open (html:not(.js)): nothing is hidden from a reader or a crawler.
   ════════════════════════════════════════════════════════════════════════ */

:root {
  /* One accent per phase, so an open panel says where the reader is.
     Not the modality colours (those mean aire/fuego/AAHH/plato). */
  --phase-before: #8fb3ff;
  --phase-during: #c8a84b;
  --phase-after: #7fd1b9;
  --panel-bg: #121212;
}
/* Light theme: darker phase accents (they are text on a light card) and the
   app's light modality colours. */
:root[data-theme="light"] {
  --phase-before: #3b62c4;
  --phase-during: #846b1e;
  --phase-after: #1f7a62;
  --panel-bg: #f3f0e8;
}
:root[data-theme="light"] .mod-aire  { --mc-bd: #185FA5; --mc-bg: rgba(55,138,221,.12); --mc-fg: #0C447C; }
:root[data-theme="light"] .mod-fuego { --mc-bd: #993C1D; --mc-bg: rgba(216,90,48,.12);  --mc-fg: #712B13; }
:root[data-theme="light"] .mod-aahh  { --mc-bd: #854F0B; --mc-bg: rgba(186,117,23,.14); --mc-fg: #633806; }
:root[data-theme="light"] .mod-plato { --mc-bd: #3B6D11; --mc-bg: rgba(99,153,34,.14);  --mc-fg: #27500A; }

/* ── Section heading block ──────────────────────────────────────────── */
.sec-head { max-width: 720px; margin-bottom: 24px; }
@media (min-width: 900px) { .sec-head { margin-bottom: 36px; } }
.sec-head .lead { margin-top: 6px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ── Modalities strip ───────────────────────────────────────────────── */
.mods { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.mod {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; min-height: 44px; border-radius: 999px;
  font-weight: 500; font-size: 15px;
  border: 1px solid var(--mc-bd); background: var(--mc-bg); color: var(--mc-fg);
}
.mod::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mc-bd); }
/* The app's modality colours (css/main/design-tokens.css, dark theme). */
.mod-aire  { --mc-bd: #378ADD; --mc-bg: rgba(55,138,221,.16); --mc-fg: #6cb6f0; }
.mod-fuego { --mc-bd: #D85A30; --mc-bg: rgba(216,90,48,.16);  --mc-fg: #f0997b; }
.mod-aahh  { --mc-bd: #BA7517; --mc-bg: rgba(186,117,23,.18); --mc-fg: #efb968; }
.mod-plato { --mc-bd: #639922; --mc-bg: rgba(99,153,34,.16);  --mc-fg: #97c459; }

/* ── Legal documents in a layer, with a way back ───────────────────── */
.doc-ov { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; background: var(--bg); }
.doc-ov[hidden] { display: none; }
.doc-bar {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  background: var(--header-bg); border-bottom: 1px solid var(--border);
}
.doc-back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  color: var(--text); font: inherit; font-size: 15px; cursor: pointer;
}
.doc-back svg { width: 18px; height: 18px; }
.doc-back:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.doc-t { color: var(--text-dim); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-frame { flex: 1; width: 100%; border: 0; background: #fff; }
body.doc-abierto { overflow: hidden; }

/* ── Contact form (under the document layer: the privacy policy opens on top) ── */
.ct-ov { z-index: 99; }
.ct-scroll { flex: 1; overflow-y: auto; padding: 20px 16px 32px; }
.ct-form, .ct-hecho { max-width: 560px; margin: 0 auto; display: grid; gap: 14px; }
.ct-form[hidden], .ct-hecho[hidden] { display: none; }
.ct-intro { color: var(--text-dim); }
.ct-l { display: grid; gap: 6px; font-size: 14px; color: var(--text-dim); }
.ct-i {
  min-height: 44px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.ct-i:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.ct-ta { resize: vertical; min-height: 140px; }
.ct-trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ct-chk { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--text-dim); }
.ct-chk input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--gold); }
.ct-chk a { color: var(--gold); }
.ct-estado { min-height: 1.4em; font-size: 14px; color: var(--gold); }
.ct-enviar { justify-self: start; }
.ct-enviar:disabled { opacity: .6; cursor: default; }
.ct-hecho { text-align: center; padding-top: 24px; }
.ct-hecho-t { font-family: var(--font-head); font-size: 22px; color: var(--text); }

/* ── No fixed fees: a short note under the modalities ──────────────── */
.no-fee {
  display: flex; align-items: flex-start; gap: 12px;
  margin-top: 22px; padding: 14px 16px; max-width: 640px;
  border: 1px solid var(--gold); border-radius: 14px; background: var(--surface);
}
.no-fee svg { width: 24px; height: 24px; flex: none; color: var(--gold); margin-top: 2px; }
.no-fee-t { margin: 0; font-weight: 600; color: var(--text); }
.no-fee-s { margin: 4px 0 0; font-size: 14px; color: var(--text-dim); }

/* ── Languages: the hero link and the list of the nine ─────────────── */
.hero-langs {
  display: inline-flex; align-items: center; gap: 8px;
  margin: -10px 0 22px; padding: 10px 14px; min-height: 44px; border-radius: 999px;
  font-size: 14px; font-weight: 500; text-decoration: none;
  color: var(--gold); border: 1px solid var(--border);
}
.hero-langs svg { width: 18px; height: 18px; flex: none; }
.hero-langs:hover { border-color: var(--gold); }
.langs { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.langs li {
  padding: 8px 14px; border-radius: 999px; font-size: 14px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-dim);
}

/* ── The journey: a rail with three phases ──────────────────────────── */
.journey { position: relative; display: grid; gap: 28px; }
/* The rail only on wide screens: on a phone its margin would squeeze the text. */
.journey::before {
  display: none;
  content: ""; position: absolute; left: 23px; top: 24px; bottom: 24px; width: 2px;
  background: linear-gradient(var(--phase-before), var(--phase-during), var(--phase-after));
  opacity: .35;
}
.phase { position: relative; --ph: var(--phase-before); }
.phase.during { --ph: var(--phase-during); }
.phase.after { --ph: var(--phase-after); }
/* On a phone the number sits on the card's top edge; on wide screens, on the rail. */
.phase-node {
  position: relative; z-index: 1; margin: 0 0 -24px 18px;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head); font-size: 22px; font-weight: 600;
  color: var(--ph); background: var(--bg);
  border: 2px solid var(--ph);
  box-shadow: 0 0 0 6px var(--bg), 0 0 24px -4px var(--ph);
}
.phase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 16px 20px;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.phase.open .phase-card {
  border-color: color-mix(in srgb, var(--ph) 55%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ph) 25%, transparent), 0 20px 50px -30px var(--ph);
}
.phase-kicker {
  font-family: var(--font-head); font-size: 14px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ph); margin-bottom: 6px;
}
.phase h3 { font-size: clamp(22px, 4.4vw, 30px); margin-bottom: 4px; }
.phase-grid { display: grid; gap: 28px; align-items: center; }
/* Inside a phase the frames follow the card's width, never the viewport's. */
.phase-grid > * { min-width: 0; }
.phase .phone { width: min(260px, 100%); }
.phase .points li::before { border-color: var(--ph); box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 7px var(--ph); }

/* ── «¿Quieres saber más…?» ─────────────────────────────────────────── */
.more-toggle {
  margin-top: 22px;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 12px 18px;
  font: inherit; font-weight: 500; font-size: 15px; text-align: left;
  color: var(--ph, var(--gold));
  background: color-mix(in srgb, var(--ph, var(--gold)) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--ph, var(--gold)) 45%, transparent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .2s ease;
}
.more-toggle:hover { background: color-mix(in srgb, var(--ph, var(--gold)) 18%, transparent); }
.more-toggle svg { width: 18px; height: 18px; flex: none; transition: transform .3s var(--ease); }
.more-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.more-toggle .when-open { display: none; }
.more-toggle[aria-expanded="true"] .when-open { display: inline; }
.more-toggle[aria-expanded="true"] .when-closed { display: none; }
html:not(.js) .more-toggle { display: none; }

/* The panel unfolds by animating its grid row from 0fr to 1fr. */
.more {
  display: grid; grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows .45s var(--ease), visibility 0s linear .45s;
}
.more > .more-inner { overflow: hidden; min-height: 0; }
.more.open, html:not(.js) .more {
  grid-template-rows: 1fr; visibility: visible;
  transition: grid-template-rows .45s var(--ease), visibility 0s;
}
.more-body {
  margin-top: 20px; padding: 16px 12px 12px;
  background: var(--panel-bg);
  border: 1px solid color-mix(in srgb, var(--ph, var(--gold)) 30%, transparent);
  border-radius: var(--radius);
}
/* Where the reader is, fixed at the top of the open panel. */
.more-where {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-head); letter-spacing: .12em; text-transform: uppercase; font-size: 13px;
  color: var(--ph, var(--gold));
  padding: 12px 0 14px; margin: -12px 0 16px;
  border-bottom: 1px solid var(--border);
  /* Not sticky (Santi, 2026-09-30): pinned, it covered the top of the first
     cards as they scrolled under it, and the panels are short enough without it. */
}
.more-where::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ph, var(--gold)); box-shadow: 0 0 12px var(--ph, var(--gold)); }
.feat-grid { display: grid; gap: 12px; }
.feat {
  padding: 16px 16px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.feat h4 { font-family: var(--font-head); font-weight: 500; font-size: 17px; letter-spacing: .01em; margin-bottom: 4px; color: var(--text); }
.feat p { font-size: 15px; color: var(--muted); }
.feat.star { border-color: color-mix(in srgb, var(--ph, var(--gold)) 45%, transparent); }
.feat.star h4::after {
  content: attr(data-badge); margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  font-family: var(--font-body); font-size: 11px; letter-spacing: .04em; vertical-align: 2px;
  color: var(--accent-fg); background: var(--ph, var(--gold));
}
/* Cards fade in one after another when the panel opens. */
html.js .more .feat { opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
html.js .more.open .feat { opacity: 1; transform: none; }
html.js .more.open .feat:nth-child(2) { transition-delay: .04s; }
html.js .more.open .feat:nth-child(3) { transition-delay: .08s; }
html.js .more.open .feat:nth-child(4) { transition-delay: .12s; }
html.js .more.open .feat:nth-child(5) { transition-delay: .16s; }
html.js .more.open .feat:nth-child(6) { transition-delay: .2s; }
html.js .more.open .feat:nth-child(n+7) { transition-delay: .24s; }

/* ── Club: bento of what a club gets beyond competitions ────────────── */
.bento { display: grid; gap: 14px; }
.tile {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 20px;
}
.tile svg { width: 26px; height: 26px; color: var(--gold); margin-bottom: 10px; }
.tile h3 { font-size: 19px; margin-bottom: 4px; }
.tile p { color: var(--muted); font-size: 15px; }
.tile.hero-tile {
  background: radial-gradient(120% 100% at 100% 0%, var(--gold-glow), transparent 60%), var(--surface);
  border-color: var(--gold-line);
}

/* ── FAQ ────────────────────────────────────────────────────────────── */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color .2s ease;
}
.faq details[open] { border-color: var(--gold-line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 18px; min-height: 52px; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--gold); transition: transform .25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; border-radius: var(--radius-sm); }
.faq .answer { padding: 0 18px 16px; color: var(--muted); }

/* ── Wider screens ──────────────────────────────────────────────────── */
@media (min-width: 700px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  /* A last tile across the whole row, so an odd count leaves no gap. */
  .club-split .tile-wide { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .journey::before { display: block; left: 31px; }
  .phase { padding-left: 88px; }
  .phase-node { position: absolute; left: 0; top: 0; margin: 0; width: 64px; height: 64px; font-size: 28px; }
  .phase-card { padding: 32px 32px; }
  .phase-grid { grid-template-columns: 1.1fr .9fr; gap: 40px; }
  .phase-grid.wide { grid-template-columns: .9fr 1.1fr; }
  .more-body { padding: 24px 24px 20px; }
  .feat-grid { grid-template-columns: repeat(3, 1fr); }
  .bento { grid-template-columns: repeat(3, 1fr); }
  .tile.hero-tile { grid-column: span 2; }
  /* The club: wide text column with its tiles, the phone beside it. */
  .club-split { grid-template-columns: 1.5fr .5fr; align-items: start; }
  .club-split .bento { grid-template-columns: repeat(2, 1fr); }
  .club-split > figure { position: sticky; top: 96px; }
  .club-split .phone { width: 100%; max-width: 260px; }
}

/* The thin rule between blocks also under the first screen: `.section + .section`
   never matched there, and the gap looked empty (Santi, 2026-10-13). */
.hero + .section { border-top: 1px solid var(--border); }

/* WhatsApp contact (@tirolog, Santi 2026-10-13), beside «¿Tienes dudas?». Only
   for the languages TiroLog answers in by phone: Spanish, Basque, Galician and
   Catalan. `lang` on <html> is updated by the language switcher. */
.support { display: flex; flex-wrap: wrap; align-items: center; column-gap: 18px; }
.support .wa-contact { display: inline-flex; align-items: center; gap: 6px; }
html:not([lang="es"]):not([lang="eu"]):not([lang="gl"]):not([lang="ca"]) .wa-contact { display: none; }

/* Simple mode (Santi, 2026-10-13): the two modes side by side, each phone with
   its caption underneath. One column on a phone, two from 700px. */
.modos { display: grid; grid-template-columns: 1fr; gap: 32px; justify-items: center; }
.modo { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.modo .phone { width: min(250px, 70vw); }
.modo figcaption { text-align: center; max-width: 260px; }
.modo figcaption strong { display: block; color: var(--gold); font-family: 'Oswald', sans-serif;
  letter-spacing: .06em; text-transform: uppercase; font-size: 1.05rem; }
.modo figcaption span { display: block; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.modos-note { text-align: center; color: var(--muted); margin: 28px auto 0; max-width: 560px; line-height: 1.6; }
@media (min-width: 700px) {
  .modos { grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; gap: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .more, .more.open { transition: none; }
  html.js .more .feat { opacity: 1; transform: none; transition: none; }
}
