/* Awan Bor Pile — Editorial light theme */

:root {
  --paper:  #FAFAF7;
  --alt:    #F0F2F5;
  --ink:    #111111;
  --muted:  #6B6B6B;
  --line:   #E2E5EA;
  --accent: #1E3A5F;       /* navy — from logo "BOR PILE" */
  --accent-bright: #2B8CD9; /* bright blue — from logo "AWAN" */
  --wa:     #25D366;
}

* { -webkit-font-smoothing: antialiased; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-feature-settings: "ss01", "cv11";
}

.font-serif {
  font-family: 'Instrument Serif', 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.font-mono {
  font-family: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;
  letter-spacing: 0;
}

/* Section label */
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: "§ ";
  color: var(--accent);
}

/* Hairline divider */
.hr-line {
  border: 0;
  border-top: 1px solid var(--line);
}

/* Buttons — minimal */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.925rem;
  padding: 0.75rem 1.25rem;
  border-radius: 2px;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  line-height: 1;
}
.btn-primary {
  background: var(--accent);
  color: var(--paper);
}
.btn-primary:hover { background: var(--accent-bright); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* Inline link — editorial underline */
.link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color 0.15s;
}
.link:hover { color: var(--accent); }

/* Nav */
.nav-link {
  color: var(--muted);
  font-size: 0.925rem;
  font-weight: 500;
  position: relative;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--accent);
  transition: background 0.3s;
}

/* Header scroll effects — transparent over hero, solid when scrolled, compact */
header {
  transition: background-color 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}
header > div { transition: height 0.3s ease; }

/* Logo: subtle white ring on dark bg */
html body header.header-transparent img[alt*="logo"] {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.3);
}

/* Compact state when scrolled past threshold */
header.header-scrolled > div { height: 56px; }
header.header-scrolled img[alt*="logo"] { width: 32px; height: 32px; }

/* Scroll progress bar — hidden at zero width */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-bright) 100%);
  z-index: 60;
  transition: width 0.08s linear, opacity 0.2s;
  pointer-events: none;
  opacity: 0;
}
.scroll-progress.active { opacity: 1; }

/* Spec row for diameter table */
.spec-row {
  display: grid;
  grid-template-columns: 90px 1fr 140px;
  gap: 2rem;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}
.spec-row:first-child { border-top: 1px solid var(--line); }
.spec-row .spec-dia {
  font-family: 'Instrument Serif', serif;
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1;
}
.spec-row .spec-dia sup {
  font-size: 0.9rem;
  color: var(--muted);
  margin-left: 2px;
  vertical-align: top;
}
.spec-row .spec-depth {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
}
@media (max-width: 640px) {
  .spec-row {
    grid-template-columns: 70px 1fr;
  }
  .spec-row .spec-depth { grid-column: 1 / -1; text-align: left; padding-top: 0.5rem; }
}

/* Form */
.input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  padding: 0.75rem 0;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s;
}
.input:focus {
  outline: none;
  border-color: var(--ink);
}
.input::placeholder { color: #B5B2A8; }
textarea.input { border: 1px solid var(--line); padding: 0.75rem; }
textarea.input:focus { border-color: var(--ink); }
select.input { padding-right: 1rem; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23111' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.25rem center; }

/* Photo caption */
figcaption {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.75rem;
  letter-spacing: 0.02em;
}

/* Mobile menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.mobile-menu.open { transform: translateX(0); }

/* Project hover */
.proj-link { display: block; transition: opacity 0.15s; }
.proj-link:hover { opacity: 0.85; }

/* Details FAQ */
details { border-bottom: 1px solid var(--line); }
details summary { cursor: pointer; list-style: none; padding: 1.25rem 0; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-weight: 500; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-family: 'Instrument Serif', serif; font-size: 1.5rem; color: var(--accent); line-height: 1; transition: transform 0.2s; }
details[open] summary::after { content: "−"; }
details > *:not(summary) { padding-bottom: 1.25rem; color: var(--muted); max-width: 70ch; line-height: 1.65; }

/* Prose */
.prose p { max-width: 62ch; line-height: 1.7; color: var(--muted); }
.prose p + p { margin-top: 1rem; }

/* WA pill — subtle, inline only */
.wa-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
}
.wa-inline svg { color: var(--wa); }
.wa-inline:hover { color: var(--accent); }

/* Video / img */
video, img { display: block; max-width: 100%; }

/* Hero video background */
.hero-wrap { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
  pointer-events: none;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(250,250,247,0.55) 0%, rgba(250,250,247,0.92) 100%);
}
.hero-content { position: relative; z-index: 2; }

/* Figure slot with background-image fallback (shows bg-alt if file missing) */
.img-slot {
  background-color: var(--alt);
  background-size: cover;
  background-position: center;
}

/* Photo frame — clean padded frame, no offset backdrop, no tags */
.photo-mount { position: relative; display: block; }
.photo-frame {
  position: relative;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(17,17,17,0.03);
}
.photo-frame-inner {
  position: relative;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-color: var(--alt);
  overflow: hidden;
}
.photo-frame video,
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Hidden — user asked to remove tags and captions */
.photo-tag, .photo-caption { display: none; }

/* Hero slider inside a frame */
.hero-slider.photo-frame { padding: 8px; }
.hero-slider.photo-frame .hero-slide { inset: 8px; }
.hero-slider.photo-frame .hero-slider-overlay { inset: 8px; }

/* FULL-BLEED HERO BACKGROUND CAROUSEL — blur + overlay + text on top */
.hero-bg {
  position: relative;
  overflow: hidden;
  background: #0A0F1C;
}
.hero-bg-slides { position: absolute; inset: 0; z-index: 0; }
.hero-bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #0A0F1C;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1.4s cubic-bezier(0.22, 1, 0.36, 1),
              transform 10s ease-out;
  filter: blur(3px);
  will-change: opacity, transform;
}
.hero-bg-slide.active { opacity: 1; transform: scale(1); }
.hero-bg-slide video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(10,15,28,0.75) 0%, rgba(10,15,28,0.45) 55%, rgba(10,15,28,0.15) 100%),
    linear-gradient(180deg, rgba(10,15,28,0.25) 0%, rgba(10,15,28,0.6) 100%);
}
.hero-bg-content {
  position: relative;
  z-index: 10;
  color: #fff;
}
.hero-bg-content .eyebrow { color: rgba(255,255,255,0.75); }
.hero-bg-content .eyebrow::before { color: var(--accentBright, #2B8CD9); }
.hero-bg-content h1 { color: #fff; }
.hero-bg-content h1 .italic { color: #fff; opacity: 0.85; }

/* Hero copy swap — grid stack, fade between */
.hero-bg-copy-container { display: grid; }
.hero-bg-copy {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.hero-bg-copy.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Vignette for cinematic depth */
.hero-bg-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.45) 100%);
}

/* Bottom bar: counter · dots · scroll — editorial strip */
.hero-bg-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 15;
  padding: 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: #fff;
}
@media (min-width: 1024px) {
  .hero-bg-footer { padding: 2rem 3rem; }
}
.hero-bg-counter {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: #fff;
  min-width: 70px;
}
.hero-bg-dots {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: center;
}
.hero-bg-dot {
  width: 28px;
  height: 2px;
  background: rgba(255,255,255,0.25);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s, width 0.3s;
}
.hero-bg-dot.active {
  background: #fff;
  width: 52px;
}
.hero-bg-scroll {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: color 0.2s;
  min-width: 70px;
  justify-content: flex-end;
}
.hero-bg-scroll:hover { color: #fff; }
.hero-bg-scroll span { animation: scrollBounce 2s ease-in-out infinite; }
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

/* ===== MOBILE RESPONSIVE POLISH ===== */
@media (max-width: 640px) {
  /* Hero carousel: reduce height & padding */
  .hero-bg-content {
    min-height: 68vh !important;
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
  }
  .hero-bg-content h1 {
    font-size: 2.75rem !important;
    line-height: 1.02 !important;
    margin-bottom: 1rem !important;
  }
  .hero-bg-content p {
    font-size: 1rem !important;
  }
  .hero-bg-copy-container { margin-bottom: 2rem !important; }

  /* Hero footer bar compact */
  .hero-bg-footer {
    padding: 1rem !important;
    gap: 0.5rem !important;
  }
  .hero-bg-counter, .hero-bg-scroll {
    font-size: 0.6rem !important;
    min-width: 46px !important;
  }
  .hero-bg-dot { width: 14px !important; }
  .hero-bg-dot.active { width: 24px !important; }

  /* Floating WA — smaller + no label (already handled, enforce) */
  .wa-float {
    bottom: 1rem !important;
    right: 1rem !important;
    padding: 0.65rem !important;
  }
  .wa-float .wa-label { display: none !important; }

  /* Buttons more tap-friendly */
  .btn { padding: 0.9rem 1.3rem; font-size: 0.95rem; }

  /* Section padding compact */
  section { padding-left: 1rem; padding-right: 1rem; }
  section > div.max-w-6xl { padding-left: 0 !important; padding-right: 0 !important; }

  /* Headings tone down */
  h1.font-serif { font-size: 2.5rem !important; line-height: 1.05 !important; }
  h2.font-serif { font-size: 2rem !important; line-height: 1.1 !important; }
  h3.font-serif { font-size: 1.35rem !important; }

  /* Spec row — ensure tidy */
  .spec-row .spec-dia { font-size: 2rem !important; }

  /* Footer mark smaller */
  .site-footer .footer-mark {
    font-size: 8rem !important;
    bottom: -15px !important;
    right: -5px !important;
  }

  /* Header compact */
  header > div { padding-left: 1rem; padding-right: 1rem; height: 56px; }
  header img[alt*="logo"] { width: 32px !important; height: 32px !important; }
  header .font-serif { font-size: 1rem; }

  /* Photo frame padding smaller */
  .photo-frame { padding: 5px; }

  /* Form inputs tappable */
  .input { padding: 0.9rem 0 !important; font-size: 1rem; }

  /* Mobile menu wider */
  #mobileMenu { width: 85vw; max-width: 320px; }
}

/* Tablet tweaks (641-1023px) */
@media (min-width: 641px) and (max-width: 1023px) {
  .hero-bg-content { min-height: 75vh !important; }
  .hero-bg-content h1 { font-size: 4.5rem !important; }
}

/* Prevent horizontal scroll — use 'clip' (not 'hidden') so sticky header still works */
html, body { overflow-x: clip; }
img, video { max-width: 100%; height: auto; }

/* Mobile menu: readable regardless of header transparent/scrolled state */
html body header #mobileMenu {
  background: var(--paper) !important;
  color: var(--ink) !important;
  box-shadow: -20px 0 40px rgba(0,0,0,0.15);
}
html body header #mobileMenu a,
html body header #mobileMenu span,
html body header.header-transparent #mobileMenu a,
html body header.header-transparent #mobileMenu span {
  color: var(--ink) !important;
}
html body header #mobileMenu .text-muted,
html body header.header-transparent #mobileMenu .text-muted {
  color: var(--muted) !important;
}
html body header #mobileMenu svg,
html body header.header-transparent #mobileMenu svg {
  color: var(--accent) !important;
}

/* Dark footer — navy gradient, bookends the hero */
.site-footer {
  background:
    radial-gradient(1200px 400px at 85% 0%, rgba(43,140,217,0.12) 0%, transparent 60%),
    linear-gradient(180deg, #1E3A5F 0%, #0A1322 100%);
  color: rgba(255,255,255,0.72);
  border-top: 0;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(43,140,217,0.5) 50%, transparent 100%);
}
.site-footer .font-serif { color: #fff; }
.site-footer h4 { color: #fff; }
.site-footer .text-muted { color: rgba(255,255,255,0.4) !important; }
.site-footer .font-mono { color: rgba(255,255,255,0.45); }
.site-footer p { color: rgba(255,255,255,0.65); }
.site-footer a { color: rgba(255,255,255,0.72); transition: color 0.2s; }
.site-footer a:hover { color: #2B8CD9; }
.site-footer .hr-line { border-top-color: rgba(255,255,255,0.08); }
/* Logo circle brighter on dark bg */
.site-footer svg circle { stroke: #2B8CD9; }
/* Big display accent number glow */
.site-footer .footer-mark {
  position: absolute;
  bottom: -40px;
  right: -10px;
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 16rem;
  color: rgba(255,255,255,0.04);
  line-height: 0.8;
  pointer-events: none;
  user-select: none;
}

/* White button variant for dark hero */
.btn-white {
  background: #fff;
  color: var(--accent);
  border: 1px solid #fff;
}
.btn-white:hover {
  background: transparent;
  color: #fff;
}
.link-white {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: text-decoration-color 0.2s;
}
.link-white:hover { text-decoration-color: #fff; }

/* Hero slider — crossfade with editorial overlay */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: var(--alt);
  /* Subtle inner border for premium feel */
  box-shadow: inset 0 0 0 1px rgba(17,17,17,0.04);
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 7s ease-out;
}
.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}
.hero-slider-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 60%, rgba(0,0,0,0.55) 100%);
}
.hero-slider-overlay > * { pointer-events: auto; }

.hero-brand {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.85);
  background: rgba(30,58,95,0.75);
  padding: 0.35rem 0.6rem;
  border-radius: 2px;
  backdrop-filter: blur(4px);
  text-transform: uppercase;
}

.hero-slider-controls {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
}
.hero-counter {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: #fff;
  background: rgba(17,17,17,0.5);
  padding: 0.35rem 0.6rem;
  border-radius: 2px;
  backdrop-filter: blur(4px);
}
.hero-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.92);
  color: var(--accent);
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.hero-nav:hover {
  background: var(--accent);
  color: #fff;
}

.hero-dots {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  display: flex;
  gap: 4px;
}
.hero-dot {
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,0.4);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, width 0.2s;
}
.hero-dot.active {
  background: #fff;
  width: 28px;
}

/* Modern scroll animation — zoom in/out bidirectional */
body.anim [data-anim] {
  opacity: 0;
  transform: scale(0.94) translateY(28px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
body.anim [data-anim].visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}
/* Stagger children inside animated blocks */
body.anim [data-anim-group] > * {
  opacity: 0;
  transform: scale(0.96) translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
body.anim [data-anim-group].visible > * { opacity: 1; transform: scale(1) translateY(0); }
body.anim [data-anim-group].visible > *:nth-child(1) { transition-delay: 0s; }
body.anim [data-anim-group].visible > *:nth-child(2) { transition-delay: 60ms; }
body.anim [data-anim-group].visible > *:nth-child(3) { transition-delay: 120ms; }
body.anim [data-anim-group].visible > *:nth-child(4) { transition-delay: 180ms; }
body.anim [data-anim-group].visible > *:nth-child(5) { transition-delay: 240ms; }
body.anim [data-anim-group].visible > *:nth-child(6) { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  body.anim [data-anim],
  body.anim [data-anim-group] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Floating WA — minimal pill, brand-cohesive navy */
.wa-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0.75rem 0.875rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(30, 58, 95, 0.25), 0 2px 4px rgba(0,0,0,0.05);
  transition: background 0.15s, transform 0.15s;
  text-decoration: none;
}
.wa-float:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
}
.wa-float .wa-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  align-items: center;
  justify-content: center;
}
.wa-float .wa-icon svg { width: 14px; height: 14px; }
.wa-float .wa-label { padding-right: 0.125rem; }
@media (max-width: 480px) {
  .wa-float { right: 1rem; bottom: 1rem; padding: 0.7rem; }
  .wa-float .wa-label { display: none; }
}


/* Header polish — consistent slim, better logo scale */
header > div.max-w-6xl {
  height: 60px;
}
@media (min-width: 1024px) {
  header > div.max-w-6xl { height: 68px; }
}
header img[alt*="logo"] {
  width: 36px !important;
  height: 36px !important;
}
header .font-serif { font-size: 1.05rem; letter-spacing: -0.01em; }
header.header-scrolled > div.max-w-6xl { height: 52px; }
header.header-scrolled img[alt*="logo"] { width: 28px !important; height: 28px !important; }


/* Nav pill — breathable rounded */
.nav-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav-pill:hover { color: var(--ink); background: rgba(0,0,0,0.04); }
.nav-pill.active { color: var(--ink); background: rgba(30,58,95,0.08); }

/* Header scrolled — subtle bg appears */
header.header-scrolled {
  background: rgba(250, 250, 247, 0.85) !important;
  border-bottom-color: var(--line) !important;
  box-shadow: 0 1px 20px rgba(17,17,17,0.04);
}

/* Mobile menu nav items */
.mobile-nav {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.2s;
}
.mobile-nav:hover { background: rgba(0,0,0,0.04); color: var(--ink); }
.mobile-nav.active { color: var(--ink); background: rgba(30,58,95,0.08); }


/* On non-hero pages, apply light bg immediately (no hero to float over) */
body:not(:has(.hero-bg)) header {
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
/* Scrolled state — bg appears smoothly */
header.header-scrolled {
  background: rgba(250, 250, 247, 0.92) !important;
  backdrop-filter: blur(16px) !important;
  border-bottom-color: var(--line) !important;
  box-shadow: 0 1px 24px rgba(17,17,17,0.04);
}

/* === HEADER FLOATING TRANSPARENT === */
header { background: transparent; border-bottom: 1px solid transparent; }
header > div.max-w-6xl { padding-top: 0.6rem; padding-bottom: 0.6rem; }

/* Non-hero pages — solid header always */
body.page-light header {
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

/* Scrolled (on hero page after passing hero) */
header.header-scrolled {
  background: rgba(250, 250, 247, 0.92) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  backdrop-filter: blur(16px) !important;
  border-bottom-color: var(--line) !important;
  box-shadow: 0 1px 24px rgba(17,17,17,0.04);
}

/* Mobile: better tap target for hamburger on dark hero bg */
@media (max-width: 1023px) {
  header.header-transparent #menuBtn svg { color: #fff !important; }
}

/* HEADER TRANSPARENT — fully blend into hero (no bg, no blur, no border) */
html body header.header-transparent,
html body header.header-transparent.sticky {
  background: transparent !important;
  background-color: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}
html body header.header-transparent *,
html body header.header-transparent .nav-link,
html body header.header-transparent a,
html body header.header-transparent span {
  color: #ffffff !important;
}
html body header.header-transparent .nav-link { color: rgba(255,255,255,0.85) !important; }
html body header.header-transparent .nav-link:hover,
html body header.header-transparent .nav-link.active { color: #fff !important; }
html body header.header-transparent .nav-link.active::after { background: #fff !important; }
html body header.header-transparent #menuBtn svg { color: #fff !important; }
html body header.header-transparent img[alt*="logo"] {
  box-shadow: 0 0 0 1.5px rgba(255,255,255,0.4);
}


/* === FIX: header fixed-overlap instead of sticky (so hero covers underneath) === */
header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 40;
}
/* Non-hero pages: push content down since header is floating fixed */
body.page-light { padding-top: 64px; }
@media (min-width: 1024px) { body.page-light { padding-top: 72px; } }
