/*
 * STRIKE - Tactical Course Portal
 * Main Stylesheet
 */

/* ============================================
 * TABLE OF CONTENTS
 * ============================================
 * 
 * 1. CUSTOM PROPERTIES (CSS Variables)
 * 2. RESET & BASE STYLES
 * 3. NAVIGATION (Navbar)
 * 4. PAGE SECTIONS & CONTAINERS
 * 5. UTILITY CLASSES
 * 6. BUTTON STYLES
 * 7. CARD COMPONENTS
 * 8. ANIMATIONS & EFFECTS
 * 9. RESPONSIVE DESIGN
 * 
 * ============================================ */

/* ============================================
 * 1. CUSTOM PROPERTIES
 * ============================================ */

/* #CUSTOM PROPERTIES */
:root {
  --color-bg: #0a0a0a;
  --color-surface: #121212;
  --color-primary: #ffd700; /* Gold/Yellow Accent */
  --color-secondary: #00ffc2; /* Tactical Green/Cyan */
  --color-text: #e0e0e0;
  --color-text-muted: #888888;
  --color-border: rgba(255, 255, 255, 0.1);

  --font-heading: "Orbitron", sans-serif;
  --font-body: "Roboto Mono", monospace;

  --transition-fast: 0.2s ease-in-out;
  --transition-slow: 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* #RESET & BASE STYLES */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  padding-top: 0;
  position: relative;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.2) 0px,
    rgba(0, 0, 0, 0.2) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 100;
  opacity: 0.3;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
}

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
}

main {
  padding-top: 0;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 0;
}

/* #ANIMATIONS */
@keyframes textGlitch {
  0% {
    text-shadow: 0.05em 0 0 rgba(0, 255, 194, 0.75),
      -0.05em -0.025em 0 rgba(255, 215, 0, 0.75),
      -0.025em 0.05em 0 rgba(0, 255, 194, 0.75);
  }
  14% {
    text-shadow: 0.05em 0 0 rgba(0, 255, 194, 0.75),
      -0.05em -0.025em 0 rgba(255, 215, 0, 0.75),
      -0.025em 0.05em 0 rgba(0, 255, 194, 0.75);
  }
  15% {
    text-shadow: -0.05em -0.025em 0 rgba(0, 255, 194, 0.75),
      0.025em 0.025em 0 rgba(255, 215, 0, 0.75),
      -0.05em -0.05em 0 rgba(0, 255, 194, 0.75);
  }
  49% {
    text-shadow: -0.05em -0.025em 0 rgba(0, 255, 194, 0.75),
      0.025em 0.025em 0 rgba(255, 215, 0, 0.75),
      -0.05em -0.05em 0 rgba(0, 255, 194, 0.75);
  }
  50% {
    text-shadow: 0.025em 0.05em 0 rgba(0, 255, 194, 0.75),
      0.05em 0 0 rgba(255, 215, 0, 0.75), 0 -0.05em 0 rgba(0, 255, 194, 0.75);
  }
  99% {
    text-shadow: 0.025em 0.05em 0 rgba(0, 255, 194, 0.75),
      0.05em 0 0 rgba(255, 215, 0, 0.75), 0 -0.05em 0 rgba(0, 255, 194, 0.75);
  }
  100% {
    text-shadow: -0.025em 0 0 rgba(0, 255, 194, 0.75),
      -0.025em -0.025em 0 rgba(255, 215, 0, 0.75),
      -0.025em -0.05em 0 rgba(0, 255, 194, 0.75);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes missionBriefingEntry {
  from {
    opacity: 0;
    transform: translateY(100px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardPulseGlow {
  0% {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 20px var(--color-secondary);
  }
  50% {
    box-shadow: 0 25px 55px rgba(0, 0, 0, 0.5), 0 0 30px var(--color-secondary);
  }
  100% {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 20px var(--color-secondary);
  }
}

@keyframes scanline {
  from {
    left: -100%;
  }
  to {
    left: 100%;
  }
}

/* #HEADER & NAVIGATION */
.header {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  width: 100%;
  padding: 1rem 5%;
  background: rgba(10, 10, 10, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5),
              0 0 10px rgba(0, 255, 194, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10000;
  will-change: transform;
  transform: translateZ(0);
  transition: box-shadow 0.3s ease;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-primary);
  text-shadow: 0 0 5px var(--color-primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-secondary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-fast);
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Active Nav Link Styling */
body.home-page .nav-links a[href="index.html"],
body.missions-page .nav-links a[href="missions.html"],
body.intel-page .nav-links a[href="intel.html"],
body.contact-page .nav-links a[href="contact.html"] {
  color: var(--color-primary);
  text-shadow: 0 0 5px var(--color-primary);
}

body.home-page .nav-links a[href="index.html"]::after,
body.missions-page .nav-links a[href="missions.html"]::after,
body.intel-page .nav-links a[href="intel.html"]::after,
body.contact-page .nav-links a[href="contact.html"]::after {
  transform: scaleX(1);
  background: var(--color-primary);
}

body.signin-page .nav-links a[href="signin.html"],
body.signup-page .nav-links a[href="signup.html"] {
  color: var(--color-primary);
  text-shadow: 0 0 5px var(--color-primary);
}

body.signin-page .nav-links a[href="signin.html"]::after,
body.signup-page .nav-links a[href="signup.html"]::after {
  transform: scaleX(1);
  background: var(--color-primary);
}

/* Auth Navigation Buttons */
.nav-btn-signin,
.nav-btn-signup {
  padding: 0.5rem 1.25rem !important;
  border: 2px solid var(--color-secondary);
  border-radius: 0;
  transition: all var(--transition-fast);
}

.nav-btn-signin::after,
.nav-btn-signup::after {
  display: none !important;
}

.nav-btn-signin:hover,
.nav-btn-signup:hover {
  background: var(--color-secondary);
  color: var(--color-bg) !important;
  box-shadow: 0 0 15px rgba(0, 255, 194, 0.4);
}

.nav-btn-signup {
  background: var(--color-secondary);
  color: var(--color-bg);
  box-shadow: 0 0 10px rgba(0, 255, 194, 0.3);
}

.nav-btn-signup:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

/* Mobile Nav Toggle - Checkbox Hack */
#nav-toggle {
  display: none;
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 25px;
  position: relative;
  z-index: 101;
}

.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  background: var(--color-text);
  height: 3px;
  width: 100%;
  position: absolute;
  left: 0;
  transition: all var(--transition-fast);
}

.nav-toggle-label span {
  top: 11px;
}

.nav-toggle-label span::before {
  content: "";
  top: -8px;
}

.nav-toggle-label span::after {
  content: "";
  top: 8px;
}

#nav-toggle:checked ~ .nav-toggle-label span {
  background: transparent;
}

#nav-toggle:checked ~ .nav-toggle-label span::before {
  transform: rotate(45deg);
  top: 0;
}

#nav-toggle:checked ~ .nav-toggle-label span::after {
  transform: rotate(-45deg);
  top: 0;
}

/* #HERO SECTION */
.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 0;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(10, 10, 10, 0.3) 0%,
    rgba(10, 10, 10, 0.7) 100%
  );
  z-index: 1;
}

.hero-content {
  z-index: 2;
  animation: fadeIn 1s ease-out;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  margin-bottom: 1rem;
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* #BUTTONS */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  border: 2px solid var(--color-secondary);
  color: var(--color-secondary);
  background: transparent;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  cursor: pointer;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--color-secondary);
  transition: left var(--transition-fast);
  z-index: -1;
}

.btn:hover {
  color: var(--color-bg);
  border-color: var(--color-secondary);
}

.btn:hover::before {
  left: 0;
}

/* #SECTIONS & PAGE LOAD ANIMATIONS */
.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--color-secondary);
  box-shadow: 0 0 10px var(--color-secondary);
}

/* #FOOTER */
.footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  text-align: center;
  padding: 2rem 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer p span {
  color: var(--color-primary);
  font-weight: 700;
}

/* #RESPONSIVE DESIGN */
@media (max-width: 768px) {
  body {
    padding-top: 0;
  }

  main {
    padding-top: 0;
  }

  .header {
    padding: 0.75rem 3%;
    flex-wrap: wrap;
  }

  .logo {
    font-size: 1.4rem;
  }

  /* Hide search bar on mobile */
  .search-container {
    display: none;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--color-surface);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    border-left: 1px solid var(--color-border);
    gap: 1.5rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
  }

  #nav-toggle:checked ~ .nav-links {
    transform: translateX(0);
  }

  .nav-toggle-label {
    display: block;
  }

  /* Mobile auth buttons */
  .nav-btn-signin,
  .nav-btn-signup {
    width: 80%;
    text-align: center;
    padding: 0.75rem 1.5rem !important;
  }

  /* Notification Banner Mobile */
  .notification-banner {
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
  }

  .notification-text {
    font-size: 0.75rem;
  }

  .notification-close {
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
  }

  /* Container padding */
  .container {
    width: 95%;
    padding: 2rem 0;
  }

  /* Section titles */
  .section-title h2 {
    font-size: 1.8rem;
  }

  .section-title p {
    font-size: 0.9rem;
  }

  /* Hero section mobile */
  .hero {
    min-height: 70vh !important;
    padding: 2rem 1rem;
  }

  .hero-content {
    padding: 1rem;
  }

  .hero h1 {
    font-size: 2.5rem !important;
    margin-bottom: 1rem;
  }

  .hero p {
    font-size: 0.95rem !important;
    margin-bottom: 1.5rem;
  }

  /* Buttons */
  .btn {
    padding: 0.8rem 1.8rem;
    font-size: 0.9rem;
  }

  /* Breadcrumb mobile */
  .breadcrumb {
    padding: 0.75rem 3%;
    font-size: 0.85rem;
  }
}

/* Tablet breakpoint */
@media (min-width: 769px) and (max-width: 1024px) {
  .header {
    padding: 0.9rem 4%;
  }

  .container {
    width: 92%;
  }

  .search-container {
    width: 250px;
  }
}

/* #SCROLL-TRIGGERED SECTION ANIMATIONS */

/* Base styles for all sections */
section {
  transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  padding: 4rem 0;
  margin: 2rem 0;
}

/* Scroll animation using CSS animation-timeline (Modern browsers) */
@supports (animation-timeline: scroll()) {
  section {
    animation: sectionScrollEffect linear;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }

  @keyframes sectionScrollEffect {
    from {
      background: transparent;
      border: none;
      padding: 4rem 0;
      transform: scale(1);
    }
    to {
      background: linear-gradient(135deg, rgba(18, 24, 38, 0.7), rgba(12, 17, 28, 0.9));
      border: 2px solid rgba(0, 255, 194, 0.2);
      border-radius: 12px;
      padding: 3rem 0;
      transform: scale(0.98);
      box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 0 40px rgba(0, 255, 194, 0.05),
        0 0 80px rgba(0, 255, 194, 0.1);
    }
  }
}

/* Fallback for browsers without animation-timeline support */
@supports not (animation-timeline: scroll()) {
  /* Add scroll-snap points for sections */
  section {
    scroll-margin-top: 100px;
  }

  /* Simulate scroll effect with viewport-based animations */
  section {
    animation: sectionFadeIn 0.8s ease-out;
    animation-fill-mode: both;
  }

  @keyframes sectionFadeIn {
    from {
      opacity: 0;
      transform: translateY(30px) scale(1);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
      background: linear-gradient(135deg, rgba(18, 24, 38, 0.5), rgba(12, 17, 28, 0.7));
      border: 1px solid rgba(0, 255, 194, 0.15);
      border-radius: 12px;
      padding: 3.5rem 0;
      box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 0 40px rgba(0, 255, 194, 0.05);
    }
  }

  /* Stagger animation delays for sequential effect */
  section:nth-of-type(1) { animation-delay: 0s; }
  section:nth-of-type(2) { animation-delay: 0.1s; }
  section:nth-of-type(3) { animation-delay: 0.2s; }
  section:nth-of-type(4) { animation-delay: 0.3s; }
  section:nth-of-type(5) { animation-delay: 0.4s; }
  section:nth-of-type(6) { animation-delay: 0.5s; }
  section:nth-of-type(7) { animation-delay: 0.6s; }
  section:nth-of-type(8) { animation-delay: 0.7s; }
  section:nth-of-type(9) { animation-delay: 0.8s; }
  section:nth-of-type(10) { animation-delay: 0.9s; }
}

/* Enhanced section hover effects */
section:hover {
  border-color: rgba(0, 255, 194, 0.4);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.5),
    inset 0 0 60px rgba(0, 255, 194, 0.08),
    0 0 100px rgba(0, 255, 194, 0.15);
  transform: scale(0.99);
}

/* Exclude hero section from scroll effects */
section.hero,
section#hero {
  animation: none !important;
  border: none !important;
  padding: 0 !important;
  transform: none !important;
  box-shadow: none !important;
  margin: 0 !important;
}

section.hero:hover,
section#hero:hover {
  border: none !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Specific section refinements */
.stats-section,
.testimonials-section,
.skill-progress-section,
.comparison-table-section,
.faq-section,
.roadmap-section {
  overflow: hidden;
}

/* Add tactical corner accents to sections */
section::before,
section::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(0, 255, 194, 0);
  transition: all 0.6s ease;
  pointer-events: none;
  z-index: 1;
}

section::before {
  top: -2px;
  left: -2px;
  border-top: 2px solid rgba(0, 255, 194, 0.3);
  border-left: 2px solid rgba(0, 255, 194, 0.3);
  border-right: none;
  border-bottom: none;
}

section::after {
  bottom: -2px;
  right: -2px;
  border-bottom: 2px solid rgba(0, 255, 194, 0.3);
  border-right: 2px solid rgba(0, 255, 194, 0.3);
  border-top: none;
  border-left: none;
}

section:hover::before,
section:hover::after {
  width: 60px;
  height: 60px;
  border-color: rgba(0, 255, 194, 0.6);
}

/* Exclude hero from corner accents */
section.hero::before,
section.hero::after,
section#hero::before,
section#hero::after {
  display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  section {
    padding: 3rem 0;
    margin: 1.5rem 0;
  }

  @supports (animation-timeline: scroll()) {
    @keyframes sectionScrollEffect {
      to {
        padding: 2.5rem 0;
        transform: scale(0.99);
      }
    }
  }

  section::before,
  section::after {
    width: 25px;
    height: 25px;
  }

  section:hover::before,
  section:hover::after {
    width: 35px;
    height: 35px;
  }
}

