/* Public homepage (boards S-Inicio-D and S-Inicio-P), in the shared tokens
   (tokens.css). The top bar, buttons, pill, section heads and footer are also
   the hidden pricing page's. Scoped to body.public. */

body.public {
  /* Height of the sticky top bar, so in-page links stop below it. */
  --home-nav-h: 76px;
  /* The side gutter: 6vw, and on wide screens whatever centres a 1180px column. */
  --home-gutter: max(6vw, calc((100% - 1180px) / 2));
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  overflow-x: hidden;
}

/* Resets without weight (:where), so each block's own margins and padding win. */
:where(.public) :where(h1, h2, h3, p, figure) { margin: 0; }
:where(.public) :where(ul, ol) { margin: 0; padding: 0; list-style: none; }

/* Navigation */
.home-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px var(--home-gutter);
  background: var(--navy);
  color: #fff;
}

.home-nav .brand, .home-footer .brand { color: #fff; font-size: 24px; }
.home-nav > nav { display: flex; flex-direction: row; align-items: center; gap: 28px; margin-left: auto; font-size: 14px; }
.home-nav > nav a { color: #b9c6e8; transition: color .15s; }
.home-nav > nav a:hover, .home-link:hover { color: #fff; }
.home-link { display: inline-flex; align-items: center; color: #fff; font-weight: 600; }
.home-link svg { display: none; }
.home-nav-actions { display: flex; align-items: center; gap: 20px; font-size: 14px; }

/* Buttons: the library's primary (yellow) and an outline for navy grounds. */
.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  transition: background .15s;
}

.home-btn.yellow { background: var(--yellow); color: var(--navy); }
.home-btn.yellow:hover { background: var(--yellow-hover); }
.home-btn.ghost { box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 55%); color: #fff; }
.home-btn.ghost:hover { background: rgb(255 255 255 / 8%); }
.home-btn.small { min-height: 44px; padding: 0 16px; font-size: 14px; }

.home-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgb(255 241 59 / 45%);
  color: var(--yellow);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
}

.home-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.public .eyebrow { color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

/* Hero: the copy, then one scene: the pitch with the match, call-up and
   money cards on its corners, over empty grass, never on a player. */
.home-hero {
  display: grid;
  /* minmax(0, ...) so one long word (German compounds) can never stretch a
     column past the screen; the headline wraps inside it instead. */
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 72px var(--home-gutter) 88px;
  overflow: hidden;
  background: radial-gradient(ellipse at 85% 30%, #263e92 0, transparent 60%), var(--navy);
  color: #fff;
}

.home-hero h1 {
  margin-top: 26px;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(50px, 5.6vw, 80px);
  line-height: .95;
  /* Long words break at their soft hyphens (&shy; in the locale string);
     breaking anywhere is only the last resort for a word that still won't fit. */
  hyphens: manual;
  overflow-wrap: break-word;
}

.home-hero h1 span { color: var(--yellow); }
.home-hero-copy > p { max-width: 520px; margin-top: 24px; color: var(--blue-line); font-size: 19px; line-height: 1.55; }
.home-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.home-hero-copy small { display: block; margin-top: 18px; color: #8fa6d4; font-size: 14px; }

/* The scene is drawn at the board's size (487 x 836) and placed in px. */
.home-scene { justify-self: center; }
.home-scene-stage { position: relative; width: 487px; height: 836px; }
.home-scene figcaption { margin-top: 28px; color: #8fa6d4; font-size: 12px; }

.home-pitch {
  position: absolute;
  left: 48px;
  top: 70px;
  width: 390px;
  height: 598px;
  transform: rotate(-4deg);
  filter: drop-shadow(0 30px 40px rgb(0 0 0 / 35%));
}

.home-pitch-players circle { fill: var(--yellow); }
.home-pitch-players circle.keeper { fill: #fff; }
.home-pitch-players text { fill: var(--navy); font: 800 12px var(--font); }

.home-card {
  position: absolute;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 22px 44px -18px rgb(0 0 0 / 65%);
}

.home-card.match { top: 0; right: 0; width: 258px; }
.home-card.money { top: 650px; left: 0; width: 258px; }
.home-card.callup { top: 300px; left: -84px; width: 176px; padding: 12px 14px; font-size: 12px; }

.home-card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.home-live { display: inline-flex; align-items: center; gap: 6px; color: #d1453b; font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.home-live .home-live-dot { width: 7px; height: 7px; background: #d1453b; }
.home-score { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; white-space: nowrap; }
.home-score b { font-size: 14px; }
.home-score span { font-family: var(--display); font-style: italic; font-size: 34px; line-height: 1; color: var(--blue); }
.home-card ul { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.home-card.match li b { color: var(--blue); }
.home-card em { color: var(--muted); font-style: normal; }
.home-card-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.home-card-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); white-space: nowrap; }
.home-card-figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; margin-top: 8px; color: var(--muted); }
.home-card-figure strong { font-family: var(--display); font-style: italic; font-weight: 400; font-size: 34px; line-height: 1; color: var(--ink); white-space: nowrap; }
.home-card.callup .home-card-figure { flex-wrap: nowrap; gap: 6px; }
.home-card.callup .home-card-figure strong { font-size: 26px; }
.home-card.callup p, .home-card.money li { display: flex; align-items: flex-start; gap: 7px; }
.home-card.callup p { margin-top: 8px; }
.home-card svg { flex: none; margin-top: 1px; color: var(--muted); }
.home-dot { flex: none; width: 6px; height: 6px; margin: 5px 4px 0; border-radius: 50%; background: #8290a8; }

/* The yellow band: four short claims, spread across the width. */
.home-band {
  display: flex;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px var(--home-gutter);
  background: var(--yellow);
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* The partner club, right under the hero: the only proof from a real club. */
.home-partner { display: flex; align-items: center; gap: 28px; padding: 40px var(--home-gutter); border-bottom: 1px solid var(--line); background: #fff; }
.home-partner-crest { flex: none; width: 72px; height: 72px; object-fit: contain; }
.home-partner h3 { margin-top: 8px; font-size: 22px; }
.home-partner p { max-width: 640px; margin-top: 6px; color: var(--muted); font-size: 16px; line-height: 1.55; }

/* Sections */
.home-section { padding: 88px var(--home-gutter) 96px; }
.home-section-head { display: flex; flex-direction: column; gap: 18px; max-width: 860px; margin-bottom: 48px; }

.home-section-head h2, .home-families h2, .home-final h2 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(38px, 4.2vw, 60px);
  line-height: 1;
  color: var(--navy);
}

.home-section-head h2 span { color: var(--blue); }
.home-section-head p { color: var(--muted); font-size: 17px; line-height: 1.55; }

.home-icon { display: flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); }

/* Everyday work: one card per role, with the things that role looks after. */
.home-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.home-role { padding: 28px 28px 12px; border-radius: var(--radius-lg); background: #fff; box-shadow: 0 1px 2px rgb(17 28 58 / 6%); }
.home-role h3 { margin: 10px 0 14px; font-size: 21px; line-height: 1.25; }
.home-role li { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line-soft); }
.home-role li > span:last-child { min-width: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.home-role li b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 16px; }

/* Families */
.home-families { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; padding: 96px var(--home-gutter); background: var(--navy); color: #fff; }
.home-families .eyebrow { color: var(--yellow); }
.home-families h2 { margin-top: 14px; color: #fff; }
.home-families h2 span { color: var(--yellow); }
.home-families > div > p { max-width: 520px; margin-top: 22px; color: var(--blue-line); font-size: 17px; line-height: 1.6; }
.home-checks { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; }
.home-checks li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.45; }
.home-checks svg { flex: none; margin-top: 1px; color: var(--yellow); }

.home-family-card { justify-self: end; width: 100%; max-width: 480px; padding: 24px; border-radius: var(--radius-lg); background: #fff; color: var(--ink); }
.home-family-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.home-family-head b { font-size: 18px; }
.home-family-head span, .home-family-label { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.home-family-label { margin: 18px 4px 8px; font-size: 12px; letter-spacing: .06em; }
.home-family-card ul { border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--line-soft); }
.home-family-card li { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--line-soft); }
.home-family-card li:first-child { border-top: 0; }
.home-family-card li > span:last-child { min-width: 0; }
.home-family-card small { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; color: var(--muted); font-size: 13px; }
.home-avatar { display: flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #eef1f7; color: var(--muted); font-size: 13px; font-weight: 700; }
.home-avatar.alert { background: var(--yellow); color: var(--navy); }

/* Match day: the staff match page's "Convocatória" card (its own classes
   from matches.css) and the three moments beside it. */
.home-matchday { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 40px; align-items: start; }
.home-lineup .section-title { align-items: center; }
.home-lineup-tag { color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .06em; }

.home-moments { display: flex; flex-direction: column; gap: 18px; }
.home-moments article { padding: 24px 26px; border-radius: var(--radius-lg); background: #fff; box-shadow: 0 1px 2px rgb(17 28 58 / 6%); }
.home-moments h3 { margin-top: 8px; font-size: 19px; }
.home-moments p { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.home-note { margin-top: 20px; color: var(--muted); font-size: 13px; }

/* How we start: three numbered steps (a real sequence) and the data note. */
.home-start { background: #fff; }
.home-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.home-steps li { padding-top: 18px; border-top: 3px solid var(--navy); }
.home-steps b { color: var(--blue); font-size: 12px; letter-spacing: .12em; }
.home-steps h3 { margin-top: 10px; font-size: 19px; }
.home-steps p, .home-data-note p { margin-top: 8px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.home-data-note { max-width: 760px; margin-top: 48px; padding: 28px; border-radius: var(--radius-lg); background: var(--bg); }
.home-data-note h3 { font-size: 19px; }

/* Data protection: the head on the left, four short lines on the right. */
.home-trust { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.home-trust .home-section-head { margin-bottom: 0; }
.home-trust ul { border-bottom: 1px solid var(--line); }
.home-trust li { display: flex; align-items: center; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.5; }

/* Final call to action */
.home-final { display: flex; justify-content: space-between; align-items: center; gap: 40px; padding: 80px var(--home-gutter); background: var(--navy); color: #fff; }
.home-final h2 { color: #fff; }
.home-final h2 span { color: var(--yellow); }
.home-final p { max-width: 620px; margin-top: 18px; color: #b9c6e8; font-size: 16px; line-height: 1.6; }
.home-final .home-btn { flex: none; }

/* Footer */
.home-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 28px var(--home-gutter); border-top: 1px solid #1b2948; background: var(--navy); color: #8fa6d4; font-size: 13px; }

/* In-page links (#funcionalidades, ...) land with the heading clear of the sticky bar. */
.public section[id] { scroll-margin-top: var(--home-nav-h); }

@media (prefers-reduced-motion: reduce) {
  .public *, .public *::before, .public *::after { transition: none !important; }
}

/* Laptops narrower than the board: the scene shrinks a little. */
@media (max-width: 1280px) and (min-width: 1101px) {
  .home-scene { zoom: .88; }
}

/* Tablets: the hero stacks and the scene sits under the copy, full size. */
@media (max-width: 1100px) {
  .home-nav > nav { display: none; }
  .home-nav-actions { margin-left: auto; }
  .home-hero { grid-template-columns: minmax(0, 1fr); }
  .home-roles { grid-template-columns: minmax(0, 1fr); }
  .home-families, .home-trust { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .home-family-card { justify-self: start; }
  .home-matchday { grid-template-columns: minmax(0, 1fr); }
  .home-lineup { max-width: 520px; }
}

/* Phones (board S-Inicio-P): the scene keeps two cards, laid out in % of a
   358 x 720 stage, so it also fits screens narrower than 390px. */
@media (max-width: 700px) {
  /* As on the match page: the substitutes by surname only. */
  .home-lineup .only-laptop { display: none; }
  /* The top bar is one row, but the invitation button may wrap to two lines. */
  body.public { --home-nav-h: 88px; --home-gutter: 16px; }
  .home-nav { padding: 12px 16px; gap: 12px; }
  .home-nav .brand { font-size: 20px; }
  .home-nav-actions { gap: 14px; }
  .home-btn.small { text-align: center; }
  .home-hero { gap: 36px; padding: 32px 20px 40px; }
  .home-pill { padding: 5px 11px; font-size: 10.5px; letter-spacing: .1em; }
  .home-hero h1 { margin-top: 20px; font-size: 54px; }
  .home-hero-copy > p { margin-top: 18px; font-size: 17px; }
  .home-ctas { flex-direction: column; gap: 10px; margin-top: 24px; }
  .home-hero-copy small { margin-top: 12px; font-size: 13px; text-align: center; }
  .home-scene { justify-self: stretch; width: 100%; max-width: 358px; margin: 0 auto; }
  .home-scene-stage { width: 100%; height: auto; aspect-ratio: 358 / 720; }
  .home-pitch { left: 12.3%; top: 17.8%; width: 67%; height: auto; aspect-ratio: 300 / 460; filter: drop-shadow(0 24px 32px rgb(0 0 0 / 35%)); }
  .home-card.match, .home-card.money { width: min(240px, 70%); }
  .home-card.money { top: 69.4%; }
  .home-card.callup { display: none; }
  .home-score { gap: 6px; }
  .home-score span { font-size: 26px; }
  .home-score b { font-size: 12.5px; }
  .home-band { display: grid; grid-template-columns: 1fr 1fr; padding-block: 16px; font-size: 11px; letter-spacing: .06em; }
  .home-partner { gap: 16px; padding-block: 28px; }
  .home-partner-crest { width: 60px; height: 60px; }
  .home-partner h3 { font-size: 17px; }
  .home-partner p { font-size: 14.5px; }
  .home-section { padding-block: 48px 56px; }
  .home-section-head { gap: 14px; margin-bottom: 28px; }
  .home-section-head h2, .home-families h2, .home-final h2 { font-size: 38px; }
  .home-section-head p { font-size: 16px; }
  .home-roles { gap: 12px; }
  .home-role { padding: 20px 18px 6px; }
  .home-role h3 { margin: 8px 0 12px; font-size: 19px; }
  .home-role li { gap: 12px; padding: 14px 0; }
  .home-families { gap: 28px; padding-block: 56px; }
  .home-families > div > p { font-size: 16px; }
  .home-family-card { padding: 18px; }
  .home-family-card li { padding: 12px 14px; }
  .home-matchday { gap: 12px; }
  .home-moments { gap: 12px; }
  .home-moments article { padding: 20px 18px; }
  .home-steps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .home-data-note { margin-top: 28px; padding: 22px; }
  .home-trust { gap: 24px; }
  .home-trust li { gap: 12px; padding: 14px 0; font-size: 15px; }
  .home-final { flex-direction: column; align-items: stretch; gap: 22px; padding-block: 52px; }
  .home-footer { flex-direction: column; align-items: flex-start; gap: 12px; padding-block: 24px 28px; }
}

/* Small phones: "sign in" shrinks to a person icon, so the top bar fits the
   full brand, the invitation button and sign-in in every language down to
   320px. The link keeps its label for screen readers (aria-label). The
   language menu lives in the footer, so it never competes for this space. */
@media (max-width: 520px) {
  .home-nav .home-link { flex: none; justify-content: center; width: 40px; height: 40px; }
  .home-nav .home-link svg { display: block; }
  .home-nav .home-link-text { display: none; }
  .home-nav { gap: 8px; }
}

/* The smallest phones: a slightly smaller logo and tighter button keep the
   whole logo and the invitation button on one row in every language, down
   to 320px. */
@media (max-width: 400px) {
  .home-nav .brand { font-size: 18px; }
  .home-nav .home-btn.small { padding: 0 10px; }
  .home-hero h1 { font-size: 46px; }
}
