:root {
  color-scheme: dark;
  --background: #111312;
  --foreground: #efefea;
  --muted: #a1a59f;
  --rule: #ffffff20;
  --red: #da403a;
  --nav-height: 5rem;
  --body: "Instrument Sans", Arial, sans-serif;
  --display: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--foreground); font: 400 1rem/1.55 var(--body); }
h1, h2, h3, p, figure { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 6px; }
.shell { width: min(100% - 7rem, 80rem); margin-inline: auto; }
#elenco, #historico, #discord { scroll-margin-top: calc(var(--nav-height) + 1.5rem); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; z-index: 9; top: .5rem; left: .5rem; background: var(--foreground); color: var(--background); padding: .6rem .9rem; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 4; background: #111312f2; backdrop-filter: blur(14px); }
.header-inner { min-height: var(--nav-height); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--rule); }
.header-inner a { text-decoration: none; }
.brand { display: inline-flex; width: fit-content; padding-block: .3rem; }
.brand img { width: 2.5rem; height: 2.5rem; }
.header-inner nav { display: flex; gap: clamp(1.4rem, 4vw, 3.5rem); }
.header-inner nav a { color: var(--muted); padding-block: .6rem; transition: color 180ms; }
.header-inner nav a:hover { color: var(--foreground); }
.header-discord { justify-self: end; border-bottom: 1px solid var(--red); padding-block: .2rem; }
.header-discord:hover { color: #f07670; }
.scroll-line { position: absolute; inset: auto 0 0; height: 1px; background: var(--red); transform: scaleX(var(--page-progress, 0)); transform-origin: left; pointer-events: none; }

.team-intro { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.7rem; padding-block: clamp(4rem, 7vw, 6rem); text-align: center; }
.intro-mark { width: clamp(8rem, 15vw, 13rem); height: auto; }
.team-intro p { max-width: 28rem; color: var(--muted); font-size: clamp(1rem, 1.45vw, 1.15rem); line-height: 1.65; }

.roster { padding-block: 2.5rem clamp(5rem, 9vw, 9rem); }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 2.7rem; }
.section-heading h2, .discord h2 { font-size: clamp(2.9rem, 6vw, 5.4rem); font-weight: 500; letter-spacing: -.065em; line-height: 1.05; }
.text-link { color: var(--muted); font-size: .94rem; text-underline-offset: .35em; text-decoration-color: #ffffff40; }
.text-link:hover { color: var(--foreground); }
.players { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.6rem 1.4rem; list-style: none; padding: 0; margin: 0; }
.player-art { position: relative; display: grid; place-items: center; aspect-ratio: .87; overflow: hidden; border: 1px solid var(--rule); background: #1b1e1c; }
.player--switii .player-art { background: radial-gradient(ellipse at 50% 75%, #33372f, #1b1e1c 80%); }
.player--thor .player-art { background: radial-gradient(ellipse at 50% 75%, #3b372b, #1b1e1c 80%); }
.player-initials { color: #454b45; font: italic 700 clamp(3rem, 7vw, 6.5rem)/1 var(--display); letter-spacing: -.04em; }
.player-art:has(img) .player-initials { visibility: hidden; }
.player-art img { position: absolute; inset: auto 0 0; width: 100%; height: 95%; object-fit: contain; object-position: bottom; transform-origin: bottom center; transition: transform 700ms var(--ease); }
.player:hover img { transform: scale(1.045); }
.player figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem .8rem; padding-block: .85rem; border-bottom: 1px solid var(--rule); }
.player h3 { font-size: clamp(1.2rem, 1.8vw, 1.6rem); line-height: 1.15; letter-spacing: -.04em; font-weight: 500; }
.player figcaption p { color: var(--muted); font-size: .9rem; }

.history { padding-block: clamp(4rem, 7vw, 7rem); border-top: 1px solid var(--rule); }
.history-row { display: grid; grid-template-columns: 1fr 1fr 1.45fr; gap: .6rem 1.5rem; align-items: baseline; padding-block: 1.4rem; border-top: 1px solid var(--rule); }
.history-row:last-child { border-bottom: 1px solid var(--rule); }
.history-row time, .history-row p, .history-row span { color: var(--muted); }
.history-row h3 { font-size: 1.13rem; font-weight: 500; }
.history-row .history-empty { grid-column: 2 / -1; }
.discord { padding-block: clamp(4rem, 8vw, 8rem); border-top: 1px solid var(--rule); }
.discord-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.discord p { margin-top: 1.1rem; max-width: 30rem; color: var(--muted); font-size: 1.05rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.4rem; padding: .8rem 1.4rem; border: 1px solid var(--red); color: var(--foreground); background: var(--red); text-decoration: none; font-weight: 500; transition: background 200ms, transform 300ms var(--ease); }
.button:hover { background: #bb342f; transform: translateY(-2px); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5rem; border-top: 1px solid var(--rule); }
.footer-inner a { text-decoration: none; font-weight: 600; }
.footer-inner span { color: var(--muted); font-size: .9rem; }

@media (prefers-reduced-motion: no-preference) {
  .intro-mark { animation: intro-in 1000ms var(--ease) both; }
  .team-intro p { animation: intro-in 1000ms 120ms var(--ease) both; }
  [data-reveal] { transition: opacity 900ms var(--ease), transform 1100ms var(--ease); transition-delay: var(--delay, 0ms); }
  [data-pending] { opacity: 0; transform: translateY(3.5rem); }
  [data-pending]:focus-within, [data-pending]:target { opacity: 1; transform: none; }
}
@keyframes intro-in {
  from { opacity: 0; transform: translateY(1.2rem); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 62rem) {
  .shell { width: calc(100% - 4rem); }
  .players { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1rem; }
}
@media (max-width: 45rem) {
  :root { --nav-height: 4rem; }
  .shell { width: calc(100% - 2.5rem); }
  .brand img { width: 2.2rem; height: 2.2rem; }
  .header-inner nav { gap: 1.15rem; }
  .header-inner a { font-size: .91rem; }
  .team-intro { padding-block: 3.7rem 4.5rem; gap: 1.3rem; }
  .intro-mark { width: 8.5rem; }
  .roster { padding-top: .5rem; }
  .section-heading { margin-bottom: 1.8rem; }
  .players { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem .8rem; }
  .player figcaption { display: block; }
  .player figcaption p { margin-top: .35rem; }
  .history-row { grid-template-columns: 1fr 1.3fr; gap: .4rem 1rem; }
  .history-row p { grid-column: 2; }
  .discord h2 { max-width: 6em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
