/* ==========================================================================
   American Society Foundation — Design System
   Modern + classical. Apple-style restraint with civic gravity.
   ========================================================================== */

:root {
  /* Palette */
  --color-bg: #faf8f3;          /* warm cream — like aged paper / marble */
  --color-surface: #ffffff;
  --color-surface-alt: #f3efe6;
  --color-text: #11182b;        /* deep ink */
  --color-text-muted: #4a5468;
  --color-text-soft: #6b7387;
  --color-navy: #0f1729;        /* federal navy */
  --color-navy-soft: #1a2440;
  --color-accent: #b8893c;      /* antique gold */
  --color-accent-dark: #8a6629;
  --color-accent-soft: #e8d8b0;
  --color-border: #e6e0d2;
  --color-border-soft: #efeadd;

  /* Typography */
  --font-serif: 'Cormorant Garamond', 'Playfair Display', 'Times New Roman', Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Menlo', monospace;

  /* Scale */
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.1875rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.75rem;
  --fs-4xl: 3.75rem;
  --fs-5xl: 5rem;

  /* Layout */
  --max-w: 1200px;
  --max-w-content: 720px;
  --max-w-wide: 1400px;
  --pad-x: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 4px;
  --radius-lg: 12px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 220ms;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(15, 23, 41, 0.04), 0 1px 3px rgba(15, 23, 41, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 41, 0.06), 0 8px 24px rgba(15, 23, 41, 0.05);
  --shadow-lg: 0 12px 40px rgba(15, 23, 41, 0.10);
}

/* Web fonts (Cormorant + Inter) */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@400;500;600;700&display=swap');

/* ==========================================================================
   Reset & base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern', 'liga', 'calt';
}

img, svg { max-width: 100%; display: block; }

a {
  color: var(--color-navy);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--color-accent-dark); }

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

/* Headings — classical serif */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--color-navy);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.5rem, 5.5vw, var(--fs-5xl)); font-weight: 500; }
h2 { font-size: clamp(2rem, 3.8vw, var(--fs-3xl)); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); font-weight: 600; }

/* Eyebrow / kicker — small caps sans, used above headings */
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: 1rem;
}

.lead {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.45;
  color: var(--color-text-muted);
  font-style: italic;
  font-weight: 400;
}

/* ==========================================================================
   Utility classes
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}
.container--narrow { max-width: var(--max-w-content); }
.container--wide   { max-width: var(--max-w-wide); }

.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section--tight { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section--alt { background: var(--color-surface-alt); }
.section--dark {
  background: var(--color-navy);
  color: #e8eaf0;
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: #ffffff; }
.section--dark .eyebrow { color: var(--color-accent-soft); }
.section--dark .lead { color: #c8cdd9; }

.divider-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 2.5rem auto;
  color: var(--color-accent);
  opacity: 0.7;
}
.divider-ornament::before,
.divider-ornament::after {
  content: '';
  flex: 0 0 60px;
  height: 1px;
  background: currentColor;
}
.divider-ornament__mark {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: 0.5em;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 243, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border-soft);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-navy);
  letter-spacing: 0.005em;
}
.brand__mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}
.brand:hover { color: var(--color-accent-dark); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  padding: 0.25rem 0;
}
.nav-links a:hover { color: var(--color-accent-dark); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1.5px;
  background: var(--color-accent);
}
.nav-links .nav-cta {
  background: var(--color-navy);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 500;
}
.nav-links .nav-cta:hover { background: var(--color-accent-dark); color: #fff; }

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  width: 40px; height: 40px;
  cursor: pointer;
  color: var(--color-navy);
}
.nav-toggle svg { width: 22px; height: 22px; margin: auto; }

@media (max-width: 1024px) {
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-links {
    position: fixed;
    inset: 68px 0 auto 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem var(--pad-x);
    transform: translateY(-110%);
    transition: transform var(--dur) var(--ease);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--color-border-soft);
  }
  .nav-links .nav-cta { text-align: center; margin-top: 0.5rem; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: clamp(5rem, 12vw, 9rem) 0 clamp(4rem, 9vw, 7rem);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(184, 137, 60, 0.10), transparent 55%),
    radial-gradient(ellipse at 80% 30%, rgba(15, 23, 41, 0.06), transparent 60%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  max-width: 880px;
}
.hero h1 {
  margin-bottom: 1.25rem;
}
.hero__lead {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  line-height: 1.45;
  color: var(--color-text-muted);
  font-weight: 400;
  font-style: italic;
  max-width: 720px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
}
.btn--primary {
  background: var(--color-navy);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-accent-dark);
  color: #fff;
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-border);
}
.btn--ghost:hover {
  border-color: var(--color-navy);
  color: var(--color-navy);
}
.btn--gold {
  background: var(--color-accent);
  color: #fff;
}
.btn--gold:hover { background: var(--color-accent-dark); color: #fff; }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }

/* ==========================================================================
   Pillars / cards grid (3 sections on home)
   ========================================================================== */

.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 880px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent-soft);
}
.card__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--color-accent);
  display: block;
  margin-bottom: 0.5rem;
}
.card__title {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  margin: 0 0 0.5rem;
  color: var(--color-navy);
}
.card__body {
  color: var(--color-text-muted);
  font-size: var(--fs-base);
  margin-bottom: 1rem;
}
.card__link {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-accent-dark);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.card__link::after {
  content: '→';
  transition: transform var(--dur) var(--ease);
}
.card__link:hover::after { transform: translateX(3px); }

/* Smaller value/principle list cards */
.tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem;
}
.tile__title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--color-navy);
}
.tile__source {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: 0.5rem;
  display: block;
}
.tile__body {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   Long-form prose
   ========================================================================== */

.prose {
  max-width: var(--max-w-content);
  margin: 0 auto;
}
.prose p {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--color-text);
  margin-bottom: 1.4em;
}
.prose p:first-of-type::first-letter {
  font-family: var(--font-serif);
  float: left;
  font-size: 4.25rem;
  line-height: 0.85;
  padding: 0.4rem 0.6rem 0 0;
  color: var(--color-accent-dark);
  font-weight: 500;
}
.prose h2, .prose h3 {
  margin-top: 2.5em;
  margin-bottom: 0.7em;
}
.prose blockquote {
  border-left: 3px solid var(--color-accent);
  margin: 2em 0;
  padding: 0.25em 0 0.25em 1.5em;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--color-navy);
}
.prose ul, .prose ol {
  font-size: 1.0625rem;
  line-height: 1.75;
  padding-left: 1.4em;
}
.prose li { margin-bottom: 0.5em; }
.prose hr {
  border: 0;
  height: 1px;
  background: var(--color-border);
  margin: 2.5em 0;
}

/* ==========================================================================
   Article list
   ========================================================================== */

.article-list { list-style: none; padding: 0; margin: 0; }
.article-item {
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
}
.article-item:last-child { border-bottom: 1px solid var(--color-border); }
.article-item__meta {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-soft);
}
.article-item__category { color: var(--color-accent-dark); font-weight: 600; }
.article-item__title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  margin: 0.25rem 0 0.5rem;
  color: var(--color-navy);
}
.article-item__title a { color: inherit; }
.article-item__title a:hover { color: var(--color-accent-dark); }
.article-item__summary { color: var(--color-text-muted); margin: 0; }
@media (max-width: 720px) {
  .article-item { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ==========================================================================
   Hero image with classical motif (CSS-only)
   ========================================================================== */

.crest {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.5rem;
  display: block;
  color: var(--color-accent);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-navy);
  color: #c5cad6;
  padding: 4rem 0 2rem;
  font-size: var(--fs-sm);
}
.site-footer a { color: #e8eaf0; }
.site-footer a:hover { color: var(--color-accent-soft); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent-soft);
  margin-bottom: 1rem;
  font-weight: 600;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.55rem; }
.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 0.5rem;
}
.footer-tagline { color: #9ba2b3; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: #8a91a3;
  font-size: var(--fs-xs);
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Page header (smaller hero on inner pages)
   ========================================================================== */

.page-header {
  padding: clamp(4rem, 8vw, 6rem) 0 clamp(2rem, 4vw, 3rem);
  text-align: left;
}
.page-header h1 {
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  margin-bottom: 1rem;
}
.page-header .lead {
  max-width: 720px;
}

/* ==========================================================================
   Reveal animation
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ==========================================================================
   Inline pieces
   ========================================================================== */

.callout {
  background: var(--color-surface-alt);
  border-left: 3px solid var(--color-accent);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin: 2rem 0;
  font-size: var(--fs-base);
  color: var(--color-text);
}
.callout strong { color: var(--color-navy); }

.tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}

/* External link arrow on emergency callouts */
.ext::after {
  content: ' ↗';
  font-size: 0.85em;
  color: var(--color-accent-dark);
}

/* Skip link for accessibility */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  background: var(--color-navy);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  z-index: 100;
}

/* Two-column structured content (used on Present page etc.) */
.two-col {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  margin: 2.5rem 0;
}
.two-col__aside {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-accent-dark);
  font-style: italic;
  position: sticky;
  top: 90px;
  align-self: start;
}
@media (max-width: 720px) {
  .two-col { grid-template-columns: 1fr; gap: 1rem; }
  .two-col__aside { position: static; }
}
