/* ==========================================================
   StronkTank site styles
   Colors come from Stronk's art. Change them in :root and the
   whole site follows.
   ========================================================== */

/* Fonts are hosted on the site itself (assets/fonts) — no outside requests. */
@font-face { font-family: "Big Shoulders Display"; font-weight: 700; font-display: swap; src: url("../fonts/big-shoulders-display-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-weight: 900; font-display: swap; src: url("../fonts/big-shoulders-display-latin-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 400; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  /* Stronk's palette */
  --black:  #000000;   /* page background */
  --fur:    #242326;   /* charcoal fur: grey surfaces */
  --fur-hi: #38363C;   /* fur highlight: lines and borders */
  --ash:    #8C8992;   /* muted text */
  --fog:    #C9C6CC;   /* body text on dark */
  --bone:   #FFF4E4;   /* headings on dark */
  --cream:  #F2D3B0;   /* collar stripes, piercings */
  --gold:   #FDBC23;   /* top of the logo gradient, eyes */
  --amber:  #F0A427;
  --ember:  #E97E12;   /* bottom of the logo gradient, collar */
  --rust:   #A55C17;   /* grid lines on orange */
  --live:   #E5322D;   /* on-air red, only shown while streaming */

  --blaze: linear-gradient(180deg, var(--gold) 0%, var(--ember) 100%);

  /* Type */
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;

  /* Layout */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1320px;
  --topbar-h: 64px;
  --grid: 56px;        /* size of the grid squares from the art backgrounds */
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: var(--topbar-h); }
body {
  margin: 0;
  background: var(--black);
  color: var(--fog);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, iframe { display: block; max-width: 100%; }
body { overflow-x: clip; }   /* swinging bones never cause sideways scrolling */
a { color: inherit; }
h1, h2, h3 { margin: 0; color: var(--bone); font-family: var(--display); font-weight: 900; line-height: 0.95; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--gold); color: var(--black); padding: .6rem 1rem; font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .7rem 1.4rem;
  font-family: var(--body); font-weight: 700; font-size: 1.05rem; letter-spacing: .01em;
  text-decoration: none; border: 2px solid transparent; border-radius: 999px; cursor: pointer;
  transition: filter .15s, background-color .15s, color .15s, border-color .15s;
}
.btn-blaze { background: var(--blaze); color: var(--black); }
.btn-blaze:hover { filter: brightness(1.08); }
.btn-black { background: var(--black); color: var(--bone); }
.btn-black:hover { background: var(--fur); }
.btn-outline-light { border-color: var(--fur-hi); color: var(--bone); }
.btn-outline-light:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 var(--gutter);
  background: rgba(0, 0, 0, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--fur);
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 2px var(--ember); }
.brand span { font-family: var(--display); font-weight: 900; font-size: 1.5rem; color: var(--bone); }
/* "Live now" pill: only visible while streaming */
.live-pill {
  margin-right: auto;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .3rem .8rem .3rem .65rem; border-radius: 999px;
  background: var(--live); color: #fff; text-decoration: none;
  font: 700 .95rem/1 var(--body); letter-spacing: .02em;
}
.live-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.live-pill:hover { filter: brightness(1.1); }
.topnav { display: flex; gap: clamp(.75rem, 2.5vw, 2rem); align-items: center; }
.topnav a { text-decoration: none; font-weight: 600; color: var(--fog); }
.topnav a:hover { color: var(--bone); }
.topnav .topnav-cta { color: var(--gold); }
.topnav .topnav-cta:hover { color: var(--amber); }

/* ---------- Hero: logo banner on the black grid ---------- */
.hero {
  background-color: var(--black);
  background-image:
    linear-gradient(180deg, transparent 45%, var(--black) 100%),   /* fade the grid out at the bottom */
    linear-gradient(var(--fur) 1px, transparent 1px),
    linear-gradient(90deg, var(--fur) 1px, transparent 1px);
  background-size: 100% 100%, var(--grid) var(--grid), var(--grid) var(--grid);
  background-position: center top;
}
.hero-inner {
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) clamp(3rem, 6vw, 4.5rem);
  text-align: center;
}
.hero-logo { margin: 0 auto; }
.hero-logo img {
  width: 100%; height: auto;
  mix-blend-mode: lighten;   /* lets the grid show through the banner's black */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 96%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 96%, transparent 100%);
}
.hero-copy { max-width: 38rem; margin: clamp(.5rem, 2vw, 1.5rem) auto 0; }
.hero-tagline { font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 500; color: var(--fog); text-wrap: balance; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.5rem; }

/* One orchestrated entrance: the logo powers up */
@media (prefers-reduced-motion: no-preference) {
  .hero-logo img { opacity: 0; transform: scale(.96); filter: brightness(2.2) saturate(.4); }
  .is-ready .hero-logo img {
    opacity: 1; transform: none; filter: none;
    transition: opacity .5s ease-out, transform .9s cubic-bezier(.2,.8,.2,1), filter .9s ease-out;
  }
}

/* ---------- The collar ---------- */
.collar {
  position: relative; height: 18px;
  background:
    repeating-linear-gradient(90deg,
      transparent 0 180px,
      var(--cream) 180px 192px, transparent 192px 200px,
      var(--cream) 200px 212px, transparent 212px 392px),
    linear-gradient(180deg, #F08A2A, var(--ember) 55%, #C9650C);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.25);
}
.collar-tag {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%) rotate(-6deg);
  display: grid; place-items: center;
  min-width: 92px; padding: 1.15rem .9rem .55rem;
  background: var(--cream); color: #4A3320;
  border: 2px solid #C9A37D; border-radius: 6px 6px 14px 14px;
  font-family: var(--display); font-weight: 900; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .04em;
  box-shadow: 0 6px 14px rgba(0,0,0,.45);
}
.collar-tag::before {   /* the ring */
  content: ""; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  width: 18px; height: 18px; border: 3px solid #C9A37D; border-radius: 50%; background: transparent;
}
.collar-tag::after {    /* the hole */
  content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 8px; height: 8px; border-radius: 50%; background: var(--black);
}
@media (prefers-reduced-motion: no-preference) {
  /* a slow, slightly uneven sway, like wind, from the moment the page loads */
  .collar-tag {
    transform-origin: 50% -12px;
    animation: tag-sway 7s ease-in-out infinite;
  }
  @keyframes tag-sway {
    0%   { transform: translateX(-50%) rotate(-6deg); }
    22%  { transform: translateX(-50%) rotate(3deg); }
    45%  { transform: translateX(-50%) rotate(-2deg); }
    70%  { transform: translateX(-50%) rotate(5deg); }
    100% { transform: translateX(-50%) rotate(-6deg); }
  }
}

/* While live: the tag turns on-air red, shows LIVE, and links to Twitch */
.collar-tag { text-decoration: none; }
.live-badge { display: none; }
.is-live .collar-tag {
  background: var(--live); color: #fff; border-color: #9E1C18; cursor: pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,.45), 0 0 18px 4px rgba(229,50,45,.55);
}
.is-live .collar-tag::before { border-color: #9E1C18; }
.is-live .collar-tag:hover { filter: brightness(1.1); }
.is-live .collar-tag:focus-visible { outline: 3px solid var(--bone); outline-offset: 4px; }
.is-live .live-badge {
  display: inline-flex; align-items: center; gap: .3rem; margin-top: .2rem;
  padding: .1rem .45rem; border-radius: 999px;
  background: #fff; color: var(--live);
  font: 700 .7rem/1.2 var(--body); letter-spacing: .08em;
}
.is-live .live-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live); }
@media (prefers-reduced-motion: no-preference) {
  .is-live .collar-tag { animation: tag-sway 7s ease-in-out infinite, live-glow 2.4s ease-in-out infinite; }
  .is-live .collar-tag:hover, .is-live .collar-tag:focus-visible { animation-play-state: paused; }
  @keyframes live-glow {
    0%, 100% { box-shadow: 0 6px 14px rgba(0,0,0,.45), 0 0 10px 1px rgba(229,50,45,.35); }
    50%      { box-shadow: 0 6px 14px rgba(0,0,0,.45), 0 0 24px 7px rgba(229,50,45,.7); }
  }
}

/* ---------- Watch (Twitch player + chat) ---------- */
.watch {
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  padding: clamp(7rem, 10vw, 8rem) var(--gutter) clamp(2.5rem, 5vw, 4rem);
}
.watch-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1.25rem; margin-bottom: 1.25rem; }
.watch-head h2 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
.watch-note { color: var(--ash); flex: 1 1 16rem; }
.chat-toggle {
  background: none; border: 1px solid var(--fur-hi); border-radius: 999px; color: var(--fog);
  font: 600 .95rem var(--body); padding: .45rem 1rem; cursor: pointer;
}
.chat-toggle:hover { border-color: var(--gold); color: var(--gold); }

.stage {
  display: grid; grid-template-columns: 1fr;
  border-radius: 14px; overflow: hidden;
  background: var(--fur);
  box-shadow: 0 0 0 2px var(--ember), 0 24px 60px -20px rgba(233, 126, 18, .35);
}
.stage-player { aspect-ratio: 16 / 9; background: var(--fur); }
.stage-player iframe, .stage-chat iframe { width: 100%; height: 100%; border: 0; }
.stage-chat { display: none; }

@media (min-width: 1024px) {
  .stage { grid-template-columns: 1fr 340px; }
  .stage-chat { display: block; border-left: 1px solid var(--fur-hi); }
  .stage.no-chat { grid-template-columns: 1fr; }
  .stage.no-chat .stage-chat { display: none; }
}
@media (max-width: 1023px) { .chat-toggle { display: none; } }

.player-fallback {
  height: 100%; display: grid; place-content: center; justify-items: center; gap: 1.25rem;
  padding: 2rem; text-align: center; color: var(--fog);
}

/* ---------- Generic sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) var(--gutter); }
.section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section-fur { background: var(--fur); }
.section-head { margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.section-head h2 { font-size: clamp(2.75rem, 7vw, 5rem); }
.section-head p { margin-top: .6rem; color: var(--ash); font-size: 1.15rem; }
.section-fur .section-head p { color: var(--fog); }

/* ---------- Recent matches ---------- */
.matches-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; }
#match-summary { color: var(--fog); }
.match-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.match {
  display: grid; align-items: center; gap: .75rem 1.25rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: .85rem 1.1rem .85rem 1rem;
  background: var(--black); border-radius: 12px;
  border-left: 5px solid var(--fur-hi);
}
.match.is-win { border-left-color: var(--gold); }
.match-hero { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.match-hero img, .match-hero-blank { width: 44px; height: 44px; border-radius: 50%; background: var(--fur); object-fit: cover; flex: none; }
.match-hero-name { font-family: var(--display); font-weight: 900; font-size: 1.6rem; line-height: 1; color: var(--bone); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match-result { font-weight: 700; justify-self: end; }
.is-win .match-result { color: var(--gold); }
.is-loss .match-result { color: var(--ash); }
.match-kda, .match-stat { display: flex; flex-direction: column; line-height: 1.15; }
.match-kda strong, .match-stat strong { color: var(--bone); font-weight: 600; font-variant-numeric: tabular-nums; }
.match-kda small, .match-stat small { color: var(--ash); font-size: .85rem; }
.match-when { color: var(--ash); font-size: .95rem; }
/* phone layout: hero + result on top, numbers underneath */
.match-kda, .match-stat, .match-when { grid-column: span 1; }
@media (max-width: 759px) {
  .match { grid-template-columns: repeat(3, 1fr); }
  .match-hero { grid-column: 1 / 3; }
  .match-result { grid-column: 3; }
  .match-when { grid-column: 1 / -1; font-size: .85rem; }
}
@media (min-width: 760px) {
  .match { grid-template-columns: minmax(12rem, 1.6fr) 4rem 1.1fr .8fr .8fr minmax(7.5rem, 1fr); }
  .match-result { justify-self: start; }
  .match-when { text-align: right; }
}
.match-empty { padding: 1.25rem; background: var(--black); border-radius: 12px; color: var(--fog); }
.match-list[aria-busy="true"] { min-height: 340px; }
.matches-credit { margin-top: 1rem; color: var(--ash); font-size: .9rem; }
.matches-credit a { color: var(--fog); }
.matches-credit a:hover { color: var(--gold); }

/* ---------- Social bone tags (hang from the collar next to STRONK) ---------- */
.collar { z-index: 5; }
.collar-socials { position: absolute; inset: 0; pointer-events: none; }
.bone-list { list-style: none; margin: 0; padding: 0; }
.bone-hang {
  /* --x (distance from the middle) and --tier (0 = top row, 1 = lower row) are set by main.js */
  --bone-h: 40px; --knob: 11px; --drop: 10px;
  position: absolute; top: 4px; left: calc(50% + var(--x, 0px));
  display: flex; flex-direction: column; align-items: center;
  transform: translateX(-50%) rotate(-2deg); transform-origin: 50% 0;
  pointer-events: auto;
}
.bone-list:not(.is-ready) .bone-hang { visibility: hidden; }   /* stay hidden until spaced out */
.bone-hang::before {   /* the ring on the collar */
  content: ""; width: 14px; height: 14px; border: 3px solid #C9A37D; border-radius: 50%;
}
.bone-string { width: 2px; height: calc(var(--drop) + var(--tier, 0) * (var(--bone-h) + 8px)); margin-top: -2px; background: #C9A37D; }
.bone {
  --fill: var(--cream);
  position: relative; display: grid; place-items: center;
  min-width: calc(var(--bone-h) * 2.4); height: var(--bone-h); padding: 0 calc(var(--knob) * 1.8);
  background: linear-gradient(var(--fill), var(--fill)) center / calc(100% - var(--knob) * 2) calc(var(--bone-h) * .56) no-repeat;
  color: #4A3320; text-decoration: none; white-space: nowrap;
  font-family: var(--display); font-weight: 900; font-size: 1.15rem; line-height: 1; text-transform: uppercase; letter-spacing: .03em;
  filter: drop-shadow(0 5px 7px rgba(0,0,0,.5));
  transition: filter .15s;
}
.bone::before, .bone::after {   /* the knobby ends */
  content: ""; position: absolute; top: 0; width: calc(var(--knob) * 2 + 2px); height: var(--bone-h);
  background:
    radial-gradient(circle at 50% 28%, var(--fill) calc(var(--knob) - .5px), transparent var(--knob)),
    radial-gradient(circle at 50% 72%, var(--fill) calc(var(--knob) - .5px), transparent var(--knob));
}
.bone::before { left: 0; }
.bone::after { right: 0; }
.bone-label { position: relative; z-index: 1; }
.bone.is-featured { --fill: var(--gold); }
.bone:hover, .bone:focus-visible { --fill: var(--amber); filter: drop-shadow(0 6px 10px rgba(233,126,18,.55)); }
.bone:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 8px; }

@media (max-width: 1023px) {
  .bone-hang { --bone-h: 34px; --knob: 9.5px; }
  .bone { font-size: 1rem; }
}
@media (max-width: 639px) {
  .bone-hang { --bone-h: 26px; --knob: 7px; --drop: 6px; }
  .bone-hang::before { width: 10px; height: 10px; border-width: 2px; }
  .bone { font-size: .7rem; }
  .collar-tag { min-width: 72px; font-size: 1rem; padding-left: .6rem; padding-right: .6rem; }
}
@media (max-width: 379px) {
  .bone-hang { --bone-h: 24px; --knob: 6.5px; }
  .bone { font-size: .62rem; }
}

@media (prefers-reduced-motion: no-preference) {
  /* same slow sway as STRONK, each bone at its own pace and already mid-sway on load */
  .bone-hang { animation: tag-sway var(--sway-dur, 7s) ease-in-out var(--sway-delay, 0s) infinite; }
  .bone-hang:hover, .bone-hang:focus-within { animation-play-state: paused; }
}

/* ---------- Clips ---------- */
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1.5rem; }
.clip { margin: 0; }
.clip-frame { aspect-ratio: 16 / 9; background: var(--fur); border-radius: 14px; overflow: hidden; }
.clip-frame iframe { width: 100%; height: 100%; border: 0; }
.clip-play { position: relative; width: 100%; height: 100%; padding: 0; border: 0; background: var(--fur); cursor: pointer; }
.clip-play img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.clip-play:hover img { opacity: 1; }
.clip-play-icon { position: absolute; left: 1rem; bottom: 1rem; width: 56px; height: 56px; border-radius: 50%; background: var(--blaze); }
.clip-play-icon::after {
  content: ""; position: absolute; left: 22px; top: 17px;
  border-left: 16px solid var(--black); border-top: 11px solid transparent; border-bottom: 11px solid transparent;
}
.clip figcaption { margin-top: .6rem; color: var(--bone); font-weight: 600; }

.clip-grid.is-empty { display: block; }
.clip-empty {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem;
  padding: 2rem; border-radius: 14px; background: var(--fur);
}
.clip-empty p { max-width: 36rem; color: var(--fog); }

/* ---------- Partner: the orange grid from Stronk's avatar ---------- */
.partner {
  color: var(--black);
  background-color: var(--ember);
  background-image:
    linear-gradient(rgba(165, 92, 23, .45) 2px, transparent 2px),
    linear-gradient(90deg, rgba(165, 92, 23, .45) 2px, transparent 2px),
    var(--blaze);
  background-size: var(--grid) var(--grid), var(--grid) var(--grid), 100% 100%;
}
.partner h2, .partner h3 { color: var(--black); }
.partner-grid { display: grid; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
@media (min-width: 960px) { .partner-grid { grid-template-columns: 1.1fr 1fr; } }
.partner-pitch h2 { font-size: clamp(2.75rem, 6.5vw, 5rem); max-width: 12ch; }
.partner-lede { margin-top: 1.25rem; max-width: 36rem; font-size: 1.2rem; font-weight: 500; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1.5rem; margin: 2rem 0 0; }
.stat { display: flex; flex-direction: column-reverse; }
.stat dt { font-size: .95rem; font-weight: 600; }
.stat dd { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(2.5rem, 5vw, 3.5rem); line-height: 1; }
.partner-pitch .btn { margin-top: 2rem; }

.partner-offer { background: var(--black); color: var(--fog); border-radius: 18px; padding: clamp(1.5rem, 3vw, 2.25rem); }
.partner-offer h3 { color: var(--bone); font-size: 1.9rem; font-weight: 700; margin-bottom: 1.25rem; }
.offer-list { list-style: none; padding: 0; margin: 0; }
.offer-list li { position: relative; padding: .85rem 0 .85rem 1.75rem; border-top: 1px solid var(--fur-hi); color: var(--bone); }
.offer-list li::before {   /* a small nod to Stronk's nose ring */
  content: ""; position: absolute; left: 0; top: 1.2rem; width: 13px; height: 13px; border-radius: 50%;
  border: 3px solid var(--gold); border-top-color: transparent; transform: rotate(-20deg);
}

/* ---------- Footer ---------- */
.footer { padding: 3rem var(--gutter) 2.5rem; overflow: hidden; }
.footer-mark {
  font-family: var(--display); font-weight: 900; text-transform: uppercase; white-space: nowrap;
  font-size: clamp(4rem, 16vw, 14rem); line-height: .8; color: var(--fur);
  max-width: var(--max); margin: 0 auto;
}
.footer-meta {
  max-width: var(--max); margin: 1.5rem auto 0;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; color: var(--ash);
}
.footer-meta a { color: var(--fog); text-decoration: none; }
.footer-meta a:hover { color: var(--gold); }

@media (max-width: 600px) {
  .brand span { display: none; }
  .topnav a[href="#clips"], .topnav a[href="#matches"] { display: none; }
}

/* Phones: let the logo banner run edge to edge */
@media (max-width: 700px) {
  .hero-logo { margin: 0 calc(-1 * var(--gutter)); }
  .hero-logo img { -webkit-mask-image: none; mask-image: none; }
}
