/* ==========================================
   Trides Corporate Website Stylesheet (v15)
   ========================================== */

/* ------------------------
   Color Variables
------------------------- */
:root {
  --bg: #ffffff;
  --fg: #111827;
  --muted: #6b7280;
  --soft: #f9fafb;
  --soft-2: #e5e7eb;
  --card: #ffffff;
  --brand: #dc2626;
  --brand-700: #b91c1c;
  --accent: #111827;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  --maxw: 1180px;
}

/* Dark Mode Palette */
body.dark-theme {
  --bg: #0d0d0d;
  --fg: #f3f4f6;
  --muted: #9ca3af;
  --soft: #121212;
  --soft-2: #27272a;
  --card: #1a1a1a;
  --brand: #ef4444;
  --brand-700: #dc2626;
  --accent: #f3f4f6;
}

/* Smooth dark mode transition */
body,
body.dark-theme {
  transition: background 0.4s ease, color 0.4s ease;
}

/* ------------------------
   Base Styles
------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', sans-serif;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--brand); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section.alt { background: var(--soft); }
.section-head { margin-bottom: 28px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ------------------------
   Header
------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg), transparent 10%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--soft-2);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;  /* brand | nav | toggle */
  align-items: center;
  justify-content: center;
  padding: 16px 0;
  gap: 24px;
}

/* ---- Right-side container for dark mode toggle ---- */
.nav-actions {
  margin-left: auto; /* push toggle to far right */
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Ensure toggle stays aligned vertically */
.theme-toggle {
  cursor: pointer;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

/* Smaller on mobile */
@media (max-width: 768px) {
  .theme-toggle {
    width: 24px;
    height: 24px;
  }
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  height: 34px; /* down from 42px */
  width: auto;
}
.brand-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
}

/* ------------------------
   Navigation
------------------------- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;  /* centers menu in the middle column */
  gap: 24px;
  justify-self: center;     /* centers nav in the grid */
}
.site-nav a {
  position: relative;
  font-weight: 500;
  font-size: 14px;
  opacity: 0.9;
  transition: color 0.3s, opacity 0.3s;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-700) 100%);
  transition: width 0.35s ease;
}
.site-nav a:hover::after { width: 100%; }
.site-nav a:hover { opacity: 1; color: var(--brand); }

@media (max-width: 900px) {
  .site-nav { display: none; flex-direction: column; }
}

/* ===========================
   Dark Mode Toggle (Navbar)
   =========================== */

/* 1) Hide the native checkbox */
#darkModeToggle {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* 2) Label acts as the visible toggle button */
.theme-toggle {
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  background: transparent;
}

/* 3) Icon via SVG mask (neutral color) */
.theme-toggle::before {
  content: "";
  width: 20px;
  height: 20px;
  background-color: var(--accent); /* neutral, not red */
  /* Moon by default */
  mask: url('https://unpkg.com/lucide-static/icons/moon.svg') no-repeat center / contain;
  -webkit-mask: url('https://unpkg.com/lucide-static/icons/moon.svg') no-repeat center / contain;
}

/* 4) When checked -> show sun */
#darkModeToggle:checked + .theme-toggle::before {
  background-color: var(--accent);
  mask: url('https://unpkg.com/lucide-static/icons/sun.svg') no-repeat center / contain;
  -webkit-mask: url('https://unpkg.com/lucide-static/icons/sun.svg') no-repeat center / contain;
}

/* 5) Hover & focus states */
.theme-toggle:hover {
  transform: scale(1.06);
  background: var(--soft-1);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Optional: compact spacing for tight navbars */
.navbar .theme-toggle { margin-left: 12px; }

/* ------------------------
   Hero Section
------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  height: 100vh;
  min-height: 650px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--accent);
  padding: 0;
}
.hero-inner {
  max-width: 800px;
  padding: 0 20px;
  z-index: 2;
  transform: translateY(-30px);
}
.hero h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 46px;
  line-height: 1.2;
  margin-bottom: 18px;
}
.hero p {
  color: var(--muted);
  font-size: 18px;
  margin: 0 auto 28px;
  max-width: 720px;
}
@media (max-width: 768px) { .hero h1 { font-size: 36px; } }

/* Animated Hero Background (Optimized) */
.animated-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(120deg, #ffffff, #f7f8fa, #f0f1f3, #ffffff);
  background-size: 400% 400%;
  animation:
    bgshift 25s ease infinite,
    heroBgFade 1.8s ease-out forwards;
  animation-delay: 0s, 0.1s;
  opacity: 0;
}

/* Subtle red brand accent overlay */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, rgba(220,38,38,0.08), transparent 70%);
  pointer-events: none;
  opacity: 0;
  animation: heroBgFade 1.8s ease-out forwards;
  animation-delay: 0.2s;
}

/* Dark mode version */
body.dark-theme .hero::before {
  background: linear-gradient(135deg, rgba(239,68,68,0.15), transparent 75%);
}

@keyframes bgshift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- Scroll Indicator (Refined Graphite Style) ---- */
.scroll-indicator {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f3f4f6; /* soft light grey base */
  color: #374151;      /* graphite icon color */
  border: 1px solid rgba(55, 65, 81, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.1);
  transition: all 0.3s ease;
}

.scroll-indicator span {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: all 0.3s ease;
}

/* --- Rotation for scroll indicator (auto up/down arrow) --- */
.scroll-indicator.up span {
  transform: rotate(135deg); /* arrow points upward when near bottom */
}

.scroll-indicator:hover {
  background: #a0202f;   /* deep crimson hover */
  color: #ffffff;
  border-color: #a0202f;
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(160, 32, 47, 0.25);
}

/* ---- Dark Mode Scroll Indicator ---- */
body.dark-theme .scroll-indicator {
  background: #1f2937; /* graphite tone */
  color: #e5e7eb;      /* soft light grey icon */
  border: 1px solid rgba(229, 231, 235, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

body.dark-theme .scroll-indicator:hover {
  background: #a0202f;  /* deep crimson hover */
  color: #ffffff;
  border-color: #a0202f;
  box-shadow: 0 4px 14px rgba(160, 32, 47, 0.3);
}

/* Hero Animations */
@keyframes heroFadeIn {
  0% { opacity:0; transform:translateY(25px); }
  100% { opacity:1; transform:translateY(0); }
}
@keyframes heroBgFade {
  0% { opacity:0; } 100% { opacity:1; }
}
.hero-inner h1,
.hero-inner p,
.hero-inner .cta-row {
  opacity:0;
  transform:translateY(25px);
  animation: heroFadeIn 1s ease-out forwards;
}
.hero-inner h1 { animation-delay:0.2s; }
.hero-inner p { animation-delay:0.4s; }
.hero-inner .cta-row { animation-delay:0.8s; }

/* ------------------------
   Buttons
------------------------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.25s ease;
  border: 1px solid var(--accent);
}
.btn.primary {
  background: linear-gradient(90deg, var(--accent) 0%, var(--brand-700) 50%, var(--accent) 100%);
  background-size: 200% 100%;
  color: var(--bg);
  border: none;
}
.btn.primary:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.4);
}
.btn.ghost {
  color: var(--accent);
  background: transparent;
  border-color: var(--accent);
}
.btn.ghost:hover {
  color: var(--brand);
  border-color: var(--brand);
  transform: translateY(-2px);
}

/* ------------------------
   Solutions Section Background (Light & Dark)
------------------------- */
#solutions.section {
  background: linear-gradient(to bottom, #f9fafb, #ffffff);
  transition: background 0.4s ease;
}

/* Dark mode background fix */
body.dark-theme #solutions.section {
  background: linear-gradient(to bottom, #111111, #1a1a1a);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr; } }

.card,
.exp-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--soft-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}
.card h3,
.exp-card h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  margin: 6px 0 4px;
  font-size: 16px;
}
.card p,
.exp-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}
.card-img {
  width: 56px;
  height: 56px;
  margin-bottom: 8px;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.3s ease;
}
.card:hover .card-img { transform: scale(1.05); }

/* Unified hover styling */
.card:hover,
.exp-card:hover {
    transform: translateY(-6px);
  border-color: rgba(55, 65, 81, 0.35); /* graphite border */
  box-shadow:
    0 4px 8px rgba(17, 24, 39, 0.08),
    0 10px 20px rgba(55, 65, 81, 0.18),
    0 20px 30px rgba(55, 65, 81, 0.12),
    inset 0 -60px 40px -40px rgba(55, 65, 81, 0.08); /* gradient fade bottom */
  transition: all 0.45s ease;
}

/* Consistent underline hover animation for all cards */
.card::after,
.exp-card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 3px;
  background: var(--brand);
  transition: width 0.35s ease;
}

.card:hover::after,
.exp-card:hover::after {
  width: 100%;
}

/* ------------------------
   Fade-in Animation
------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
/* Scalable delay pattern */
.fade-in.visible:nth-child(1){transition-delay:0s;}
.fade-in.visible:nth-child(2){transition-delay:0.1s;}
.fade-in.visible:nth-child(3){transition-delay:0.2s;}
.fade-in.visible:nth-child(4){transition-delay:0.3s;}
.fade-in.visible:nth-child(5){transition-delay:0.4s;}
.fade-in.visible:nth-child(6){transition-delay:0.5s;}
.fade-in.visible:nth-child(7){transition-delay:0.6s;}
.fade-in.visible:nth-child(8){transition-delay:0.7s;}
.fade-in.visible:nth-child(9){transition-delay:0.8s;}
.fade-in.visible:nth-child(10){transition-delay:0.9s;}

/* ------------------------
   Contact Section (Cleaned)
------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 960px) {
  .contact-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* Enquiry & Support inline row layout */
.enquiry-support {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 48px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-style: normal;
}
.enquiry-inline,
.support-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.support-inline .wa {
  height: 20px;
  width: 20px;
  margin-left: 4px;
  vertical-align: middle;
}
@media (max-width: 640px) {
  .enquiry-support { flex-direction: column; align-items: flex-start; gap: 6px; }
}

.map-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-height: 320px;
  background: var(--card);
}
.map-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ------------------------
   Proven Industry Success Background (Light & Dark)
------------------------- */
#experience.section {
  background: linear-gradient(to bottom, #f9fafb, #ffffff);
  transition: background 0.4s ease;
}

/* Dark mode version */
body.dark-theme #experience.section {
  background: linear-gradient(to bottom, #0e0e0e, #1a1a1a);
}

.scroll-wrapper {
  position: relative;
  margin-top: 16px;
}

/* Scrollable container */
.scroll-cards {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 28px;
  padding: 8px 12px 12px;
  -webkit-overflow-scrolling: touch;
}

.scroll-cards::-webkit-scrollbar {
  height: 8px;
}
.scroll-cards::-webkit-scrollbar-thumb {
  background: var(--soft-2);
  border-radius: 4px;
}

/* Experience cards */
.exp-card {
  flex: 0 0 calc((100% - 56px) / 3); /* Show 3 cards per view */
  scroll-snap-align: start;
  background: var(--card);
  border: 1px solid var(--soft-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  min-height: 260px;
}

.exp-card h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 17px;
}

.exp-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}

.exp-card:hover {
    transform: translateY(-6px);
  border-color: rgba(55, 65, 81, 0.35); /* graphite border */
  box-shadow:
    0 4px 8px rgba(17, 24, 39, 0.08),
    0 10px 20px rgba(55, 65, 81, 0.18),
    0 20px 30px rgba(55, 65, 81, 0.12),
    inset 0 -60px 40px -40px rgba(55, 65, 81, 0.08); /* gradient fade bottom */
  transition: all 0.45s ease;
}

/* Adjust for larger screens (wider cards, still 3 visible) */
@media (min-width: 1400px) {
  .exp-card { flex: 0 0 calc((100% - 72px) / 3); }
}

/* Responsive: 2 cards on tablet, 1 on mobile */
@media (max-width: 1024px) {
  .exp-card { flex: 0 0 calc((100% - 24px) / 2); }
}
@media (max-width: 768px) {
  .exp-card { flex: 0 0 85%; min-height: 280px; }
}

/* ---- Proven Industry Success Scroll Buttons (Refined Look) ---- */
.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #f3f4f6; /* soft light grey base */
  color: #374151;      /* graphite icon color */
  border: 1px solid rgba(55, 65, 81, 0.15);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 18px;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(17, 24, 39, 0.08);
  transition: all 0.3s ease;
  opacity: 0.85;
}

.scroll-btn:hover {
  background: #a0202f;   /* subtle deep crimson tint */
  color: #ffffff;
  border-color: #a0202f;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 12px rgba(160, 32, 47, 0.25);
  opacity: 1;
}

.scroll-btn.left { left: -20px; }
.scroll-btn.right { right: -20px; }

@media (max-width: 900px) {
  .scroll-btn { display: none; }
}

/* ---- Dark Mode Styling for Scroll Buttons ---- */
.dark .scroll-btn {
  background: #1f2937; /* graphite base for dark mode */
  color: #e5e7eb;      /* soft light grey icon */
  border: 1px solid rgba(229, 231, 235, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.dark .scroll-btn:hover {
  background: #a0202f;  /* same elegant deep crimson hover */
  color: #ffffff;
  border-color: #a0202f;
  box-shadow: 0 4px 14px rgba(160, 32, 47, 0.3);
}

/* Dark mode support */
body.dark-theme .exp-card {
  background: var(--card);
  border-color: var(--soft-2);
}

/* ------------------------
   ABOUT US SECTION
------------------------- */

/* General About Section Text */
.about-content > p {
  text-align: justify;
  margin-bottom: 16px;
  color: var(--fg);
  line-height: 1.8;
}

/* Governance section heading */
.about-content h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 32px;
  margin-bottom: 16px;
}

/* ------------------------
   Governance & Integrity Cards (Centered Layout)
------------------------- */
.governance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.gov-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;        /* center all child elements */
  text-align: center;         /* center text */
  background: var(--card);
  border: 1px solid var(--soft-2);
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}

/* Hover underline + lift */
.gov-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--brand);
  transition: width 0.35s ease;
}
.gov-card:hover::after { width: 100%; }
.gov-card:hover {
  transform: translateY(-6px);
  border-color: rgba(55, 65, 81, 0.35); /* graphite border */
  box-shadow:
    0 4px 8px rgba(17, 24, 39, 0.08),
    0 10px 20px rgba(55, 65, 81, 0.18),
    0 20px 30px rgba(55, 65, 81, 0.12),
    inset 0 -60px 40px -40px rgba(55, 65, 81, 0.08); /* gradient fade bottom */
  transition: all 0.45s ease;
}

/* Header + icon */
.gov-card h4 {
  display: flex;
  flex-direction: column;     /* icon above text */
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  color: var(--accent);
  font-size: 16px;
  line-height: 1.25;          /* tighter gap between lines */
  margin-top: 0;
  margin-bottom: 10px;
  text-align: center;
}

.icon {
  width: 24px;
  height: 24px;
  display: block;
  margin: 0 auto 8px auto;    /* centers icon above text */
  stroke: currentColor;
  fill: none;
  color: var(--accent);
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

/* Optional hover highlight */
.gov-card:hover .icon {
  opacity: 1;
}

/* Description */
.gov-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 22px;
  max-width: 95%;
}

/* ---- Governance Buttons (Unified with Hero CTA Gradient) ---- */
.gov-card .btn.small {
  align-self: center;
  display: inline-block;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  color: var(--bg);
  background: linear-gradient(90deg, var(--accent) 0%, var(--brand-700) 50%, var(--accent) 100%);
  background-size: 200% 100%;
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.2px;
  transition: background-position 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.gov-card .btn.small:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35);
}

.gov-card .btn.small:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .gov-card {
    padding: 26px 20px;
  }
  .gov-card h4 {
    font-size: 15px;
  }
  .gov-card i[data-lucide] {
    width: 16px;
    height: 16px;
  }
  .gov-card p {
    font-size: 13px;
  }
}

/* ---- Governance Footer Text (Fine-tuned Typography) ---- */
.governance-footer-text {
  text-align: center;
  max-width: 780px;
  margin: 28px auto 0 auto;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15.5px;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.governance-footer-text strong {
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.4px;
}

/* Section Heading (Consistency) */
.section-head h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
}
.section-head p.muted {
  color: var(--muted);
  font-size: 15px;
}
/* ------------------------
   Footer (Unified Design)
------------------------- */
.site-footer {
  position: relative;
  background: color-mix(in oklab, var(--bg), transparent 8%);
  backdrop-filter: blur(6px);
  border-top: 1px solid var(--soft-2);
  padding: 28px 0;
  font-size: 14px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--muted); transition: color 0.3s ease; }
.footer-links a:hover { color: var(--brand); }
body.dark-theme .site-footer {
  background: color-mix(in oklab, var(--bg), transparent 12%);
  border-top: 1px solid var(--soft-2);
}

/* ------------------------
   Active Nav Highlight + Underline
------------------------- */
.site-nav a.active,
.footer-links a.active {
  color: var(--brand);
  font-weight: 600;
}
body.dark-theme .site-nav a.active,
body.dark-theme .footer-links a.active {
  color: var(--brand);
  text-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

/* Animated underline */
.site-nav a,
.footer-links a {
  position: relative;
  transition: color 0.3s ease, font-weight 0.3s ease;
}
.site-nav a::after,
.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: var(--brand);
  transition: width 0.35s ease;
}
.site-nav a.active::after,
.footer-links a.active::after { width: 100%; }
body.dark-theme .site-nav a.active::after,
body.dark-theme .footer-links a.active::after {
  background: var(--brand);
  box-shadow: 0 0 8px rgba(239,68,68,0.5);
}