/* ==========================================================================
   Gradedeck Core Design System — Tier-1 Academic Commercial Standard
   PRISTINE LIGHT THEME: Academic Precision, Stripe/Notion Quality, Zero AI Slop
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&family=Cinzel:wght@600;700;800&display=swap');

:root {
  /* Surface Tokens — Crisp Academic Light Architecture */
  --bg-app: #FAFAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #F8FAFC;
  --bg-surface-card: #FFFFFF;
  --bg-surface-hover: #F1F5F9;
  --bg-input: #FFFFFF;
  
  /* Borders — Precision Hairline Neutral Slate */
  --border-subtle: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-strong: #94A3B8;
  --border-focus: #4F46E5;
  
  /* Typography Colors — High Contrast & Deep Legibility */
  --text-primary: #0F172A;          /* Deep Slate Black */
  --text-secondary: #334155;        /* Subtitle & Body Slate */
  --text-muted: #64748B;            /* Microcopy & Meta */
  --text-tertiary: #94A3B8;
  --text-inverse: #FFFFFF;
  
  /* Accent Tokens */
  --accent-primary: #4F46E5;          /* Royal Academic Indigo (Indigo 600) */
  --accent-primary-hover: #4338CA;    /* Indigo 700 */
  --accent-primary-glow: rgba(79, 70, 229, 0.15);
  
  --accent-gold: #B45309;             /* Scholastic Amber (Amber 700 for high contrast) */
  --accent-gold-soft: #FEF3C7;        /* Amber 100 */
  --accent-gold-border: #FDE68A;
  
  --accent-emerald: #047857;          /* Verified Grade Green (Emerald 700) */
  --accent-emerald-soft: #ECFDF5;     /* Emerald 50 */
  --accent-emerald-border: #A7F3D0;
  
  --accent-cyan: #0E7490;             /* Cyan 700 */
  --accent-cyan-soft: #ECFEFF;        /* Cyan 50 */
  --accent-cyan-border: #A5F3FC;
  
  /* Fonts */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-academic: 'Cinzel', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  
  /* Shadows — Subtle, Soft, Multi-layered Elevation */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 6px -1px rgba(15, 23, 42, 0.06), 0 1px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px -6px rgba(15, 23, 42, 0.1), 0 8px 16px -4px rgba(15, 23, 42, 0.06);
  --shadow-inner: inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
  
  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  
  /* Layout Constants */
  --container-max: 1200px;
  --nav-height: 4.25rem;
  --transition-fast: 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Core Standards */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-app);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(79, 70, 229, 0.04), transparent 50%),
    linear-gradient(to bottom, #FFFFFF, #FAFAFC 40%, #F8FAFC);
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Accessibility: Skip to Content */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent-primary);
  color: #FFFFFF;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  z-index: 99999;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(1.85rem, 5vw, 3.8rem); font-weight: 800; overflow-wrap: break-word; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.4rem); overflow-wrap: break-word; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.55rem); overflow-wrap: break-word; }
h4 { font-size: 1.05rem; overflow-wrap: break-word; }

p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Top Announcement Banner */
.top-announcement {
  background: #F8FAFC;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  text-align: center;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.announcement-badge {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold-border);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Modern Sticky Header */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.brand-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 9px;
  background: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 900;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.brand-tld {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  padding: 0.4rem 0;
  position: relative;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-primary);
  border-radius: var(--radius-full);
}

.nav-cta-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
  display: none;
  background: #F1F5F9;
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  padding: 0;
}

.mobile-menu-btn:hover {
  background: #E2E8F0;
  border-color: var(--border-strong);
}

/* Footer Architecture — Clean Light Slate */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: #F8FAFC;
  padding: 4.5rem 0 2.5rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-disclaimer-box {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-xs);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  color: var(--text-muted);
}

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

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-medium);
    box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.12), 0 6px 14px -2px rgba(15, 23, 42, 0.06);
    padding: 1rem 1.5rem 1.5rem;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 999;
  }
  
  .nav-links.is-open {
    display: flex;
    animation: mobileMenuSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-links .nav-link {
    width: 100%;
    padding: 0.85rem 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav-links li:last-child .nav-link {
    border-bottom: none;
  }

  .nav-links .nav-link.active::after {
    display: none;
  }

  .nav-links .nav-link.active {
    color: var(--accent-primary);
    background: #EEF2FF;
    border-radius: var(--radius-sm);
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .top-announcement {
    font-size: 0.72rem;
    padding: 0.4rem 0.65rem;
    gap: 0.35rem;
    text-align: center;
    line-height: 1.4;
  }

  .brand-logo {
    font-size: 1.05rem;
    gap: 0.45rem;
  }

  .brand-icon {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 0.95rem;
    border-radius: 7px;
  }

  .brand-tld {
    font-size: 0.8rem;
  }

  .nav-cta-group {
    gap: 0.45rem;
  }

  #nav-unlock-btn {
    padding: 0.45rem 0.65rem;
    font-size: 0.78rem;
    min-height: 38px;
    gap: 0.35rem;
  }

  .mobile-menu-btn {
    width: 38px;
    height: 38px;
    padding: 7px;
  }
}

@media (max-width: 380px) {
  .container {
    padding: 0 0.5rem;
  }

  .brand-logo {
    font-size: 0.98rem;
  }

  .brand-tld {
    display: none;
  }

  #nav-unlock-btn {
    padding: 0.4rem 0.55rem;
    font-size: 0.74rem;
  }

  #nav-unlock-btn svg {
    width: 13px;
    height: 13px;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}
