/* Head Coach Games – bolagssidan.
   Bildvärld: coachens taktiktavla. Spelplan i blått, magneter, tuschstreck. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Kalam";
  src: url("fonts/kalam-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --board: #F3F6F2;      /* whiteboard */
  --ink: #12151A;        /* svart tusch */
  --field: #1B43C4;      /* spelplanen */
  --field-deep: #0F2A8C;
  --red: #E8402F;
  --yellow: #F6C52E;     /* magnet */
  --green: #27B072;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --display: "Archivo", "Arial Narrow", sans-serif;
  --hand: "Kalam", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--board);
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Korn över hela sidan – tar bort det platta digitala. */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  opacity: 0.11; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2 {
  font-stretch: 68%;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(3rem, 8.2vw, 7.5rem); }
h2 { font-size: clamp(2.5rem, 6.4vw, 5.75rem); }
h3 { font-stretch: 80%; font-weight: 700; font-size: 1.35em; line-height: 1.15; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
.hand { font-family: var(--hand); }

/* Topp */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem var(--gutter);
  pointer-events: none;
  transition: transform 0.3s ease;
}
.top.away { transform: translateY(-110%); }
.top a { pointer-events: auto; text-decoration: none; border-radius: 999px; padding: 0.5em 1.1em; font-weight: 700; }
/* Logotypen står fritt. Den är ritad för mörk bakgrund, så över ljusa avsnitt
   vänds den till sin mörka variant (svarta bokstäver, svart GAMES-platta). */
.top a.wordmark { background: none; padding: 0; border-radius: 0; transform-origin: 0 0; }
.wordmark img { display: block; height: clamp(3.25rem, 5.6vw, 4.75rem); width: auto; transition: filter 0.25s; }
.top.on-light .wordmark img { filter: invert(1); }

.top .talk { background: var(--yellow); color: var(--ink); font-size: 0.95rem; box-shadow: 0 0 0 2px var(--ink); }
.top .talk:hover { background: #fff; }

.button {
  display: inline-block; margin-top: 2rem;
  padding: 0.85em 1.6em;
  background: var(--yellow); color: var(--ink);
  font-weight: 800; text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 6px 0 rgba(0, 0, 40, 0.35);
}
.button:hover { background: #fff; }

/* ───── Berättelsen ───── */
.story {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 70% 40%, var(--field) 0%, var(--field-deep) 100%);
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: var(--gutter);
  padding: 6.5rem var(--gutter) 4rem;
  align-items: start;
}
.lines { position: absolute; left: -12%; top: -18%; width: 124%; height: 136%; pointer-events: none; transform: rotate(-11deg); }
.lines * { fill: none; stroke: #fff; stroke-width: 3; opacity: 0.13; }
.steps { position: relative; display: grid; gap: 5rem; }
.step p { max-width: 34ch; margin-top: 1.5rem; font-size: 1.15em; }
.boardwrap { position: sticky; top: 5rem; }
.board { display: block; width: 100%; height: auto; max-height: 82svh; overflow: visible; }

.anim .story { height: 100svh; align-items: center; padding-top: 4.5rem; padding-bottom: 2rem; }
.anim .steps { gap: 0; }
.anim .step { grid-area: 1 / 1; align-self: center; }
.anim .boardwrap { position: static; }

.board .magnets { filter: drop-shadow(0 7px 5px rgba(0, 0, 50, 0.4)); }
.board .ring { fill: none; stroke: #fff; stroke-width: 2.5; opacity: 0.75; }
.board .play { fill: none; stroke: var(--yellow); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.board .homeplay { stroke: #fff; opacity: 0.25; }
.board .home-disc { fill: #8C97B8; }
.board .cross { fill: none; stroke: #FF5746; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.board .note { font-family: var(--hand); font-size: 26px; fill: #fff; }
.board .note.y { fill: var(--yellow); }
.board .n-home, .board .n-out { visibility: hidden; } /* hör bara till mellanstegen */
.board .chip rect { fill: #fff; }
.board .chip text { font-family: var(--display); font-weight: 800; font-size: 19px; fill: var(--ink); text-anchor: middle; }

/* Första vyn: arenafoto i helskärm. Fotot står ensamt i första steget, sedan
   tonas det ned och tavlan ritas ovanpå med platta markörer. */
.story { background: #0A1650; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
.story::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(8, 14, 56, 0.92) 0%, rgba(8, 14, 56, 0.62) 45%, rgba(8, 14, 56, 0.12) 100%); }
.steps, .boardwrap { z-index: 2; }
.anim .boardwrap { position: relative; top: 0; } /* top: 0 – annars skjuter grundregelns sticky-avstånd ned tavlan */
.board .magnets { filter: none; }
.board .team circle:first-child { fill: rgba(10, 22, 80, 0.55); stroke: #fff; stroke-width: 3; }
.story .button { box-shadow: none; }
@media (max-width: 900px) {
  .hero-bg { object-position: 80% 50%; }
  .story::after { background: linear-gradient(to top, rgba(8, 14, 56, 0.94) 0%, rgba(8, 14, 56, 0.75) 50%, rgba(8, 14, 56, 0.15) 100%); }
}

/* ───── Bevisen ───── */
.proof {
  position: relative; overflow: hidden;
  min-height: 100svh;
  padding: 7rem var(--gutter) 5rem;
  display: grid; align-content: center; gap: 3.5rem;
}
.proof h2 { max-width: 14ch; }
.blob { position: absolute; z-index: 0; pointer-events: none; }
.proof > *:not(.blob) { position: relative; z-index: 1; }
.proof .blob { right: -7rem; top: -7rem; width: 34rem; max-width: 70vw; aspect-ratio: 1; border-radius: 50%; border: 1.1rem solid var(--yellow); padding: 1.6rem; }
.proof .blob img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem var(--gutter); }
.stat { text-align: center; }
.gaugebox { position: relative; width: 100%; max-width: 17rem; margin: 0 auto; }
.gauge { display: block; width: 100%; height: auto; transform: rotate(-90deg); }
.gauge .track { fill: none; stroke: rgba(18, 21, 26, 0.1); stroke-width: 20; }
.gauge .arc { fill: none; stroke: var(--c, var(--field)); stroke-width: 20; stroke-linecap: round; }
.gaugebox b {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-stretch: 62%; font-weight: 900;
  font-size: clamp(2.6rem, 5.6vw, 5rem); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat span { display: block; margin: 1rem auto 0; max-width: 18ch; font-weight: 600; line-height: 1.3; }
.source { font-size: 0.85em; opacity: 0.7; max-width: 60ch; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.facts li { background: var(--ink); color: #fff; border-radius: 1.25rem; padding: 1.25rem 1.5rem; display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.facts b { font-stretch: 62%; font-weight: 900; font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1; color: var(--yellow); }
.facts li:nth-child(2) { background: var(--field); }
.facts li:nth-child(3) { background: var(--red); }
.facts li:nth-child(3) b { color: #fff; }

/* ───── Vad ligan får ───── */
.gets-sec { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 30% 30%, var(--field) 0%, var(--field-deep) 100%); color: #fff; padding: 8rem var(--gutter); min-height: 100svh; display: grid; align-content: center; gap: 4rem; }
.gets-sec > *:not(.lines) { position: relative; }
.gets-sec .lines { transform: rotate(-7deg); }
.gets-sec .lines * { opacity: 0.11; }
/* På blått får alla punkter samma gula bricka; pastellerna skar sig mot bakgrunden. */
.gets-sec .icon .bg { fill: var(--yellow); }
.underline { display: block; width: min(24rem, 70%); height: auto; margin-top: 0.75rem; overflow: visible; }
.underline path { fill: none; stroke: var(--yellow); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.gets-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--gutter); align-items: center; }
.gets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3rem; }
.shot { margin: 0; border-radius: 1.75rem; overflow: hidden; }
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gets-grid .shot { aspect-ratio: 3 / 4; transform: rotate(2deg); box-shadow: 1rem 1rem 0 var(--yellow); }
.gets li { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.gets p { margin-top: 0.4rem; max-width: 30ch; }
.icon { width: 5rem; height: 5rem; overflow: visible; }
.icon .bg { fill: var(--c, var(--yellow)); }
.icon .ln { fill: none; stroke: var(--ink); stroke-width: 4.8; stroke-linecap: round; stroke-linejoin: round; }
.icon .fl { fill: var(--ink); }

/* ───── Bildband ───── */
.band { position: relative; overflow: hidden; height: 100svh; min-height: 32rem; background: var(--field-deep); color: #fff; display: grid; align-items: end; }
.band img { position: absolute; left: 0; top: -12%; width: 100%; height: 124%; object-fit: cover; object-position: 50% 35%; }
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 22, 80, 0.92) 0%, rgba(10, 22, 80, 0.35) 45%, rgba(10, 22, 80, 0) 70%); }
.band-text { position: relative; z-index: 1; padding: 0 var(--gutter) clamp(2.5rem, 7vh, 5rem); }
.band-text h2 { font-size: clamp(3rem, 9vw, 8.5rem); }
.band-text p { margin-top: 1.25rem; max-width: 44ch; font-size: 1.15em; }

/* ───── Varför vår ───── */
.why { position: relative; overflow: hidden; background: var(--ink); color: var(--board); padding: 8rem var(--gutter); min-height: 100svh; display: grid; align-content: center; gap: 4rem; }
.why .lines * { opacity: 0.07; }
.why > *:not(.lines) { position: relative; }
.why > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.reasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.reasons li { border: 2px solid rgba(255,255,255,0.14); border-radius: 1.75rem; padding: 2rem; display: grid; grid-template-columns: minmax(0, 1fr) 9rem; gap: 1.5rem; align-items: center; background: rgba(14, 17, 24, 0.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.reasons h3 { font-size: clamp(1.75rem, 3vw, 2.6rem); font-stretch: 68%; font-weight: 800; color: var(--yellow); }
.reasons p { margin-top: 0.75rem; max-width: 38ch; }
.mini { width: 9rem; height: auto; overflow: visible; }
.mini .w { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.mini text { font-family: var(--hand); font-size: 26px; fill: #fff; }
.live { font-family: var(--hand); font-size: 1.5em; }

/* ───── Kontakt ───── */
.contact { position: relative; overflow: hidden; background: var(--yellow); padding: 8rem var(--gutter) 2.5rem; min-height: 100svh; display: grid; align-content: space-between; gap: 5rem; }
.contact .lines { transform: rotate(8deg); }
.contact .lines * { stroke: var(--ink); opacity: 0.1; }
.contact > *:not(.lines) { position: relative; }
.contact-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--gutter); align-items: center; }
.contact-top .shot { aspect-ratio: 4 / 3; transform: rotate(-2.5deg); box-shadow: 1rem 1rem 0 var(--ink); }
.logoplate { display: inline-block; }
.logoplate img { display: block; height: clamp(4.5rem, 9vw, 7rem); width: auto; filter: invert(1); }
.contact h2 { font-size: clamp(2.25rem, 5.2vw, 4.75rem); max-width: 14ch; }
.contact-lead { margin-top: 2rem; font-stretch: 80%; font-weight: 700; font-size: 1.15em; }
.mail {
  display: inline-block; margin-top: 0.4rem;
  font-stretch: 68%; font-weight: 800;
  font-size: clamp(1.5rem, 3.7vw, 3.5rem); line-height: 1;
  text-decoration-thickness: 0.06em; text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}
.mail:hover { color: var(--field); }
.people { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2rem calc(var(--gutter) / 2); }
@media (max-width: 1250px) { .people { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.people li { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 1rem; align-items: center; line-height: 1.3; }
.people .disc { width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--ink); color: var(--yellow); display: grid; place-items: center; font-stretch: 68%; font-weight: 800; font-size: 1.25rem; box-shadow: 0 5px 0 rgba(0,0,0,0.2); }
.people b { display: block; font-stretch: 80%; font-size: 1.15em; }
.small { font-size: 0.85em; display: flex; flex-wrap: wrap; gap: 1rem 3rem; justify-content: space-between; align-items: end; text-align: right; border-top: 2px solid var(--ink); padding-top: 1.25rem; }

@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; padding-top: 5rem; }
  .boardwrap { position: static; order: -1; }
  .board { max-height: 40svh; }
  .anim .story { grid-template-rows: auto 1fr; align-items: start; gap: 1rem; }
  .anim .step { align-self: start; }
  .step p { font-size: 1em; margin-top: 1rem; }
  .button { margin-top: 1.25rem; }
  .stats, .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts, .gets, .reasons, .gets-grid, .contact-top { grid-template-columns: 1fr; }
  .gets-grid .shot { aspect-ratio: 4 / 3; max-width: 26rem; margin-top: 1rem; }
  .gets-grid .shot img { object-position: 50% 20%; }
  .contact-top .shot { max-width: 26rem; }
  .proof .blob { width: 48vw; right: -14vw; top: -14vw; border-width: 0.6rem; padding: 0.8rem; }
  .gets { gap: 2rem; }
  .reasons li { grid-template-columns: minmax(0, 1fr) 5.5rem; padding: 1.5rem; }
  .mini { width: 5.5rem; }
  .proof, .gets-sec, .why, .contact { padding-top: 6rem; padding-bottom: 4rem; }
  .contact { padding-bottom: 2rem; }
}
@media (max-width: 480px) {
  .people { grid-template-columns: 1fr; }
}
