/* ==========================================================================
   TYPEKEY ACADEMY — ENHANCED PRODUCT STYLESHEET
   Official Design System: Deep Navy (#1C1D3E) + Gold Tassel (#F59E0B) + Light Shell (#EEF1F8)
   Includes Rich Gradients, Keyframe Animations, Micro-interactions & Glassmorphism
   ========================================================================== */

:root {
  /* Brand Product Palette (From typekey-student & typekey-teacher) */
  --brand:          #1C1D3E;   /* Deep Navy — Keyboard Body & Dark Header */
  --brand-mid:      #25274D;   /* Mid Navy */
  --brand-light:    #363870;   /* Light Navy Border / Active State */

  /* Graduation Accent (Gold / Amber) */
  --accent:         #F59E0B;   /* Gold Graduation Tassel */
  --accent-dark:    #D97706;   /* Dark Amber */
  --accent-light:   #FFFBEB;   /* Soft Cream Tint */
  --accent-glow:    rgba(245, 158, 11, 0.35);

  /* Purple Accent */
  --purple:         #7C3AED;   /* Electric Purple */
  --purple-mid:     #6D28D9;
  --purple-light:   #EDE9FE;

  /* Semantics */
  --success:        #10B981;
  --success-light:  #D1FAE5;
  --danger:         #EF4444;
  --danger-light:   #FEE2E2;

  /* App Shell & Backgrounds */
  --bg-page:        #EEF1F8;   /* Light Blue-Gray App Shell */
  --bg-card:        #FFFFFF;   /* Pure White Cards */
  --bg-card-alt:    #F8FAFF;   /* Soft Cool Off-White */
  
  /* Text Colors */
  --text-main:      #0F1324;   /* Deep Dark Primary Text */
  --text-body:      #4A5068;   /* Slate Secondary Text */
  --text-muted:     #8B93B3;   /* Muted Blue Gray */
  --text-amber:     #D97706;   /* Gold Tag Text */

  /* Gradients */
  --gradient-hero:      linear-gradient(135deg, #1C1D3E 0%, #25274D 50%, #151632 100%);
  --gradient-title:     linear-gradient(135deg, #1C1D3E 0%, #7C3AED 50%, #F59E0B 100%);
  --gradient-gold:      linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  --gradient-navy:      linear-gradient(135deg, #1C1D3E 0%, #25274D 100%);
  --gradient-card-glow: linear-gradient(135deg, rgba(245,158,11,0.12) 0%, rgba(124,58,237,0.06) 100%);
  --gradient-bg-mesh:   radial-gradient(circle at 50% 0%, rgba(245,158,11,0.08) 0%, rgba(28,29,62,0.03) 60%, transparent 100%);

  /* Borders & Shadows */
  --border:         #E3E7F5;
  --border-strong:  #C5CCDF;
  --shadow-sm:      0 2px 8px rgba(15, 19, 36, 0.05);
  --shadow-md:      0 4px 20px rgba(15, 19, 36, 0.08);
  --shadow-lg:      0 12px 40px rgba(15, 19, 36, 0.12);
  --shadow-gold:    0 6px 24px rgba(245, 158, 11, 0.35);
  --shadow-navy:    0 6px 20px rgba(28, 29, 62, 0.25);

  /* Radii */
  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      20px;
  --radius-full:    9999px;

  /* Typography */
  --font-sans:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;

  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition:      0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 90px 0;
  position: relative;
}

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

/* ==========================================================================
   Header Navigation Bar (Deep Navy #1C1D3E)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--brand);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  height: 70px;
  display: flex;
  align-items: center;
  transition: all var(--transition);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.header-brand:hover {
  transform: scale(1.02);
}

.brand-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 3px #FFFFFF) drop-shadow(0 0 8px rgba(255, 255, 255, 0.85));
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.header-brand:hover .brand-logo-img {
  transform: scale(1.06);
  filter: drop-shadow(0 0 5px #F59E0B) drop-shadow(0 0 12px rgba(245, 158, 11, 0.9));
}

.brand-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-link {
  text-decoration: none;
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 700;
  transition: all var(--transition-fast);
  position: relative;
}

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

.header-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

.header-link:hover::after {
  width: 100%;
}

/* ==========================================================================
   Hero Section with Gradient & Mascot Animation
   ========================================================================== */
.hero-section {
  padding: 70px 0 70px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, rgba(124, 58, 237, 0.05) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.mascot-wrapper {
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.mascot-img {
  width: 150px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 15px 30px rgba(28, 29, 62, 0.15));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 22px;
  border-radius: var(--radius-full);
  background: #FFFBEB;
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12);
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 20px;
  color: var(--brand);
  min-height: 68px;
  position: relative;
  z-index: 1;
}

.gradient-title {
  background: var(--gradient-title);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-body);
  max-width: 680px;
  margin: 0 auto 36px auto;
  line-height: 1.6;
  font-weight: 400;
  min-height: 64px;
  position: relative;
  z-index: 1;
}

/* Hero Typewriter Animation Cursor */
.typing-cursor {
  display: inline-block;
  color: var(--accent-dark);
  font-weight: 400;
  margin-left: 2px;
  opacity: 1;
}

.typing-cursor.blinking {
  animation: cursorBlink 0.8s infinite;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  position: relative;
  z-index: 1;
}

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 32px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: var(--font-sans);
}

.btn-dark {
  background: var(--gradient-navy);
  color: #FFFFFF;
  box-shadow: var(--shadow-navy);
}

.btn-dark:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(28, 29, 62, 0.35);
  background: linear-gradient(135deg, #25274D 0%, #363870 100%);
}

.btn-light {
  background: #FFFFFF;
  color: var(--brand);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-light:hover {
  background: #F8FAFF;
  border-color: var(--brand);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--gradient-gold);
  color: #0F1324;
  box-shadow: var(--shadow-gold);
}

.btn-accent:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.45);
}

/* ==========================================================================
   Section Headers (Matching Screenshots 2 & 3)
   ========================================================================== */
.section-tag {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 12px;
  background: var(--accent-light);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 56px auto;
  font-weight: 400;
}

/* ==========================================================================
   Cards Grid (3 Columns Top, 2 Columns Bottom)
   ========================================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.cards-grid.two-cols {
  grid-template-columns: repeat(2, 1fr);
  max-width: 780px;
  margin: 28px auto 0 auto;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-gold);
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-dark);
}

.feature-card:hover::before {
  opacity: 1;
}

.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-light);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  transition: all var(--transition);
}

.feature-card:hover .icon-box {
  background: var(--gradient-gold);
  color: #0F1324;
  transform: scale(1.08) rotate(3deg);
  box-shadow: var(--shadow-gold);
}

.card-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.card-text {
  font-size: 0.96rem;
  color: var(--text-body);
  line-height: 1.6;
}

/* ==========================================================================
   Interactive Typing Test Simulator (Enhanced Light Theme)
   ========================================================================== */
.simulator-section {
  padding: 70px 0;
  position: relative;
}

.simulator-box {
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  max-width: 860px;
  margin: 0 auto;
}

.sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gradient-navy);
  color: #FFFFFF;
  padding: 16px 26px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  box-shadow: var(--shadow-navy);
}

.sim-item { display: flex; flex-direction: column; }
.sim-label { font-size: 0.7rem; color: rgba(255,255,255,0.7); letter-spacing: 0.5px; }
.sim-num { font-size: 1.5rem; font-weight: 800; font-family: var(--font-mono); color: var(--accent); }
.sim-num small { font-size: 0.8rem; color: #FFFFFF; font-weight: 400; }

.passage-view {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  line-height: 1.8;
  background: #F8FAFF;
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: var(--radius-md);
  min-height: 110px;
  margin-bottom: 24px;
}

.char.correct { color: var(--success); font-weight: 600; }
.char.incorrect { color: var(--danger); background: var(--danger-light); border-radius: 2px; }
.char.current { border-bottom: 3px solid var(--accent-dark); font-weight: 700; }

.sim-input {
  width: 100%;
  padding: 16px 20px;
  font-size: 1.05rem;
  font-family: var(--font-mono);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition);
}

.sim-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(28, 29, 62, 0.12);
}

/* ==========================================================================
   Bottom Contact / CTA Section (Matching Screenshot 4)
   ========================================================================== */
.bottom-cta-section {
  padding: 70px 0 80px 0;
  text-align: center;
  position: relative;
}

.kbd-badge-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
  box-shadow: var(--shadow-gold);
  animation: float 4s ease-in-out infinite;
}

.bottom-cta-title {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.bottom-cta-sub {
  font-size: 1.15rem;
  color: var(--text-body);
  max-width: 600px;
  margin: 0 auto 36px auto;
}

/* FAQ Accordion (Light Theme) */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.faq-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.faq-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.faq-btn {
  width: 100%;
  padding: 22px 26px;
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--font-sans);
}

.faq-icon {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.35s ease;
  padding: 0 26px;
  color: var(--text-body);
  font-size: 0.96rem;
  opacity: 0;
}

.faq-card.open .faq-content {
  max-height: 200px;
  padding-bottom: 22px;
  opacity: 1;
}

/* Footer (Matching Header Background) */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 36px 0;
  background: var(--brand);
  color: #FFFFFF;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ==========================================================================
   Scroll Reveal Animation Classes
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Rules */
@media (max-width: 992px) {
  .hero-title { font-size: 2.8rem; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid.two-cols { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero-title { font-size: 2.2rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .btn { width: 100%; }
  .header-nav { display: none; }
}
