/* FanApp — Concepto D · Resumen del partido
   MATCH + PLACE + BODY + MOMENTS + HISTORY
   Light + dark, both designed on purpose. Not diary, not SaaS, not live-score. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100%; }
html, body { overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd { margin: 0; }
input, select { font: inherit; color: inherit; }

button, a, select, input[type="submit"] { touch-action: manipulation; }
a[href], button:not(:disabled), select, .recap-marker, .club-swatch { cursor: pointer; }

:focus { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100%; left: var(--space-4);
  z-index: 1000;
  background: var(--text-primary);
  color: var(--bg);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  font-family: var(--font-condensed);
  font-weight: 600;
  transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus { top: var(--space-4); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-sm { width: 16px; height: 16px; }

/* Faint mowed-pitch stripe — the one recurring football texture, used only on
   the three surfaces that are meant to carry match feeling: hero preview,
   recap card, season strip. Subtle on purpose; never competes with content. */
.pitch-surface {
  background-image:
    repeating-linear-gradient(
      115deg,
      color-mix(in srgb, var(--text-primary) 4%, transparent) 0px,
      color-mix(in srgb, var(--text-primary) 4%, transparent) 3px,
      transparent 3px,
      transparent 46px
    ),
    linear-gradient(165deg, var(--surface-elevated), var(--surface));
}

/* ---------- Theme transition (targeted, not blanket) ---------- */

@media (prefers-reduced-motion: no-preference) {
  body,
  .site-header::before,
  .recap-card,
  .recap-marker-chip,
  .history-strip-card,
  .match-tile,
  .signal-item,
  .journey-node,
  .club-demo-preview,
  .field input,
  .field select,
  .button-ghost {
    transition: background-color var(--dur-theme) var(--ease-out), color var(--dur-theme) var(--ease-out), border-color var(--dur-theme) var(--ease-out), box-shadow var(--dur-theme) var(--ease-out);
  }
}

/* ---------- Type ---------- */

.eyebrow {
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--accent-strong);
  margin: 0 0 var(--space-3);
}

/* Malvinas Sans is an expressive accent, not the default reading font: it lives
   in the hero and on the two section headings that mark the product's emotional
   peaks (.display-accent). Every other heading reads in the functional condensed
   face so the page doesn't feel like the same handwritten voice repeated seven times. */
h2 { font-family: var(--font-condensed); font-weight: 700; font-size: var(--fs-h2); line-height: var(--lh-heading); letter-spacing: 0.01em; text-transform: uppercase; color: var(--text-primary); }
h2.display-accent { font-family: var(--font-display); font-weight: 400; letter-spacing: var(--tracking-display); text-transform: uppercase; }
h3 { font-family: var(--font-condensed); font-weight: 600; font-size: var(--fs-h3); line-height: var(--lh-heading); color: var(--text-primary); }

.section-lede { font-size: var(--fs-lede); color: var(--text-secondary); max-width: 42rem; margin-top: var(--space-3); }
.section-head { margin-bottom: var(--space-6); text-align: center; }
.section-head > * { margin-inline: auto; }
.section-head-left { text-align: left; }
.section-head-left > * { margin-inline: 0; }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  border-radius: var(--radius-pill);
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.button-primary { background: var(--accent); color: var(--accent-on); box-shadow: var(--glow-accent); }
.button-primary:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px var(--border-strong), var(--glow-accent); }
.button-primary:active { transform: translateY(0); }
.button-ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border-strong); }
.button-ghost:hover { border-color: var(--accent-strong); color: var(--accent-strong); }
.button-ghost .icon { transition: transform var(--dur-fast) var(--ease-out); }
.button-ghost:hover .icon { transform: translateX(3px); }
.button-sm { min-height: 40px; padding: 0 var(--space-5); font-size: var(--fs-small); }
.button-block { width: 100%; }
.button:disabled { opacity: 0.5; pointer-events: none; }

/* ---------- Header ---------- */

/* backdrop-filter lives on ::before, not on .site-header itself: a filter on the
   real element creates a new containing block for position:fixed descendants in
   Chromium, which breaks the full-height mobile nav panel nested inside it. */
.site-header {
  position: sticky; top: 0;
  z-index: var(--z-header);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out);
}
.site-header::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--border); }
.site-header[data-scrolled="true"]::before { background: color-mix(in srgb, var(--bg) 92%, transparent); }

.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: var(--space-4); }

.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}
.wordmark span { color: var(--accent); }
.wordmark-sm { font-size: 1.25rem; }

.header-actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }

.theme-toggle, .nav-toggle {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}
.theme-toggle:hover, .nav-toggle:hover { color: var(--text-primary); background: var(--surface-elevated); }
.theme-toggle .icon, .nav-toggle .icon { grid-area: 1/1; transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }

.theme-toggle .icon-theme-moon { opacity: 0; transform: rotate(-40deg) scale(0.7); }
.theme-toggle .icon-theme-sun { opacity: 1; transform: none; }
:root[data-theme="light"] .theme-toggle .icon-theme-sun { opacity: 0; transform: rotate(40deg) scale(0.7); }
:root[data-theme="light"] .theme-toggle .icon-theme-moon { opacity: 1; transform: none; }

.nav-toggle .icon-close { opacity: 0; transform: rotate(-45deg) scale(0.7); }
.nav-toggle .icon-open { opacity: 1; transform: none; }
.nav-toggle[aria-expanded="true"] .icon-open { opacity: 0; transform: rotate(45deg) scale(0.7); }
.nav-toggle[aria-expanded="true"] .icon-close { opacity: 1; transform: none; }

.nav-links { display: flex; align-items: center; gap: var(--space-6); }
.nav-links a {
  font-family: var(--font-condensed);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  position: relative;
  padding-block: var(--space-2);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--accent);
  transition: right var(--dur-base) var(--ease-out);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { right: 0; }

.site-nav { display: flex; align-items: center; gap: var(--space-7); }

@media (max-width: 899px) {
  .site-nav {
    position: fixed; inset: 0 0 0 auto;
    width: min(20rem, 84vw);
    background: var(--surface);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-8);
    padding: var(--space-8) var(--space-7);
    transform: translateX(100%);
    transition: transform var(--dur-slow) var(--ease-io);
    z-index: 150;
  }
  .site-nav[data-open="true"] { transform: translateX(0); }
  .nav-links { flex-direction: column; align-items: flex-start; gap: var(--space-5); }
  .nav-links a { font-size: 1.25rem; }
  .site-nav .button { width: 100%; }
}
@media (min-width: 900px) { .nav-toggle { display: none; } }

/* ---------- Hero ---------- */

.hero { position: relative; padding-block: var(--space-7) var(--space-8); overflow: clip; }

.hero-field { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5; }
.hero-arc { position: absolute; top: -22%; right: -18%; width: min(52rem, 80vw); color: var(--border-strong); }
.hero-arc circle, .hero-arc line { fill: none; stroke: currentColor; stroke-width: 1.5; }

.hero-inner { position: relative; z-index: 1; display: grid; gap: var(--space-8); align-items: center; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-hero);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  text-transform: uppercase;
  margin: 0 0 var(--space-6);
  max-width: 16ch;
}

.hero-lede { font-size: var(--fs-lede); color: var(--text-secondary); max-width: 34rem; margin-bottom: var(--space-7); }

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-6); }

.hero-fineprint { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-small); color: var(--text-tertiary); max-width: 32rem; }
.hero-fineprint .icon { color: var(--signal-health); }

/* Compact preview of the recap component itself */
.hero-preview { position: relative; margin: 0; }
.hero-preview-card {
  position: relative;
  max-width: 24rem;
  margin-inline: auto;
  padding: var(--space-5) var(--space-5) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), var(--glow-accent);
  transform: rotate(-1.5deg);
  overflow: hidden;
}
.hero-preview-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-5); gap: var(--space-3); }
.hero-preview-teams { font-family: var(--font-condensed); font-weight: 600; font-size: 0.9375rem; color: var(--text-primary); }
.hero-preview-status { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-tertiary); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); padding: 0.15em 0.7em; }

.hero-preview-moment { display: flex; align-items: baseline; gap: var(--space-3); margin-bottom: var(--space-4); }
.hero-preview-minute { font-family: var(--font-display); font-size: 2.5rem; line-height: 1; color: var(--event-goal); }
.hero-preview-event { display: flex; flex-direction: column; gap: 2px; }
.hero-preview-event-label { font-family: var(--font-condensed); font-weight: 700; font-size: 0.9375rem; letter-spacing: 0.02em; color: var(--text-primary); }
.hero-preview-event-signal { font-family: var(--font-mono); font-size: 0.75rem; color: var(--signal-health); }

.hero-preview-wave { width: 100%; height: 64px; color: var(--signal-health); opacity: 0.85; margin-bottom: var(--space-2); }
.hero-preview-wave path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.hero-preview-axis { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-tertiary); }

.hero-preview-fade {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 40%;
  background: linear-gradient(to bottom, transparent, var(--bg) 92%);
  pointer-events: none;
}

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.1fr 0.9fr; gap: var(--space-9); }
  .hero-preview-card { margin-inline: 0; margin-left: auto; }
}

/* ---------- Statement bridge ---------- */

.statement { border-block: 1px solid var(--border); padding-block: var(--space-7); }
.statement-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-6); }
.statement-phase p { font-family: var(--font-condensed); font-size: clamp(1.15rem, 1vw + 1rem, 1.6rem); font-weight: 600; line-height: 1.25; margin-top: var(--space-2); }
.statement-phase[data-phase="after"] { text-align: right; }
.statement-phase[data-phase="after"] p { color: var(--text-primary); }
.statement-phase[data-phase="during"] p { color: var(--text-secondary); }
.phase-tag { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-tertiary); }
.phase-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: var(--space-2); }
.phase-dot-quiet { background: var(--text-tertiary); }
.phase-dot-live { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.statement-arrow { width: 40px; height: 20px; color: var(--border-strong); }
.statement-arrow path { fill: none; stroke: currentColor; stroke-width: 1.6; }

@media (max-width: 640px) {
  .statement-inner { grid-template-columns: 1fr; text-align: left !important; gap: var(--space-4); }
  .statement-phase[data-phase="after"] { text-align: left; }
  .statement-arrow { transform: rotate(90deg); justify-self: start; }
}

/* ---------- Resumen del partido ---------- */

.recap-section { padding-block: var(--space-8); }

.recap-card {
  margin: 0 0 var(--space-6);
  padding: var(--space-6) var(--space-6) var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.recap-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-7); padding-bottom: var(--space-5); border-bottom: 1px solid var(--border); }
.recap-teams { font-family: var(--font-condensed); font-weight: 600; font-size: 1.25rem; }
.recap-teams strong { font-family: var(--font-mono); font-weight: 500; color: var(--event-goal); font-variant-numeric: tabular-nums; margin-inline: 0.15em; }
.recap-sep { color: var(--text-tertiary); }
.recap-status { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-secondary); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); padding: 0.2em 0.75em; }
.recap-context { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--fs-small); color: var(--signal-location); margin-left: auto; }
.recap-date { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--text-tertiary); }

.recap-track { position: relative; height: clamp(240px, 30vw, 280px); margin-inline: var(--space-2); }

.recap-wave { position: absolute; inset: 42% 0 26%; width: 100%; height: 32%; }
.recap-wave-path { fill: none; stroke: var(--signal-health); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0.8; pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }

.recap-wave-hint { position: absolute; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--signal-health); white-space: nowrap; }
.recap-wave-hint-start { left: 0; top: 62%; }

.recap-halftime { position: absolute; top: 36%; bottom: 20%; left: calc(var(--m) / 95 * 100%); width: 1px; background: repeating-linear-gradient(to bottom, var(--border-strong) 0 4px, transparent 4px 9px); }

.recap-axis { position: absolute; left: 0; right: 0; bottom: 0; height: 20px; }
.recap-axis span { position: absolute; left: calc(var(--m) / 95 * 100%); transform: translateX(-50%); font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--text-tertiary); }
.recap-axis span:first-child { transform: translateX(0); }
.recap-axis span:last-child { transform: translateX(-100%); }

.recap-events { position: absolute; inset: 0 0 20px 0; }
.recap-events li { position: absolute; left: calc(var(--m) / 95 * 100%); top: 0; bottom: 0; transform: translateX(-50%); display: flex; }
.recap-events li.is-minor { align-items: flex-end; }

/* Major chips sit in a column: [chip] — [stem, flex:1] — [anchor dot], so the
   connector always reaches the axis instead of dangling a fixed 14px stub.
   That's what made the 38' chip read as "disconnected" before. */
.recap-events li.is-major { flex-direction: column; align-items: center; }
.recap-events li.is-major::before {
  content: ""; order: 1; flex: 1; width: 2px; min-height: 10px;
  background: var(--border-strong);
}
.recap-events li.is-major::after {
  content: ""; order: 2; width: 6px; height: 6px; margin-top: -3px;
  border-radius: 50%; background: var(--border-strong); flex-shrink: 0;
}
.recap-events li.is-major:has(.recap-marker-chip[data-kind="goal-peak"])::before,
.recap-events li.is-major:has(.recap-marker-chip[data-kind="goal-peak"])::after {
  background: var(--event-goal);
}
.recap-events li[data-row="b"] .recap-marker-chip { margin-top: 38px; }

.recap-marker {
  --dot: 12px;
  position: relative;
  width: var(--dot); height: var(--dot);
  margin-bottom: calc(50% - var(--dot) / 2);
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--text-tertiary);
  transition: transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.recap-marker::before {
  content: ""; position: absolute; inset: -16px;
}
.recap-marker:hover, .recap-marker:focus-visible { transform: scale(1.15); }

/* Minor (dot-only, discoverable on focus/click) */
.recap-events li.is-minor .recap-marker[data-kind="goal"] { --dot: 14px; background: var(--event-goal); border-color: var(--event-goal); }

/* Major (always-visible labeled chips) */
.recap-marker-chip {
  width: auto; height: auto; margin-bottom: 0;
  display: inline-flex; flex-direction: column; align-items: center; gap: 1px;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  white-space: nowrap;
}
.recap-marker-chip:hover, .recap-marker-chip:focus-visible { transform: translateY(-2px); }
.recap-chip-minute { font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.recap-chip-label { font-family: var(--font-condensed); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.03em; color: var(--text-primary); }
.recap-chip-sub { font-family: var(--font-mono); font-size: 0.625rem; color: var(--signal-health); }

.recap-marker-chip[data-kind="chance"] { border-color: var(--border-strong); }
.recap-marker-chip[data-kind="goal-peak"] {
  padding: var(--space-2) var(--space-4);
  background: var(--accent-soft); border-color: var(--event-goal); border-width: 1.5px;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.recap-marker-chip[data-kind="goal-peak"] .recap-chip-label { color: var(--event-goal); font-size: 0.8125rem; }
.recap-marker-chip[data-kind="motm"] { background: var(--event-vote-soft); border-color: var(--event-vote); }
.recap-marker-chip[data-kind="motm"] .recap-chip-label { color: var(--event-vote); }
.recap-marker-chip[data-kind="final"] { background: var(--surface); border-color: var(--text-primary); }

.recap-detail {
  margin-top: var(--space-6);
  padding: var(--space-5);
  background: var(--accent-soft);
  border: 1px solid var(--event-goal);
  border-radius: var(--radius-md);
}
.recap-detail-heading { font-family: var(--font-condensed); font-weight: 600; font-size: 1.1rem; margin-bottom: var(--space-2); }
.recap-detail-line { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.recap-detail-caption { font-size: var(--fs-small); color: var(--text-tertiary); margin-top: var(--space-2); }
.recap-detail[data-tone="neutral"] { background: var(--surface-elevated); border-color: var(--border-strong); }
.recap-detail[data-tone="motm"] { background: var(--event-vote-soft); border-color: var(--event-vote); }
.recap-detail[data-tone="final"] { background: var(--surface-elevated); border-color: var(--border-strong); }

.recap-legend { display: grid; gap: var(--space-5); grid-template-columns: 1fr; margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--border); }
.recap-legend-title { font-family: var(--font-condensed); font-weight: 600; font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); margin-bottom: var(--space-3); }
.recap-legend-group ul { display: flex; flex-direction: column; gap: var(--space-2); }
.recap-legend-group li { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-small); color: var(--text-secondary); }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot-goal { background: var(--event-goal); }
.dot-vote { background: var(--event-vote); }
.dot-health { background: var(--signal-health); }
.dot-location { background: var(--signal-location); }

@media (min-width: 640px) { .recap-legend { grid-template-columns: 1fr 1fr; } }

.recap-note { max-width: 40rem; color: var(--text-secondary); }

@media (max-width: 640px) {
  .recap-context { margin-left: 0; }
  .recap-track { height: 300px; }
  .recap-marker-chip { padding: 3px var(--space-2); }
  .recap-chip-label { font-size: 0.6875rem; }

  /* Narrow screens: keep only the 3 headline moments (chance, goal, final) as
     always-visible chips — matches content-priority guidance. The vote-open
     marker collapses to a dot; still fully reachable via focus/click. */
  .recap-events li[data-priority="secondary"] { flex-direction: row; align-items: flex-end; }
  .recap-events li[data-priority="secondary"]::before,
  .recap-events li[data-priority="secondary"]::after { display: none; }
  .recap-events li[data-priority="secondary"] .recap-marker-chip {
    width: 12px; height: 12px; padding: 0; margin-bottom: calc(50% - 6px);
    border-radius: 50%; background: var(--event-vote-soft); border: 2px solid var(--event-vote);
  }
  .recap-events li[data-priority="secondary"] .recap-chip-minute,
  .recap-events li[data-priority="secondary"] .recap-chip-label,
  .recap-events li[data-priority="secondary"] .recap-chip-sub { display: none; }

  /* With the vote marker collapsed, give the final chip its own row back so
     it doesn't crowd the goal chip right next to it. */
  .recap-events li[data-row="b"] .recap-marker-chip[data-kind="final"] { margin-top: 0; }
}

/* ---------- Cómo funciona / journey ---------- */

.how { padding-block: var(--space-8); background: var(--surface); border-block: 1px solid var(--border); }

.journey { position: relative; max-width: 46rem; margin-inline: auto; }
.journey::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 21px;
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--border-strong) 0 5px, transparent 5px 11px);
}

.journey-step { position: relative; display: flex; gap: var(--space-5); padding-bottom: var(--space-6); }
.journey-step:last-child { padding-bottom: 0; }

.journey-node {
  position: relative; flex-shrink: 0;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
}
.journey-node .journey-num {
  position: absolute; right: -4px; bottom: -4px;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-tertiary);
}

.journey-minute { display: inline-block; font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--accent-strong); letter-spacing: 0.04em; margin-bottom: var(--space-1); }
.journey-copy h3 { margin-bottom: var(--space-2); }
.journey-copy p { color: var(--text-secondary); max-width: 34rem; }

.journey-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.journey-tags li { font-family: var(--font-condensed); font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); background: var(--surface-elevated); border: 1px solid var(--border-strong); padding: 0.3em 0.75em; border-radius: var(--radius-pill); }

.journey-step-passive .journey-node { border-style: dashed; opacity: 0.85; }
.journey-step[data-step="5"] .journey-node { background: var(--event-vote-soft); border-color: var(--event-vote); color: var(--event-vote); }
.journey-step[data-step="6"] .journey-node { background: var(--accent-soft); border-color: var(--event-goal); color: var(--event-goal); }
.journey-step[data-step="7"] .journey-node { background: var(--signal-location-soft); border-color: var(--signal-location); color: var(--signal-location); }

@media (min-width: 900px) {
  .journey { max-width: none; }
  .journey::before { left: 50%; transform: translateX(-0.5px); }
  .journey-step { width: 50%; padding-bottom: var(--space-7); }

  .journey-step:nth-child(odd) { flex-direction: row-reverse; padding-inline-end: var(--space-7); text-align: right; }
  .journey-step:nth-child(odd) .journey-node { margin-right: -22px; }
  .journey-step:nth-child(odd) .journey-copy { margin-left: auto; }
  .journey-step:nth-child(odd) .journey-tags { justify-content: flex-end; }

  .journey-step:nth-child(even) { margin-left: 50%; padding-inline-start: var(--space-7); }
  .journey-step:nth-child(even) .journey-node { margin-left: -22px; }
}

/* Club personalization demo — inert on public brand, isolated to this widget.
   Three surfaces re-theme at once (top bar, avatar, stat chip) so the "your
   club changes the mood" idea reads clearly instead of one faint dot changing color. */
.club-demo { margin-top: var(--space-5); padding: var(--space-4); background: var(--surface-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); max-width: 30rem; }
.journey-step:nth-child(odd) .club-demo { margin-left: auto; }
.club-demo-label { font-size: var(--fs-small); color: var(--text-tertiary); margin-bottom: var(--space-4); text-align: left; }
.club-demo-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }

.club-demo-preview {
  flex: 1; min-width: 190px;
  border-radius: var(--radius-md);
  background: var(--club-surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: background-color var(--dur-base) var(--ease-out);
}
.club-demo-preview-bar { height: 5px; background: linear-gradient(90deg, var(--club-primary), var(--club-accent)); transition: background var(--dur-base) var(--ease-out); }
.club-demo-preview-body { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); }
.club-demo-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--club-primary); flex-shrink: 0; transition: background-color var(--dur-base) var(--ease-out); }
.club-demo-id { flex: 1; min-width: 0; }
.club-demo-name { display: block; font-family: var(--font-condensed); font-weight: 700; font-size: 0.875rem; color: var(--text-primary); }
.club-demo-meta { display: block; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-tertiary); }
.club-demo-chip { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 600; padding: 0.25em 0.65em; border-radius: var(--radius-pill); background: var(--club-accent); color: var(--club-on-primary); flex-shrink: 0; transition: background-color var(--dur-base) var(--ease-out); }

.club-demo-swatches { display: flex; gap: var(--space-2); }
.club-swatch {
  width: 28px; height: 36px; border-radius: 8px;
  background: linear-gradient(165deg, var(--sw-a) 48%, var(--sw-b) 48%);
  border: 2px solid var(--border);
}
.club-swatch[aria-pressed="true"] { border-color: var(--text-primary); }

/* ---------- Historia ---------- */

.history { padding-block: var(--space-8); }

.history-strip-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-5);
}
/* Secondary treatment: the match tiles are the lead visual now — this strip
   supports them as a quieter footnote instead of a competing card. */
.history-strip-card-secondary {
  border: none;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: var(--space-5) 0 0;
  margin-bottom: 0;
  background-image: none;
}
.history-strip-card-secondary .history-strip-label { font-weight: 500; font-size: var(--fs-small); color: var(--text-tertiary); }
.history-strip-card-secondary .history-strip { height: 56px; }
.history-strip-label { font-family: var(--font-condensed); font-weight: 600; font-size: 0.9375rem; color: var(--text-primary); margin-bottom: var(--space-4); }
.history-strip { display: flex; align-items: flex-end; gap: 4px; height: 84px; }
.history-strip span { flex: 1; min-width: 4px; height: var(--h); border-radius: 3px 3px 1px 1px; background: var(--text-tertiary); opacity: 0.45; }
.history-strip span.is-home { background: var(--text-secondary); opacity: 0.8; }
.history-strip span.is-away { background: transparent; border: 1.5px solid var(--text-secondary); opacity: 0.7; }
.history-strip span.is-peak.is-home { background: var(--event-goal); opacity: 1; }
.history-strip span.is-peak.is-away { border-color: var(--event-goal); }
.history-strip-legend { display: flex; gap: var(--space-5); margin-top: var(--space-4); font-size: var(--fs-small); color: var(--text-secondary); flex-wrap: wrap; }
.history-strip-legend span { display: inline-flex; align-items: center; gap: var(--space-2); }
.swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.swatch-home { background: var(--text-secondary); }
.swatch-away { border: 1.5px solid var(--text-secondary); }
.swatch-peak { background: var(--event-goal); }

/* Match tiles — collectible ticket stubs, not KPI cards */
.match-tiles { display: grid; gap: var(--space-4); grid-template-columns: 1fr; margin-bottom: var(--space-6); }
@media (min-width: 640px) { .match-tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .match-tiles { grid-template-columns: repeat(4, 1fr); } }

.match-tile {
  position: relative;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
@media (hover: hover) {
  .match-tile:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: 0 10px 24px color-mix(in srgb, var(--text-primary) 10%, transparent); }
}
.match-tile-main { padding: var(--space-4) var(--space-4) var(--space-5); }
.match-tile-teams { font-family: var(--font-condensed); font-weight: 700; font-size: 0.9375rem; color: var(--text-primary); margin-bottom: var(--space-1); }
.match-tile-teams strong { color: var(--event-goal); font-family: var(--font-mono); }
.match-tile-date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-tertiary); }

.match-tile-stub {
  position: relative;
  padding: var(--space-3) var(--space-4);
  border-top: 1px dashed var(--border-strong);
}
.match-tile-stub::before, .match-tile-stub::after {
  content: ""; position: absolute; left: -8px; width: 16px; height: 16px;
  background: var(--bg); border-radius: 50%;
}
.match-tile-stub::before { top: -8px; }
.match-tile-stub::after { top: -8px; right: -8px; left: auto; }
.match-tile-tags { display: flex; flex-direction: column; gap: var(--space-2); }
.match-tile-tags li { display: flex; align-items: center; gap: var(--space-2); font-size: 0.75rem; color: var(--text-secondary); }
.match-tile-tags .icon { color: var(--text-tertiary); }

.match-tile-classic { border-color: var(--event-goal); }
.match-tile-classic::before { content: "CLÁSICO"; position: absolute; top: var(--space-3); right: var(--space-3); font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.05em; color: var(--event-goal); background: var(--accent-soft); border: 1px solid var(--event-goal); border-radius: var(--radius-pill); padding: 0.15em 0.6em; }

.history-chips { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); font-size: var(--fs-small); color: var(--text-tertiary); }
.history-chips span:nth-child(4n+1) { color: var(--text-secondary); }

/* ---------- Privacidad ---------- */

.privacy { padding-block: var(--space-7); background: var(--surface); border-block: 1px solid var(--border); }
.privacy-grid { display: grid; gap: var(--space-8); grid-template-columns: 1fr; }
@media (min-width: 900px) { .privacy-grid { grid-template-columns: 0.85fr 1.15fr; } }

.privacy-note { margin-top: var(--space-4); padding: var(--space-3) var(--space-4); border-left: 2px solid var(--event-vote); background: var(--event-vote-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: var(--fs-small); color: var(--text-secondary); max-width: 34rem; }

/* Compact list, not four heavy cards — the message carries the weight, not the chrome. */
.signal-list { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 640px) { .signal-list { grid-template-columns: 1fr 1fr; column-gap: var(--space-6); } }
.signal-item { display: flex; gap: var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid var(--border); }
.signal-item .icon { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; color: var(--text-secondary); }
.signal-item:nth-child(1) .icon, .signal-item:nth-child(2) .icon { color: var(--signal-location); }
.signal-item:nth-child(3) .icon { color: var(--signal-health); }
.signal-row { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-1); }
.signal-item h3 { font-size: 0.9375rem; }
.signal-item p { color: var(--text-secondary); font-size: 0.8125rem; }
.signal-badge { font-family: var(--font-mono); font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-tertiary); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); padding: 0.1em 0.55em; }

/* ---------- Waitlist ---------- */

.waitlist { padding-block: var(--space-8); }
.waitlist-inner { max-width: 34rem; }
.waitlist h2 { font-size: clamp(1.9rem, 1.6vw + 1.5rem, 3rem); }

.waitlist-form { margin-top: var(--space-7); display: flex; flex-direction: column; gap: var(--space-5); }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label { font-family: var(--font-condensed); font-weight: 600; font-size: 0.9375rem; }
.required { color: var(--accent-strong); margin-left: 2px; }
.field-optional { font-family: var(--font-body); font-weight: 400; color: var(--text-tertiary); font-size: 0.8125rem; }

.field input, .field select {
  min-height: 48px;
  padding: 0 var(--space-4);
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
}
.field input::placeholder { color: var(--text-tertiary); }
.field input:focus, .field select:focus { border-color: var(--accent-strong); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.field select { appearance: none; background-repeat: no-repeat; background-position: right var(--space-4) center; padding-right: var(--space-8); background-image: var(--select-chevron); }
:root { --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aab3c5' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
:root[data-theme="light"] { --select-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23454e60' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }

.field[data-invalid="true"] input { border-color: var(--error); box-shadow: 0 0 0 3px color-mix(in srgb, var(--error) 15%, transparent); }
.field-error { color: var(--error); font-size: var(--fs-small); }

.waitlist-fineprint { font-size: var(--fs-small); color: var(--text-tertiary); }
.waitlist-feedback { font-size: var(--fs-small); font-weight: 600; min-height: 1.2em; }
.waitlist-feedback[data-tone="success"] { color: var(--accent-strong); }
.waitlist-feedback[data-tone="error"] { color: var(--error); }

.button.is-loading .button-label { opacity: 0; }
.button.is-loading { position: relative; pointer-events: none; }
.button.is-loading::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent-on) 35%, transparent);
  border-top-color: var(--accent-on);
}

/* ---------- Footer ---------- */

.site-footer { padding-block: var(--space-8); border-top: 1px solid var(--border); }
.footer-inner { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
.footer-brand p:last-child { color: var(--text-tertiary); font-size: var(--fs-small); margin-top: var(--space-2); }
.footer-nav { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.footer-nav a { font-family: var(--font-condensed); font-weight: 600; font-size: var(--fs-small); color: var(--text-secondary); }
.footer-nav a:hover { color: var(--accent-strong); }
.footer-meta { font-size: var(--fs-small); color: var(--text-tertiary); }
.footer-meta p:first-child span { color: var(--text-tertiary); }
.footer-meta p:first-child { color: var(--accent-strong); font-family: var(--font-mono); }
.footer-meta p:last-child { margin-top: var(--space-2); }

@media (min-width: 900px) {
  .footer-inner { grid-template-columns: 1fr auto auto; align-items: start; }
}

/* ---------- Scroll offsets ---------- */

section[id] { scroll-margin-top: 84px; }

/* ---------- Motion (reduced by default; enhanced when allowed) ---------- */

.reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
  html.js .reveal.is-visible { opacity: 1; transform: none; }
  html.js .reveal.reveal-stagger { transition-delay: calc(var(--i, 0) * 60ms); }

  html.js .recap-wave-path { stroke-dashoffset: 1; transition: stroke-dashoffset 1.1s var(--ease-out) 0.15s; }
  html.js .recap-card.is-visible .recap-wave-path { stroke-dashoffset: 0; }
  html.js .recap-wave-hint { opacity: 0; transition: opacity var(--dur-slow) var(--ease-out) 1s; }
  html.js .recap-card.is-visible .recap-wave-hint { opacity: 1; }

  .phase-dot-live { animation: pulse-breathe 2.4s var(--ease-io) infinite; }
  @keyframes pulse-breathe {
    0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft); }
    50% { box-shadow: 0 0 0 8px transparent; }
  }

  .recap-marker-chip[data-kind="goal-peak"] { animation: chip-glow 2.6s var(--ease-io) infinite; }
  @keyframes chip-glow {
    0%, 100% { box-shadow: 0 0 0 3px var(--accent-soft); }
    50% { box-shadow: 0 0 0 6px transparent; }
  }

  .hero-preview-wave path { animation: wave-drift 10s var(--ease-io) infinite alternate; }
  @keyframes wave-drift {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px); }
  }

  .button.is-loading::after { animation: spin 0.7s linear infinite; }
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
}
