/* ==============================================
   ASTRANEX DEFENCE — Main Stylesheet
   Futuristic · Dark · Defence-Tech · Production-Ready
   ============================================== */

/* ──────────────────────────────────────────────
   1. DESIGN TOKENS
   ────────────────────────────────────────────── */
:root {
  /* Colors */
  --bg-color: #000000;
  --bg-surface: #080a0d;
  --text-primary: #ffffff;
  --text-secondary: #888888;
  --text-tertiary: #444444;
  --accent-color: #ffffff;
  --border-color: #222222;
  --border-light: rgba(255, 255, 255, 0.1);

  /* Typography */
  --font-primary: "Inter", sans-serif;
  --font-heading: "Space Grotesk", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Spacing scale */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 32px;
  --spacing-lg: 64px;
  --spacing-xl: 120px;

  /* Header height — used for offset calculations */
  --header-h: 72px;
}

/* Mobile header is taller; override in breakpoint */
@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }
}

/* ──────────────────────────────────────────────
   2. RESET & BASE
   ────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: auto; /* Required for Lenis smooth scroll */
  font-size: 16px;
  background-color: var(--bg-color);
  color: var(--text-primary);
  /* Prevent horizontal scroll */
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /**
   * TACTICAL CROSSHAIR CURSOR
   * Replaces the native browser pointer with a custom SVG crosshair.
   * Encoded directly in CSS to avoid external HTTP requests or missing asset errors.
   */
  cursor: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2v20M2 12h20M12 8a4 4 0 1 0 0 8 4 4 0 1 0 0-8z' stroke='white' stroke-width='1.5' fill='none' opacity='0.7'/%3E%3C/svg%3E") 12 12, crosshair;
}

/* Ensure interactive elements keep the tactical crosshair or a pointer variant */
a, button, input, textarea, .team-member, .btn, .social-icon {
  cursor: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2v20M2 12h20M12 8a4 4 0 1 0 0 8 4 4 0 1 0 0-8z' stroke='white' stroke-width='1.5' fill='none' opacity='1'/%3E%3Ccircle cx='12' cy='12' r='2' fill='white'/%3E%3C/svg%3E") 12 12, pointer !important;
}

/* Anchor base */
a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

/* Images */
img {
  display: block;
  max-width: 100%;
}

/* Remove list bullets globally (nav lists handled separately) */
ul {
  list-style: none;
}

/* ──────────────────────────────────────────────
   3. TYPOGRAPHY
   ────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: var(--spacing-sm);
  line-height: 1.1;
}

h1 {
  font-size: clamp(2rem, 5.5vw, 4.2rem);
  letter-spacing: clamp(2px, 1vw, 5px);
  margin-bottom: var(--spacing-md);
}

h2.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: clamp(4px, 1.2vw, 6px);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  display: inline-block;
}

h3 {
  font-size: clamp(1rem, 2vw, 1.2rem);
  letter-spacing: 2px;
}

p {
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  margin-bottom: var(--spacing-md);
  letter-spacing: 0.3px;
  line-height: 1.7;
}

/* ──────────────────────────────────────────────
   4. LAYOUT UTILITIES
   ────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  position: relative;
}

.centered-layout {
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/**
 * TACTICAL FRAME EFFECT
 * Used to wrap the Mission and Vision text blocks.
 * Employs a very subtle backdrop-filter to create a physically 'frosted' glass plate 
 * hovering over the background grid, along with an inset black shadow for depth.
 */
.tactical-frame {
  position: relative;
  padding: 60px 40px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.tactical-frame::before,
.tactical-frame::after {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.tactical-frame::before {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
}

.tactical-frame::after {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
}

.tactical-frame:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(255, 255, 255, 0.02);
}

.tactical-frame:hover::before,
.tactical-frame:hover::after {
  width: 60px;
  height: 60px;
  border-color: rgba(255, 255, 255, 1);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
}

/* ──────────────────────────────────────────────
   5. GRID OVERLAY BACKGROUND
   ────────────────────────────────────────────── */
.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}

/**
 * LASER SCAN ANIMATION
 * Creates a glowing horizontal bar that physically sweeps down the user's screen 
 * to mimic a radar or system diagnostic scanning the grid.
 */
.grid-overlay::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.4);
  /* Heavy glowing box-shadow for light emission */
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.4);
  animation: laserScan 10s linear infinite;
  opacity: 0;
}

@keyframes laserScan {
  0% { transform: translateY(-50px); opacity: 0; }
  5% { opacity: 1; }
  95% { opacity: 1; }
  100% { transform: translateY(110vh); opacity: 0; }
}

/* ──────────────────────────────────────────────
   6. HEADER
   ────────────────────────────────────────────── */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-md);
  gap: var(--spacing-sm);
  background-color: rgba(0, 0, 0, 0.96);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* ── Brand ── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-symbol {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  background: #050505;
  border-radius: 3px;
  position: relative;
  padding: 4px;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  flex-shrink: 0;
}

/**
 * BRAND LOGO CORNER BRACKETS
 * Generates the physical 'HUD' targeting brackets entirely using CSS pseudo-elements (::before / ::after)
 * without needing extra HTML wrappers.
 */
.brand-symbol::before,
.brand-symbol::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

/* Top-Left Bracket */
.brand-symbol::before {
  top: -2px;
  left: -2px;
  border-right: none;
  border-bottom: none;
}

/* Bottom-Right Bracket */
.brand-symbol::after {
  bottom: -2px;
  right: -2px;
  border-left: none;
  border-top: none;
}

.brand-symbol:hover {
  border-color: var(--text-primary);
  /* Slightly expand the logo container, pushing the brackets outward */
  transform: scale(1.06);
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) brightness(1.1);
  image-rendering: -webkit-optimize-contrast;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 3px;
  font-size: clamp(0.75rem, 1.5vw, 1.1rem);
  color: #ffffff;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ── Desktop navigation ── */
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.main-nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  opacity: 0.6;
  padding: 4px 0;
  /* Enlarge touch target */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.3s ease, text-shadow 0.3s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  opacity: 1;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

/* Underline sweep on hover */
.main-nav a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--text-primary);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  transition: width 0.45s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.main-nav a:hover::after {
  width: 100%;
}

/* ── System status badge ── */
.system-status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-secondary);
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.system-status::before {
  content: "[ ";
  opacity: 0.4;
}

.system-status::after {
  content: " ]";
  opacity: 0.4;
}

.system-status .active {
  color: var(--text-primary);
  font-weight: 700;
  transition: opacity 0.15s ease;
  display: inline-block;
  min-width: 100px; /* Lock width to longest word to prevent layout shifting */
  text-align: left;
}

/* ── Hamburger button (mobile only) ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  /* Touch target */
  min-width: 44px;
  min-height: 44px;
  transition: border-color 0.25s ease;
}

.hamburger:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.hamburger:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 3px;
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 1px;
  background-color: #ffffff;
  transform-origin: center;
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease,
    width 0.35s ease;
}

/* Animated X when open */
.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
  width: 0;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ── Mobile nav drawer ── */
.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: 100%;
  background: rgba(4, 4, 6, 0.98);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: var(--spacing-sm) 0;
  z-index: 1100;
  /* Hidden by default */
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.mobile-nav.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mobile-nav-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-secondary);
  padding: 16px var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
  transition:
    color 0.2s ease,
    background 0.2s ease;
  /* Generous touch target */
  min-height: 52px;
  display: flex;
  align-items: center;
}

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

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

/* ──────────────────────────────────────────────
   7. HERO SECTION
   ────────────────────────────────────────────── */
.hero-section {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.hero-content {
  max-width: 820px;
  margin: 0 auto;
  animation: fadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.subtext {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  font-weight: 300;
  letter-spacing: 0.5px;
}

.hero-section .container {
  padding-bottom: 100px;
}

/* CTA button row */
.cta-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-sm);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  text-transform: uppercase;
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 2px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition:
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  /* Touch-friendly */
  min-height: 48px;
  /* Lock both buttons to the exact same size */
  width: 240px;
}

.btn-primary,
.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  box-shadow: 0 0 0 rgba(255, 255, 255, 0);
}

.btn-primary:hover,
.btn-secondary:hover {
  background-color: var(--text-primary);
  color: var(--bg-color);
  border-color: var(--text-primary);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
}

/* ──────────────────────────────────────────────
   8. CONTENT SECTIONS
   ────────────────────────────────────────────── */
.content-section {
  padding: var(--spacing-xl) 0;
  position: relative;
  border-bottom: 1px solid var(--border-color);
}

/* Large decorative section number (background watermark) */
.section-number {
  position: absolute;
  top: var(--spacing-lg);
  left: var(--spacing-md);
  font-family: var(--font-heading);
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 700;
  color: #0f0f0f;
  z-index: 0;
  line-height: 1;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}

/* Ensure section content sits above watermark */
.content-section > .container {
  position: relative;
  z-index: 1;
}

/* Mission / Vision / About large text */
.mission-text,
.vision-text,
.about-text {
  font-size: clamp(1.1rem, 2.5vw, 1.8rem);
  line-height: 1.65;
  color: var(--text-primary);
  font-weight: 300;
  letter-spacing: 0.2px;
}

/* ──────────────────────────────────────────────
   CINEMATIC REVEAL (BLUR & FADE-UP)
   ────────────────────────────────────────────── */
.cinematic-initial {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(20px);
  transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1),
              filter 1.2s cubic-bezier(0.2, 0.8, 0.2, 1),
              transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, filter, transform;
}

.cinematic-revealed {
  opacity: 1;
  filter: blur(0px);
  transform: translateY(0);
}

/* Small top divider on Mission */
.divider-top {
  width: 48px;
  height: 1px;
  background-color: var(--border-color);
  margin: 0 auto var(--spacing-md);
}

/* ──────────────────────────────────────────────
   9. TEAM SECTION
   ────────────────────────────────────────────── */
#team .container {
    text-align: center;
}

.team-grid {
  text-align: left;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-md);
}

.team-member {
  border: 1px solid var(--border-color);
  padding: var(--spacing-md);
  background-color: transparent;
  transition:
    transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
    border-color 0.4s ease,
    box-shadow 0.4s ease,
    background-color 0.4s ease;
  will-change: transform, box-shadow, border-color;
  position: relative;
}

.team-member:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.3);
  background-color: transparent;
  box-shadow: 
    0 10px 20px rgba(0, 0, 0, 0.8),
    0 0 15px rgba(255, 255, 255, 0.05);
  z-index: 2; /* Ensures hovering card sits above others */
}

.team-member h3 {
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  margin-bottom: 6px;
}

.team-member {
  cursor: pointer;
}

.team-member .role {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

/* Hide excessive details on the front card for a cleaner look */
.team-member .expertise,
.team-member .linkedin-link {
  display: none;
}

/* ──────────────────────────────────────────────
   10. TEAM MODAL POPUP (BLUR & GLOW)
   ────────────────────────────────────────────── */

/**
 * FIXED MODAL PARENT
 * Anchors to the screen and handles taking up the full viewport.
 * Note: Opacity is NOT animated on this parent layer to prevent browser bugs
 * where backdrop-filter blurs vanish during parent opacity animations.
 */
.team-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  /* Removed parent opacity animation to fix browser backdrop-filter bug */
  transition: visibility 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  padding: var(--spacing-md);
  box-sizing: border-box;
}

.team-modal.open {
  visibility: visible;
}

.team-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Define full blur natively, but hide with opacity */
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px) grayscale(30%);
  backdrop-filter: blur(4px) grayscale(30%);
  opacity: 0;
  /* Defining the blur directly here allows us to smoothly transition it in/out */
  transition: opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.team-modal.open .team-modal-backdrop {
  opacity: 1;
}

.team-modal-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 480px; /* Forces exact same height for all team popup cards */
  max-height: 90vh;
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 30px 60px rgba(0, 0, 0, 0.9),
    0 0 40px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  overflow: hidden;
}

.team-modal.open .team-modal-container {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.team-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.team-modal-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.team-modal-body {
  display: flex;
  flex-direction: row;
  height: 100%;
}

.team-modal-photo {
  width: 40%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(80%);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.team-modal-info {
  width: 60%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto; /* Handles any text overflow gracefully on fixed height */
}

.team-modal-name {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 5px;
  color: #fff;
}

.team-modal-role {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.team-modal-expertise {
  font-size: 1rem;
  color: #ccc;
  line-height: 1.6;
  margin-bottom: 35px;
  font-weight: 300;
}

.team-modal-linkedin {
  width: auto;
  min-width: 180px;
}

@media (max-width: 768px) {
  .team-modal-container {
    height: 85vh; /* Extend fixed height vertically for mobile stack */
    max-height: 650px;
  }

  .team-modal-body {
    flex-direction: column;
  }
  
  .team-modal-photo {
    width: 100%;
    height: 300px;
    object-position: top center;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .team-modal-info {
    width: 100%;
    padding: 25px;
  }
}

.team-photo {
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(100%);
  margin-bottom: var(--spacing-md);
  transition:
    filter 0.5s ease,
    border-color 0.35s ease;
  border-bottom: 2px solid var(--border-color);
}

.team-member:hover .team-photo {
  filter: grayscale(20%);
  border-color: rgba(255, 255, 255, 0.3);
}

.linkedin-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1.5px;
  opacity: 0.6;
  min-height: 44px;
  padding: 6px 0;
  transition: opacity 0.2s ease;
}

.linkedin-link:hover {
  opacity: 1;
}

/* ──────────────────────────────────────────────
   10. CONTACT SECTION
   ────────────────────────────────────────────── */
#contact {
  isolation: isolate;
  position: relative;
}

#contact .container {
  z-index: 1;
  position: relative;
  text-align: center;
}

#contact .section-title {
  display: block;
  margin-bottom: 36px;
  padding-bottom: 18px;
  font-size: clamp(1.4rem, 2.8vw, 2.4rem);
  letter-spacing: clamp(4px, 1.5vw, 8px);
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
}

/* Sub-label underneath Contact heading */
#contact .section-title::after {
  content: "CLEARANCE REQUIRED";
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: #777;
  margin-top: 10px;
  font-weight: 400;
}

/* Form card */
.form-container {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(24px, 4.5vw, 52px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-surface);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.7);
  position: relative;
}

/* Corner bracket — top-left */
.form-container::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 28px;
  height: 28px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  pointer-events: none;
}

/* Corner bracket — bottom-right */
.form-container::after {
  content: "";
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 28px;
  height: 28px;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  pointer-events: none;
}

/* Terminal bar inside form card */
.terminal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #777;
  letter-spacing: 2px;
  text-transform: uppercase;
  flex-wrap: wrap;
}

.terminal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #444;
  display: inline-block;
  flex-shrink: 0;
}

/* Form layout */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #888;
  transition: color 0.2s ease;
}

.form-group:focus-within label {
  color: #ccc;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  color: #f0f0f0;
  font-family: var(--font-primary);
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
  letter-spacing: 0.4px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
  outline: none;
  border-radius: 0;
  /* Touch-friendly */
  min-height: 48px;
  -webkit-appearance: none;
  appearance: none;
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
  font-family: var(--font-primary);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #666;
  font-size: 0.88rem;
}

.form-group input:hover,
.form-group textarea:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: rgba(255, 255, 255, 0.4);
  border-bottom-color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.05), 0 0 20px rgba(255, 255, 255, 0.05);
}

/* Animated underline scan effect */
.field-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #fff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 5px #fff;
  transition: width 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  pointer-events: none;
}

.form-group input:focus ~ .field-line,
.form-group textarea:focus ~ .field-line {
  width: 100%;
}

/* Form footer row */
.form-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-top: 6px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.secure-note {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #666;
}

.secure-note::before {
  content: "▸ ";
  color: #444;
}

/* Submit button */
.btn-submit {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 0;
  padding: 18px 40px;
  background: #ffffff;
  color: #000000;
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 4px;
  font-size: clamp(0.75rem, 1.5vw, 0.85rem);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  /* Touch-friendly */
  min-height: 56px;
  transition:
    background 0.35s ease,
    color 0.35s ease,
    letter-spacing 0.35s ease;
}

/* Shimmer sweep on hover */
.btn-submit::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.12),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-submit:hover {
  background: transparent;
  color: #ffffff;
  letter-spacing: 6px;
}

.btn-submit:hover::before {
  left: 100%;
}

.btn-submit:active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ──────────────────────────────────────────────
   11. FOOTER
   ────────────────────────────────────────────── */
.main-footer {
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-xl) 0 var(--spacing-md);
  background-color: #000;
  text-align: center;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  letter-spacing: 3px;
  font-weight: 700;
  text-transform: uppercase;
}

.brand-col .footer-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin: 0 auto var(--spacing-md) auto;
  max-width: 300px;
  line-height: 1.6;
}

/* Social icon pills */
.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-xs);
}

.social-icon {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  transition:
    background 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
    color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
    border-color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
    box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
    transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  /* Touch-friendly */
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.social-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: inline-block;
  vertical-align: middle;
}

/* X (Twitter) uses a solid path fill instead of a stroke */
.social-icon--x svg {
  fill: currentColor;
  stroke: none;
}

.social-icon:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5), inset 0 0 5px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Footer nav columns */
.footer-nav li {
  margin-bottom: 12px;
}

.footer-nav a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: color 0.2s ease;
  display: inline-block;
  /* Touch-friendly */
  min-height: 32px;
  line-height: 32px;
}

.footer-nav a:hover {
  color: var(--text-primary);
}

/* Legal link row */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0;
  border-top: 1px solid var(--border-color);
  margin-top: var(--spacing-md);
}

.footer-legal a {
  color: var(--text-tertiary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
  min-height: 32px;
  line-height: 32px;
  display: inline-block;
}

.footer-legal a:hover {
  color: var(--text-primary);
}

/* Bottom bar */
.footer-bottom {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: var(--spacing-sm);
  font-size: 0.7rem;
  color: #444;
  font-family: var(--font-mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.status-dot {
  color: #555;
  font-size: 8px;
}

/* ──────────────────────────────────────────────
   12. SCROLL PROGRESS BAR
       (width driven by JS via CSS variable)
   ────────────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--scroll-pct, 0%);
  height: 2px;
  background: #ffffff;
  z-index: 2000;
  pointer-events: none;
  transition: width 0.1s linear;
  /* Subtle glow */
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

/* ──────────────────────────────────────────────
   13. HERO SCROLL INDICATOR
       Fiber Optic Data Stream (Enhanced)
   ────────────────────────────────────────────── */
.scroll-indicator.data-stream {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  cursor: pointer;
  animation: fadeUpCenter 1.8s 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stream-track {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 95px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.25) 50%, transparent);
}

.stream-packet {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 15px;
  background-color: var(--text-primary);
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 1), 0 0 20px rgba(255, 255, 255, 0.6);
  animation: streamShoot 2.5s infinite cubic-bezier(0.7, 0, 0.3, 1);
}

.stream-target {
  position: absolute;
  bottom: 35px;
  left: 50%;
  /* Removed transform here because the animation 'targetPulse' will manage the transform! */
  margin-left: -5px; /* Manually offset by exactly half its 10px width */
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  box-sizing: border-box;
  animation: targetPulse 2.5s infinite cubic-bezier(0.7, 0, 0.3, 1);
}

.stream-label {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 5px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  margin-left: 2.5px; /* Offset to counter exactly half of the 5px letter-spacing, preserving exact optical center */
}

.scroll-indicator.data-stream:hover .stream-label {
  color: var(--text-secondary);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

@keyframes streamShoot {
  0% { transform: translateY(-15px); opacity: 0; height: 15px; }
  10% { opacity: 1; height: 35px; }
  60% { transform: translateY(90px); opacity: 1; height: 8px; }
  75%, 100% { transform: translateY(95px); opacity: 0; }
}

@keyframes targetPulse {
  0%, 55% { transform: scale(0.8); border-color: rgba(255, 255, 255, 0.1); background-color: transparent; }
  60% { transform: scale(1.6); border-color: rgba(255, 255, 255, 0.8); background-color: rgba(255, 255, 255, 0.2); }
  100% { transform: scale(0.8); border-color: rgba(255, 255, 255, 0.1); background-color: transparent; }
}

/* Live status dot — pulsing green equivalent in white */
.status-dot-live {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }

  50% {
    opacity: 0.7;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0);
  }
}

/* ──────────────────────────────────────────────
   14. ANIMATIONS
   ────────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUpCenter {
  from {
    opacity: 0;
    transform: translate(-50%, 24px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Intersection Observer triggered class (set by JS) */
.section-animate {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ──────────────────────────────────────────────
   13. RESPONSIVE BREAKPOINTS
   ────────────────────────────────────────────── */

/* ── Large tablets / small desktops ── */
@media (max-width: 1024px) {
  .main-nav {
    gap: var(--spacing-sm);
  }

  /* Keep system-status visible — just shrink font */
  .system-status {
    font-size: 0.6rem;
    padding: 4px 8px;
    letter-spacing: 1.5px;
  }
}

/* ── Tablets (600–900px): 2-column team grid ── */
@media (min-width: 600px) and (max-width: 900px) {
  .team-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
  }
}

/* ── Tablets: footer ── */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
  }

  .brand-col {
    grid-column: span 2;
    margin-bottom: var(--spacing-md);
  }
}

/* ── Mobile (hamburger kicks in at 768px) ── */
@media (max-width: 768px) {
  /* ---- Header layout ---- */
  .hamburger {
    display: flex;
  }

  .main-nav {
    display: none;
  }
  .scroll-indicator {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 24px;
  }

  /* replaced by mobile drawer */
  /* System status: hide from header on mobile — shown inside mobile drawer instead */
  .system-status {
    display: none;
  }

  .sticky-header {
    padding: 0 var(--spacing-sm);
    justify-content: space-between;
  }

  /* ---- Mobile nav drawer premium upgrades ---- */
  /* Status strip at top of drawer */
  .mobile-nav::before {
    content: "SYSTEM: ACTIVE  //  SECURE CHANNEL";
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: #333;
    text-transform: uppercase;
    padding: 10px var(--spacing-md);
    border-bottom: 1px solid #111;
    background: #040406;
  }

  /* Each mobile nav link — full-width with arrow indicator */
  .mobile-nav-link {
    padding: 18px var(--spacing-md);
    font-size: 0.85rem;
    letter-spacing: 3.5px;
    position: relative;
  }

  /* Right-arrow indicator on each link */
  .mobile-nav-link::after {
    content: "→";
    position: absolute;
    right: var(--spacing-md);
    opacity: 0;
    transform: translateX(-6px);
    transition:
      opacity 0.2s ease,
      transform 0.2s ease;
    font-size: 0.9rem;
  }

  .mobile-nav-link:hover::after,
  .mobile-nav-link:focus-visible::after {
    opacity: 0.5;
    transform: translateX(0);
  }

  /* Touch active state — visible tap feedback */
  .mobile-nav-link:active {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
  }

  /* ---- Hero ---- */
  .hero-section {
    min-height: 100svh;
  }

  /* ---- Section watermark numbers ---- */
  .section-number {
    font-size: clamp(4rem, 20vw, 8rem);
  }

  /* ---- Team grid — MOBILE HORIZONTAL LAYOUT ---- */
  /* Switch from tall vertical cards to compact horizontal rows */
  .team-grid {
    grid-template-columns: 1fr;
    /* one card per row */
    gap: var(--spacing-sm);
    /* tighter spacing */
  }

  /* Card becomes a horizontal flex row */
  .team-member {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
    /* gap handled by member-info padding */
    padding: 0;
    /* photo flush with card edge */
    overflow: hidden;
  }

  /* Square photo — fixed width on the left */
  .team-photo {
    width: 110px;
    height: 130px;
    min-width: 110px;
    /* prevent shrinking */
    object-fit: cover;
    object-position: top center;
    margin-bottom: 0;
    /* remove bottom margin */
    border-bottom: none;
    border-right: 2px solid var(--border-color);
    /* vertical divider instead */
    flex-shrink: 0;
    align-self: stretch;
    /* fill full card height */
  }

  /* On tap, colour accent on the right border divider */
  .team-member:active .team-photo {
    border-right-color: rgba(255, 255, 255, 0.4);
  }

  /* Info block fills remaining space */
  .team-member .member-info {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Tighten typography inside horizontal cards */
  .team-member h3 {
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
  }

  .team-member .role {
    font-size: 0.72rem;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
    line-height: 1.3;
  }

  .team-member .expertise {
    font-size: 0.75rem;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* truncate long expertise text */
    line-clamp: 2;
    /* standard property */
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* LinkedIn link compact */
  .linkedin-link {
    font-size: 0.65rem;
    min-height: 32px;
    padding: 0;
    letter-spacing: 1px;
  }

  /* Touch tap replaces hover on team cards */
  .team-member:active {
    transform: none;
    /* no lift on mobile — border flash instead */
    border-color: rgba(255, 255, 255, 0.35);
  }

  /* Hover desaturation still works (on tablets with stylus) */
  .team-member:hover .team-photo,
  .team-member:active .team-photo {
    filter: grayscale(20%);
  }

  /* ---- Contact form ---- */
  .form-row {
    grid-template-columns: 1fr;
  }

  #contact .section-title {
    font-size: 1.4rem;
    letter-spacing: 4px;
    margin-bottom: 20px;
    padding-bottom: 12px;
  }

  #contact .btn-submit {
    padding: 16px 24px;
    letter-spacing: 3px;
  }

  /* Button touch state */
  .btn:active {
    opacity: 0.75;
    transform: scale(0.98);
  }

  .btn-submit:active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }

  /* Touch feedback for LinkedIn links */
  .linkedin-link:active {
    opacity: 1;
    text-decoration: underline;
  }

  /* ---- Footer ---- */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .brand-col {
    grid-column: span 1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .footer-legal {
    gap: var(--spacing-sm);
    flex-wrap: wrap;
  }

  /* Social icons — larger tap target on mobile */
  .social-icon {
    padding: 9px 16px;
    font-size: 0.7rem;
  }

  .social-icon:active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.6), inset 0 0 5px rgba(255, 255, 255, 0.3);
    transform: translateY(1px); /* Make it press INTO the screen on touch */
    transition-duration: 0.1s; /* Snap down quickly */
  }
}

/* ── Small phones (≤480px) ── */
@media (max-width: 480px) {
  :root {
    --spacing-lg: 48px;
    --spacing-xl: 72px;
  }

  h1 {
    letter-spacing: 1px;
  }

  .cta-group {
    flex-direction: column;
    margin-top: 24px;
  }

  .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    padding: 12px 20px;
  }

  .brand-symbol {
    width: 38px;
    height: 38px;
  }

  .logo {
    font-size: 0.7rem;
    letter-spacing: 2px;
  }

  .tactical-frame {
    padding: 35px 20px;
  }

  .form-container {
    padding: 25px 15px;
  }

  /* Horizontal card: slightly narrower photo on very small screens */
  .team-photo {
    width: 90px;
    min-width: 90px;
    /* height is auto (stretch) — do NOT set a fixed height here */
  }

  .team-member .member-info {
    padding: 12px;
  }

  .footer-legal {
    flex-direction: column;
    gap: 8px;
  }
}

/* ── Accessibility: respect reduced motion preference ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ──────────────────────────────────────────────
   15. ERROR STATES & GLITCH EFFECTS
   ────────────────────────────────────────────── */

.error-log {
  display: block;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.75rem;
  color: #ff3333;
  margin-top: 8px;
  min-height: 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.error-log.active {
  opacity: 1;
}

.error-log.active::after {
  content: '_';
  animation: type-blink 1s step-end infinite;
}

@keyframes type-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.btn-submit.btn-error {
  border-color: #ff3333;
  color: #ff3333;
  background-color: rgba(255, 51, 51, 0.05);
  animation: glitch-shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

.btn-submit.btn-error::before {
  display: none;
}

@keyframes glitch-shake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
  40%, 60% { transform: translate3d(5px, 0, 0); }
}

/* ──────────────────────────────────────────────
   16. GHOSTLY TRAILING CURSOR GLOW
   ────────────────────────────────────────────── */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 400px;
  pointer-events: none; /* Crucial: lets clicks pass right through it */
  z-index: 0; /* Kept low so it sits 'behind' text */
  will-change: transform;
}

.cursor-glow::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle closest-side, rgba(255, 255, 255, 0.10) 0%, transparent 100%);
  border-radius: 50%;
  /* Soft pulse to make it feel alive even when mouse is still */
  animation: glow-breathe 4s infinite alternate ease-in-out;
}

@keyframes glow-breathe {
  0% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.9); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* Hide the custom glow completely on tablets/phones to save perf on touch devices */
@media (max-width: 1024px) {
  .cursor-glow {
    display: none !important;
  }
}
