/* ==========================================================================
   METROPULSE RAPID TRANSIT (MPRT) - DESIGN SYSTEM & CORE STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  /* Brand Palette */
  --bg-dark: #070a12;
  --bg-body: #0a0e1a;
  --bg-surface: #10172a;
  --bg-card: rgba(19, 28, 49, 0.75);
  --bg-card-solid: #131c31;
  --bg-card-hover: rgba(28, 40, 70, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.25);
  
  /* Primary Accent Colors */
  --primary: #0284c7;
  --primary-light: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.4);
  --accent-cyan: #06b6d4;
  --accent-blue: #2563eb;
  
  /* Metro Line System Colors */
  --line-blue: #0284c7;
  --line-green: #10b981;
  --line-red: #ef4444;
  --line-purple: #a855f7;
  --line-yellow: #f59e0b;
  --line-silver: #94a3b8;
  
  /* Functional Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #38bdf8;
  
  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Text Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-bright: #ffffff;
  
  /* Shadows & Glassmorphism */
  --glass-blur: blur(16px);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(56, 189, 248, 0.2);
  --shadow-glow-green: 0 0 25px rgba(16, 185, 129, 0.25);
  --shadow-glow-red: 0 0 25px rgba(239, 68, 68, 0.25);

  /* Layout */
  --nav-height: 80px;
  --container-max: 1320px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 85% 65%, rgba(168, 85, 247, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(16, 185, 129, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.25;
}

/* ==========================================================================
   CONTAINER & GRID SYSTEM
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.container-fluid {
  width: 100%;
  padding-left: 2rem;
  padding-right: 2rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-12 { grid-template-columns: repeat(12, 1fr); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* ==========================================================================
   GLASSMORPHISM & CARDS
   ========================================================================== */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  position: relative;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.neon-border {
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  text-align: center;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
}

.btn-accent {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: 1px solid rgba(52, 211, 153, 0.4);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary-light);
  color: var(--primary-light);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 1rem 2.2rem;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-live {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-blue {
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.line-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.line-blue { background: #0284c7; color: white; }
.line-green { background: #10b981; color: white; }
.line-red { background: #ef4444; color: white; }
.line-purple { background: #a855f7; color: white; }
.line-yellow { background: #f59e0b; color: #1e293b; }

/* Pulse Indicator dot */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  position: relative;
  display: inline-block;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: inherit;
  opacity: 0.6;
  animation: pulsePing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.pulse-dot.red {
  background-color: #ef4444;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(7, 10, 18, 0.75);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

.site-header.scrolled {
  background: rgba(7, 10, 18, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-bright);
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.brand-name span {
  color: var(--primary-light);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-bright);
}

.nav-link.active::after, .nav-link:hover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-light);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--primary-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--text-main);
}

/* ==========================================================================
   NETWORK STATUS TICKER
   ========================================================================== */
.network-ticker {
  background: rgba(16, 23, 42, 0.9);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
  font-size: 0.85rem;
  margin-top: var(--nav-height);
  overflow: hidden;
  position: relative;
  z-index: 100;
}

.ticker-wrapper {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.ticker-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--text-bright);
  white-space: nowrap;
  background: rgba(2, 132, 199, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
}

.ticker-content {
  display: flex;
  align-items: center;
  gap: 3rem;
  white-space: nowrap;
  animation: marquee 35s linear infinite;
}

.ticker-content:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
}

.ticker-item strong {
  color: var(--text-bright);
}

/* ==========================================================================
   SECTION HEADERS
   ========================================================================== */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.5rem;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.section-title span {
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ==========================================================================
   FORM CONTROLS & INPUTS
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.input-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  color: var(--text-bright);
  font-size: 0.95rem;
  transition: var(--transition-fast);
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.input-box:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
  background: rgba(15, 23, 42, 0.95);
}

.input-box input, .input-box select, .input-box textarea {
  width: 100%;
  background: transparent;
  color: var(--text-bright);
  font-size: 0.95rem;
}

.input-box select option {
  background: var(--bg-surface);
  color: var(--text-bright);
}

.input-icon {
  color: var(--primary-light);
  font-size: 1.1rem;
}

/* Swap Button */
.btn-swap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-glow);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-bounce);
  margin: auto;
  box-shadow: var(--shadow-sm);
}

.btn-swap:hover {
  transform: rotate(180deg) scale(1.1);
  background: var(--primary);
  color: white;
}

/* ==========================================================================
   DIGITAL PASSENGER INFO DISPLAY (PID) BOARD
   ========================================================================== */
.pid-board {
  background: #020617;
  border: 2px solid #1e293b;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 0, 0, 0.9);
  position: relative;
}

.pid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #334155;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.pid-clock {
  font-family: var(--font-mono);
  color: #f59e0b;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.2rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.pid-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.pid-table th {
  color: #94a3b8;
  font-weight: 600;
  text-align: left;
  padding: 0.6rem 0.8rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid #1e293b;
}

.pid-table td {
  padding: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #f8fafc;
}

.pid-table tr:hover td {
  background: rgba(56, 189, 248, 0.05);
}

.status-ontime {
  color: #10b981;
  font-weight: 700;
}

.status-delayed {
  color: #ef4444;
  font-weight: 700;
}

.status-approaching {
  color: #f59e0b;
  font-weight: 700;
  animation: blink 1.2s infinite;
}

/* ==========================================================================
   METRO SMART CARD (3D FLIP)
   ========================================================================== */
.card-scene {
  perspective: 1000px;
  width: 100%;
  max-width: 420px;
  height: 250px;
  margin: 0 auto;
}

.metro-card-3d {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.metro-card-3d.flipped {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, #091e3a 0%, #173865 50%, #0d2142 100%);
  overflow: hidden;
}

.card-front::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.card-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #0d2142 0%, #0a1728 100%);
}

.card-chip {
  width: 48px;
  height: 38px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
}

.card-chip::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.card-nfc {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
}

.card-number {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.magnetic-strip {
  background: #020617;
  height: 44px;
  margin: -0.5rem -1.75rem 1rem -1.75rem;
  border-top: 1px solid #334155;
  border-bottom: 1px solid #334155;
}

/* ==========================================================================
   DIGITAL TICKET & QR BOARDING PASS
   ========================================================================== */
.digital-ticket {
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(56, 189, 248, 0.15);
  max-width: 650px;
  margin: 0 auto;
  position: relative;
}

.ticket-header {
  background: linear-gradient(135deg, #0369a1, #0284c7);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.2);
  position: relative;
}

.ticket-header::before, .ticket-header::after {
  content: '';
  position: absolute;
  bottom: -14px;
  width: 28px;
  height: 28px;
  background: var(--bg-body);
  border-radius: 50%;
  z-index: 10;
}

.ticket-header::before { left: -14px; }
.ticket-header::after { right: -14px; }

.ticket-body {
  padding: 2rem;
}

.ticket-qr-section {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: #050811;
  border-top: 1px solid var(--border-color);
  padding: 4.5rem 0 2rem 0;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  color: var(--text-muted);
  margin: 1.25rem 0;
  max-width: 320px;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.social-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary-light);
  transform: translateY(-3px);
}

.footer-col h4 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--primary-light);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary-light);
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 100%;
  padding: 2.25rem;
  position: relative;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #090e1c;
    flex-direction: column;
    padding: 2rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    transform: translateY(-150%);
    transition: transform 0.4s ease;
  }
  
  .nav-menu.open {
    transform: translateY(0);
  }
  
  .mobile-toggle {
    display: block;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
