@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Hanuman:wght@100;300;400;700;900&display=swap');


:root {
  /* Colors */
  --color-bg-primary: #FAF7F2;
  --color-bg-secondary: #E8E4DD;
  --color-bg-tertiary: #D4CFC6;
  --color-accent: #C9A227;
  --color-accent-light: #E4C85C;
  --color-accent-dark: #9A7A1C;
  --color-text-primary: #2D2A26;
  --color-text-secondary: #6B6560;
  --color-text-muted: #9A958E;
  --color-highlight: #C75B39;
  --color-highlight-light: #E07A5A;
  --color-white: #FFFFFF;
  --color-black: #1A1816;
  
  /* Typography */
  --font-display: 'Playfair Display', 'Hanuman', Georgia, serif;
  --font-body: 'Inter', 'Hanuman', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-khmer: 'Hanuman', 'Khmer OS', serif;
  
  /* Font Sizes — Fluid Typography */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.375rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.625rem);
  --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2.25rem);
  --text-3xl: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  --text-4xl: clamp(2.5rem, 1.75rem + 3.75vw, 5rem);
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  
  /* Layout */
  --max-width: 1400px;
  --nav-height: 80px;
  --sidebar-width: 320px;
  
  /* Effects */
  --shadow-sm: 0 1px 3px rgba(45, 42, 38, 0.08);
  --shadow-md: 0 4px 12px rgba(45, 42, 38, 0.1);
  --shadow-lg: 0 8px 30px rgba(45, 42, 38, 0.12);
  --shadow-xl: 0 20px 60px rgba(45, 42, 38, 0.15);
  --shadow-glow: 0 0 40px rgba(201, 162, 39, 0.2);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Khmer text styling */
.khmer, [lang="km"] {
  font-family: var(--font-khmer);
  line-height: 1.8;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* Selection */
::selection {
  background-color: var(--color-accent);
  color: var(--color-white);
}

/* Focus states */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   TYPOGRAPHY
   ───────────────────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-primary);
}

.text-display {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.text-headline {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.text-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
}

.text-subtitle {
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--color-text-secondary);
}

.text-body {
  font-size: var(--text-base);
  line-height: 1.7;
}

.text-caption {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.text-overline {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* ─────────────────────────────────────────────────────────────────────────────
   LAYOUT
   ───────────────────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-4xl) 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   NAVIGATION
   ───────────────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(45, 42, 38, 0.06);
  z-index: 1000;
  transition: var(--transition-base);
}

.nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav__logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}

.nav__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-primary);
}

.nav__logo-text span {
  color: var(--color-accent);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav__link {
  position: relative;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  transition: var(--transition-base);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: calc(100% - var(--space-xl));
  height: 2px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  transition: transform var(--transition-base);
}

.nav__link:hover,
.nav__link.active {
  color: var(--color-text-primary);
}

.nav__link:hover::after,
.nav__link.active::after {
  transform: translateX(-50%) scaleX(1);
}

.nav__link--grade {
  font-family: var(--font-display);
  font-weight: 600;
}

/* Mobile Menu Toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: var(--radius-full);
  transition: var(--transition-base);
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }
  
  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    /* Use an explicit viewport height instead of bottom:0 — the nav's
       backdrop-filter makes it the containing block for this fixed element,
       so bottom:0 would collapse the menu to zero height. */
    height: calc(100vh - var(--nav-height));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-primary);
    /* Apple-style: the panel drops in from the top and fades, instead of
       sliding in from the side. Hidden + non-interactive when closed. */
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition-slow),
                opacity var(--transition-base),
                visibility 0s linear 250ms;
    overflow-y: auto;
  }

  .nav__links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform var(--transition-slow),
                opacity var(--transition-base),
                visibility 0s;
  }

  .nav__link {
    padding: var(--space-md);
    font-size: var(--text-lg);
    font-weight: 600;
  }

  .nav__link::after {
    display: none;
  }

  /* Stagger each item in from the top, like apple.com's menu */
  .nav__links.open li {
    animation: navItemIn var(--transition-slow) ease both;
  }
  .nav__links.open li:nth-child(1) { animation-delay: 0.04s; }
  .nav__links.open li:nth-child(2) { animation-delay: 0.08s; }
  .nav__links.open li:nth-child(3) { animation-delay: 0.12s; }
  .nav__links.open li:nth-child(4) { animation-delay: 0.16s; }
  .nav__links.open li:nth-child(5) { animation-delay: 0.20s; }
  .nav__links.open li:nth-child(6) { animation-delay: 0.24s; }
  .nav__links.open li:nth-child(7) { animation-delay: 0.28s; }
}

@keyframes navItemIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   HERO SECTION
   ───────────────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + var(--space-3xl)) var(--space-lg) var(--space-3xl);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(201, 162, 39, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(199, 91, 57, 0.08), transparent),
    linear-gradient(180deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
}

.hero__content {
  text-align: center;
  max-width: 900px;
}

.hero__overline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.8s ease both;
}

.hero__overline::before,
.hero__overline::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--color-accent);
}

.hero__title {
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.8s ease 0.1s both;
}

.hero__title-en {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 500;
  font-style: italic;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.hero__title-km {
  display: block;
  font-family: var(--font-khmer);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.hero__subtitle {
  max-width: 700px;
  margin: 0 auto var(--space-2xl);
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  animation: fadeInUp 0.8s ease 0.3s both;
}

/* ─────────────────────────────────────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: var(--transition-base);
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: var(--color-white);
  box-shadow: var(--shadow-md), 0 4px 20px rgba(201, 162, 39, 0.25);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 8px 30px rgba(201, 162, 39, 0.35);
}

.btn--secondary {
  background: var(--color-white);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-bg-secondary);
}

.btn--secondary:hover {
  background: var(--color-bg-secondary);
  border-color: var(--color-bg-tertiary);
}

.btn--ghost {
  color: var(--color-text-secondary);
}

.btn--ghost:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-secondary);
}

/* ─────────────────────────────────────────────────────────────────────────────
   GRADE CARDS — Editorial "Issue" Style
   ───────────────────────────────────────────────────────────────────────────── */
.grades {
  padding: var(--space-4xl) 0;
  background: var(--color-bg-secondary);
}

.grades__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.grades__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.grade-card {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-md);
  transition: var(--transition-slow);
  overflow: hidden;
  cursor: pointer;
}

.grade-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-highlight));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}

.grade-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.grade-card:hover::before {
  transform: scaleX(1);
}

.grade-card__issue {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-bg-secondary);
  line-height: 1;
  transition: var(--transition-base);
}

.grade-card:hover .grade-card__issue {
  color: rgba(201, 162, 39, 0.15);
}

.grade-card__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.grade-card__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}

.grade-card__title-km {
  font-family: var(--font-khmer);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.grade-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.grade-card__meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.grade-card__arrow {
  position: absolute;
  bottom: var(--space-lg);
  right: var(--space-lg);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-full);
  color: var(--color-text-secondary);
  transition: var(--transition-base);
}

.grade-card:hover .grade-card__arrow {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateX(4px);
}

/* ─────────────────────────────────────────────────────────────────────────────
   SUBJECT CARDS
   ───────────────────────────────────────────────────────────────────────────── */
.subjects {
  padding: var(--space-3xl) 0;
}

.subjects__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.subjects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.subject-card {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-bg-secondary);
  transition: var(--transition-base);
  cursor: pointer;
}

.subject-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transform: translateY(-4px);
}

.subject-card.active {
  border-color: var(--color-accent);
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.05), transparent);
}

.subject-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: 1.5rem;
  transition: var(--transition-base);
}

.subject-card:hover .subject-card__icon {
  background: var(--color-accent);
  color: var(--color-white);
}

.subject-card__title {
  font-family: var(--font-khmer);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
  line-height: 1.6;
}

.subject-card__subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ─────────────────────────────────────────────────────────────────────────────
   PDF VIEWER LAYOUT
   ───────────────────────────────────────────────────────────────────────────── */
.viewer-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
  padding-top: var(--nav-height);
}

.viewer-sidebar {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--color-white);
  border-right: 1px solid var(--color-bg-secondary);
  overflow-y: auto;
  z-index: 100;
  transition: transform var(--transition-slow);
}

.viewer-sidebar__header {
  position: sticky;
  top: 0;
  background: var(--color-white);
  padding: var(--space-lg);
  border-bottom: 1px solid var(--color-bg-secondary);
  z-index: 10;
}

.viewer-sidebar__content {
  padding: var(--space-md);
}

.viewer-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  background: var(--color-bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.viewer-main__frame {
  width: 100%;
  height: calc(100vh - var(--nav-height) - var(--space-2xl));
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: none;
}

/* Sidebar toggle for mobile */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: var(--space-lg);
  left: var(--space-lg);
  width: 56px;
  height: 56px;
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Backdrop shown behind the mobile sidebar; tapping it closes the sidebar.
   Sits above the PDF iframe (which would otherwise swallow outside clicks)
   but below the sidebar itself. */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(45, 42, 38, 0.45);
  z-index: 99;
}

@media (max-width: 1024px) {
  .viewer-sidebar {
    transform: translateX(-100%);
  }

  .viewer-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .viewer-main {
    margin-left: 0;
  }

  .sidebar-toggle {
    display: flex;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   BREADCRUMB
   ───────────────────────────────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.breadcrumb__link {
  transition: color var(--transition-fast);
}

.breadcrumb__link:hover {
  color: var(--color-accent);
}

.breadcrumb__separator {
  color: var(--color-bg-tertiary);
}

.breadcrumb__current {
  color: var(--color-text-primary);
  font-weight: 500;
}

/* ─────────────────────────────────────────────────────────────────────────────
   EMPTY / PLACEHOLDER STATE
   ───────────────────────────────────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4xl) var(--space-lg);
  color: var(--color-text-muted);
}

.empty-state__icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

.empty-state__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

.empty-state__text {
  font-size: var(--text-base);
  max-width: 400px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FEATURES SECTION
   ───────────────────────────────────────────────────────────────────────────── */
.features {
  padding: var(--space-4xl) 0;
  background: var(--color-white);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-2xl);
}

.feature {
  text-align: center;
  padding: var(--space-xl);
}

.feature__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-bg-secondary), var(--color-bg-primary));
  border-radius: var(--radius-lg);
  font-size: 2rem;
}

.feature__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

.feature__text {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────────────────────────── */
.footer {
  background: var(--color-black);
  color: var(--color-white);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.footer__logo-icon {
  width: 36px;
  height: 36px;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
}

.footer__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
}

.footer__description {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.footer__nav {
  display: flex;
  gap: var(--space-3xl);
}

.footer__nav-group h4 {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: var(--space-md);
}

.footer__nav-group a {
  display: block;
  padding: var(--space-xs) 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.footer__nav-group a:hover {
  color: var(--color-accent);
}

.footer__bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__copyright {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .footer__nav {
    flex-direction: column;
    gap: var(--space-xl);
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   ANIMATIONS
   ───────────────────────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Staggered animation delays */
.animate-stagger > *:nth-child(1) { animation-delay: 0s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.4s; }
.animate-stagger > *:nth-child(6) { animation-delay: 0.5s; }

.animate-fade-up {
  animation: fadeInUp 0.6s ease both;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease both;
}

.animate-slide-in {
  animation: slideInLeft 0.6s ease both;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease both;
}

/* ─────────────────────────────────────────────────────────────────────────────
   UTILITIES
   ───────────────────────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-auto { margin-top: auto; }
.mb-0 { margin-bottom: 0; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* Page padding for fixed nav */
.page-content {
  padding-top: var(--nav-height);
}
