/*
 * site-chrome.css: shared styles for the universal nav and footer.
 *
 * Loaded by every page via <link rel="stylesheet" href="/site-chrome.css">.
 * The matching markup is injected at runtime by /site-chrome.js into
 * <div data-chrome="header"> and <div data-chrome="footer"> placeholders.
 *
 * Page-specific overrides (e.g. the home page premium-skin nav-cta) can sit
 * inline AFTER this stylesheet; the cascade respects load order.
 *
 * Edit weights, sizes, or colors here once. They propagate site-wide.
 */

/* ---- HEADER (fixed, blurred-on-scroll) ---- */
.header-wrap {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s, transform 0.3s;
}
.header-wrap.scrolled {
  background: rgba(250, 250, 250, 0.55);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom-color: rgba(0, 0, 0, 0.04);
}
header {
  max-width: 1320px; margin: 0 auto;
  height: 80px; padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between;
}
.header-logo { height: 22px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a:not(.nav-cta) {
  font-size: 0.88rem; font-weight: 500;
  color: var(--text-2); letter-spacing: 0.01em;
  transition: color 0.2s ease;
}
.nav-links a:not(.nav-cta):hover { color: var(--text); }
.nav-links a.is-current {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
}

.nav-cta {
  font-size: 0.88rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 6px 0;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--text);
  position: relative;
  transition: color 0.25s ease;
}
.nav-cta::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--text);
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.25s ease, background 0.25s ease;
}
.nav-cta:hover {
  color: var(--accent);
}
.nav-cta:hover::after {
  transform: scaleX(1);
  background: var(--accent);
}

/* ---- FOOTER ---- */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 88px 0 36px;
  margin-top: 0;
}
.footer-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 72px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--border);
}
.footer-brand-mark { height: 22px; width: auto; display: block; margin-bottom: 22px; }
.footer-brand-line {
  font-family: var(--sans);
  font-size: 1rem; line-height: 1.6;
  font-weight: 500;
  color: var(--text-2); max-width: 360px; margin: 0;
}
.footer-entity {
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-2); letter-spacing: 0.04em;
  margin-top: 28px;
}
.footer-col-label {
  font-family: var(--sans);
  font-size: 0.74rem; font-weight: 700;
  color: var(--accent-dim);
  text-transform: uppercase; letter-spacing: 0.14em;
  margin-bottom: 22px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 14px; }
.footer-col li:last-child { margin-bottom: 0; }
.footer-col a, .footer-col span {
  font-size: 0.95rem; line-height: 1.5;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.2s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.footer-col a:hover { color: var(--accent); }
.footer-col-arrow {
  font-size: 0.78rem; opacity: 0.7;
  transition: transform 0.2s ease;
}
.footer-col a:hover .footer-col-arrow { transform: translateX(2px); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px; gap: 24px; flex-wrap: wrap;
  font-size: 0.84rem; color: var(--text-2);
}
.footer-bottom-copyright { font-weight: 600; letter-spacing: 0.01em; }
.footer-legal {
  display: inline-flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
  font-weight: 500;
}
.footer-legal a {
  color: var(--text-2);
  transition: color 0.2s ease;
}
.footer-legal a:hover { color: var(--accent); }
.footer-legal-sep { color: var(--text-3); opacity: 0.55; padding: 0 4px; }

/* ---- MOBILE ---- */
@media (max-width: 768px) {
  header { padding: 0 20px; height: 64px; }
  .header-logo { height: 14px; }
  .nav-links { gap: 20px; }
  .nav-links a { display: none; }

  footer { padding: 56px 0 28px; }
  .footer-inner { padding: 0 20px; }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-bottom: 32px;
  }
  .footer-brand-mark { height: 18px; margin-bottom: 18px; }
  .footer-brand-line { font-size: 0.96rem; max-width: none; }
  .footer-entity { margin-top: 22px; font-size: 0.74rem; }
  .footer-col-label { margin-bottom: 16px; font-size: 0.7rem; }
  .footer-col li { margin-bottom: 12px; }
  .footer-col a, .footer-col span { font-size: 0.92rem; }
  .footer-bottom {
    flex-direction: column; align-items: flex-start;
    gap: 14px; padding-top: 22px; font-size: 0.78rem;
  }
}

/* ---- COOKIE CONSENT (centered modal, injected by site-chrome.js) ---- */
.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 20, 32, 0.62);
  backdrop-filter: blur(6px) saturate(1.2);
  -webkit-backdrop-filter: blur(6px) saturate(1.2);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.consent-overlay[hidden] { display: none; }
.consent-overlay.is-visible {
  opacity: 1;
}
.consent-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 40px 44px 36px;
  box-shadow: 0 24px 80px rgba(20, 20, 32, 0.18), 0 6px 24px rgba(20, 20, 32, 0.06);
  transform: scale(0.96) translateY(8px);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: auto;
}
.consent-overlay.is-visible .consent-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.consent-eyebrow {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 16px;
}
.consent-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.55rem, 3vw, 1.95rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 14px;
}
.consent-title em {
  font-style: italic;
  color: var(--accent);
  font-size: 1.04em;
}
.consent-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 26px;
}
.consent-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.consent-body a:hover { color: var(--text); }

.consent-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
  padding-top: 4px;
}
.consent-category {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 18px 20px;
}
.consent-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.consent-category-head h3 {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.005em;
}
.consent-required {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.consent-category-desc {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0;
}

.consent-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.consent-toggle input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.consent-toggle-track {
  position: relative;
  display: inline-block;
  width: 36px; height: 20px;
  background: #d4d4dc;
  border-radius: 2px;
  transition: background 0.25s ease;
}
.consent-toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.25s ease;
}
.consent-toggle input:checked + .consent-toggle-track {
  background: var(--accent);
}
.consent-toggle input:checked + .consent-toggle-track .consent-toggle-thumb {
  transform: translateX(16px);
}
.consent-toggle input:focus-visible + .consent-toggle-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.consent-btn {
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 13px 26px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.consent-btn-primary {
  background: var(--text);
  color: #ffffff;
  border-color: var(--text);
}
.consent-btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.consent-btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.consent-btn-ghost:hover {
  border-color: var(--text-3);
  background: var(--surface-2);
}
.consent-btn-text {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 12px 8px;
}
.consent-btn-text:hover {
  color: var(--accent);
}

@media (max-width: 600px) {
  .consent-overlay { padding: 16px; align-items: flex-end; }
  .consent-modal {
    padding: 28px 24px 24px;
    border-radius: 2px;
    max-height: calc(100vh - 32px);
  }
  .consent-title { font-size: 1.4rem; }
  .consent-body { font-size: 0.9rem; margin-bottom: 22px; }
  .consent-actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .consent-btn { width: 100%; text-align: center; padding: 12px 18px; }
  .consent-btn-text { padding: 10px 8px; }
  .consent-category { padding: 16px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .consent-overlay, .consent-modal { transition: opacity 0.2s ease; transform: none; }
  .consent-overlay.is-visible .consent-modal { transform: none; }
}
