/* Kumar Gaming: shared styles for kumar-gaming.com and demos.kumar-gaming.com.
   Keep this file identical in main/ and demos/.

   The look comes from the team art: cream "paper" stickers on dark ink,
   with the red and cyan of the 3D glasses used as an anaglyph offset. */

:root {
  --ink: #13161e;
  --ink-2: #1b1f2a;
  --line: #2e3444;
  --cream: #fff7e1;
  --muted: #a6a9b6;
  --red: #ff3d68;
  --cyan: #2fd0e2;

  --font-display: "Bahnschrift", "DIN Alternate", "DIN Condensed", "Avenir Next Condensed",
    "Roboto Condensed", "sans-serif-condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;

  /* type scale, ratio ~1.3 */
  --s-1: 0.8125rem;
  --s0: 1.0625rem;
  --s1: 1.375rem;
  --s2: 1.8rem;
  --s3: 2.4rem;
  --s4: 3.2rem;

  /* anaglyph offset for stickers */
  --shift: 5px;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: dark; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font: 400 var(--s0)/1.6 var(--font-body);
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-stretch: 75%;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--cyan); text-underline-offset: 0.2em; }
a:hover { color: var(--cream); }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 2px; }

code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.05em 0.35em;
  overflow-wrap: anywhere;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: var(--gutter); top: -4rem;
  background: var(--cream); color: var(--ink); padding: 0.5rem 0.9rem; border-radius: 3px;
  font-weight: 600; text-decoration: none; z-index: 10;
}
.skip:focus { top: 0.75rem; }

/* the sticker: cream disc with a red/cyan 3D-glasses offset */

.sticker {
  display: block;
  border-radius: 50%;
  background: var(--cream);
  box-shadow: calc(var(--shift) * -1) 0 0 var(--cyan), var(--shift) 0 0 var(--red);
}

/* anaglyph type, used on page titles only */

.anaglyph {
  color: var(--cream);
  text-shadow: -0.035em 0 0 var(--cyan), 0.035em 0 0 var(--red);
}

/* header */

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 1.5rem; padding-block: 0.85rem;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  color: var(--cream); text-decoration: none;
  font-family: var(--font-display); font-stretch: 75%; font-weight: 700; font-size: var(--s1);
  line-height: 1;
}
.brand img { width: 40px; height: 40px; --shift: 2px; }
.brand:hover { color: var(--cream); }

.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--cream); }

/* buttons */

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.25rem 0.75rem;
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--cream);
  font-family: var(--font-display); font-stretch: 75%; font-weight: 700; font-size: var(--s1);
  line-height: 1.1; text-decoration: none;
}
.btn:hover { border-color: var(--muted); color: var(--cream); }
.btn-primary {
  background: var(--cream); border-color: var(--cream); color: var(--ink);
  box-shadow: -3px 0 0 var(--cyan), 3px 0 0 var(--red);
}
.btn-primary:hover { background: #fff; border-color: #fff; color: var(--ink); box-shadow: -5px 0 0 var(--cyan), 5px 0 0 var(--red); }

/* hero */

.hero {
  padding-block: clamp(2rem, 6vw, 4.5rem) clamp(3rem, 8vw, 5.5rem);
  background: radial-gradient(circle at 78% 45%, rgba(255, 247, 225, 0.06), transparent 34rem);
}
.hero .wrap { display: grid; gap: 2rem; align-items: center; }

.hero-tiger { width: 200px; --shift: 7px; margin-left: 7px; }

.hero-title {
  font-size: clamp(3.75rem, 17vw, 6rem);
  line-height: 0.86;
  letter-spacing: -0.015em;
  margin-bottom: 1.5rem;
}
.hero-title span { display: block; }

.hero-lede { font-size: var(--s1); line-height: 1.45; max-width: 30ch; margin-bottom: 2rem; }

@media (min-width: 54rem) {
  .hero .wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 3rem; }
  .hero-text { order: -1; }
  .hero-tiger { width: min(100%, 440px); justify-self: end; margin-right: 12px; --shift: 12px; }
  .hero-title { font-size: clamp(5rem, 9.5vw, 9.5rem); }
}

/* one load moment: the 3D offset settles, like putting the glasses on */
@media (prefers-reduced-motion: no-preference) {
  .hero-title { animation: focus-type 0.9s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-tiger { animation: focus-disc 0.9s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  @keyframes focus-type {
    from { text-shadow: -0.16em 0 0 var(--cyan), 0.16em 0 0 var(--red); }
  }
  @keyframes focus-disc {
    from { box-shadow: -34px 0 0 var(--cyan), 34px 0 0 var(--red); }
  }
}

/* sections */

.section { padding-block: clamp(3rem, 8vw, 5.5rem); border-top: 1px solid var(--line); }
.section .wrap { display: grid; gap: 1.25rem 3rem; align-items: start; }
.section h2 { font-size: clamp(2.25rem, 7vw, var(--s4)); }
.section-note { color: var(--muted); max-width: 32ch; margin-top: 0.75rem; }

@media (min-width: 54rem) {
  .section .wrap { grid-template-columns: 15rem minmax(0, 1fr); }
  .section.is-wide .wrap { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .section.is-wide .section-note { margin-top: 0.5rem; }
}

.prose { max-width: 62ch; }
.prose .plans { color: var(--muted); }

/* roster: a lineup of stickers */

.lineup { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem; }

.player { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 0.25rem 1.25rem; align-items: start; align-content: start; }
.player .sticker { width: 96px; margin-left: var(--shift); }
.player h3 { font-size: var(--s2); line-height: 1; }
.player-desc { color: var(--muted); margin-top: 0.6rem; max-width: 34ch; }

.role {
  display: inline-block; margin-top: 0.5rem;
  font-family: var(--font-display); font-weight: 600; font-size: var(--s0); line-height: 1.3;
  color: var(--cyan); border: 1px solid var(--line); border-radius: 999px; padding: 0.05rem 0.65rem;
  white-space: nowrap;
}

/* the sub sits apart: dashed ring instead of the 3D offset */
.bench { margin-top: 2.25rem; padding-top: 2rem; border-top: 1px dashed var(--line); }
.bench .sticker { box-shadow: none; outline: 2px dashed var(--line); outline-offset: 5px; margin-left: 0; }
.bench h3 { color: var(--muted); }
.bench .role { color: var(--muted); }

@media (min-width: 54rem) {
  .lineup { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2.25rem 2rem; }
  .lineup .player { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .lineup .sticker { width: 100%; max-width: 190px; margin: 0 0 1.4rem var(--shift); --shift: 6px; }
  .bench .player { grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 0 1.75rem; }
  .bench .sticker { width: 120px; margin: 0 0 0 7px; }
}

/* map veto */

.maps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr));
}
.map { background: var(--ink-2); border-top: 3px solid var(--line); border-radius: 0 0 6px 6px; padding: 1rem 1.1rem 1.15rem; }
.map h3 { font-size: var(--s2); }
.map-status { font-weight: 600; font-size: var(--s-1); margin: 0.35rem 0 0.5rem; }
.map-note { color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }

.map.is-main { border-top-color: var(--red); }
.map.is-main .map-status { color: var(--red); }
.map.is-play { border-top-color: var(--cream); }
.map.is-learn { border-top-color: var(--cyan); }
.map.is-learn .map-status { color: var(--cyan); }
.map.is-ban { background: transparent; border: 1px dashed var(--line); border-top-width: 3px; }
.map.is-ban h3 { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.map.is-ban .map-status { color: var(--muted); }

/* demos teaser on main */

.kinds { margin: 1.75rem 0 2rem; display: grid; gap: 0.75rem; }
.kinds div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.5rem 1rem; align-items: baseline; }
.kinds dt { font-family: var(--font-display); font-stretch: 75%; font-weight: 700; font-size: var(--s1); }
.kinds dd { margin: 0; color: var(--muted); }

/* responsive tables: file lists */

.rtable { width: 100%; border-collapse: collapse; }
.rtable th {
  text-align: left; font-weight: 500; font-size: var(--s-1); color: var(--muted);
  padding: 0 1rem 0.6rem; border-bottom: 1px solid var(--line);
}
.rtable td { padding: 0.9rem 1rem; vertical-align: baseline; }
.rtable tbody tr:nth-child(odd) { background: var(--ink-2); }
.rtable .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.files td:first-child a { font-weight: 600; overflow-wrap: anywhere; }
@media (min-width: 40.01rem) { .files td:first-child a { white-space: nowrap; } }
.files td { color: var(--muted); }
.files td:first-child { color: var(--cream); }
.files td[colspan] { color: var(--muted); }

@media (max-width: 40rem) {
  .rtable thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .rtable, .rtable tbody { display: block; }
  .rtable tr { display: grid; gap: 0.35rem 0.75rem; padding: 0.9rem 1rem; align-items: baseline; }
  .rtable td { display: block; padding: 0; }
  .files tr { grid-template-columns: minmax(0, 1fr) auto auto; }
  .files td:first-child { grid-column: 1 / -1; }
  .files .num { text-align: left; }
}

/* demos page */

.page-intro { padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(2.5rem, 6vw, 4rem); }
.page-intro .wrap { display: grid; gap: 1.5rem 3rem; align-items: start; }
.intro-tiger { width: 112px; --shift: 5px; margin-left: 5px; }
.page-title { font-size: clamp(3rem, 12vw, 6rem); line-height: 0.9; letter-spacing: -0.015em; margin-bottom: 1.25rem; }
.page-intro .lede { font-size: var(--s1); line-height: 1.45; max-width: 36ch; }

@media (min-width: 54rem) {
  .page-intro .wrap { grid-template-columns: minmax(0, 1fr) auto; }
  .intro-tiger { width: 180px; --shift: 8px; margin: 0.5rem 8px 0 0; grid-column: 2; grid-row: 1; }
}

.howto {
  margin-top: 2rem; max-width: 46rem; padding: 1rem 1.25rem;
  border-left: 3px solid var(--cyan); background: var(--ink-2); border-radius: 0 6px 6px 0;
}
.howto h2 { font-size: var(--s1); margin-bottom: 0.4rem; }
.howto p { color: var(--muted); }

/* footer */

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: var(--s-1); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 2rem 2.5rem; }
.site-footer p { margin: 0; max-width: 60ch; }
