/*
 * Archive of American Radio — fe2-inspired grayscale theme
 * Spacing + polish borrowed from Radio Index; palette stays black/white/gray.
 */

:root {
  --base-size-2: 2px;
  --base-size-4: 4px;
  --base-size-8: 8px;
  --base-size-12: 12px;
  --base-size-16: 16px;
  --page-x: 16px;
  --action-target: 44px;
  --item-surface-radius: 22px;
  --control-radius: 999px;

  --aar-chrome: #f2f2f6;
  --aar-bg: #ffffff;
  --aar-bg-gradient: linear-gradient(to bottom, var(--aar-chrome) 0%, var(--aar-bg) 100%);
  --aar-fg: #111111;
  --aar-muted: rgba(17, 17, 17, 0.68);
  --aar-muted-soft: rgba(17, 17, 17, 0.5);
  --aar-separator: rgba(60, 60, 67, 0.18);
  --aar-control-bg: #ffffff;
  --aar-soft: rgba(17, 17, 17, 0.06);
  --aar-surface-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

body[data-site="archive"] {
  --accent-color: var(--aar-fg);
  --color-fill-heading: var(--aar-fg);
  --color-fill-secondary: var(--aar-muted);
  --border: var(--aar-separator);
}

html[data-page="home"] {
  background: var(--aar-bg-gradient);
  color-scheme: light;
}

html[data-page="home"] body {
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html[data-page="subpage"] body {
  background: var(--aar-bg-gradient);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Header (fe2 chrome) ── */
body[data-site="archive"] .sp-header {
  height: var(--action-target);
  background: rgba(242, 242, 246, 0.82);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  border-bottom: 1px solid var(--aar-separator);
}

body[data-site="archive"] .sp-header-inner {
  max-width: 920px;
  padding: 0 var(--page-x);
}

body[data-site="archive"] .sp-header-name {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

body[data-site="archive"] .sp-nav .nav-link {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--aar-muted);
  border-radius: var(--control-radius);
}

body[data-site="archive"] .sp-nav .nav-link:hover,
body[data-site="archive"] .sp-nav .nav-link.active {
  color: var(--aar-fg);
  background: var(--aar-soft);
}

body[data-site="archive"] .sp-nav-cta {
  min-height: 32px;
  padding: 6px 16px;
  margin-left: var(--base-size-8);
  border-radius: var(--control-radius);
  font-size: 14px;
  font-weight: 600;
  background: var(--aar-fg);
  color: var(--aar-bg);
}

body[data-site="archive"] .sp-nav-cta:hover {
  opacity: 0.88;
}

/* ── Footer ── */
body[data-site="archive"] .sp-footer {
  background: transparent;
  border-top: 1px solid var(--aar-separator);
  padding: calc(var(--base-size-16) + var(--base-size-8)) 0;
}

body[data-site="archive"] .sp-footer-inner {
  max-width: 920px;
  padding: 0 var(--page-x);
  font-size: 13px;
  color: var(--aar-muted-soft);
}

body[data-site="archive"] .sp-footer a {
  color: var(--aar-muted);
  text-decoration: none;
}

body[data-site="archive"] .sp-footer a:hover {
  color: var(--aar-fg);
}

/* ── Homepage canvas ── */
body[data-site="archive"] .archive-page {
  background: transparent;
  color: var(--aar-fg);
}

body[data-site="archive"] .hero {
  padding: calc(var(--action-target) + var(--base-size-16) * 3) 0 calc(var(--base-size-16) * 4);
  background: transparent;
  border-bottom: 1px solid var(--aar-separator);
}

body[data-site="archive"] .hero-badge {
  background: var(--aar-control-bg);
  border-color: var(--aar-separator);
  color: var(--aar-muted);
  border-radius: var(--control-radius);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body[data-site="archive"] .hero-line-1 {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 500;
  color: var(--aar-muted);
  letter-spacing: -0.02em;
}

body[data-site="archive"] .hero-line-2 {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

body[data-site="archive"] .hero-subtitle {
  font-size: 17px;
  line-height: 1.55;
  color: var(--aar-muted);
}

body[data-site="archive"] a.btn-primary,
body[data-site="archive"] a.btn-primary:link,
body[data-site="archive"] a.btn-primary:visited,
body[data-site="archive"] .btn-donate,
body[data-site="archive"] .nl-form button {
  background: var(--aar-fg);
  color: var(--aar-bg);
  -webkit-text-fill-color: var(--aar-bg);
  border-radius: var(--control-radius);
  font-weight: 600;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

body[data-site="archive"] a.btn-primary:hover,
body[data-site="archive"] .btn-donate:hover {
  opacity: 0.88;
  color: var(--aar-bg);
  -webkit-text-fill-color: var(--aar-bg);
}

body[data-site="archive"] .btn-outline {
  border-radius: var(--control-radius);
  border-color: var(--aar-separator);
  background: var(--aar-control-bg);
  font-weight: 600;
}

body[data-site="archive"] .btn-outline:hover {
  border-color: rgba(17, 17, 17, 0.28);
  background: var(--aar-soft);
}

/* ── Sections ── */
body[data-site="archive"] .section {
  padding: calc(var(--base-size-16) * 4) 0;
}

body[data-site="archive"] .section + .section {
  border-top-color: var(--aar-separator);
}

body[data-site="archive"] .section-alt {
  background: transparent;
}

body[data-site="archive"] .container {
  max-width: 720px;
  padding: 0 var(--page-x);
}

body[data-site="archive"] .section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--aar-muted-soft);
}

body[data-site="archive"] .section-intro,
body[data-site="archive"] .editorial-body,
body[data-site="archive"] .genres-text,
body[data-site="archive"] .pillar p,
body[data-site="archive"] .check-list li,
body[data-site="archive"] .faq-item p {
  color: var(--aar-muted);
  font-size: 15px;
  line-height: 1.65;
}

body[data-site="archive"] .editorial-lede {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.025em;
  color: var(--aar-fg);
}

body[data-site="archive"] .section-intro a.text-link,
body[data-site="archive"] .section-intro a.text-link:visited {
  color: var(--aar-fg);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(17, 17, 17, 0.25);
}

body[data-site="archive"] .section-intro a.text-link:hover {
  text-decoration-color: var(--aar-fg);
}
