/* ================================= */
/* Common: Resets & Variables        */
/* ================================= */
::selection {
  background-color: #ff5722;
  color: #ffffff;
}

:root {
  --brand-orange: #ff5722;
  --brand-hover: #e64a19;
  --primary-glow: #6aa9ff;
  --secondary-glow: #00ffff;
  --bg-dark-blue: #0f172a;
  --bg-card-blue: #1e293b;
  --bg-dark: #0a192f;
  --bg-darker: #0b1120;
  --text-light: #f8fafc;
  --text-muted: #94a3b8;
  --text-main: #ffffff;
  --glass-bg: rgba(23, 35, 58, 0.65);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-gradient: linear-gradient(90deg, #ffffff, #9ec5ff);
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #000307;
  overflow-x: hidden;
  color: var(--text-main);
}

/* ================================= */
/* Common: Layout & Wrappers         */
/* ================================= */
.page-wrapper {
  position: relative;
  background: #000307;
  overflow: hidden;
}

.step-wrapper {
  position: relative;
  padding: 80px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background-color: #000307;
  overflow: hidden;
}

.feature-row {
  position: relative;
  z-index: 1;
  padding: 60px 0;
}

.bg-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(255, 87, 34, 0.05),
      transparent 50%
    ),
    radial-gradient(circle at 80% 70%, rgba(0, 255, 255, 0.03), transparent 50%);
  animation: pulseGlow 10s infinite alternate;
  z-index: 0;
  pointer-events: none;
}

.line-dec {
  margin: 0 auto;
  width: 100px;
  height: 4px;
  border-radius: 2px;
  background: var(--brand-orange);
  box-shadow: 0 0 15px var(--brand-orange);
}

.sub-page-heading {
  color: #ffffff;
  background: linear-gradient(90deg, #ffffff, #ff5722);
  -webkit-background-clip: text;
  -moz-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ================================= */
/* Common: Accessibility Helpers     */
/* ================================= */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 10px 14px;
  background: #ffffff;
  color: #000000;
  z-index: 1000;
  border-radius: 6px;
  font-weight: 700;
}

.skip-link:focus,
.skip-link:focus-visible {
  left: 12px;
  top: 12px;
  outline: 3px solid var(--brand-orange);
}

a:focus-visible,
button:focus-visible,
.video-card-3d:focus-visible,
.carousel-control-prev:focus-visible,
.carousel-control-next:focus-visible {
  outline: 3px solid var(--brand-orange);
  outline-offset: 2px;
}

/* ================================= */
/* Common: Typography & Copy         */
/* ================================= */
.teacher-step-content {
  padding: 20px;
  text-align: left;
  color: #ffffff;
}

.teacher-title,
h2.sub-heading {
  font-weight: 700;
  color: #ffffff;
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -moz-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.teacher-title {
  font-size: 2rem;
  margin-bottom: 20px;
}

.teacher-desc {
  font-size: 1.1rem;
  line-height: 1.7;
  opacity: 0.8;
  margin-bottom: 30px;
  color: #e0e0e0;
}

h2.sub-heading {
  letter-spacing: -0.5px;
  margin-bottom: 4rem;
  position: relative;
  z-index: 1;
}

.hero-description {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 40px;
  font-weight: 300;
}

.step-number {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-glow);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 15px;
  background: rgba(106, 169, 255, 0.1);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(106, 169, 255, 0.2);
}

/* ================================= */
/* Common: Buttons & Badges          */
/* ================================= */
.btn-brand {
  background-color: var(--brand-orange);
  color: #ffffff;
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  z-index: 1;
}

.btn-brand:hover {
  background-color: var(--brand-hover);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(255, 87, 34, 0.3);
}

.btn-brand:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.25);
}

.btn-brand:active {
  transform: scale(0.99);
}

.section-badge {
  display: inline-block;
  padding: 6px 16px;
  background-color: rgba(255, 87, 34, 0.1);
  color: var(--brand-orange);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 87, 34, 0.2);
}

/* ================================= */
/* Common: Icons & Highlights        */
/* ================================= */
.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 20px;
  color: var(--primary-glow);
  font-size: 1.25rem;
  border: 1px solid var(--glass-border);
  box-shadow: 0 0 15px rgba(106, 169, 255, 0.1);
}

.icon-box {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 87, 34, 0.15);
  color: var(--brand-orange);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 20px;
}

/* ================================= */
/* Common: Media & Imagery           */
/* ================================= */
.feature-image-wrapper {
  position: relative;
  padding: 10px;
  transition: transform 0.5s ease;
}

.feature-image-wrapper:hover {
  transform: translateY(-5px);
}

.feature-image-box {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

.feature-image-box img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.9;
  transition: opacity 0.3s;
}

.feature-image-box:hover img {
  opacity: 1;
}

.img-glow {
  position: absolute;
  width: 80%;
  height: 80%;
  background: var(--primary-glow);
  filter: blur(80px);
  opacity: 0.15;
  top: 10%;
  left: 10%;
  z-index: -1;
}

/* ================================= */
/* Common: Background Patterns        */
/* ================================= */
.bg-pattern-dots {
  background-image: radial-gradient(
    rgba(106, 169, 255, 0.15) 1px,
    transparent 1px
  );
  background-size: 30px 30px;
}

.bg-pattern-grid {
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

.bg-pattern-diagonal {
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 15px
  );
}

.bg-pattern-cross {
  background-image: radial-gradient(
      circle,
      rgba(255, 255, 255, 0.08) 1.5px,
      transparent 1.5px
    ),
    radial-gradient(circle, rgba(255, 255, 255, 0.08) 1.5px, transparent 1.5px);
  background-position: 0 0, 20px 20px;
  background-size: 40px 40px;
}

.bg-pattern-blueprint {
  background-image: linear-gradient(
      rgba(106, 169, 255, 0.05) 2px,
      transparent 2px
    ),
    linear-gradient(90deg, rgba(106, 169, 255, 0.05) 2px, transparent 2px),
    linear-gradient(rgba(106, 169, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106, 169, 255, 0.03) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
}

/* ================================= */
/* Common: Mobile App CTA Block      */
/* ================================= */
.mobile-app-cta {
  background: #000307;
  padding: 80px 0;
  border-top: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  overflow: hidden;
}

.mobile-app-cta .google-play,
.mobile-app-cta .app-store {
  min-width: 150px;
  max-width: 200px;
  object-fit: contain;
}

.mobile-app-cta .google-play img,
.mobile-app-cta .app-store img {
  width: 100%;
  height: auto;
  display: block;
}

.mobile-app-cta .google-play:hover,
.mobile-app-cta .app-store:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease;
}

/* ================================= */
/* Page: Teacher Flow                */
/* ================================= */
.feature-carousel .carousel-caption {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border-radius: 50px;
  padding: 5px 20px;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  white-space: nowrap;
}

.feature-carousel .carousel-indicators {
  margin-bottom: 0.5rem;
}

.feature-carousel .carousel-control-prev,
.feature-carousel .carousel-control-next {
  opacity: 0;
  transition: opacity 0.3s;
  width: 10%;
}

.feature-image-box:hover .carousel-control-prev,
.feature-image-box:hover .carousel-control-next {
  opacity: 0.8;
}

@media (min-width: 768px) {
  .app-image {
    width: 430px !important;
  }
}

/* ================================= */
/* Page: Bulk Grading                */
/* ================================= */
.perspective-wrapper {
  max-width: 550px;
  margin: 0 auto;
  perspective: 800px;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.video-card-3d {
  position: relative;
  width: 100%;
  max-width: 750px;
  cursor: pointer;
  border-radius: 16px;
  transform: rotateX(35deg) rotateY(0deg) rotateZ(0deg);
  transform-style: preserve-3d;
  box-shadow: -30px 30px 60px rgba(0, 0, 0, 0.6),
    1px 1px 0px 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.27);
  background: #000000;
  will-change: transform;
}

.video-card-3d:hover {
  transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(1.02);
}

.video-card-3d video {
  width: 100%;
  border-radius: 16px;
  display: block;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.video-card-3d:hover video {
  opacity: 1;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateZ(50px);
  width: 80px;
  height: 80px;
  background: rgba(255, 87, 34, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 2rem;
  box-shadow: 0 0 30px rgba(255, 87, 34, 0.6);
  animation: pulse 2s infinite;
}

.feature-section-wrapper {
  position: relative;
  overflow: hidden;
  padding: 80px 0;
  color: var(--text-main);
}

.feature-section {
  position: relative;
  padding: 5rem 0;
  overflow: hidden;
  z-index: 1;
}

.feature-card {
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1),
    0 8px 20px -5px rgba(0, 0, 0, 0.3);
  padding: 3rem 2rem 2.5rem 2rem;
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: 100%;
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 2rem;
  width: 40px;
  height: 4px;
  background-color: var(--brand-orange);
  opacity: 0.8;
  border-radius: 0 0 4px 4px;
  transition: width 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 87, 34, 0.4);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2),
    0 20px 30px -10px rgba(0, 0, 0, 0.4);
}

.feature-card:hover::before {
  width: 60px;
}

.card-icon-wrapper {
  font-size: 2.5rem;
  color: var(--brand-orange);
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 8px rgba(255, 87, 34, 0.3));
}

.feature-card h5 {
  color: var(--text-light);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-card p,
.card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0;
}

.card-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--text-light);
}

/* ================================= */
/* Page: School (Shared components)  */
/* ================================= */

/* ================================= */
/* Common: Modal & Overlay           */
/* ================================= */
.modal-content {
  background-color: #000000;
  border: 1px solid var(--brand-orange);
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-close {
  filter: invert(1);
}

/* ================================= */
/* Animations                        */
/* ================================= */
@keyframes pulseGlow {
  from {
    opacity: 0.6;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.7);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(255, 87, 34, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 87, 34, 0);
  }
}

/* ================================= */
/* Accessibility: Reduced Motion     */
/* ================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .video-card-3d,
  .feature-card,
  .btn-brand {
    will-change: auto;
  }
}

/* ================================= */
/* Responsive Tweaks                 */
/* ================================= */
@media (max-width: 991px) {
  .mobile-app-cta {
    text-align: center;
  }

  .mobile-app-cta .d-flex {
    justify-content: center !important;
  }
}

@media (max-width: 768px) {
  .feature-row {
    text-align: center;
    padding: 40px 0;
  }

  .teacher-step-content {
    text-align: center;
    padding: 0 0 40px 0;
  }

  .perspective-wrapper {
    max-width: 500px;
  }
}

@media (min-width: 1400px) {
  .perspective-wrapper {
    max-width: 600px;
  }
}

@media (min-width: 1400px) {
  #videoModal .modal-lg {
    max-width: 1000px;
  }
}
