/**
 * styles/header.css
 * Northshore Gen LLC — Fixed Adaptive Glassmorphic Navigation Header
 * Independent Technology Research & Design Studio
 * Feature F12 / Interface Contract #5
 */

/* ==========================================================================
   1. Fixed Header Container & Glassmorphism Layer
   ========================================================================== */
#site-header,
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--header-height, 72px);
  z-index: var(--z-header, 100);
  background-color: rgba(10, 11, 14, 0.72);
  backdrop-filter: var(--glass-blur-md, blur(16px));
  -webkit-backdrop-filter: var(--glass-blur-md, blur(16px));
  border-bottom: 1px solid var(--glass-border-subtle, rgba(255, 255, 255, 0.08));
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: background-color, border-color, color, box-shadow;
  transition:
    background-color 0.25s var(--ease-smooth, ease),
    border-color 0.25s var(--ease-smooth, ease),
    color 0.25s var(--ease-smooth, ease),
    box-shadow 0.25s ease;
  box-sizing: border-box;
}

/* Header Inner Alignment Container */
.site-header__container,
.header-inner {
  max-width: var(--container-max-width, 1440px);
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--header-pad-x, clamp(1.5rem, 4vw, 3.5rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-sizing: border-box;
}

/* ==========================================================================
   2. Brand Emblem & Logo Typography
   ========================================================================== */
.site-header__brand,
.brand-logo {
  font-family: var(--font-display, 'Syne', sans-serif);
  font-weight: 700;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.25rem);
  letter-spacing: -0.025em;
  color: var(--text-primary, #ffffff);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  user-select: none;
  white-space: nowrap;
  transition:
    color 0.25s ease,
    opacity 0.25s ease,
    transform 0.25s var(--ease-spring);
}

.site-header__brand:hover,
.brand-logo:hover {
  color: var(--accent-emerald, #C2A476);
  transform: translateY(-1px);
  text-shadow: 0 0 16px var(--color-accent-glow, rgba(194, 164, 118, 0.35));
}

/* ==========================================================================
   3. Desktop Navigation Menu & Animated Link Indicators
   ========================================================================== */
.site-header__nav,
.nav-links {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link,
#site-header nav a,
.site-header .nav-links a {
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
  color: var(--color-text-secondary, #8b949e);
  text-decoration: none;
  position: relative;
  padding: 0.4rem 0.2rem;
  letter-spacing: 0.01em;
  display: inline-block;
  transition:
    color 0.25s ease,
    transform 0.2s ease;
}

.nav-link::after,
#site-header nav a::after,
.site-header .nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-emerald, #C2A476);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--color-accent-glow, rgba(194, 164, 118, 0.35));
  transition: width 0.25s var(--ease-spring);
}

.nav-link:hover,
#site-header nav a:hover,
.site-header .nav-links a:hover,
.nav-link:focus-visible {
  color: var(--text-primary, #ffffff);
}

.nav-link:hover::after,
.nav-link.is-active::after,
#site-header nav a:hover::after,
.site-header .nav-links a:hover::after {
  width: 100%;
}

/* ==========================================================================
   4. Action CTA & Glassmorphic Quick Pill
   ========================================================================== */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.25rem;
  border-radius: 9999px;
  font-size: var(--text-xs, 0.8rem);
  font-weight: 600;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  background: var(--glass-bg-medium, rgba(255, 255, 255, 0.06));
  backdrop-filter: var(--glass-blur-sm, blur(8px));
  -webkit-backdrop-filter: var(--glass-blur-sm, blur(8px));
  border: 1px solid var(--glass-border-subtle, rgba(255, 255, 255, 0.08));
  color: var(--text-primary, #ffffff);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.02em;
  transition: all 0.25s var(--ease-spring);
}

.header-contact-btn:hover {
  background: var(--glass-bg-high, rgba(255, 255, 255, 0.12));
  border-color: var(--accent-emerald, #C2A476);
  color: var(--text-primary, #ffffff);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--color-accent-glow, rgba(194, 164, 118, 0.25));
}

.header-contact-btn .btn-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-emerald, #C2A476);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--accent-emerald, #C2A476);
  animation: pulse-dot 2s infinite ease-in-out;
}

/* ==========================================================================
   5. Adaptive Luminance Contrast Overrides (.on-light)
   ========================================================================== */
#site-header.on-light,
.site-header.on-light {
  background-color: rgba(244, 245, 248, 0.88);
  border-bottom-color: var(--glass-border-light, rgba(0, 0, 0, 0.12));
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

#site-header.on-light .site-header__brand,
#site-header.on-light .brand-logo {
  color: var(--color-text-dark, #0f1015);
}

#site-header.on-light .site-header__brand:hover,
#site-header.on-light .brand-logo:hover {
  color: #C2A476;
  text-shadow: 0 0 12px rgba(194, 164, 118, 0.35);
}

#site-header.on-light .nav-link,
#site-header.on-light #site-header nav a,
#site-header.on-light .site-header .nav-links a {
  color: #3b4252;
}

#site-header.on-light .nav-link:hover,
#site-header.on-light #site-header nav a:hover,
#site-header.on-light .site-header .nav-links a:hover,
#site-header.on-light .nav-link:focus-visible {
  color: var(--color-text-dark, #0f1015);
}

#site-header.on-light .nav-link::after,
#site-header.on-light #site-header nav a::after,
#site-header.on-light .site-header .nav-links a::after {
  background: #C2A476;
  box-shadow: 0 0 6px rgba(194, 164, 118, 0.4);
}

#site-header.on-light .btn--glass,
#site-header.on-light .header-contact-btn {
  background-color: rgba(15, 16, 21, 0.06);
  border-color: rgba(15, 16, 21, 0.14);
  color: var(--color-text-dark, #0f1015);
}

#site-header.on-light .btn--glass:hover,
#site-header.on-light .header-contact-btn:hover {
  background-color: rgba(15, 16, 21, 0.12);
  border-color: #C2A476;
  color: var(--color-text-dark, #0f1015);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

#site-header.on-light .header-contact-btn .btn-dot {
  background-color: #C2A476;
  box-shadow: 0 0 8px rgba(194, 164, 118, 0.6);
}

/* ==========================================================================
   6. Studio Light Section Baseline Styling (#about)
   ========================================================================== */
.about-section,
.services-section[data-theme="light"],
[data-theme="light"] {
  background-color: var(--color-bg-light, #f4f5f8);
  color: var(--color-text-dark, #0f1015);
}

.about-section .section-title,
.about-section h2,
.about-section h3 {
  color: var(--color-text-dark, #0f1015);
}

.about-section .section-desc,
.about-section p {
  color: #4a525d;
}

.about-section .glass-card {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.about-section .glass-card:hover {
  border-color: var(--accent-emerald, #C2A476);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   7. Focus Visible & Accessibility States
   ========================================================================== */
#site-header a:focus-visible,
#site-header button:focus-visible {
  outline: 2px solid var(--accent-emerald, #C2A476);
  outline-offset: 3px;
  border-radius: 4px;
}

#site-header.on-light a:focus-visible,
#site-header.on-light button:focus-visible {
  outline-color: #C2A476;
}

/* ==========================================================================
   8. Responsive Adaptations
   ========================================================================== */
@media (max-width: 900px) {
  .nav-list {
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  #site-header,
  .site-header {
    height: 64px;
  }

  .site-header__nav,
  .nav-links {
    display: none; /* Streamlined mobile layout; full navigation present in footer */
  }

  .header-contact-btn {
    padding: 0.45rem 0.95rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 420px) {
  .site-header__container,
  .header-inner {
    padding: 0 1rem;
  }

  .site-header__brand,
  .brand-logo {
    font-size: 0.95rem;
  }

  .header-contact-btn .btn-text {
    display: none;
  }

  .header-contact-btn {
    padding: 0.5rem;
    border-radius: 50%;
  }

  .header-contact-btn .btn-dot {
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #site-header,
  .site-header,
  .site-header *,
  .nav-link::after,
  .header-contact-btn {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
