/* ============================================================
   Grechka — Computer Gaming Club
   Palette  light #faf6ec · dark #10203a · accent1 #d9a441 · accent2 #b3352b
   Fonts    Anton (display) · Karla (text/UI)
   ============================================================ */

:root {
  --light: #faf6ec;
  --dark: #10203a;
  --ink: #10203a;
  --paper: #faf6ec;
  --gold: #d9a441;
  --red: #b3352b;
  --gold-08: rgba(217, 164, 65, 0.08);
  --gold-16: rgba(217, 164, 65, 0.16);
  --radius: 8px;
  --border: 3px;
  --maxw: 1200px;
  --nav-h: 68px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Karla", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Anton", Impact, sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.98;
  margin: 0;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(18px, 5vw, 40px); }

.visually-hidden, .apply-form caption {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--gold); color: var(--dark); padding: 10px 16px;
  border: var(--border) solid var(--dark); border-radius: var(--radius);
  font-weight: 700; transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  --btn-fg: var(--dark);
  --btn-bg: var(--gold);
  display: inline-flex; align-items: center; gap: .5em;
  font-family: "Karla", sans-serif; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; font-size: .82rem;
  text-decoration: none; cursor: pointer;
  padding: 13px 22px; border-radius: var(--radius);
  border: var(--border) solid var(--btn-fg);
  background: var(--btn-bg); color: var(--btn-fg);
  transition: background .25s ease, color .25s ease;
}
.btn__arrow { transition: transform .25s ease; }
.btn:hover .btn__arrow, .btn:focus-visible .btn__arrow { transform: translateX(4px); }

.btn--gold { --btn-bg: var(--gold); --btn-fg: var(--dark); }
.btn--gold:hover, .btn--gold:focus-visible { background: var(--dark); color: var(--gold); border-color: var(--gold); }

.btn--ghost-light { --btn-bg: transparent; --btn-fg: var(--paper); }
.btn--ghost-light:hover, .btn--ghost-light:focus-visible { background: var(--paper); color: var(--dark); border-color: var(--paper); }

.btn--nav { --btn-bg: var(--gold); --btn-fg: var(--dark); padding: 9px 16px; }
.btn--nav:hover, .btn--nav:focus-visible { background: var(--dark); color: var(--gold); }

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

/* ---------- Kicker + headings ---------- */
.kicker {
  font-family: "Karla", sans-serif; font-weight: 700;
  text-transform: uppercase; letter-spacing: .22em; font-size: .72rem;
  color: var(--red); margin: 0 0 10px;
}
.section--dark .kicker, .kicker--light { color: var(--gold); }

.section__head { max-width: 720px; margin-bottom: clamp(30px, 5vw, 52px); }
.section__head h2 { font-size: clamp(2.2rem, 6vw, 4rem); }
.section__intro { margin: 16px 0 0; font-size: 1.05rem; opacity: .92; }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(56px, 9vw, 104px) 0; }
.section--light { background: var(--light); color: var(--ink); }
.section--dark { background: var(--dark); color: var(--paper); }

/* varsity stripe rows along block edges */
.varsity-stripe {
  height: 10px;
  background: repeating-linear-gradient(90deg, var(--red) 0 26px, transparent 26px 52px);
  border-block: var(--border) solid currentColor;
  opacity: .85;
  margin: 0 0 clamp(30px, 5vw, 48px);
}
.teams .varsity-stripe:last-child { margin: clamp(30px, 5vw, 48px) 0 0; }

/* ---------- Flag / pennant edges (motif) ---------- */
.flag-edge { height: 46px; position: relative; z-index: 2; margin-top: -1px; }
.flag-edge--down { background: var(--dark); clip-path: polygon(0 0, 100% 0, 100% 55%, 92% 100%, 84% 55%, 76% 100%, 68% 55%, 60% 100%, 52% 55%, 44% 100%, 36% 55%, 28% 100%, 20% 55%, 12% 100%, 4% 55%, 0 100%); }
.flag-edge--up-dark { background: var(--dark); clip-path: polygon(0 100%, 100% 100%, 100% 45%, 92% 0, 84% 45%, 76% 0, 68% 45%, 60% 0, 52% 45%, 44% 0, 36% 45%, 28% 0, 20% 45%, 12% 0, 4% 45%, 0 0); }
.flag-edge--up-light { background: var(--light); clip-path: polygon(0 100%, 100% 100%, 100% 45%, 92% 0, 84% 45%, 76% 0, 68% 45%, 60% 0, 52% 45%, 44% 0, 36% 45%, 28% 0, 20% 45%, 12% 0, 4% 45%, 0 0); }

/* pennant edge "breathes" — very slow, desktop only, barely perceptible */
@media (min-width: 1025px) {
  .flag-edge--down { animation: pennant-down 14s ease-in-out infinite; }
  .flag-edge--up-dark, .flag-edge--up-light { animation: pennant-up 15s ease-in-out infinite; }
}
@keyframes pennant-down {
  0%,100% { clip-path: polygon(0 0, 100% 0, 100% 55%, 92% 100%, 84% 55%, 76% 100%, 68% 55%, 60% 100%, 52% 55%, 44% 100%, 36% 55%, 28% 100%, 20% 55%, 12% 100%, 4% 55%, 0 100%); }
  50% { clip-path: polygon(0 0, 100% 0, 100% 52%, 92% 96%, 84% 58%, 76% 96%, 68% 58%, 60% 96%, 52% 58%, 44% 96%, 36% 58%, 28% 96%, 20% 58%, 12% 96%, 4% 58%, 0 96%); }
}
@keyframes pennant-up {
  0%,100% { clip-path: polygon(0 100%, 100% 100%, 100% 45%, 92% 0, 84% 45%, 76% 0, 68% 45%, 60% 0, 52% 45%, 44% 0, 36% 45%, 28% 0, 20% 45%, 12% 0, 4% 45%, 0 0); }
  50% { clip-path: polygon(0 100%, 100% 100%, 100% 48%, 92% 4%, 84% 42%, 76% 4%, 68% 42%, 60% 4%, 52% 42%, 44% 4%, 36% 42%, 28% 4%, 20% 42%, 12% 4%, 4% 42%, 0 4%); }
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(16, 32, 58, 0.72);
  backdrop-filter: blur(6px);
  transition: background .3s ease, box-shadow .3s ease;
  border-bottom: 3px solid transparent;
}
.nav.is-stuck { background: var(--dark); border-bottom-color: var(--gold); }
.nav__inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 12px clamp(18px, 5vw, 40px);
  display: flex; align-items: center; gap: 20px;
  min-height: var(--nav-h);
}
.nav__brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); }
.nav__pennant {
  width: 22px; height: 22px; background: var(--gold);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
}
.nav__wordmark { font-family: "Anton", sans-serif; font-size: 1.4rem; letter-spacing: .06em; text-transform: uppercase; color: inherit; }
.nav__links { margin-left: auto; display: flex; gap: 6px; }
.nav__link {
  color: var(--paper); text-decoration: none; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; font-size: .92rem;
  transition: background .2s, color .2s;
}
.nav__link:hover { background: var(--gold-16); }
.nav__link.is-active { background: var(--gold); color: var(--dark); }

.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; margin-left: auto; }
.nav__toggle span { display: block; width: 26px; height: 3px; background: var(--paper); margin: 5px 0; transition: .3s; }
.nav__mobile { display: none; flex-direction: column; background: var(--dark); border-top: 3px solid var(--gold); padding: 8px 0; }
.nav__mobile a { color: var(--paper); text-decoration: none; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 12px clamp(18px, 5vw, 40px); }
.nav__mobile a:hover { background: var(--gold-16); }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; overflow: hidden; color: var(--paper); isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16,32,58,.78) 0%, rgba(16,32,58,.6) 45%, rgba(16,32,58,.92) 100%);
}
.hero__ripple { position: absolute; inset: 0; overflow: hidden; z-index: -1; }
.ripple-band {
  position: absolute; left: -10%; width: 120%; height: 60px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .12; will-change: transform;
}
.ripple-band--1 { top: 30%; animation: ripple 9s ease-in-out infinite; }
.ripple-band--2 { top: 50%; background: linear-gradient(90deg, transparent, var(--red), transparent); opacity: .14; animation: ripple 11s ease-in-out infinite reverse; }
.ripple-band--3 { top: 68%; animation: ripple 13s ease-in-out infinite; }
@keyframes ripple {
  0%,100% { transform: translateY(0) skewY(0deg); }
  25% { transform: translateY(-12px) skewY(-1.4deg); }
  50% { transform: translateY(8px) skewY(1.2deg); }
  75% { transform: translateY(-6px) skewY(-0.8deg); }
}
.hero__spotlight {
  position: absolute; width: 60vw; height: 60vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(217,164,65,.22), transparent 62%);
  top: -20%; left: -10%; will-change: transform;
  animation: spotlight 18s ease-in-out infinite;
}
@keyframes spotlight {
  0%,100% { transform: translate(0,0); }
  50% { transform: translate(60vw, 30vh); }
}

.hero__content { position: relative; padding: clamp(96px, 16vh, 190px) 0 clamp(64px, 10vh, 120px); max-width: 860px; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 5.6rem); margin: 0 0 20px; }
.hero__lede { font-size: clamp(1.05rem, 2.2vw, 1.32rem); max-width: 640px; opacity: .95; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 0; }
.hero__facts {
  list-style: none; margin: 42px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: clamp(20px, 5vw, 52px);
  border-top: var(--border) solid var(--gold); padding-top: 24px;
}
.hero__facts strong { display: block; font-family: "Anton", sans-serif; font-size: 2.2rem; color: var(--gold); line-height: 1; }
.hero__facts li { font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; max-width: 160px; }

/* ============================================================
   TEAMS
   ============================================================ */
.teams__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 3vw, 28px); }
.team-card {
  border: var(--border) solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  transition: border-color .3s ease, transform .3s ease;
  display: flex; flex-direction: column;
}
.team-card:hover { border-color: var(--gold); }
.team-card__media { position: relative; overflow: hidden; aspect-ratio: 1 / 1; }
.team-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.team-card:hover .team-card__media img { transform: scale(1.05); }
.team-card__chevron {
  position: absolute; top: 14px; left: -2px; z-index: 2;
  background: var(--red); color: var(--paper);
  font-family: "Anton", sans-serif; letter-spacing: .06em; text-transform: uppercase;
  font-size: .82rem; padding: 6px 20px 6px 14px;
  clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
  transition: transform .3s ease;
}
.team-card:hover .team-card__chevron { transform: translateX(4px); }
.team-card__body { padding: 20px 20px 24px; }
.team-card__body h3 { font-size: 1.7rem; }
.team-card__cpt { font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; color: var(--red); margin: 6px 0 10px; }
.team-card__body p:last-child { margin: 0; font-size: .96rem; }

/* ============================================================
   SCHEDULE TABLE
   ============================================================ */
.table-wrap { border: var(--border) solid var(--gold); border-radius: var(--radius); overflow: hidden; }
.schedule-table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.schedule-table th, .schedule-table td { text-align: left; padding: 15px 18px; }
.schedule-table thead th {
  font-family: "Anton", sans-serif; text-transform: uppercase; letter-spacing: .06em;
  font-size: .92rem; background: var(--gold); color: var(--dark);
}
.schedule-table tbody tr:nth-child(odd) { background: var(--gold-08); }
.schedule-table tbody tr:not(:last-child) { border-bottom: 1px solid rgba(250,246,236,.14); }
.sched-day { font-family: "Anton", sans-serif; letter-spacing: .06em; color: var(--gold); font-size: 1.05rem; font-weight: 400; }

/* ============================================================
   UPCOMING MATCHES
   ============================================================ */
.match-list { list-style: none; margin: 0; padding: 0; border: var(--border) solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.match-row {
  display: flex; align-items: center; gap: clamp(14px, 3vw, 28px);
  padding: 20px clamp(16px, 3vw, 26px);
}
.match-row:not(:last-child) { border-bottom: var(--border) solid var(--ink); }
.match-date { flex: 0 0 auto; text-align: center; min-width: 62px; }
.match-date__d { display: block; font-family: "Anton", sans-serif; font-size: 2.4rem; line-height: .9; color: var(--ink); transition: color .25s ease; }
.match-date__m { display: block; font-weight: 700; letter-spacing: .14em; font-size: .72rem; color: var(--red); }
.match-row:hover .match-date__d { color: var(--red); }
.match-body { flex: 1 1 auto; }
.match-teams { display: block; font-size: 1.12rem; }
.match-vs { font-family: "Anton", sans-serif; color: var(--red); margin: 0 6px; letter-spacing: .04em; }
.match-meta { display: block; font-size: .84rem; opacity: .75; margin-top: 4px; text-transform: uppercase; letter-spacing: .05em; }
.match-tag {
  flex: 0 0 auto; align-self: flex-start;
  font-weight: 700; font-size: .68rem; letter-spacing: .12em;
  padding: 5px 11px; border: 2px solid var(--ink); border-radius: 999px;
}
.match-tag--home { background: var(--gold); border-color: var(--gold); color: var(--dark); }

/* ============================================================
   WHY JOIN
   ============================================================ */
.why__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 34px); }
.why-item { border-top: var(--border) solid var(--gold); padding-top: 18px; }
.why-num {
  display: block; font-family: "Anton", sans-serif; font-size: 4.4rem; line-height: 1;
  margin-bottom: 8px;
  -webkit-text-stroke: 2px var(--gold); text-stroke: 2px var(--gold);
  color: transparent;
  background: linear-gradient(to top, var(--gold) 50%, transparent 50%);
  background-size: 100% 200%;
  background-position: 0 0%;
  -webkit-background-clip: text; background-clip: text;
  transition: background-position .7s ease;
}
.why-num.is-filled { background-position: 0 100%; }
.why-item h3 { font-size: 1.35rem; margin-bottom: 8px; }
.why-item p { margin: 0; font-size: .96rem; opacity: .92; }

/* ============================================================
   GALLERY
   ============================================================ */
.gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.5vw, 24px); }
.gallery__item {
  position: relative; margin: 0; overflow: hidden;
  border: var(--border) solid var(--ink); border-radius: var(--radius);
  aspect-ratio: 1 / 1;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--dark); color: var(--paper);
  font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem;
  padding: 12px 16px;
  transform: translateY(100%); transition: transform .3s ease;
}
.gallery__item:hover figcaption, .gallery__item:focus-within figcaption { transform: translateY(0); }

/* ============================================================
   APPLY FORM
   ============================================================ */
.apply__inner { max-width: 760px; }
.apply-form { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; color: var(--gold); }
.field input, .field select {
  font-family: "Karla", sans-serif; font-size: 1rem;
  padding: 12px 14px; color: var(--paper);
  background: rgba(250,246,236,.06);
  border: var(--border) solid var(--paper); border-radius: var(--radius);
  transition: border-color .2s ease, background .2s ease;
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23d9a441' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px; padding-right: 38px; }
.field option { color: var(--dark); }
.field input:focus-visible, .field select:focus-visible { outline: none; border-color: var(--gold); background: rgba(217,164,65,.1); }
.field input::placeholder { color: rgba(250,246,236,.5); }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.apply-form__submit { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }
.form-status { grid-column: 1 / -1; margin: 4px 0 0; font-weight: 700; min-height: 1.2em; }
.form-status.success { color: var(--gold); }
.form-status.error { color: #ff9b91; }
.form-underline { grid-column: 1 / -1; height: 4px; background: var(--gold); width: 0; transition: width .5s ease; border-radius: 2px; }
.form-underline.is-shown { width: 100%; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--dark); color: var(--paper); padding-top: clamp(48px, 7vw, 76px); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer__brand .nav__wordmark { display: block; margin-bottom: 12px; font-size: 1.6rem; }
.footer__brand p { max-width: 320px; opacity: .85; font-size: .95rem; }
.footer__col h3 { font-size: 1rem; letter-spacing: .08em; margin-bottom: 12px; color: var(--gold); }
.footer__col a { display: block; text-decoration: none; opacity: .85; padding: 5px 0; font-size: .95rem; transition: opacity .2s, color .2s; }
.footer__col a:hover { opacity: 1; color: var(--gold); }
.footer__bar {
  border-top: 3px solid var(--gold);
  padding: 20px clamp(18px, 5vw, 40px);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  max-width: var(--maxw); margin-inline: auto; width: 100%;
  font-size: .84rem; opacity: .82;
}
.footer__bar a { color: var(--gold); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease-out, transform .5s ease-out; }
.reveal.is-visible { opacity: 1; transform: none; }
.match-row { opacity: 0; transform: translateX(-24px); transition: opacity .5s ease-out, transform .5s ease-out; }
.match-list.is-visible .match-row { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .why__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav__links, .btn--nav { display: none; }
  .nav__toggle { display: block; }
  .nav__mobile.is-open { display: flex; }
  .teams__grid, .gallery__grid { grid-template-columns: 1fr; }
  .apply-form { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
  .schedule-table { min-width: 520px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .why__grid { grid-template-columns: 1fr; }
  .match-row { flex-wrap: wrap; }
  .match-tag { order: -1; }
  .hero__facts { gap: 20px; }
}

/* ============================================================
   REDUCED MOTION — kill everything
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal, .match-row { opacity: 1 !important; transform: none !important; }
  .why-num { background-position: 0 100% !important; }
  .ripple-band, .hero__spotlight { display: none; }
}
