/* ================================================
   3D EduTech — Landing Page Premium Styles
   Glassmorphism + Cyber Teal + Animated Hero
   ================================================ */

/* ---- PAGE RESET FOR LANDING ---- */
body { padding-top: 56px; }

/* ---- ANIMATED BACKGROUND ---- */
.hero-bg {
  position: absolute; inset: 0; overflow: hidden; z-index: 0;
}
.hero-bg::before {
  content: '';
  position: absolute; inset: -50%;
  background: radial-gradient(ellipse 80% 60% at 20% 40%, rgba(0,212,170,0.12) 0%, transparent 60%),
              radial-gradient(ellipse 60% 80% at 80% 60%, rgba(102,126,234,0.10) 0%, transparent 60%),
              radial-gradient(ellipse 40% 40% at 50% 0%, rgba(118,75,162,0.08) 0%, transparent 50%);
  animation: meshMove 12s ease-in-out infinite alternate;
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle, rgba(0,212,170,0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridFade 8s ease-in-out infinite alternate;
}
@keyframes meshMove {
  0%   { transform: translate(0,0) rotate(0deg) scale(1); }
  50%  { transform: translate(-3%,2%) rotate(2deg) scale(1.05); }
  100% { transform: translate(2%,-1%) rotate(-1deg) scale(1.02); }
}
@keyframes gridFade { 0%{opacity:0.4} 100%{opacity:0.8} }

/* ---- HERO SECTION ---- */
.hero {
  position: relative; padding: 7rem 0 5rem;
  background: var(--bg-primary); overflow: hidden; min-height: 92vh;
  display: flex; align-items: center;
}
.hero .container { position: relative; z-index: 1; width: 100%; }
.hero-content {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem; align-items: center;
}
/* Text always left, visual always right */
.hero-text { order: 1; }
.hero-visual { order: 2; }

/* Badge */
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 1rem; border-radius: 2rem;
  background: var(--accent-subtle); border: 1px solid var(--border-hover);
  color: var(--accent); font-size: 0.8125rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1.5rem;
  animation: badgePulse 3s ease-in-out infinite;
}
.hero-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 2s infinite;
}
@keyframes badgePulse { 0%,100%{box-shadow:0 0 0 0 var(--accent-glow)} 50%{box-shadow:0 0 12px 2px var(--accent-glow)} }

/* Title */
.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.03em;
  margin-bottom: 1.5rem; color: var(--text-primary);
}
.hero-title .gradient-text {
  background: linear-gradient(135deg, #00d4aa 0%, #667eea 50%, #00d4aa 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: gradientShift 4s linear infinite;
}
@keyframes gradientShift { 0%{background-position:0%} 100%{background-position:200%} }

.hero-subtitle {
  font-size: 1.125rem; color: var(--text-secondary);
  margin-bottom: 2.5rem; line-height: 1.7; max-width: 480px;
}
.hero-subtitle strong { color: var(--text-primary); font-weight: 500; }

/* Buttons */
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 1.75rem; border-radius: 0.625rem;
  font-weight: 600; text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  border: none; cursor: pointer; font-size: 0.9375rem; letter-spacing: -0.01em;
}
.btn-primary {
  background: linear-gradient(135deg, #00d4aa, #00b894);
  color: #000; box-shadow: 0 4px 20px rgba(0,212,170,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,212,170,0.4);
  background: linear-gradient(135deg, #00eabc, #00d4aa);
}
.btn-secondary {
  background: var(--bg-card); color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
}
.btn-secondary:hover {
  border-color: var(--border-hover); background: var(--accent-subtle);
  color: var(--accent); transform: translateY(-2px);
}
.btn-large { padding: 1.125rem 2.25rem; font-size: 1.0625rem; }
.btn-icon { font-size: 1.125rem; transition: transform 0.2s; }
.btn:hover .btn-icon { transform: translateX(4px); }

/* Stats row under buttons */
.hero-stats {
  display: flex; gap: 2rem; margin-top: 2.5rem; padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}
.hero-stat-value {
  font-size: 1.75rem; font-weight: 700; color: var(--text-primary); line-height: 1;
}
.hero-stat-value span { color: var(--accent); }
.hero-stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.25rem; }

/* Hero Visual */
.hero-visual { position: relative; }
.hero-3d-container {
  width: 100%; height: 480px; border-radius: 1.25rem;
  background: var(--bg-secondary); overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 0 80px rgba(0,212,170,0.08), 0 40px 80px rgba(0,0,0,0.4);
  position: relative;
}
.hero-3d-container::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(0,212,170,0.04) 0%, transparent 50%);
  pointer-events: none;
}
/* Floating decoration */
.hero-deco {
  position: absolute; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,212,170,0.15), transparent 70%);
  animation: floatDeco 6s ease-in-out infinite;
}
.hero-deco:nth-child(1) { top: -40px; right: -40px; animation-delay: 0s; }
.hero-deco:nth-child(2) { bottom: -60px; right: 20%; width: 220px; height: 220px; animation-delay: -3s;
  background: radial-gradient(circle, rgba(102,126,234,0.12), transparent 70%);
}
@keyframes floatDeco { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-8px,12px) scale(1.05)} }

/* ---- TRUST BAR ---- */
.trust-bar {
  padding: 1.5rem 0; border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color); background: var(--bg-secondary);
}
.trust-bar-inner {
  display: flex; align-items: center; justify-content: center;
  gap: 3rem; flex-wrap: wrap;
}
.trust-item {
  display: flex; align-items: center; gap: 0.5rem;
  color: var(--text-secondary); font-size: 0.875rem; font-weight: 500;
}
.trust-icon { color: var(--accent); font-size: 1rem; }

/* ---- SECTION TITLES ---- */
.section-tag {
  display: inline-block; padding: 0.25rem 0.875rem; border-radius: 2rem;
  background: var(--accent-subtle); color: var(--accent); font-size: 0.75rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem;
}
.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700;
  text-align: center; margin-bottom: 1rem; letter-spacing: -0.02em;
}
.section-subtitle {
  text-align: center; color: var(--text-secondary);
  font-size: 1.0625rem; max-width: 560px; margin: 0 auto 3.5rem; line-height: 1.7;
}

/* ---- FEATURES SECTION ---- */
.features {
  padding: 6rem 0; background: var(--bg-primary); position: relative;
}
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.feature-card {
  padding: 2rem; background: var(--bg-card);
  border: 1px solid var(--border-color); border-radius: 1.25rem;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1); position: relative; overflow: hidden;
  backdrop-filter: blur(12px);
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient); transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}
.feature-card:hover {
  transform: translateY(-6px); border-color: var(--border-hover);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3), 0 0 30px rgba(0,212,170,0.06);
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon-wrap {
  width: 3.5rem; height: 3.5rem; border-radius: 0.875rem;
  background: var(--accent-subtle); border: 1px solid var(--border-hover);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem; transition: all 0.3s;
}
.feature-card:hover .feature-icon-wrap {
  background: var(--accent); box-shadow: 0 0 20px var(--accent-glow);
}
.feature-icon-wrap svg { width: 24px; height: 24px; color: var(--accent); transition: color 0.3s; }
.feature-card:hover .feature-icon-wrap svg { color: #000; }
.feature-title {
  font-size: 1.1875rem; font-weight: 600; margin-bottom: 0.625rem;
  color: var(--text-primary); letter-spacing: -0.01em;
}
.feature-description { color: var(--text-secondary); line-height: 1.65; font-size: 0.9375rem; }

/* ---- SUBJECTS SECTION ---- */
.subjects {
  padding: 6rem 0; background: var(--bg-secondary);
}
.subjects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem;
}
.subject-card {
  position: relative; padding: 2rem; background: var(--bg-card);
  border: 1px solid var(--border-color); border-radius: 1.25rem;
  text-decoration: none; transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column; overflow: hidden; backdrop-filter: blur(8px);
}
.subject-card::after {
  content: ''; position: absolute; inset: 0; border-radius: 1.25rem;
  background: var(--gradient); opacity: 0; transition: opacity 0.3s;
}
.subject-card:hover {
  transform: translateY(-6px); border-color: var(--border-hover);
  box-shadow: 0 24px 60px rgba(0,0,0,0.3), 0 0 40px rgba(0,212,170,0.07);
}
.subject-card:hover::after { opacity: 0.04; }
.subject-icon {
  font-size: 2.5rem; margin-bottom: 1rem; display: inline-flex;
  width: 3.75rem; height: 3.75rem; align-items: center; justify-content: center;
  background: var(--accent-subtle); border-radius: 0.875rem;
  border: 1px solid var(--border-hover);
}
.subject-title {
  font-size: 1.25rem; font-weight: 600; margin-bottom: 0.625rem;
  color: var(--text-primary); letter-spacing: -0.01em;
}
.subject-description {
  color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 1.25rem; flex-grow: 1; font-size: 0.9375rem;
}
.subject-stats { display: flex; gap: 1.25rem; margin-bottom: 1rem; }
.stat { display: flex; align-items: center; gap: 0.375rem; color: var(--text-secondary); font-size: 0.8125rem; }
.stat-icon { font-size: 0.875rem; }
.subject-badge { position: absolute; top: 1rem; right: 1rem; }
.badge {
  padding: 0.3125rem 0.75rem; border-radius: 2rem;
  font-size: 0.75rem; font-weight: 600;
}
.badge-success { background: rgba(16,185,129,0.12); color: #10b981; border: 1px solid rgba(16,185,129,0.2); }
.badge-warning { background: rgba(245,158,11,0.12); color: #f59e0b; border: 1px solid rgba(245,158,11,0.2); }

/* ---- STATISTICS SECTION ---- */
.statistics {
  padding: 5rem 0; background: var(--bg-primary); position: relative; overflow: hidden;
}
.statistics::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 100% at 50% 50%, rgba(0,212,170,0.04), transparent);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; position: relative; z-index: 1;
}
.stat-card {
  text-align: center; padding: 2.5rem 1.5rem;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 1.25rem; backdrop-filter: blur(12px); transition: all 0.3s;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--gradient);
}
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: 0 0 30px rgba(0,212,170,0.08); }
.stat-value {
  font-size: 3rem; font-weight: 800; color: var(--text-primary);
  margin-bottom: 0.5rem; letter-spacing: -0.03em; line-height: 1;
}
.stat-value .accent { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; }

/* ---- CTA SECTION ---- */
.cta {
  padding: 7rem 0; position: relative; overflow: hidden;
  background: var(--bg-secondary);
}
.cta-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(0,212,170,0.08) 0%, transparent 70%);
}
.cta-content { text-align: center; position: relative; z-index: 1; }
.cta-title {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800;
  margin-bottom: 1rem; letter-spacing: -0.03em;
}
.cta-subtitle {
  font-size: 1.125rem; color: var(--text-secondary);
  margin-bottom: 2.5rem; line-height: 1.6;
}
.cta-badge { display: inline-flex; gap: 1.5rem; margin-top: 1.5rem; flex-wrap: wrap; justify-content: center; }
.cta-tag {
  display: flex; align-items: center; gap: 0.375rem;
  color: var(--text-secondary); font-size: 0.875rem;
}
.cta-tag-icon { color: var(--accent); }

/* ---- FOOTER ---- */
.footer {
  padding: 4rem 0 2rem; background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
}
.footer-content {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem; margin-bottom: 3rem;
}
.footer-brand .logo { margin-bottom: 1rem; }
.footer-description {
  color: var(--text-secondary); line-height: 1.65; font-size: 0.9375rem; max-width: 320px;
}
.footer-heading {
  font-size: 0.8125rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 1.25rem; color: var(--text-primary);
}
.footer-link {
  display: block; color: var(--text-secondary); text-decoration: none;
  margin-bottom: 0.625rem; font-size: 0.9375rem; transition: all 0.2s;
}
.footer-link:hover { color: var(--accent); transform: translateX(4px); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 2rem; border-top: 1px solid var(--border-color);
  color: var(--text-secondary); font-size: 0.875rem;
}
.footer-tech {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: var(--text-secondary);
}
.footer-tech-dot { color: var(--accent); font-size: 1.25rem; line-height: 1; }

/* ---- PAGE HEADER (breadcrumb pages) ---- */
.page-hero {
  padding: 4.5rem 0 3rem; background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color); position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 100% at 0% 50%, rgba(0,212,170,0.05), transparent);
}
.page-hero .container { position: relative; z-index: 1; }
.page-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700;
  letter-spacing: -0.02em; margin-bottom: 0.5rem;
}
.page-subtitle { color: var(--text-secondary); font-size: 1rem; }

/* ---- BREADCRUMBS ---- */
.breadcrumbs {
  padding: 1rem 0; background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}
.breadcrumbs .container { display: flex; align-items: center; gap: 0.5rem; }
.breadcrumb-link { color: var(--text-secondary); text-decoration: none; font-size: 0.875rem; transition: color 0.2s; }
.breadcrumb-link:hover { color: var(--accent); }
.breadcrumb-separator { color: var(--border-color); font-size: 0.75rem; }
.breadcrumb-current { color: var(--text-primary); font-size: 0.875rem; font-weight: 500; }

/* ---- EMPTY STATE ---- */
.empty-state {
  grid-column: 1 / -1; text-align: center; padding: 5rem 2rem; color: var(--text-secondary);
}
.empty-state a { margin-top: 1.5rem; display: inline-block; }

/* ---- PROGRESS HEADER (subjects/progress) ---- */
.progress-header {
  padding: 3rem 0 2rem; background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

/* ---- RESPONSIVE ---- */
@media(max-width:1024px) {
  .hero-content { grid-template-columns: 1fr; gap: 3rem; }
  .hero-title { font-size: 2.75rem; }
  .hero-3d-container { height: 360px; }
  .features-grid { grid-template-columns: repeat(2,1fr); }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .footer-content { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media(max-width:768px) {
  .hero { padding: 5rem 0 4rem; min-height: auto; }
  .hero-content { gap: 2rem; }
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-3d-container { height: 260px; }
  .hero-stats { gap: 1.25rem; }
  .hero-stat-value { font-size: 1.375rem; }
  .features-grid { grid-template-columns: 1fr; }
  .subjects-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2,1fr); gap: 1rem; }
  .stat-value { font-size: 2rem; }
  .section-title { font-size: 1.75rem; }
  .cta-title { font-size: 1.75rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .trust-bar-inner { gap: 1rem; }
  .hero-buttons { flex-direction: column; }
  .hero-badge { font-size: 0.7rem; padding: 0.3rem 0.75rem; }
  .trust-item { font-size: 0.8rem; }
}

/* ---- PAGE HERO (subjects, glossary inner pages) ---- */
.page-hero {
  padding: 5rem 0 3rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(0,212,170,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.page-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0.5rem 0 0.75rem;
}
.page-subtitle {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  max-width: 540px;
}

/* ---- EXPLODE BUTTON SPECIAL ---- */
#explodeBtn {
  background: linear-gradient(135deg, rgba(239,68,68,0.08), rgba(251,146,60,0.08));
  border-color: rgba(239,68,68,0.2);
  color: #fb923c;
}
#explodeBtn:hover {
  background: linear-gradient(135deg, rgba(239,68,68,0.18), rgba(251,146,60,0.18));
  border-color: rgba(239,68,68,0.5);
  color: #ef4444;
}
#explodeBtn.mode-active {
  background: linear-gradient(135deg, #ef4444, #fb923c);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 20px rgba(239,68,68,0.4);
}

/* ---- KIOSK / PRESENTATION MODE ---- */
.kiosk-mode .header,
.kiosk-mode .viewer-info {
  display: none !important;
}
.kiosk-mode .viewer-container {
  height: 100vh;
  margin-top: 0;
}
.kiosk-mode .viewer-sidebar {
  width: 240px;
}

/* ---- FULLSCREEN 3D canvas fix ---- */
#canvas-container:fullscreen {
  width: 100vw;
  height: 100vh;
}
#canvas-container:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
}

/* ---- HOTSPOT LABELS (CSS2D) ---- */
.hotspot-label {
  animation: fadeIn 0.3s ease;
  user-select: none;
}
.hotspot-label:hover .hotspot-text {
  color: #fff;
}

/* ---- GRADIENT TEXT ANIMATION ---- */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- TOUR / PRESENTATION OVERLAY ---- */
.tour-overlay {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  z-index: 500;
  box-shadow: var(--shadow-glow);
  animation: fadeIn 0.4s ease;
}
.tour-text {
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 500;
}
.tour-step {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tour-btn {
  padding: 0.5rem 1.25rem;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  transition: var(--transition);
}
.tour-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
