/* ==========================================================================
   SDM English Medium School - Production Editorial Design Language
   Inspired by award-winning editorial portfolio UX/UI
   ========================================================================== */

:root {
  --color-bg: #0c0d0e;
  --color-surface: #141619;
  --color-surface-light: #f9f8f5;
  --color-text-dark: #0f1012;
  --color-text-light: #f0ede6;
  --color-muted: #8e9299;
  --color-accent: #8b1527; /* SDM Maroon */
  --color-accent-hover: #a31a30;
  --color-gold: #c5a059;   /* Supporting Accent */
  --color-border-dark: rgba(255, 255, 255, 0.1);
  --color-border-light: rgba(0, 0, 0, 0.1);

  --font-heading: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;

  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --container-max: 1380px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-light);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography Scale */
h1, h2, h3, h4, .hero-title {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.huge-heading {
  font-size: clamp(2.5rem, 6.5vw, 5.5rem);
  text-transform: uppercase;
}

.section-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 1rem;
  display: inline-block;
}

/* Skip Link */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-accent);
  color: white;
  padding: 0.75rem 1.5rem;
  z-index: 9999;
}
.skip-to-content:focus {
  top: 1rem;
}

/* Layout Containers */
.container {
  width: 90%;
  max-width: var(--container-max);
  margin: 0 auto;
}

.grid {
  display: grid;
  gap: 2rem;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Theme Variants */
.theme-dark {
  background-color: var(--color-bg);
  color: var(--color-text-light);
}

.theme-light {
  background-color: var(--color-surface-light);
  color: var(--color-text-dark);
}
.theme-light .section-eyebrow {
  color: var(--color-accent);
}

/* Header & Nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: all 0.4s var(--transition-smooth);
  background: linear-gradient(to bottom, rgba(12,13,14,0.85) 0%, rgba(12,13,14,0) 100%);
}

.site-header.scrolled {
  background: rgba(12, 13, 14, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border-dark);
}

.header-container {
  width: 92%;
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  flex-direction: column;
}

.logo-main {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: #fff;
}

.logo-sub {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--color-gold);
}

.desktop-nav ul {
  display: flex;
  gap: 2rem;
}

.desktop-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.desktop-nav a:hover {
  color: var(--color-gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--transition-smooth);
}

.btn-accent {
  background-color: var(--color-accent);
  color: #fff;
}
.btn-accent:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}
.btn-outline:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 0.6rem 1.2rem;
  font-size: 0.75rem;
}

.hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 5px;
}
.hamburger-btn span {
  width: 25px;
  height: 2px;
  background-color: #fff;
  transition: all 0.3s ease;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  overflow: hidden;
}

.hero-bg-media {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 1;
}

.hero-video, .hero-img-fallback {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.4) contrast(1.1);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: var(--container-max);
  margin: 0 auto;
}

.hero-title-huge {
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 0.95;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero-title-huge span {
  display: block;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--color-muted);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
  40% { transform: translate(-50%, -10px); }
  60% { transform: translate(-50%, -5px); }
}

/* Section Common */
.section-padding {
  padding: 7rem 0;
}

.section-header-block {
  margin-bottom: 4rem;
}

/* Numbered Editorial Cards */
.numbered-card {
  border-top: 1px solid var(--color-border-dark);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}

.theme-light .numbered-card {
  border-top-color: var(--color-border-light);
}

.card-num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-gold);
  font-weight: 600;
}

.card-title {
  font-size: 1.25rem;
  margin-top: 1rem;
}

/* Horizontal Gallery */
.horizontal-scroll-container {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding-bottom: 2rem;
  scroll-snap-type: x mandatory;
}

.gallery-card {
  flex: 0 0 350px;
  scroll-snap-align: start;
  background: var(--color-surface);
  border: 1px solid var(--color-border-dark);
  overflow: hidden;
}

.gallery-card-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.5s var(--transition-smooth);
}

.gallery-card:hover .gallery-card-img {
  transform: scale(1.05);
}

.gallery-card-info {
  padding: 1.5rem;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: var(--color-bg);
  z-index: 2000;
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-menu-inner {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-close-btn {

  background: none; border: none;
  color: #fff; font-size: 2.5rem; cursor: pointer;
}

.mobile-nav ul li {
  margin-bottom: 1.2rem;
}

.mobile-nav a {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
}

.mobile-nav .num {
  color: var(--color-gold);
  margin-right: 0.5rem;
  font-size: 1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border-dark);
  padding: 5rem 0 2rem;
}

.footer-heading {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--color-gold);
  margin-bottom: 1.5rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  color: var(--color-muted);
  font-size: 0.8rem;
}

/* Motion & Animation Utilities */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Media Queries */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .desktop-nav { display: none; }
  .hamburger-btn { display: flex; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section-padding { padding: 4rem 0; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}