/* ==========================================================================
   Cards & Yards landing page: shared parts for both versions
   (field, video player, intro, card types, footer).
   Built on nfl/nfl-tokens.css + nfl/nfl-components.css. Theme per page via
   body.v-spielfeld / body.v-stadion (see the page <style>).
   ========================================================================== */

:root {
  --gap: clamp(14px, 2.4svh, 28px);
  --lw: 2px;                                   /* yard line width */
  --card-ratio: 178.58 / 249.45;               /* 63 × 88 mm trim */
  --head-h: 72px;                              /* header with the Shield (p137: 48px Shield, 72px bar) */
  --field-h: max(600px, calc(100svh - var(--head-h)));
}

/* ---------- Field (hero) ----------
   Landscape: end zones left (red, OFFENSE) and right (blue, DEFENSE), like the board.
   Portrait: the field turns, end zones top and bottom. */
.field {
  --ez: clamp(76px, 8.4vw, 132px);
  --num-band: clamp(56px, 10.5svh, 104px);
  --num-size: clamp(26px, min(4vw, 6.6svh), 62px);
  position: relative;
  display: grid;
  grid-template-columns: var(--ez) minmax(0, 1fr) var(--ez);
  min-height: var(--field-h);
  isolation: isolate;
}
.ez { position: relative; display: grid; place-items: center; overflow: hidden; }
.ez__word {
  font: 900 italic clamp(30px, min(5.6vw, calc((var(--field-h) - 210px) / 9.6)), 92px)/.86 var(--nfl-font-display-c);
  text-transform: uppercase; white-space: nowrap; letter-spacing: -0.01em;
  writing-mode: vertical-rl;
  display: flex; align-items: center; gap: .32em;
}
.ez--home .ez__word { transform: rotate(180deg); }          /* reads bottom → top, as on the board */
.ez__tag {
  font: 900 italic .3em/1 var(--nfl-font-display-c);
  padding: .5em .28em; border: 2px solid currentColor;
}
.ez__stars {
  position: absolute; left: 50%; width: clamp(34px, 3.4vw, 54px); aspect-ratio: 231 / 251;
  transform: translateX(-50%);
  background: currentColor;
  -webkit-mask: url("stars.png") center / contain no-repeat; mask: url("stars.png") center / contain no-repeat;
}
.ez__stars--top { top: clamp(16px, 3svh, 32px); }
.ez__stars--bottom { bottom: clamp(16px, 3svh, 32px); }

.turf { position: relative; overflow: hidden; }
.turf__lines, .turf__nums { position: absolute; inset: 0; pointer-events: none; }
.yl { position: absolute; top: 0; bottom: 0; left: var(--p); width: var(--lw); margin-left: calc(var(--lw) / -2); background: var(--line); }
.yl--goal { --lw: 4px; }
.yl--mid { background: var(--line-mid, var(--line)); }
.yn {
  position: absolute; left: var(--p); top: calc(var(--num-band) / 2);
  display: flex; align-items: center; gap: .12em;
  font: 700 var(--num-size)/1 var(--nfl-font-display-c); color: var(--num);
  transform: translate(-50%, -50%) rotate(180deg); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.yn--b { top: auto; bottom: calc(var(--num-band) / 2); transform: translate(-50%, 50%); }
.yn--mid { color: var(--num-mid, var(--num)); }
.yn i { width: 0; height: 0; border-block: .16em solid transparent; display: none; }
.yn i.s { border-right: .24em solid currentColor; }
.yn i.e { border-left: .24em solid currentColor; }
/* landscape: bottom row upright, top row turned 180° → arrows always point to the nearer goal */
.yn--b[data-dir="lo"] i.s, .yn--b[data-dir="hi"] i.e,
.yn--a[data-dir="lo"] i.e, .yn--a[data-dir="hi"] i.s { display: block; }

.stage {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--gap);
  padding: var(--num-band) clamp(16px, 4%, 64px);
}

@media (max-aspect-ratio: 1/1) {
  .field {
    --ez: clamp(64px, 12vw, 120px);
    --num-band: clamp(40px, 9vw, 72px);
    --num-size: clamp(22px, 5.4vw, 40px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--ez) minmax(0, 1fr) var(--ez);
  }
  .ez__word { writing-mode: horizontal-tb; font-size: clamp(26px, 8.4vw, 72px); flex-direction: row; }
  .ez--home .ez__word { transform: none; }
  .ez__tag { padding: .28em .5em; }
  .ez__stars { top: 50% !important; bottom: auto !important; left: auto; width: clamp(24px, 6vw, 44px); transform: translateY(-50%); }
  .ez__stars--top { left: clamp(10px, 3vw, 28px); }
  .ez__stars--bottom { right: clamp(10px, 3vw, 28px); }
  .ez__word .ez__tag { display: none; }
  .yl { left: 0; right: 0; top: var(--p); bottom: auto; width: auto; height: var(--lw); margin: calc(var(--lw) / -2) 0 0; }
  .yn { left: calc(var(--num-band) / 2); top: var(--p); transform: translate(-50%, -50%) rotate(90deg); }
  .yn--b { left: auto; right: calc(var(--num-band) / 2); bottom: auto; transform: translate(50%, -50%) rotate(-90deg); }
  .yn i { display: none !important; }
  .yn--a[data-dir="lo"] i.s, .yn--a[data-dir="hi"] i.e,
  .yn--b[data-dir="lo"] i.e, .yn--b[data-dir="hi"] i.s { display: block !important; }
  .stage { padding: clamp(28px, 7vw, 64px) clamp(10px, 3vw, 24px); justify-content: center; }
  .turf { min-height: calc(var(--field-h) - 2 * var(--ez)); }
}

/* ---------- Header: Shield left, one jump link right ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.site-head { position: relative; z-index: 5; border: 0; }
.site-head .nfl-header__inner { min-height: var(--head-h); justify-content: space-between; padding-inline: var(--nfl-margin); }
.site-head .nfl-shield { display: block; }
.site-head .nfl-nav a { display: inline-flex; align-items: center; gap: .45em; }
.site-head .nfl-nav a::after {             /* small down arrow: the link jumps down the page */
  content: ""; width: 0; height: 0; border-inline: .3em solid transparent; border-top: .38em solid currentColor;
}
#karten { scroll-margin-top: 0; }

/* ---------- Video player ---------- */
.player { position: relative; margin: 0; width: 100%; }
.stage .player {
  /* landscape: as wide as the height left after numbers, logo and caption allows */
  width: min(100%, 1400px, calc((var(--field-h) - 2 * var(--num-band) - var(--player-extra, 24px)) * 16 / 9));
}
@media (max-aspect-ratio: 1/1) { .stage .player { width: 100%; } }
.player__frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--nfl-gridiron-black); }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--nfl-gridiron-black); }
.player__poster {
  position: absolute; inset: 0; z-index: 2; border: 0; padding: 0; margin: 0; width: 100%;
  display: grid; place-content: center; justify-items: center; gap: clamp(10px, 2vw, 22px);
  cursor: pointer; color: var(--nfl-sideline-white); background: var(--poster-bg, var(--nfl-depth-blue));
  font: inherit;
}
.player__play {
  width: clamp(64px, 9vw, 112px); aspect-ratio: 1; border-radius: 50%;
  border: 3px solid currentColor; display: grid; place-items: center;
  transition: background var(--nfl-dur-fast) var(--nfl-ease-shift), transform var(--nfl-dur-fast) var(--nfl-ease-unifier);
}
.player__play::before {
  content: ""; width: 0; height: 0; margin-left: 9%;
  border-block: .62em solid transparent; border-left: 1em solid currentColor;
  font-size: clamp(20px, 2.6vw, 34px);
  transition: border-left-color var(--nfl-dur-fast);
}
.player__poster:hover .player__play, .player__poster:focus-visible .player__play { background: var(--nfl-sideline-white); transform: scale(1.06); }
.player__poster:hover .player__play::before, .player__poster:focus-visible .player__play::before { border-left-color: var(--play-ink, var(--nfl-shield-blue)); }
.player__poster:focus-visible { outline: 3px solid var(--nfl-impact-blue); outline-offset: -6px; }
.player__cta { font: 700 var(--nfl-size-cta)/1 var(--nfl-font-display); text-transform: uppercase; letter-spacing: .02em; }
.player__note { display: none; font: 400 var(--nfl-size-small)/1.2 var(--nfl-font-sans); max-width: 34ch; text-align: center; opacity: .85; }
.player[data-state="playing"] .player__poster { display: none; }
.player[data-state="missing"] .player__poster { cursor: default; }
.player[data-state="missing"] .player__play { opacity: .35; transform: none; background: none; }
.player[data-state="missing"] .player__play::before { border-left-color: currentColor; }
.player[data-state="missing"] .player__note { display: block; }
.player__caption { margin-top: 12px; text-align: center; font: 500 var(--nfl-size-small)/1.2 var(--nfl-font-sans); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Intro (⅓ grid: text 2/3, facts 1/3) ---------- */
.intro { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.intro__side { display: grid; gap: clamp(16px, 2vw, 24px); min-width: 0; }
.intro__logo { width: 100%; height: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.intro h2 { font: 700 var(--nfl-size-h1)/var(--nfl-leading-display-sentence) var(--nfl-font-display); margin: 10px 0 20px; }
.intro p { font-size: clamp(1.0625rem, 1.5vw, 1.375rem); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.facts li { padding: clamp(16px, 2vw, 24px); display: grid; gap: 6px; }
.facts b { font: 900 italic clamp(2.5rem, 4.4vw, 4rem)/.86 var(--nfl-font-display); }
.facts span { font: 500 var(--nfl-size-small)/1.2 var(--nfl-font-sans); text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 860px) { .intro { grid-template-columns: 1fr; align-items: start; } .intro__side { max-width: 440px; } }

/* ---------- Card types ---------- */
.types__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 40px; margin-bottom: clamp(32px, 5vw, 72px); }
.types__head h2 { font: 900 italic clamp(2.75rem, 7vw, 6.5rem)/.86 var(--nfl-font-display); text-transform: uppercase; letter-spacing: -0.01em; }
.types__head p { margin: 0; max-width: 40ch; }
.types__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
@media (max-width: 900px) { .types__grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }
.type { display: grid; gap: 18px; align-content: start; }
.fan { position: relative; aspect-ratio: 1.22; margin-bottom: 8px; }
.fan img {
  position: absolute; bottom: 4%; left: 50%; width: 47%; aspect-ratio: var(--card-ratio); height: auto;
  border-radius: 5.2% / 3.7%; object-fit: cover;
  transform-origin: 50% 100%;
  transform: translateX(calc(-50% + var(--x, 0%))) rotate(var(--r, 0deg));
  transition: transform var(--nfl-dur-base) var(--nfl-ease-unifier);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}
.fan img:nth-child(1) { --r: -12deg; --x: -34%; }
.fan img:nth-child(2) { z-index: 2; }
.fan img:nth-child(3) { --r: 12deg; --x: 34%; }
.type:hover .fan img:nth-child(1) { --r: -16deg; --x: -42%; }
.type:hover .fan img:nth-child(3) { --r: 16deg; --x: 42%; }
.type__pill {
  justify-self: start; padding: .5em 1.1em .45em; border-radius: var(--nfl-radius-pill);
  font: 700 var(--nfl-size-cta)/1 var(--nfl-font-display); text-transform: uppercase; letter-spacing: .02em;
}
.type__pill--off { background: var(--nfl-shield-red); color: var(--nfl-sideline-white); }
.type__pill--def { background: var(--nfl-shield-blue); color: var(--nfl-sideline-white); }
.type__pill--spc { background: var(--nfl-impact-yellow); color: var(--nfl-gridiron-black); }
.type h3 { font: 500 var(--nfl-size-h2)/1.05 var(--nfl-font-display); text-transform: uppercase; }
.type p { margin: 0; }
.type__rule { font: 500 var(--nfl-size-small)/1.2 var(--nfl-font-sans); padding-top: 14px; border-top: 2px solid var(--rule-line, var(--nfl-black-20)); }

/* ---------- Footer: Shield bottom centre (Restraint) ---------- */
.foot { text-align: center; display: grid; justify-items: center; gap: 20px; }
.foot .nfl-shield { --shield-h: 64px; margin: 32px 32px 8px; }
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; }
.foot small { font: 400 var(--nfl-size-caption)/1.3 var(--nfl-font-sans); opacity: .8; max-width: 60ch; }

/* ---------- Version switch (prototype only) ---------- */
.switch {
  position: fixed; z-index: 50; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: 4px; padding: 4px; border-radius: var(--nfl-radius-pill);
  background: var(--nfl-gridiron-black); box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}
.switch a {
  padding: .6em 1.1em .55em; border-radius: var(--nfl-radius-pill); color: var(--nfl-sideline-white); text-decoration: none;
  font: 700 .8125rem/1 var(--nfl-font-display); text-transform: uppercase; letter-spacing: .03em;
}
.switch a[aria-current="page"] { background: var(--nfl-sideline-white); color: var(--nfl-gridiron-black); }
@media (max-width: 560px) {
  .fan img { width: 40%; }
  .fan img:nth-child(1) { --x: -30%; } .fan img:nth-child(3) { --x: 30%; }
  .type:hover .fan img:nth-child(1) { --x: -33%; } .type:hover .fan img:nth-child(3) { --x: 33%; }
}
main, footer { overflow-x: clip; }
