:root {
  --ink: #171717;
  --paper: #fffaf4;
  --muted: #6c625d;
  --line: #eaded2;
  --coral: #f26f61;
  --teal: #19747e;
  --gold: #d8a548;
  --white: #ffffff;
  --card-bg: #ffffff;
  --shadow: 0 18px 48px rgba(41, 28, 18, 0.12);
  --header-bg: rgba(255, 250, 244, 0.92);
  --header-border: rgba(234, 222, 210, 0.85);
  --surface: #f7efe5;
  --placeholder-bg: #f1e6da;
}

[data-theme="dark"] {
  --ink: #e8e4df;
  --paper: #0f1218;
  --muted: #8a8480;
  --line: #252a32;
  --teal: #2cb8c5;
  --gold: #e8b855;
  --card-bg: #161c24;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(15, 18, 24, 0.92);
  --header-border: rgba(37, 42, 50, 0.85);
  --surface: #131820;
  --placeholder-bg: #1e2530;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 5vw, 56px);
  border-bottom: 1px solid var(--header-border);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--teal);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 58px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: border-color 0.15s;
}

.theme-toggle:hover {
  border-color: var(--teal);
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  min-height: calc(100vh - 73px);
  padding: clamp(36px, 7vw, 84px) clamp(18px, 5vw, 56px);
  background:
    linear-gradient(135deg, rgba(242, 111, 97, 0.2), transparent 36%),
    linear-gradient(225deg, rgba(25, 116, 126, 0.24), transparent 35%),
    var(--paper);
}

[data-theme="dark"] .hero {
  background:
    linear-gradient(135deg, rgba(242, 111, 97, 0.22), transparent 36%),
    linear-gradient(225deg, rgba(44, 184, 197, 0.2), transparent 35%),
    var(--paper);
}

.hero-bg-track {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 78% 25%, rgba(44, 184, 197, 0.35), transparent 34%),
    radial-gradient(circle at 24% 72%, rgba(255, 207, 92, 0.25), transparent 36%),
    #101722;
}

.hero-bg-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0;
  filter: saturate(1.35) contrast(1.12) brightness(1.18);
  transform: scale(1);
  animation: heroSlideshow 18s ease-in-out infinite;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background-image:
    radial-gradient(circle at 22% 20%, rgba(255, 207, 92, 0.2), transparent 26%),
    radial-gradient(circle at 82% 25%, rgba(44, 184, 197, 0.22), transparent 30%),
    linear-gradient(90deg, rgba(255, 250, 244, 0.82), rgba(255, 250, 244, 0.48));
  pointer-events: none;
}

[data-theme="dark"] .hero::before {
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 207, 92, 0.12), transparent 26%),
    radial-gradient(circle at 78% 26%, rgba(44, 184, 197, 0.14), transparent 32%),
    linear-gradient(90deg, rgba(15, 18, 24, 0.7), rgba(15, 18, 24, 0.34));
}

.hero-copy,
.hero-panel {
  position: relative;
  z-index: 2;
}

@keyframes heroSlideshow {
  0% {
    opacity: 0;
    transform: scale(1) translate3d(-1%, -0.5%, 0);
  }

  8%,
  30% {
    opacity: 1;
  }

  38%,
  100% {
    opacity: 0;
    transform: scale(1.035) translate3d(1%, 0.5%, 0);
  }
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(3.1rem, 9vw, 7.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 670px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.7;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-weight: 800;
}

.button.primary {
  color: var(--white);
  background: var(--ink);
}

.button.secondary {
  color: var(--ink);
  background: var(--card-bg);
}

.phone-button,
.hero-actions .phone-button,
.contact-band .phone-button {
  color: #171717;
  border-color: #ffcf5c;
  background: #ffcf5c;
  box-shadow: 0 12px 28px rgba(255, 207, 92, 0.28);
}

.phone-button:hover {
  border-color: #ffffff;
  background: #ffffff;
}

.hero-panel {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.hero-panel img {
  width: min(100%, 340px);
  margin: 0 auto 8px;
  border-radius: 8px;
}

.hero-panel div {
  display: grid;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.hero-panel span {
  color: var(--muted);
  font-weight: 700;
}

.hero-panel strong {
  font-size: 1.22rem;
}

.section {
  padding: clamp(52px, 8vw, 92px) clamp(18px, 5vw, 56px);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 26px;
}

.section-heading h2,
.contact-band h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

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

.feature-grid article,
.empty-state,
.media-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: 0 10px 28px rgba(41, 28, 18, 0.07);
}

[data-theme="dark"] .feature-grid article,
[data-theme="dark"] .empty-state,
[data-theme="dark"] .media-card {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.feature-grid article {
  padding: 24px;
}

.feature-grid h3,
.media-card h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}

.feature-grid p,
.media-card p,
.empty-state,
.contact-band p {
  color: var(--muted);
  line-height: 1.65;
}

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

.grade-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -8px 0 22px;
}

.grade-filter {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--card-bg);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.grade-filter:hover,
.grade-filter.is-active {
  color: #171717;
  border-color: #ffcf5c;
  background: #ffcf5c;
}

.media-card {
  overflow: hidden;
}

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

.student-grid .media-card img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 10px;
}

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

.media-card p {
  margin: 0;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 26px;
}

.poster-section {
  background: var(--surface);
}

.game-section {
  background: var(--card-bg);
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: 18px;
  align-items: stretch;
}

.video-frame,
.student-profile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: 0 10px 28px rgba(41, 28, 18, 0.07);
  overflow: hidden;
}

[data-theme="dark"] .video-frame,
[data-theme="dark"] .student-profile {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.video-frame video,
.video-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #101010;
}

.video-placeholder {
  display: grid;
  place-items: center;
  padding: 20px;
  color: #fffaf4;
  font-weight: 800;
  text-align: center;
}

.student-profile img,
.student-photo-placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--placeholder-bg);
}

.student-photo-placeholder {
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.game-copy,
.student-profile-body {
  padding: 18px;
}

.game-copy h3,
.student-profile h3 {
  margin: 0 0 8px;
}

.game-copy p,
.student-profile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: clamp(18px, 5vw, 56px);
  padding: clamp(26px, 5vw, 44px);
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, var(--ink), #23474b);
}

[data-theme="dark"] .contact-band {
  background: linear-gradient(135deg, #1a2540, #0e3038);
}

.contact-band .eyebrow,
.contact-band p {
  color: #f8d9cb;
}

[data-theme="dark"] .contact-band .eyebrow,
[data-theme="dark"] .contact-band p {
  color: #a8cdd0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(18px, 5vw, 56px);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  font-weight: 800;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-links a {
  color: var(--teal);
  font-weight: 800;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.88);
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(100%, 1100px);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
}

.lightbox button {
  position: absolute;
  top: 18px;
  right: 18px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid #ffffff;
  border-radius: 8px;
  color: #171717;
  background: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

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

  .game-layout {
    grid-template-columns: 1fr;
  }

  .contact-band,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .button {
    width: 100%;
  }
}
