:root {
  --bg: #f5f8ff;
  --surface: #ffffff;
  --surface-2: #eaf2ff;
  --ink: #08142a;
  --muted: #52627c;
  --blue: #315cf6;
  --blue-2: #0c8dff;
  --navy: #0a1937;
  --line: rgba(8, 20, 42, 0.13);
  --shadow: 0 20px 48px rgba(17, 46, 108, 0.14);
  --danger: #d9284a;
  --good: #087a4d;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(135deg, rgba(49, 92, 246, 0.08), transparent 32rem),
    linear-gradient(180deg, #ffffff 0, var(--bg) 28rem);
}

body.admin-body {
  background: #f7f9fe;
}

a {
  color: inherit;
}

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

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 78px;
  padding: 12px 48px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.91);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand img {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(49, 92, 246, 0.18);
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-title {
  font-size: 1rem;
  line-height: 1;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.main-nav {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex: 1;
  flex-wrap: wrap;
}

.main-nav a,
.category-panel a {
  padding: 9px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 850;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a[aria-current="page"],
.category-panel a:hover {
  color: var(--blue);
  background: rgba(49, 92, 246, 0.1);
}

.category-button {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
  background: #fff;
}

.category-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 18px;
  display: grid;
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.category-panel[hidden] {
  display: none;
}

.hero {
  display: grid;
  align-items: center;
  min-height: calc(100svh - 150px);
  padding: 84px 48px 72px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.97) 0, rgba(255, 255, 255, 0.88) 46%, rgba(234, 242, 255, 0.6) 100%),
    url("../assets/img/logo.png") right 8% center / min(46rem, 60%) no-repeat,
    #eef5ff;
}

.hero-inner,
.container {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.hero-copy {
  max-width: 660px;
}

.kicker {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: 4.85rem;
  font-weight: 950;
}

h2 {
  margin-bottom: 14px;
  font-size: 2.6rem;
  font-weight: 950;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
  font-weight: 920;
}

.lead {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.65;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  background: #fff;
}

.button:hover,
.button:focus {
  border-color: rgba(49, 92, 246, 0.45);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(49, 92, 246, 0.12);
}

.button.primary {
  border-color: transparent;
  color: #fff;
  background: var(--blue);
}

.button.danger {
  border-color: transparent;
  color: #fff;
  background: var(--danger);
}

.icon-button {
  width: 46px;
  padding: 0;
  font-size: 1.25rem;
}

.section {
  padding: 72px 48px;
}

.section.band {
  background: #fff;
}

.section.narrow .container {
  width: min(900px, 100%);
}

.section-head {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-head.center {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-copy,
.page-copy p,
.card p,
.media-card p,
.social-card p,
.event-empty {
  color: var(--muted);
  line-height: 1.65;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.media-card,
.social-card,
.admin-panel,
.contact-form,
.calendar-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card {
  min-height: 170px;
  padding: 22px;
}

.feature-card {
  display: grid;
  align-content: space-between;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.card-link {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.page-hero {
  padding: 78px 48px 56px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.82)),
    url("../assets/img/logo.png") right 10% center / min(28rem, 48%) no-repeat,
    var(--surface-2);
}

.page-hero .container {
  max-width: 1180px;
}

.page-hero h1 {
  font-size: 3.6rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.page-copy {
  display: grid;
  gap: 18px;
}

.value-list,
.role-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.value-list li,
.role-list li {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.55;
}

.value-list strong,
.role-list strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.role-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.role-list strong {
  min-width: 92px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.media-card {
  overflow: hidden;
}

.media-card img,
.media-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-2);
}

.media-placeholder {
  display: grid;
  place-items: center;
  padding: 24px;
}

.media-placeholder img {
  width: 42%;
  max-width: 150px;
  border-radius: 8px;
}

.media-card-body {
  padding: 18px;
}

.roster-showcase {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.roster-showcase img {
  display: block;
  width: 100%;
  height: auto;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.social-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  align-items: center;
  padding: 22px;
  color: inherit;
  text-decoration: none;
}

.social-card svg {
  width: 52px;
  height: 52px;
  fill: currentColor;
}

.social-card.tiktok {
  color: #111;
}

.social-card.discord {
  color: #5865f2;
}

.social-card span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.calendar-shell {
  padding: 22px;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.calendar-title {
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 950;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  gap: 1px;
}

.weekday,
.day {
  min-width: 0;
  background: #fff;
}

.weekday {
  min-height: 42px;
  padding: 12px 8px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.day {
  min-height: 130px;
  padding: 10px;
}

.day.empty {
  background: #f0f4fb;
}

.day[data-admin-date] {
  cursor: pointer;
}

.day[data-admin-date]:hover,
.day[data-admin-date]:focus {
  outline: 3px solid rgba(49, 92, 246, 0.38);
  outline-offset: -3px;
}

.day-number {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 950;
}

.event {
  display: grid;
  gap: 6px;
  margin-top: 7px;
  padding: 8px;
  border-radius: 8px;
  color: #fff;
  font-size: 0.83rem;
  font-weight: 850;
  background: var(--blue);
  overflow-wrap: anywhere;
}

.event a {
  color: #fff;
  text-decoration: none;
}

.event small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.75rem;
  line-height: 1.35;
}

.event-controls {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
}

.calendar-delete {
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.26);
}

.calendar-delete:hover,
.calendar-delete:focus {
  background: var(--danger);
}

.admin-edit-bar,
.tournament-editor {
  margin-bottom: 18px;
}

.admin-edit-bar[hidden],
.tournament-editor[hidden] {
  display: none;
}

.admin-edit-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(49, 92, 246, 0.25);
  border-radius: 8px;
  background: rgba(49, 92, 246, 0.08);
}

.admin-edit-bar strong {
  display: block;
  margin-bottom: 3px;
}

.form-grid,
.admin-form,
.contact-form {
  display: grid;
  gap: 16px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 7px;
}

.field.full,
.form-grid .status {
  grid-column: 1 / -1;
}

label {
  color: var(--ink);
  font-weight: 850;
}

input,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(49, 92, 246, 0.12);
}

textarea {
  min-height: 132px;
  resize: vertical;
}

.required-message {
  display: none;
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 900;
}

.field-invalid .required-message {
  display: block;
}

.field-invalid input,
.field-invalid textarea {
  border-color: var(--danger);
}

.contact-form {
  padding: 22px;
}

.status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.status.good {
  color: var(--good);
}

.admin-wrap {
  display: grid;
  align-items: center;
  min-height: 100vh;
  padding: 40px 18px;
}

.admin-panel {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.admin-title {
  margin-top: 26px;
  font-size: 3rem;
}

.admin-subtitle {
  color: var(--muted);
  line-height: 1.6;
}

.site-footer {
  padding: 32px 48px;
  border-top: 1px solid var(--line);
  background: var(--navy);
  color: #fff;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.footer-inner .brand {
  color: #fff;
}

.footer-inner .brand-subtitle,
.footer-copy {
  color: rgba(255, 255, 255, 0.72);
}

.footer-copy {
  max-width: 430px;
  margin: 12px 0 0;
  line-height: 1.55;
}

.footer-socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-socials a {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
}

.footer-socials svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.footer-bottom {
  width: min(1180px, 100%);
  margin: 20px auto 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .site-header {
    padding-right: 22px;
    padding-left: 22px;
  }

  .main-nav {
    display: none;
  }

  .category-button {
    display: grid;
  }

  .hero,
  .page-hero,
  .section,
  .site-footer {
    padding-right: 22px;
    padding-left: 22px;
  }

  .hero {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.88)),
      url("../assets/img/logo.png") center bottom 8% / 22rem no-repeat,
      #eef5ff;
  }

  h1,
  .page-hero h1 {
    font-size: 3.4rem;
  }

  h2 {
    font-size: 2.15rem;
  }

  .grid.three,
  .grid.four,
  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .brand-subtitle {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 64px;
    padding-bottom: 210px;
  }

  h1,
  .page-hero h1 {
    font-size: 2.45rem;
  }

  .lead {
    font-size: 1.02rem;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .media-grid,
  .social-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    display: block;
  }

  .weekday {
    display: none;
  }

  .day {
    min-height: 92px;
    border-bottom: 1px solid var(--line);
  }

  .day.empty {
    display: none;
  }

  .calendar-toolbar {
    align-items: stretch;
  }

  .calendar-title {
    align-self: center;
    font-size: 1.08rem;
  }

  .admin-edit-bar,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .role-list li,
  .social-card {
    display: grid;
    grid-template-columns: 1fr;
  }
}
