/* =============================================================
   RetireeReport — main.css
   Design system: Navy #0D1F3C | Gold #B8943A
   Fonts: Playfair Display (serif) + Lato (sans-serif)
   Base: 18px, mobile-first, WCAG 2.1 AA
   ============================================================= */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,700&family=Lato:wght@300;400;700;900&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Brand */
  --color-navy: #0D1F3C;
  --color-navy-dark: #081629;
  --color-navy-mid: #1a3560;
  --color-navy-light: #2a5490;
  --color-gold: #B8943A;
  --color-gold-dark: #9A7A2E;
  --color-gold-light: #D4AE5A;

  /* Neutrals */
  --color-white: #FFFFFF;
  --color-off-white: #F7F5F2;
  --color-bg-subtle: #EEF0F4;
  --color-border: #D0D5DC;
  --color-text: #1A1A1A;
  /* 16:1 on white — AAA */
  --color-text-muted: #4A5568;
  /* 7.5:1 on white — AA */
  --color-text-light: #6B7280;
  /* 4.6:1 on white — AA large */

  /* Category accents (AA-compliant on white bg) */
  --color-finance: #1B5E20;
  /* dark green  */
  --color-finance-bg: #E8F5E9;
  --color-health: #7B1212;
  /* dark red    */
  --color-health-bg: #FFEBEE;
  --color-lifestyle: #0D3B7A;
  /* dark blue   */
  --color-lifestyle-bg: #E3EBF8;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Lato', Arial, Helvetica, sans-serif;

  --text-base: 1.125rem;
  /* 18px */
  --text-sm: 0.889rem;
  /* ~16px */
  --text-xs: 0.778rem;
  /* ~14px */
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.5rem;
  --text-4xl: 3.25rem;

  --leading-tight: 1.2;
  --leading-snug: 1.4;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --max-width: 1100px;
  --content-width: 720px;
  --gutter: var(--space-6);

  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 6px 24px rgba(0, 0, 0, 0.13);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 220ms ease;

  /* Focus ring — visible, high-contrast */
  --focus-ring: 0 0 0 3px #B8943A;
}

/* ── Reset & Box Model ────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Base ─────────────────────────────────────────────────── */
html {
  font-size: 18px;
  /* base — all rem values relative to this */
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-off-white);
}

/* ── Accessibility ────────────────────────────────────────── */

/* Skip-nav link — hidden until focused */
.skip-nav {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 9999;
  padding: var(--space-3) var(--space-6);
  background: var(--color-gold);
  color: var(--color-navy);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-nav:focus {
  top: var(--space-2);
}

/* Visible focus ring on all interactive elements */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* Remove focus ring for mouse users while preserving it for keyboard */
:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Typography ───────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  color: var(--color-navy);
  line-height: var(--leading-tight);
  font-weight: 700;
}

h1 {
  font-size: clamp(var(--text-2xl), 5vw, var(--text-4xl));
}

h2 {
  font-size: clamp(var(--text-xl), 4vw, var(--text-3xl));
}

h3 {
  font-size: clamp(var(--text-lg), 3vw, var(--text-2xl));
}

h4 {
  font-size: var(--text-lg);
}

h5 {
  font-size: var(--text-base);
}

h6 {
  font-size: var(--text-sm);
}

p {
  max-width: 70ch;
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-gold-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-navy);
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

small {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

blockquote {
  border-left: 4px solid var(--color-gold);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-8) 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-navy-mid);
  background: var(--color-bg-subtle);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ── Layout Utilities ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, var(--gutter));
}

.content-width {
  max-width: var(--content-width);
  margin-inline: auto;
}

.section {
  padding-block: var(--space-16);
}

.section--alt {
  background-color: var(--color-bg-subtle);
}

.section--dark {
  background-color: var(--color-navy);
  color: var(--color-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-white);
}

/* ── Grid System ──────────────────────────────────────────── */
.grid {
  display: grid;
  gap: var(--space-6);
}

/* Mobile: 1 col → tablet: 2 col → desktop: 3 col */
.grid--3 {
  grid-template-columns: 1fr;
}

.grid--2 {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Header & Navigation ──────────────────────────────────── */
.site-header {
  background: var(--color-navy);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
  gap: var(--space-4);
}

.site-logo {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-white);
  text-decoration: none;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.site-logo__accent {
  color: var(--color-gold);
}

.site-logo:hover {
  color: var(--color-gold-light);
}

/* Mobile nav toggle */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 8px;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile: nav hidden by default */
.site-nav {
  display: none;
  width: 100%;
  padding-bottom: var(--space-4);
}

.site-nav.is-open {
  display: block;
}

.site-nav__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.site-nav__link {
  display: block;
  color: #C5D3E0;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
  color: var(--color-gold-light);
  background: rgba(255, 255, 255, 0.06);
}

/* Tablet+ — horizontal nav, hide toggle */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: block !important;
    width: auto;
    padding-bottom: 0;
  }

  .site-nav__list {
    flex-direction: row;
    gap: var(--space-1);
    align-items: center;
  }
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(150deg, var(--color-navy-dark) 0%, var(--color-navy-light) 100%);
  color: var(--color-white);
  text-align: center;
  padding-block: var(--space-20);
  padding-inline: var(--gutter);
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: var(--space-5);
}

.hero h1 .accent {
  color: var(--color-gold-light);
}

.hero__lead {
  font-size: var(--text-lg);
  color: #C5D3E0;
  max-width: 56ch;
  margin-inline: auto;
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.4px;
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition-base), color var(--transition-base),
    border-color var(--transition-base), box-shadow var(--transition-base);
}

/* Primary: gold on navy background */
.btn--primary {
  background: var(--color-gold);
  color: var(--color-navy);
  border-color: var(--color-gold);
}

.btn--primary:hover {
  background: var(--color-gold-dark);
  border-color: var(--color-gold-dark);
  color: var(--color-navy);
}

/* Outline: transparent with gold border */
.btn--outline {
  background: transparent;
  color: var(--color-gold-light);
  border-color: var(--color-gold-light);
}

.btn--outline:hover {
  background: var(--color-gold);
  color: var(--color-navy);
  border-color: var(--color-gold);
}

/* Secondary: navy */
.btn--secondary {
  background: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}

.btn--secondary:hover {
  background: var(--color-navy-mid);
  border-color: var(--color-navy-mid);
  color: var(--color-white);
}

/* ── Section Headings ─────────────────────────────────────── */
.section-header {
  margin-bottom: var(--space-10);
}

.section-header__eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-gold-dark);
  margin-bottom: var(--space-2);
}

.section-header__title {
  margin-bottom: var(--space-3);
}

.section-header__subtitle {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 58ch;
  line-height: var(--leading-relaxed);
}

/* ── Category Cards ───────────────────────────────────────── */
.category-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-card__stripe {
  height: 6px;
}

.category-card--finance .category-card__stripe {
  background: var(--color-finance);
}

.category-card--health .category-card__stripe {
  background: var(--color-health);
}

.category-card--lifestyle .category-card__stripe {
  background: var(--color-lifestyle);
}

.category-card__body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.category-card__icon {
  font-size: 2rem;
  margin-bottom: var(--space-4);
  line-height: 1;
}

.category-card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.category-card--finance .category-card__title {
  color: var(--color-finance);
}

.category-card--health .category-card__title {
  color: var(--color-health);
}

.category-card--lifestyle .category-card__title {
  color: var(--color-lifestyle);
}

.category-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
  flex: 1;
  margin-bottom: var(--space-5);
}

.category-card__cta {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  color: var(--color-gold-dark);
}

.category-card__cta:hover {
  color: var(--color-navy);
}

/* ── Article Cards ────────────────────────────────────────── */
.article-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: box-shadow var(--transition-base);
}

.article-card:hover {
  box-shadow: var(--shadow-md);
}

.article-card__tag {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: var(--space-1) var(--space-3);
  border-radius: 3px;
  display: inline-block;
  align-self: flex-start;
}

.tag--finance {
  background: var(--color-finance-bg);
  color: var(--color-finance);
}

.tag--health {
  background: var(--color-health-bg);
  color: var(--color-health);
}

.tag--lifestyle {
  background: var(--color-lifestyle-bg);
  color: var(--color-lifestyle);
}

.article-card__title {
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  margin-bottom: 0;
}

.article-card__title a {
  color: var(--color-navy);
  text-decoration: none;
}

.article-card__title a:hover {
  color: var(--color-gold-dark);
  text-decoration: underline;
}

.article-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
  margin-bottom: 0;
}

.article-card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  margin-top: auto;
}

/* ── Newsletter ───────────────────────────────────────────── */
.newsletter {
  background: var(--color-navy);
  padding-block: var(--space-16);
  text-align: center;
}

.newsletter__title {
  color: var(--color-white);
  margin-bottom: var(--space-3);
}

.newsletter__desc {
  color: #C5D3E0;
  font-size: var(--text-base);
  margin-bottom: var(--space-8);
  max-width: 48ch;
  margin-inline: auto;
}

.newsletter__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 480px;
  margin-inline: auto;
}

.newsletter__input {
  width: 100%;
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-text);
}

.newsletter__input:focus-visible {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: none;
}

/* Inline layout on wider screens */
@media (min-width: 480px) {
  .newsletter__form {
    flex-direction: row;
  }

  .newsletter__input {
    flex: 1;
  }
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--color-navy-dark);
  color: #8A9BAC;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  padding-block: var(--space-10);
  text-align: center;
}

.site-footer__links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-5);
  margin-bottom: var(--space-5);
}

.site-footer__links a {
  color: #8A9BAC;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-footer__links a:hover {
  color: var(--color-gold-light);
}

.site-footer__copy {
  color: #6B7C8D;
  margin-bottom: 0;
}

.site-footer__disclaimer {
  font-size: var(--text-xs);
  color: #4A5568;
  line-height: var(--leading-normal);
  margin-top: var(--space-3);
  margin-bottom: 0;
  max-width: 72ch;
  margin-inline: auto;
}

/* ── Utility Classes ──────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

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

.text-left {
  text-align: left;
}

.mt-0 {
  margin-top: 0;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

/* ── Page eyebrow label utilities (from about.html inline styles) ── */
.about-cta-label,
.nl-section-label {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.about-cta-label {
  color: var(--color-gold);
}

.nl-section-label {
  color: var(--color-gold-light);
}

/* ── Print ────────────────────────────────────────────────── */
@media print {

  .site-header,
  .nav-toggle,
  .newsletter,
  .site-footer {
    display: none;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
  }
}

/* ── Form Accessibility Updates ── */
.form-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: #1A1A1A;
  /* High-Contrast Slate */
  margin-bottom: 8px;
  text-align: left;
}

.newsletter__form-wrapper {
  max-width: 480px;
  margin-inline: auto;
  text-align: left;
}

.nl-form-wrapper {
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

/* 3px solid Gold focus state for inputs */
input:focus,
input:focus-visible,
textarea:focus,
textarea:focus-visible {
  outline: none !important;
  border: 3px solid #B8943A !important;
  border-radius: var(--radius-sm);
}