/*
  The Clean Paper — Design Tokens
  Minimal design system based on the selected brand direction.

  Fonts are loaded from Google Fonts in the mockup HTML.
  For production, consider self-hosting fonts for privacy/performance.
*/

:root {
  /* Brand colors */
  --tcp-ink: #042034;
  --tcp-navy: #032D44;
  --tcp-teal: #1E444C;

  --tcp-paper: #F9F7F5;
  --tcp-parchment: #EAD3AD;

  --tcp-gold: #A6916C;
  --tcp-gold-light: #E6D2AE;

  --tcp-stone: #5D615B;
  --tcp-mist: #EDE8E2;

  /* Semantic colors */
  --color-background: var(--tcp-paper);
  --color-surface: #FFFFFF;
  --color-surface-warm: #FCFAF7;
  --color-text: var(--tcp-ink);
  --color-text-muted: var(--tcp-stone);
  --color-heading: var(--tcp-ink);
  --color-link: var(--tcp-ink);
  --color-link-hover: var(--tcp-teal);
  --color-border: var(--tcp-mist);
  --color-accent: var(--tcp-gold);
  --color-accent-soft: var(--tcp-gold-light);

  /* Typography */
  --font-heading: "Cormorant Garamond", "Bodoni 72", "Bodoni MT", Didot, Georgia, serif;
  --font-body: "Source Serif 4", "Literata", Georgia, serif;
  --font-ui: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-script: "Cormorant Garamond", Georgia, serif;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 2.75rem;
  --text-4xl: clamp(3rem, 8vw, 5.25rem);

  /* Layout */
  --container-wide: 1180px;
  --container-reading: 740px;
  --container-header: 900px;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-round: 999px;

  /* Border */
  --border-subtle: 1px solid var(--color-border);
  --border-gold: 1px solid color-mix(in srgb, var(--tcp-gold) 42%, transparent);

  /* Shadows — intentionally minimal */
  --shadow-soft: 0 14px 38px rgba(4, 32, 52, 0.06);
  --shadow-card: 0 8px 24px rgba(4, 32, 52, 0.045);

  /* Motion */
  --transition-fast: 140ms ease;
  --transition-base: 220ms ease;
}

/* Base */

html {
  color: var(--color-text);
  background: var(--color-background);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.72;
}

body {
  margin: 0;
  color: var(--color-text);
  background:
    radial-gradient(circle at top, rgba(234, 211, 173, 0.18), transparent 36rem),
    var(--color-background);
}

a {
  color: var(--color-link);
  text-decoration-color: color-mix(in srgb, var(--tcp-gold) 55%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

a:hover {
  color: var(--color-link-hover);
  text-decoration-color: var(--tcp-gold);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.05;
  font-weight: 500;
  margin: 0 0 var(--space-4);
}

h1 {
  font-size: var(--text-4xl);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.65rem;
}

p {
  margin: 0 0 var(--space-5);
}

small,
.meta,
.kicker,
.nav-link,
.button {
  font-family: var(--font-ui);
}

.container-wide {
  width: min(calc(100% - 2rem), var(--container-wide));
  margin-inline: auto;
}

.container-reading {
  width: min(calc(100% - 2rem), var(--container-reading));
  margin-inline: auto;
}

.kicker {
  color: var(--tcp-gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--text-xs);
  font-weight: 650;
}

.decorative-rule {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--tcp-gold);
  margin: var(--space-5) auto;
  width: min(100%, 440px);
}

.decorative-rule::before,
.decorative-rule::after {
  content: "";
  height: 1px;
  background: var(--tcp-gold);
  flex: 1;
  opacity: 0.75;
}

.decorative-rule span {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.6rem;
}

/* Header */

.site-header {
  border-bottom: var(--border-subtle);
  background: color-mix(in srgb, var(--tcp-paper) 90%, white);
}

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

.brand {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  color: var(--tcp-ink);
  text-decoration: none;
  letter-spacing: -0.015em;
}

.brand .the {
  color: var(--tcp-gold);
  font-style: italic;
  font-size: 0.82em;
  margin-right: 0.16em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.nav-link {
  color: var(--tcp-stone);
  font-size: var(--text-sm);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--tcp-ink);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-round);
  border: 1px solid transparent;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.button-primary {
  background: var(--tcp-ink);
  color: var(--tcp-paper);
}

.button-primary:hover {
  background: var(--tcp-navy);
  color: var(--tcp-paper);
}

.button-secondary {
  background: transparent;
  color: var(--tcp-ink);
  border-color: var(--tcp-gold);
}

.button-secondary:hover {
  background: color-mix(in srgb, var(--tcp-gold-light) 25%, transparent);
  color: var(--tcp-ink);
}

/* Hero */

.hero {
  padding: var(--space-9) 0 var(--space-8);
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 3.6rem);   /* smaller than the global h1, balanced with the 200px emblem */
}

.hero-logo {
  width: 200px;
  height: 200px;
  margin: 0 auto var(--space-5);
  /* drop-shadow follows the emblem's alpha shape, so the transparent margin
     doesn't produce a detached halo the way box-shadow (the box) did */
  filter: drop-shadow(0 8px 18px rgba(4, 32, 52, 0.16));
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  color: var(--tcp-stone);
  max-width: 760px;
  margin: 0 auto var(--space-3);
}
.hero-mission {
  font-size: 0.98rem;                 /* matches the home article-card dek */
  line-height: 1.6;
  color: var(--tcp-stone);            /* original colour, per Michele */
  max-width: 640px;
  margin: 0 auto var(--space-6);
}

.hero-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* Article cards */

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.article-card {
  background: color-mix(in srgb, white 54%, var(--tcp-paper));
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.article-card h3 {
  font-size: 1.65rem;
  margin-bottom: var(--space-3);
}

.article-card p {
  color: var(--tcp-stone);
  font-size: 0.98rem;
}

.article-card .card-dek {
  --card-dek-max: 15.2rem;
  max-height: var(--card-dek-max);
  overflow: hidden;
  margin-bottom: 0;
}

.article-card .card-dek.is-clamped {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 2.2rem), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 2.2rem), transparent);
}

.article-card .card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.article-card .card-field,
.article-card .card-date {
  margin: 0;
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  line-height: 1.45;
}

.article-card .card-field {
  color: color-mix(in srgb, var(--tcp-stone) 86%, var(--tcp-ink));
  font-size: 0.68rem;
  font-weight: 680;
  min-width: 0;
}

.article-card .card-date {
  color: color-mix(in srgb, var(--tcp-gold) 78%, var(--tcp-stone));
  font-size: 0.62rem;
  font-weight: 650;
  flex: 0 0 auto;
  text-align: right;
  white-space: nowrap;
}

/* Editorial callouts */

.callout {
  border: var(--border-gold);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  background: color-mix(in srgb, var(--tcp-parchment) 18%, white);
  margin: var(--space-6) 0;
}

.callout h3 {
  font-family: var(--font-ui);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--tcp-gold);
  margin-bottom: var(--space-3);
}

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

.callout-caution {
  background: color-mix(in srgb, var(--tcp-teal) 7%, white);
  border-color: color-mix(in srgb, var(--tcp-teal) 25%, var(--tcp-mist));
}

/* Article page */

.article-header {
  padding: var(--space-8) 0 var(--space-6);
  text-align: center;
}

.article-header h1 {
  max-width: 900px;
  margin-inline: auto;
}

.article-dek {
  color: var(--tcp-stone);
  max-width: 780px;
  margin-inline: auto;
  font-size: 1.25rem;
}

.article-meta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.article-meta-row span {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tcp-stone);
  border: 1px solid var(--tcp-mist);
  border-radius: var(--radius-round);
  padding: 0.35rem 0.7rem;
}

.article-body {
  padding-bottom: var(--space-9);
}

.article-body h2 {
  margin-top: var(--space-7);
  margin-bottom: var(--space-4);
}

.article-body .lead {
  font-size: 1.25rem;
  color: var(--tcp-ink);
}

.source-box {
  background: var(--tcp-navy);
  color: var(--tcp-paper);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-top: var(--space-7);
}

.source-box h3 {
  color: var(--tcp-paper);
}

.source-box a {
  color: var(--tcp-parchment);
}

/* Footer */

.site-footer {
  background: var(--tcp-navy);
  color: var(--tcp-paper);
  padding: var(--space-7) 0;
  margin-top: var(--space-8);
}

.site-footer p {
  color: color-mix(in srgb, var(--tcp-paper) 76%, var(--tcp-stone));
  max-width: 720px;
}

.footer-links {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--tcp-parchment);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
}

/* Responsive */

@media (max-width: 860px) {
  .article-grid {
    grid-template-columns: 1fr;
  }

  .article-card .card-dek {
    --card-dek-max: 22rem;
  }

  .nav {
    height: auto;
    padding: var(--space-4) 0;
    align-items: flex-start;
    gap: var(--space-3);
    flex-direction: column;
  }

  .nav-links {
    gap: var(--space-3);
    flex-wrap: wrap;
  }

  .hero {
    padding-top: var(--space-7);
  }
}
