/* shared/shared.css
   Brave Life header, mobile nav, footer. Consumes tokens.css; assumes base.css.
   Load order on every page: tokens.css → base.css → shared.css → page CSS. */

/* ========== HEADER ========== */
.header {
  position: fixed; inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: center;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--color-border);
  box-shadow: inset 0 1px 0 rgba(250,246,241,0.06), 0 4px 20px rgba(0,0,0,0.4);
  z-index: var(--z-header);
}
/* Slow orange/purple underglow: the one atmospheric use of purple */
.header::after {
  content: ''; position: absolute; bottom: -6px; left: -40px; right: -40px; height: 12px;
  background:
    radial-gradient(ellipse at center, var(--primary-a50) 0%, var(--primary-a0) 70%),
    radial-gradient(ellipse at center, var(--atmos-a50) 0%, var(--atmos-a0) 70%);
  background-size: 50% 100%, 50% 100%; background-position: 0% 0, 50% 0; background-repeat: no-repeat;
  animation: navGlow 11.2s linear infinite; filter: blur(14px); pointer-events: none;
}
@keyframes navGlow {
  0%   { background-position: -20% 0, 30% 0; }
  50%  { background-position: 70% 0, 120% 0; }
  100% { background-position: -20% 0, 30% 0; }
}
.header-inner {
  width: 100%; max-width: var(--container-wide);
  display: flex; align-items: center; gap: var(--space-4);
  padding: 0 var(--gutter);
}
.header-logo { flex: none; display: flex; align-items: center; min-height: 44px; }
.header-logo img { height: 32px; width: auto; }
.header-nav { display: none; flex: 1; align-items: center; justify-content: center; gap: var(--space-6); }
.header-nav a {
  font-weight: 800; font-size: var(--text-xs); letter-spacing: 0.055em; text-transform: uppercase;
  color: rgba(250,246,241,0.82); text-decoration: none; white-space: nowrap;
  padding: 12px 2px; position: relative; transition: color var(--dur-fast);
}
.header-nav a:hover, .header-nav a.active, .header-nav a[aria-current="page"] { color: var(--color-text); }
.header-nav a[aria-current="page"]::after {
  content: ''; position: absolute; left: 2px; right: 2px; bottom: 6px; height: 2px;
  background: var(--brand-orange); border-radius: 2px;
}
.header-cta { flex: none; margin-left: auto; display: flex; align-items: center; gap: var(--space-2); }
.header-cta .btn { --btn-h: 44px; }
.header-cta .btn > span { padding-inline: var(--space-4); }

/* Hamburger (≤1024px) */
.hamburger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; background: none; border: 0; border-radius: var(--radius-sm);
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--color-text); border-radius: 2px; transition: transform var(--dur) var(--ease), opacity var(--dur); }
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav sheet */
.mobile-nav {
  position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
  display: none; flex-direction: column; align-items: stretch; gap: 0;
  padding: var(--space-5) var(--gutter) calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
  background: rgba(10,9,8,0.96);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  z-index: var(--z-nav); overflow-y: auto;
}
.mobile-nav[data-open="true"] { display: flex; }
.mobile-nav a.mobile-nav-link {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px; padding: 0 var(--space-2);
  font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; text-transform: uppercase; letter-spacing: 0.01em;
  color: var(--color-text); text-decoration: none; border-bottom: 1px solid var(--color-border);
}
.mobile-nav a.mobile-nav-link[aria-current="page"] { color: var(--brand-orange); }
.mobile-nav a.mobile-nav-link:hover { color: var(--brand-orange-hot); }
.mobile-nav-foot { margin-top: auto; padding-top: var(--space-6); display: grid; gap: var(--space-3); }
.mobile-nav-foot .btn { width: 100%; }
.mobile-nav-foot p { color: var(--color-text-muted); font-size: var(--text-sm); text-align: center; margin: 0; }

@media (min-width: 1025px) {
  .header-logo img { height: 40px; }
  .header-nav { display: flex; }
  .hamburger, .mobile-nav { display: none !important; }
}
@media (max-width: 480px) {
  .header-cta .btn > span { padding-inline: 14px; }
  .header-cta .cta-now { display: none; }
}
/* At 320px the pill's right edge measured 326px - it spilled past the viewport
   and was only invisible because the header clips. */
@media (max-width: 360px) {
  .header-cta { gap: var(--space-1); }
  .header-cta .btn > span { padding-inline: 10px; }
}

/* Legacy alias while pages migrate to .btn--ring */
.btn-conic { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 1px; border-radius: var(--radius-pill); background: var(--ring-gradient); color: var(--color-text); text-decoration: none; font-weight: 800; transition: transform var(--dur-fast), box-shadow var(--dur); }
.btn-conic > span { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 24px; border-radius: inherit; background: var(--color-bg); font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.btn-conic:hover { transform: scale(1.02); box-shadow: var(--glow-orange-soft); }

/* ========== FOOTER ========== */
.footer { border-top: 1px solid var(--color-border); padding: var(--space-9) 0 calc(var(--space-6) + env(safe-area-inset-bottom, 0px)); background: var(--color-bg-raised); }
.footer-top { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6) var(--space-5); margin-bottom: var(--space-7); }
.footer-brand { grid-column: 1 / -1; }
.footer-brand img { height: 36px; width: auto; }
.footer-brand p { font-size: var(--text-sm); color: var(--color-text-muted); margin: var(--space-3) 0 var(--space-4); max-width: 26rem; }
.footer-socials { display: flex; gap: var(--space-2); }
.footer-socials a { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: rgba(250,246,241,0.7); transition: color var(--dur-fast), background var(--dur-fast); }
.footer-socials a:hover { color: var(--color-text); background: rgba(250,246,241,0.06); }
.footer-socials svg { width: 24px; height: 24px; }
.footer-col h4 { font-size: var(--text-md); font-weight: 700; margin: 0 0 var(--space-3); }
.footer-col a { display: flex; align-items: center; min-height: 44px; font-size: var(--text-sm); color: var(--color-text-muted); text-decoration: none; padding: 4px 0; line-height: 1.4; transition: color var(--dur-fast); }
.footer-col a:hover { color: var(--color-text); }
.footer-bottom { display: flex; flex-direction: column; gap: var(--space-3); align-items: center; text-align: center; padding-top: var(--space-5); border-top: 1px solid var(--color-border); font-size: var(--text-sm); color: var(--color-text-muted); }
.footer-bottom-links { display: flex; gap: var(--space-2); }
.footer-bottom-links a { color: var(--color-text-muted); text-decoration: none; padding: 12px 10px; display: inline-block; }
.footer-bottom-links a:hover { color: var(--color-text); }

@media (min-width: 768px) {
  .footer-top { grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-8); }
  .footer-brand { grid-column: auto; }
  .footer-brand img { height: 44px; }
  .footer-brand p { font-size: var(--text-md); }
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}
