/* BrainPlay Studio — placeholder site.
   Signature: the tactics board. Red = a pinned (live) app, and nothing else is red.
   Fonts self-hosted: Big Shoulders Display + Albert Sans (SIL OFL 1.1),
   Permanent Marker (Apache 2.0) — used only for the hand-written board notes. */

@font-face { font-family: "Big Shoulders Display"; font-weight: 600 900; font-display: swap;
  src: url("../fonts/big-shoulders-latin.woff2") format("woff2"); }
@font-face { font-family: "Albert Sans"; font-weight: 400 700; font-display: swap;
  src: url("../fonts/albert-sans-latin.woff2") format("woff2"); }
@font-face { font-family: "Permanent Marker"; font-weight: 400; font-display: swap;
  src: url("../fonts/permanent-marker-latin.woff2") format("woff2"); }

:root {
  --paper:   #F2F4EE;   /* touchline chalk */
  --sheet:   #FFFFFF;
  --ink:     #14213A;   /* away-kit navy */
  --ink-2:   #4A566B;
  --ink-3:   #6B7588;
  --rule:    #D7DCD2;
  --grass:   #2E8A4E;
  --grass-2: #297D46;
  --grass-ink: #1E6A3A; /* green for text on paper, 6.3:1 */
  --magnet:  #E4472E;   /* the magnet — live apps only */
  --magnet-edge: #A8301C;
  --marker:  #FFD83A;   /* dry-wipe marker on the board */

  --f-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --f-body: "Albert Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-hand: "Permanent Marker", "Comic Sans MS", cursive;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
code { font: 500 .8em/1 var(--f-mono); letter-spacing: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 12px; top: -64px; z-index: 10; padding: 10px 14px; background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; border-radius: 6px; }
.skip:focus { top: 12px; }

.display {
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  line-height: .86; letter-spacing: .004em;
}

/* ---------- Nav ---------- */
.nav { border-bottom: 1px solid var(--rule); background: var(--paper); }
.nav__inner { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none; font-weight: 700; letter-spacing: -.01em; }
.brand img { width: 34px; height: 34px; }
.nav__links { display: flex; gap: 24px; }
.nav__links a, .nav__play { text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav__links a { color: var(--ink-2); }
.nav__links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav__play { padding: 8px 14px; border-radius: 8px; background: var(--ink); color: #fff; }
.nav__play:hover { background: var(--grass-ink); }
@media (max-width: 640px) { .nav__links { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; min-height: 50px; padding: 0 22px;
  border-radius: 10px; background: var(--ink); color: #fff;
  font-weight: 700; text-decoration: none;
  box-shadow: 0 3px 0 #070D19;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background-color .15s;
}
.btn:hover { background: var(--grass-ink); box-shadow: 0 3px 0 #0F3D20; }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 transparent; }

/* ---------- Hero ---------- */
.hero { padding: clamp(36px, 6vw, 80px) 0 clamp(48px, 7vw, 96px); }
.hero__head { margin-bottom: clamp(28px, 4vw, 48px); }
.hero h1 { font-size: clamp(3.4rem, .6rem + 7.4vw, 8rem); }
.hero h1 span { display: block; color: var(--grass-ink); }
.hero__aside {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 20px 40px; margin-top: clamp(22px, 3vw, 36px);
  padding-top: clamp(18px, 2.4vw, 28px); border-top: 2px solid var(--ink);
}
.hero__lede { font-size: clamp(1.08rem, 1rem + .3vw, 1.22rem); color: var(--ink-2); max-width: 34em; }

/* ---------- The tactics board ---------- */
.board {
  padding: clamp(8px, 1.2vw, 14px);
  border-radius: clamp(14px, 1.8vw, 22px);
  background: linear-gradient(180deg, #E4E8E3, #C6CCC6);   /* aluminium rim */
  box-shadow: inset 0 1px 0 #fff, 0 1px 0 #AEB5AE, 0 28px 50px -28px rgba(20, 33, 58, .55);
}
.board__field {
  position: relative; aspect-ratio: 1000 / 640; container-type: size;
  border-radius: clamp(8px, 1vw, 12px); overflow: hidden;
  background: var(--grass);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12), inset 0 10px 30px rgba(0, 0, 0, .18);
}
.board__pitch {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, var(--grass) 0 10%, var(--grass-2) 10% 20%);
}
.board__chalk, .board__ink { position: absolute; inset: 0; width: 100%; height: 100%; }
.board__chalk { color: rgba(255, 255, 255, .82); }
.board__ink { color: var(--marker); }

.magnet {
  --m: clamp(44px, 8cqw, 88px);
  position: absolute; left: var(--x); top: var(--y);
  width: var(--m); height: var(--m);
  transform: translate(-50%, -50%);
  text-decoration: none;
}
.magnet--app {
  border-radius: 50%; padding: calc(var(--m) * .075);
  background: var(--magnet);
  box-shadow: 0 calc(var(--m) * .06) 0 var(--magnet-edge), 0 calc(var(--m) * .16) calc(var(--m) * .2) rgba(0, 0, 0, .35);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.magnet--app img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.magnet--app:hover { transform: translate(-50%, -56%); box-shadow: 0 calc(var(--m) * .06) 0 var(--magnet-edge), 0 calc(var(--m) * .3) calc(var(--m) * .3) rgba(0, 0, 0, .3); }
.magnet--app:focus-visible { outline-color: var(--marker); outline-offset: 5px; border-radius: 50%; }

.tag {
  position: absolute; left: 50%; top: calc(100% + 12px); transform: translateX(-50%) rotate(-1.5deg);
  padding: 5px 9px 6px; background: var(--sheet); color: var(--ink);
  font: 700 clamp(.68rem, .55rem + .35vw, .86rem)/1.15 var(--f-body); white-space: nowrap; text-align: center;
  border-radius: 3px; box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
}
.tag em { display: block; font-style: normal; font-weight: 600; font-size: .82em; color: var(--grass-ink); margin-top: 2px; }

.magnet--open .ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px dashed var(--marker);
}
.note {
  position: absolute; left: 50%; top: calc(100% + 10px); transform: translateX(-50%) rotate(-4deg);
  font: 400 clamp(.85rem, .6rem + .6vw, 1.3rem)/1 var(--f-hand); color: var(--marker); white-space: nowrap;
}

.board__cap { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 12px 6px 2px; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.board__cap span { display: inline-flex; align-items: center; gap: 8px; }
.key { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.key--app { background: var(--magnet); box-shadow: 0 2px 0 var(--magnet-edge); }
.key--open { border: 2px dashed var(--grass); }

/* Portrait pitch on phones: rotate the pitch, keep magnets upright */
@media (max-width: 640px) {
  .board__field { aspect-ratio: 640 / 1000; }
  .board__pitch { inset: auto; left: 50%; top: 50%; width: 100cqh; height: 100cqw; transform: translate(-50%, -50%) rotate(90deg); }
  .magnet { --m: clamp(46px, 15cqw, 72px); transform: translate(-50%, -50%) rotate(-90deg); }
  .magnet--app:hover { transform: translate(-50%, -50%) rotate(-90deg); }
}

/* The one orchestrated moment: magnets snap on, then the runs are drawn */
@media (prefers-reduced-motion: no-preference) {
  .magnet { animation: snap .45s var(--d, 0s) var(--ease) both; }
  .run { stroke-dasharray: 1; animation: draw .7s .8s cubic-bezier(.6, 0, .3, 1) both; }
  .run--2 { animation-delay: 1.05s; }
  @keyframes snap { from { opacity: 0; translate: 0 -14px; scale: 1.12; } }
  @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
}

/* ---------- Team sheet ---------- */
.lineup { padding: clamp(56px, 8vw, 112px) 0; border-top: 1px solid var(--rule); }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; margin-bottom: 28px; }
.sec-head h2 { font-size: clamp(2.6rem, 1.6rem + 3.6vw, 4.6rem); }
.sec-head p { color: var(--ink-2); max-width: 28em; }

.sheet { background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; padding: clamp(8px, 2vw, 20px) clamp(16px, 3vw, 36px); }
.sheet__group {
  padding: 22px 0 10px; border-bottom: 2px solid var(--ink);
  font: 700 .78rem/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
}
.sheet__list { margin-bottom: 14px; }
.player {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; align-items: center;
  gap: 8px 24px; padding: 20px 0; border-bottom: 1px solid var(--rule);
}
.sheet__list > .player:last-child { border-bottom: 0; }
.player__icon { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 0 0 1px rgba(20, 33, 58, .1); }
.player__icon--open { border: 2px dashed #A9B1A4; box-shadow: none; border-radius: 50%; }
.player h4 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; }
.player__body p { color: var(--ink-2); margin-top: 2px; }
.player__body .player__meta { font-size: .85rem; color: var(--ink-3); margin-top: 6px; }
.player__status { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.player__status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--magnet); }
.player__link { font-weight: 700; font-size: .95rem; white-space: nowrap; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: var(--rule); }
.player__link:hover { text-decoration-color: var(--ink); }
.player--bench { grid-template-columns: 64px minmax(0, 1fr); }

@media (max-width: 860px) {
  .player { grid-template-columns: 56px minmax(0, 1fr); align-items: start; }
  .player__icon { width: 56px; height: 56px; }
  .player__status, .player__link { grid-column: 2; }
  .player--bench { grid-template-columns: 56px minmax(0, 1fr); }
}

/* ---------- What we make ---------- */
.make { background: var(--ink); color: #fff; padding: clamp(56px, 8vw, 104px) 0; }
.sec-kicker { font: 700 .78rem/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: #9FB0C8; margin-bottom: 28px; }
.make__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px clamp(32px, 6vw, 96px); }
.make__col { border-top: 2px solid rgba(255, 255, 255, .9); padding-top: 22px; }
.make__col h3 { font-size: clamp(2.4rem, 1.4rem + 3.2vw, 4.2rem); margin-bottom: 16px; }
.make__col p { color: #C7D0DE; max-width: 28em; font-size: 1.08rem; }
@media (max-width: 760px) { .make__grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #9FB0C8; border-top: 1px solid rgba(255, 255, 255, .12); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px; padding-block: 28px 36px; font-size: .92rem; }
.footer__tag { color: #fff; font-weight: 600; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer__links a { color: #fff; text-decoration: none; font-weight: 600; }
.footer__links a:hover { text-decoration: underline; text-underline-offset: 5px; }
.footer__legal { flex-basis: 100%; font-size: .84rem; }
.footer :focus-visible { outline-color: #fff; }

/* ---------- Simple pages (privacy, 404) ---------- */
.page { padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 9vw, 120px); }
.prose { max-width: 40rem; }
.prose h1 { font-size: clamp(3rem, 1.6rem + 5vw, 5.6rem); margin-bottom: 14px; }
.prose h2 { font-size: 1.25rem; font-weight: 700; margin: 36px 0 8px; letter-spacing: -.01em; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 12px; }
.prose ul { list-style: disc; padding-left: 1.2em; margin-top: 10px; display: grid; gap: 6px; }
.prose a { color: var(--ink); font-weight: 600; text-underline-offset: 4px; }
.prose .meta { font-size: .92rem; color: var(--ink-3); }
.lost { display: grid; gap: 22px; justify-items: start; }
.lost h1 { font-size: clamp(3.4rem, 1.6rem + 7vw, 7.4rem); }
.lost p { color: var(--ink-2); max-width: 30em; font-size: 1.12rem; }
