/* ============================================
   FU Freedom Fund — Manifesto Stylesheet
   Agora-inspired direct response design
   ADA/WCAG 2.1 AA+ Compliant
   ============================================ */

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

:root {
  /* Palette — all pass WCAG AA contrast on #FAF8F4 */
  --bg: #FAF8F4;
  --bg-alt: #F2EDE5;
  --text: #1A1A1A;           /* 15:1 on bg — AAA */
  --text-muted: #555555;     /* 6.5:1 on bg — AA */
  --accent-red: #A01A1A;     /* 5.8:1 on bg — AA (adjusted for contrast) */
  --accent-red-hover: #7A1313;
  --accent-gold: #8A6D00;    /* 5.1:1 on bg — AA (adjusted) */
  --accent-gold-light: #F5E6B8;
  --border: #C4BFB5;
  --white: #FFFFFF;
  --focus-ring: #1A1A1A;

  /* Typography */
  --font-serif: 'Georgia', 'Times New Roman', 'Lora', serif;
  --font-sans: 'Helvetica Neue', 'Arial', sans-serif;
  --body-size: 21px;
  --line-height: 1.75;
  --max-width: 650px;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: var(--font-serif);
  font-size: var(--body-size);
  line-height: var(--line-height);
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Skip Navigation (ADA) --- */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--text);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  transition: top 0.15s ease;
}

.skip-nav:focus {
  top: 0;
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* --- Focus States (ADA — keyboard navigation) --- */
a:focus,
button:focus,
.cta-button:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

/* Remove outline for mouse users */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Hero Section --- */
.hero {
  padding: 80px 24px 60px;
  text-align: center;
  background: var(--bg);
}

.hero__image {
  max-width: 100%;
  height: auto;
  margin-bottom: 40px;
}

.hero__title {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 24px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

.hero__byline {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- Article / Body --- */
.article {
  padding: 40px 0 80px;
}

.beat {
  margin-bottom: 60px;
}

.beat__header {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 32px;
  margin-top: 60px;
  padding-top: 20px;
}

.beat__image {
  width: 100%;
  height: auto;
  margin: 32px 0;
  border-radius: 4px;
}

/* --- Paragraphs --- */
.p {
  margin-bottom: 1.4em;
  font-family: var(--font-serif);
  font-size: var(--body-size);
  line-height: var(--line-height);
  color: var(--text);
}

.p--italic {
  font-style: italic;
}

.p--bold {
  font-weight: 700;
}

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

/* --- Inline Emphasis --- */
em {
  font-style: italic;
}

strong {
  font-weight: 700;
}

/* --- Sub-headers within beats --- */
.h3 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin: 40px 0 20px;
}

.h3--italic {
  font-style: italic;
}

/* --- Pull Quotes --- */
.pull-quote {
  border-left: 4px solid var(--accent-red);
  padding: 16px 0 16px 28px;
  margin: 36px 0;
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--text);
}

.pull-quote--gold {
  border-left-color: var(--accent-gold);
}

.pull-quote--vow {
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--accent-red);
}

/* --- Inline Highlight --- */
.highlight {
  background: var(--accent-gold-light);
  padding: 2px 4px;
  border-radius: 2px;
}

/* --- Separator --- */
.separator {
  text-align: center;
  margin: 50px 0;
  font-size: 1.5rem;
  letter-spacing: 0.5em;
  color: var(--border);
}

/* --- CTA Section --- */
.cta-section {
  background: var(--bg-alt);
  border-top: 3px solid var(--accent-red);
  border-bottom: 3px solid var(--accent-red);
  padding: 48px 24px;
  margin: 60px 0;
  text-align: center;
}

.cta-section__heading {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

.cta-section__text {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text);
  max-width: 500px;
  margin: 0 auto 28px;
}

.cta-button {
  display: inline-block;
  background: var(--accent-red);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 18px 48px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease;
}

.cta-button:hover,
.cta-button:focus {
  background: var(--accent-red-hover);
}

.cta-button--large {
  font-size: 1.35rem;
  padding: 22px 56px;
}

/* --- Choice Block --- */
.choice-block {
  margin: 36px 0;
  padding: 28px;
  background: var(--bg-alt);
  border-radius: 6px;
}

.choice-block__item {
  margin-bottom: 20px;
}

.choice-block__item:last-child {
  margin-bottom: 0;
}

.choice-block__label {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-red);
  margin-bottom: 8px;
}

/* --- "No!" List --- */
.no-list {
  list-style: none;
  margin: 28px 0;
  padding: 0;
}

.no-list li {
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

/* --- Footer --- */
.footer {
  padding: 48px 24px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.footer a {
  color: var(--text-muted);
  text-decoration: underline;
}

.footer a:hover,
.footer a:focus {
  color: var(--text);
}

/* ============================================
   RESPONSIVE — Tablet (768px and below)
   ============================================ */
@media screen and (max-width: 768px) {
  :root {
    --body-size: 20px;
  }

  .hero {
    padding: 56px 20px 44px;
  }

  .hero__title {
    font-size: 2.35rem;
  }

  .hero__subtitle {
    font-size: 1.25rem;
  }

  .beat__header {
    font-size: 1.85rem;
  }

  .h3 {
    font-size: 1.4rem;
  }

  .cta-section {
    padding: 36px 20px;
  }

  .cta-button--large {
    font-size: 1.15rem;
    padding: 18px 40px;
  }

  .pull-quote {
    font-size: 1.2rem;
  }
}

/* ============================================
   RESPONSIVE — Mobile (480px and below)
   ============================================ */
@media screen and (max-width: 480px) {
  :root {
    --body-size: 18px;
    --line-height: 1.7;
  }

  .hero {
    padding: 40px 16px 32px;
  }

  .hero__title {
    font-size: 1.85rem;
  }

  .hero__subtitle {
    font-size: 1.1rem;
  }

  .hero__byline {
    font-size: 0.8rem;
  }

  .container {
    padding: 0 16px;
  }

  .beat__header {
    font-size: 1.5rem;
    margin-top: 40px;
    margin-bottom: 24px;
  }

  .beat__image {
    margin: 20px 0;
  }

  .h3 {
    font-size: 1.25rem;
    margin: 28px 0 14px;
  }

  .cta-section {
    padding: 28px 16px;
    margin: 40px 0;
  }

  .cta-section__heading {
    font-size: 1.5rem;
  }

  .cta-section__text {
    font-size: 1rem;
  }

  .cta-button {
    font-size: 1rem;
    padding: 16px 32px;
    width: 100%;
    max-width: 320px;
  }

  .cta-button--large {
    font-size: 1.1rem;
    padding: 18px 36px;
  }

  .pull-quote {
    font-size: 1.1rem;
    padding-left: 20px;
  }

  .beat {
    margin-bottom: 40px;
  }

  .footer {
    padding: 32px 16px;
    font-size: 0.8rem;
  }
}

/* ============================================
   ACCESSIBILITY — Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

/* ============================================
   ACCESSIBILITY — High Contrast Mode
   ============================================ */
@media (prefers-contrast: high) {
  :root {
    --bg: #FFFFFF;
    --bg-alt: #F0F0F0;
    --text: #000000;
    --text-muted: #333333;
    --accent-red: #990000;
    --border: #666666;
  }

  .cta-button {
    border: 2px solid #000000;
  }

  .beat__image {
    border: 1px solid #666666;
  }
}

/* ============================================
   ACCESSIBILITY — Forced Colors (Windows High Contrast)
   ============================================ */
@media (forced-colors: active) {
  .cta-button {
    border: 2px solid ButtonText;
  }

  .skip-nav {
    border: 2px solid ButtonText;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .cta-section,
  .skip-nav {
    display: none;
  }

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

  .hero__title {
    font-size: 24pt;
  }

  .beat__header {
    font-size: 18pt;
    page-break-before: auto;
  }

  .beat__image {
    max-width: 100%;
    page-break-inside: avoid;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}
