/* ============================================================
   AETERNUM LABS — LAYOUT
   Announcement bar, sticky nav, footer
   ============================================================ */

/* ---- Announcement Bar ---- */
.announcement-bar {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  font-weight: var(--semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  overflow: hidden;
  height: 36px;
  display: flex;
  align-items: center;
}

.marquee-wrapper { overflow: hidden; width: 100%; }

.marquee-track {
  display: flex;
  white-space: nowrap;
  animation: marquee-scroll 35s linear infinite;
  width: max-content;
}

.announcement-bar:hover .marquee-track { animation-play-state: paused; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---- Site Nav — Dark Luxury Glass ---- */

@keyframes nav-aurora {
  0%   { opacity: 0.6; transform: translateX(-3%) scaleX(1.0); }
  50%  { opacity: 1.0; transform: translateX(0%)  scaleX(1.06); }
  100% { opacity: 0.6; transform: translateX(3%)  scaleX(1.0); }
}

@keyframes gold-pulse {
  0%,100% { opacity: 0.55; }
  50%     { opacity: 1.0;  }
}

@keyframes glass-sweep {
  0%   { transform: translateX(-140%) skewX(-22deg); opacity: 0;   }
  6%   { opacity: 1; }
  100% { transform: translateX(320%)  skewX(-22deg); opacity: 0;   }
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);

  /* Dark luxury glass — navy tinted, strong blur */
  background: linear-gradient(
    180deg,
    rgba(8, 20, 42, 0.58) 0%,
    rgba(13, 31, 56, 0.46) 100%
  );
  backdrop-filter: blur(44px) saturate(240%) brightness(1.06);
  -webkit-backdrop-filter: blur(44px) saturate(240%) brightness(1.06);

  border: none;

  /* Multi-layer shadow — top highlight + gold glow bottom + deep drop */
  box-shadow:
    inset 0 1px 0   rgba(255, 255, 255, 0.14),
    inset 0 -1px 0  rgba(201, 169, 110, 0.45),
    0 1px  0        rgba(201, 169, 110, 0.22),
    0 2px  12px     rgba(201, 169, 110, 0.08),
    0 16px 72px     rgba(0,   0,   0,   0.40),
    0 4px  24px     rgba(0,   0,   0,   0.20);

  transition: padding 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
  padding: 22px 0;
  isolation: isolate;
}

/* Aurora radial glow — warm gold pooling at edges */
.site-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 220% at  8% 50%, rgba(201,169,110,0.13) 0%, transparent 60%),
    radial-gradient(ellipse 55% 220% at 92% 50%, rgba(201,169,110,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 35% 220% at 50% 50%, rgba(120,160,220,0.05) 0%, transparent 55%);
  animation: nav-aurora 9s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: -1;
}

/* Gold hairline border — glowing, centered fade */
.site-nav::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent            0%,
    rgba(201,169,110,0.20) 10%,
    rgba(201,169,110,0.95) 50%,
    rgba(201,169,110,0.20) 90%,
    transparent            100%
  );
  box-shadow: 0 0 16px rgba(201,169,110,0.55), 0 0 40px rgba(201,169,110,0.20);
  animation: gold-pulse 4s ease-in-out infinite;
  pointer-events: none;
}

/* Shimmer sweep across glass surface */
.site-nav .glass-shimmer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}
.site-nav .glass-shimmer::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 38%; height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.04),
    rgba(255,255,255,0.09),
    rgba(255,255,255,0.04),
    transparent
  );
  animation: glass-sweep 11s ease-in-out infinite;
  animation-delay: 2s;
}

/* Nav links — white text on dark glass */
.nav-link {
  color: rgba(255, 255, 255, 0.78) !important;
  letter-spacing: 0.10em;
}
.nav-link:hover { color: rgba(255, 255, 255, 1) !important; }
.nav-link::after { background: var(--gold) !important; }

.nav-logo__text {
  color: rgba(255, 255, 255, 0.96) !important;
  letter-spacing: 0.30em;
}

.nav-cart {
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: rgba(255, 255, 255, 0.80) !important;
}
.nav-cart:hover { border-color: var(--gold) !important; color: var(--gold) !important; }

/* Scrolled — slightly more opaque, tighter */
.site-nav.scrolled {
  padding: 13px 0;
  background: linear-gradient(
    180deg,
    rgba(8, 20, 42, 0.68) 0%,
    rgba(13, 31, 56, 0.58) 100%
  );
  box-shadow:
    inset 0 1px 0   rgba(255, 255, 255, 0.18),
    inset 0 -1px 0  rgba(201, 169, 110, 0.50),
    0 1px  0        rgba(201, 169, 110, 0.28),
    0 2px  14px     rgba(201, 169, 110, 0.10),
    0 24px 96px     rgba(0,   0,   0,   0.50),
    0 6px  32px     rgba(0,   0,   0,   0.25);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 13px;
  font-weight: var(--medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  position: relative;
  padding-bottom: 2px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--base);
}
.nav-link:hover::after { width: 100%; }

.nav-logo { text-align: center; flex-shrink: 0; }
.nav-logo__text {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: var(--semibold);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--navy);
}

.nav-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid rgba(13,31,56,0.2);
  border-radius: 50%;
  font-size: 12px;
  font-weight: var(--semibold);
  color: var(--navy);
  transition: border-color var(--base);
}
.nav-cart:hover { border-color: var(--gold); }

.nav-cta { padding: 12px 24px; font-size: 12px; }

@media (max-width: 1024px) {
  .nav-left, .nav-right { gap: 20px; }
  .nav-cta { display: none; }
}
@media (max-width: 768px) {
  .nav-left { display: none; }
  .nav-right { gap: 16px; }
  .site-nav { padding: 16px 0; }
}

/* ---- Hamburger Button ---- */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.nav-hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
  border-radius: 2px;
}
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-right .nav-link { display: none; }
  .nav-right { gap: 8px; }
}

/* ---- Mobile Drawer ---- */
.mobile-drawer {
  position: fixed;
  top: 0; right: 0;
  width: calc(100% - 56px);
  max-width: 340px;
  height: 100%;
  background: var(--cream-warm);
  z-index: calc(var(--z-nav) + 10);
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-drawer.is-open { transform: translateX(0); }

.mobile-drawer__inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 100px 40px 48px;
}

.mobile-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-drawer__link {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: var(--thin);
  color: var(--navy);
  padding: 16px 0;
  border-bottom: 1px solid rgba(13,31,56,0.07);
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: block;
}
.mobile-drawer__link:hover {
  color: var(--gold);
  padding-left: 8px;
}

.mobile-drawer__footer {
  margin-top: 48px;
}
.mobile-drawer__compliance {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--blue-gray);
  text-transform: uppercase;
  text-align: center;
  margin-top: 24px;
  line-height: 1.7;
}

/* Overlay */
.mobile-drawer__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13,31,56,0.5);
  z-index: calc(var(--z-nav) + 9);
  opacity: 0;
  transition: opacity 0.38s ease;
}
.mobile-drawer__overlay.is-visible {
  display: block;
  opacity: 1;
}

/* ---- Drawer Close Button ---- */
.mobile-drawer__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.mobile-drawer__close span {
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
}
.mobile-drawer__close span:nth-child(1) { transform: rotate(45deg); }
.mobile-drawer__close span:nth-child(2) { transform: rotate(-45deg); }
.mobile-drawer__close:hover span { background: var(--gold); }

/* Prevent body scroll when drawer open */
body.drawer-open { overflow: hidden; }

/* Float hamburger above drawer as the X close button — backup for non-fixed contexts */
body.drawer-open .nav-hamburger {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: calc(var(--z-nav) + 30);
}

/* Float hamburger above drawer as the X close button */
body.drawer-open .nav-hamburger {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: calc(var(--z-nav) + 30);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 80px 0 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 40px;
}

.footer-logo {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: var(--semibold);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--white);
  display: block;
  margin-bottom: 20px;
}

.footer-tagline {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: var(--thin);
  font-style: italic;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-nav__heading {
  font-size: 11px;
  font-weight: var(--semibold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.footer-nav__col a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
  transition: color var(--fast);
}
.footer-nav__col a:hover { color: var(--white); }

.footer-bottom { text-align: center; }

.footer-compliance {
  font-size: 11px;
  line-height: 1.8;
  color: rgba(255,255,255,0.3);
  max-width: 800px;
  margin: 0 auto 20px;
}

.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-nav { grid-template-columns: repeat(2, 1fr); }
  .site-footer { padding: 64px 0 32px; }
}
@media (max-width: 480px) {
  .footer-nav { grid-template-columns: 1fr; gap: 32px; }
  .footer-tagline { font-size: 18px; }
}

/* ============================================================
   TOUCH TARGET IMPROVEMENTS
   ============================================================ */
.nav-hamburger { width: 48px; height: 48px; }
.nav-right .nav-cart {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
}

@media (max-width: 600px) {
  .shop-filter-btn { padding: 11px 20px; }
  .pdp-trust-pill { padding: 9px 14px; }
  .mobile-drawer__inner { padding: 88px 24px 48px; }
  .mobile-drawer__link { font-size: 28px; }
  .site-footer { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
}

/* ============================================================
   PREFERS-REDUCED-MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .site-nav::before,
  .site-nav::after,
  .site-nav .glass-shimmer::after { animation: none !important; }
  .al-product-card__inner::before { animation: none !important; }
  .pdp-hero__orb { animation: none !important; }
  .calc-hero__orb { animation: none !important; }
  .marquee-track { animation-play-state: paused !important; }
}
