/* === CLEVERLIBRE DESIGN SYSTEM === */
/* Based on the Next.js mockup — translated to vanilla CSS for Hugo */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Newsreader:ital,wght@0,400;0,500;1,400;1,500&display=swap');

/* ---- Design Tokens ---- */
:root {
  /* Ember */
  --ember-50: #FCEBE4;
  --ember-100: #F8D3C5;
  --ember-200: #F2B29C;
  --ember-300: #EC8E70;
  --ember-400: #E66C48;
  --ember-500: #DD4B27;
  --ember-600: #C13A18;
  --ember-700: #9C2E12;
  --ember-800: #74230F;
  --ember-900: #4E1809;

  /* Teal */
  --teal-50: #E6F6F2;
  --teal-100: #C2E9DF;
  --teal-200: #9BDBCB;
  --teal-300: #6FCBB3;
  --teal-400: #49B79E;
  --teal-500: #29A78D;
  --teal-600: #1F8C76;
  --teal-700: #16705E;
  --teal-800: #0F5446;
  --teal-900: #093A30;

  /* Stone */
  --stone-0: #FFFFFF;
  --stone-25: #FBF9F3;
  --stone-50: #F6F2E9;
  --stone-100: #ECE6D6;
  --stone-200: #DCD4BF;
  --stone-300: #C7BBA0;
  --stone-400: #A89C7F;
  --stone-500: #7F7560;
  --stone-600: #5D5544;
  --stone-700: #423D30;
  --stone-800: #2B2820;
  --stone-900: #1A1813;
  --stone-950: #121009;

  /* Aliases */
  --bg-default: var(--stone-50);
  --bg-paper: var(--stone-25);
  --bg-surface2: var(--stone-100);
  --ink: var(--stone-900);
  --paper: var(--stone-50);
  --border-ink: var(--stone-900);
  --border-strong: var(--stone-300);
  --surface: var(--stone-25);
  --surface-inverse: var(--stone-900);
  --dot: var(--stone-300);
  --offset-ink: 3px 3px 0 var(--stone-900);

  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-sans: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --font-serif: 'Newsreader', serif;

  /* Spacing */
  --radius-xs: 0;
  --radius-sm: 1px;
  --radius-md: 2px;
  --radius-lg: 4px;
  --radius-xl: 6px;
  --radius-pill: 999px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-default: var(--stone-950);
    --bg-paper: #1C1A13;
    --bg-surface2: #24211A;
    --ink: #F2ECDD;
    --paper: var(--stone-950);
    --border-ink: var(--stone-100);
    --border-strong: #423D30;
    --surface: #1C1A13;
    --surface-inverse: var(--stone-50);
    --dot: #322E24;
    --offset-ink: 3px 3px 0 #000;
  }
}

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

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--bg-default);
  margin: 0;
  padding: 0;
}

::selection {
  background: var(--ember-200);
  color: var(--stone-950);
}

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.22;
  color: var(--ink);
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 54px;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.22;
  letter-spacing: -0.01em;
}

h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.36;
}

p {
  margin: 0 0 1em 0;
}

a {
  color: var(--teal-700);
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
}

/* ---- Eyebrow ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember-600);
  display: block;
  margin-bottom: 12px;
}

/* ---- Layout ---- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-default);
  border-bottom: 1.5px solid var(--border-ink);
  transition: background-color 0.15s;
}

.site-header.scrolled {
  background: color-mix(in srgb, var(--bg-default) 86%, transparent);
  backdrop-filter: blur(8px);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.logo-mark {
  display: block;
  flex: none;
}

.logo-wordmark {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.01em;
}

.logo-wordmark .clever {
  color: var(--ink);
}

.logo-wordmark .libre {
  color: var(--ember-500);
}

.nav-desktop {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}

.nav-desktop a {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  color: var(--stone-600);
  padding: 11px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all 0.11s;
}

.nav-desktop a:hover {
  color: var(--ink);
}

.nav-desktop a.active {
  color: var(--ember-700);
  background: var(--ember-50);
  border-color: var(--ember-200);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-actions .git-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--teal-700);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-sans);
  font-weight: 600;
  text-transform: none;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-ink);
  padding: 11px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.11s, box-shadow 0.11s, background-color 0.11s, color 0.11s;
}

.btn-primary {
  background: var(--ember-500);
  color: #FFF6F1;
  box-shadow: var(--offset-ink);
}

.btn-primary:hover {
  background: var(--ember-600);
  text-decoration: none;
}

.btn-primary:active {
  box-shadow: none;
  transform: translate(2px, 2px);
}

.btn-teal {
  background: var(--teal-600);
  color: #FFFFFF;
  box-shadow: var(--offset-ink);
}

.btn-teal:hover {
  background: var(--teal-700);
  text-decoration: none;
}

.btn-outline {
  background: var(--surface);
  color: var(--ink);
}

.btn-outline:hover {
  background: var(--bg-surface2);
  text-decoration: none;
}

.btn-small {
  padding: 7px 13px;
  font-size: 13px;
}

.btn-large {
  padding: 14px 24px;
  font-size: 15.5px;
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--border-ink);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }
  .header-actions .git-link {
    display: none;
  }
  .menu-toggle {
    display: flex;
  }
  h1 {
    font-size: 42px;
  }
  h2 {
    font-size: 32px;
  }
}

/* ---- Sections ---- */
section {
  padding: 80px 0;
}

.section-divide-top {
  border-top: 1.5px solid var(--border-ink);
}

.section-divide-bottom {
  border-bottom: 1.5px solid var(--border-ink);
}

.bg-paper {
  background: var(--bg-paper);
}

.bg-surface2 {
  background: var(--bg-surface2);
}

.bg-ink {
  background: var(--stone-950);
  color: var(--stone-50);
}

.bg-ink h1,
.bg-ink h2,
.bg-ink h3,
.bg-ink h4 {
  color: var(--stone-50);
}

/* ---- Hero ---- */
.hero {
  border-bottom: 1.5px solid var(--border-ink);
  padding: 88px 0 76px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember-700);
  border: 1.5px solid var(--ember-500);
  border-radius: var(--radius-pill);
  padding: 6px 13px;
  background: var(--ember-50);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 66px;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--ink);
  max-width: 940px;
  text-wrap: balance;
  margin-bottom: 24px;
}

.hero-title .accent {
  color: var(--ember-500);
}

.hero-subtitle {
  color: var(--stone-600);
  max-width: 600px;
  font-size: 17px;
  line-height: 1.62;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

.hero-stats {
  display: flex;
  gap: 44px;
  flex-wrap: wrap;
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--stone-500);
  display: block;
  margin-top: 8px;
  max-width: 160px;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 42px;
  }
  .hero {
    padding: 60px 0 50px;
  }
}

/* ---- Dot Grid ---- */
.dot-grid {
  background-image: radial-gradient(var(--dot) 1.1px, transparent 1.1px);
  background-size: 22px 22px;
}

/* ---- Cards ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

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

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

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .card-grid-2 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1.5px solid var(--border-ink);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform 0.12s, box-shadow 0.12s;
}

.card:hover {
  box-shadow: var(--offset-ink);
  transform: translate(-1px, -1px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.icon-tile {
  width: 46px;
  height: 46px;
  flex: none;
  border: 1.5px solid var(--border-ink);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ember-50);
}

.icon-tile svg {
  color: var(--ember-600);
}

/* ---- State Badge ---- */
.state-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.05em;
  white-space: nowrap;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  border: 1.5px solid;
}

.state-proposed { color: #2D6FB8; border-color: #2D6FB8; }
.state-incubating { color: #BC8118; border-color: #BC8118; }
.state-active { color: var(--teal-700); border-color: var(--teal-700); }
.state-graduated { color: var(--ember-600); border-color: var(--ember-600); }
.state-archived { color: var(--stone-500); border-color: var(--stone-500); }

/* ---- Project Tile ---- */
.project-tile {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 19px;
}

.project-tile:hover {
  text-decoration: none;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.project-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.project-name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
}

.project-lang {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--stone-500);
}

.project-metrics {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--stone-500);
}

.project-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ---- Standards Grid ---- */
.standards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1.5px solid var(--border-ink);
  background: var(--surface);
}

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

.standard-cell {
  padding: 26px 28px;
  border-color: var(--border-ink);
}

.standard-cell:not(:last-child) {
  border-bottom: 1.5px solid var(--border-ink);
}

.standard-abbr {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--teal-700);
}

.standard-member {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--teal-700);
  border: 1px solid var(--teal-400);
  border-radius: var(--radius-pill);
  padding: 3px 7px;
  margin-left: 8px;
  white-space: nowrap;
}

/* ---- Principle Row ---- */
.principle-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 28px;
  align-items: start;
  padding: 36px 0;
  border-bottom: 1.5px solid var(--border-ink);
}

.principle-number {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ember-500);
}

.principle-content {
  display: flex;
  gap: 20px;
  align-items: start;
}

@media (max-width: 640px) {
  .principle-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ---- Steward Card ---- */
.steward-card .monogram {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.monogram-ember {
  background: var(--ember-50);
  color: var(--ember-600);
}

.monogram-teal {
  background: var(--teal-50);
  color: var(--teal-700);
}

.monogram-ink {
  background: var(--bg-surface2);
  color: var(--ink);
}

/* ---- Join Band ---- */
.join-band {
  border: 1.5px solid var(--border-ink);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--offset-ink);
  padding: 52px 48px;
}

@media (max-width: 768px) {
  .join-band {
    padding: 36px 28px;
  }
}

.join-band-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 768px) {
  .join-band-grid {
    grid-template-columns: 1fr;
  }
}

.join-band-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 42px;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--ink);
  max-width: 520px;
  text-wrap: balance;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .join-band-title {
    font-size: 32px;
  }
}

/* ---- Quote ---- */
.quote-text {
  font-family: var(--font-serif);
  font-weight: 500;
  font-style: italic;
  font-size: 34px;
  line-height: 1.4;
  color: var(--stone-50);
  max-width: 820px;
  text-wrap: balance;
  margin: 0 auto;
}

.quote-attribution {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--stone-400);
  margin-top: 16px;
  letter-spacing: 0.05em;
}

/* ---- Section Head ---- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.section-head-left {
  max-width: 640px;
}

.section-head h2 {
  color: var(--ink);
  text-wrap: balance;
  margin-top: 8px;
}

.section-head p {
  color: var(--stone-600);
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.62;
}

/* ---- Lineage ---- */
.lineage-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 40px;
  align-items: center;
  padding: 46px 0;
}

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

.lineage-body {
  color: var(--stone-300);
  font-size: 17px;
  line-height: 1.62;
}

.lineage-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.lineage-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}

.lineage-links a.teal {
  color: var(--teal-300);
}

.lineage-links a.ember {
  color: var(--ember-400);
}

/* ---- Contact Form ---- */
.contact-form label {
  display: block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--ink);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 14px;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--border-ink);
  box-shadow: 0 0 0 3px rgba(221, 75, 39, 0.35);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

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

/* ---- Footer ---- */
.site-footer {
  background: var(--stone-950);
  color: var(--stone-50);
  border-top: 1.5px solid var(--border-ink);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 60px 32px 38px;
  max-width: 1180px;
  margin: 0 auto;
}

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

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
}

.footer-brand .clever {
  color: var(--stone-50);
}

.footer-brand .libre {
  color: var(--ember-400);
}

.footer-desc {
  font-size: 15px;
  color: var(--stone-300);
  max-width: 300px;
  margin-bottom: 18px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--stone-700);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stone-300);
}

.footer-social a:hover {
  color: var(--stone-50);
  text-decoration: none;
}

.footer-column h4 {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember-400);
  margin-bottom: 14px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-column a {
  font-size: 15px;
  color: var(--stone-300);
  text-decoration: none;
}

.footer-column a:hover {
  color: var(--stone-50);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--stone-800);
  padding: 20px 32px;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--stone-400);
  margin: 0;
}

/* ---- News List ---- */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.news-item {
  display: block;
  text-decoration: none;
  color: inherit;
}

.news-item:hover {
  text-decoration: none;
}

.news-item .card {
  padding: 22px 26px;
}

.news-item h3 {
  font-size: 20px;
  margin-bottom: 6px;
}

.news-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--stone-500);
  display: block;
  margin-bottom: 8px;
}

/* ---- Page Head ---- */
.page-head {
  border-bottom: 1.5px solid var(--border-ink);
  padding: 72px 0 60px;
}

.page-head h1 {
  max-width: 880px;
  text-wrap: balance;
}

.page-head .subtitle {
  color: var(--stone-600);
  max-width: 640px;
  margin-top: 22px;
  font-size: 17px;
  line-height: 1.62;
}

.page-head .subtitle.serif {
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 760px;
}

/* ---- Channel Card ---- */
.channel-card {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
}

.channel-card:hover {
  text-decoration: none;
}

.channel-card h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.channel-card p {
  font-size: 15px;
  color: var(--stone-600);
  margin-bottom: 8px;
}

.channel-card .label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal-700);
}

/* ---- Content ---- */
.content-area {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0 80px;
}

.content-area h1,
.content-area h2,
.content-area h3 {
  margin-top: 32px;
  margin-bottom: 16px;
}

.content-area ul,
.content-area ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.content-area li {
  margin-bottom: 8px;
}

.content-area img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

.content-area blockquote {
  border-left: 3px solid var(--ember-500);
  padding-left: 20px;
  margin-left: 0;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--stone-600);
}

/* ---- Misc ---- */
.text-center {
  text-align: center;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 16px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mb-1 {
  margin-bottom: 8px;
}

.mb-2 {
  margin-bottom: 16px;
}

.py-2 {
  padding-top: 16px;
  padding-bottom: 16px;
}

.info-note {
  font-size: 14px;
  color: var(--stone-500);
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Door card */
.door-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.door-card .door-body {
  flex: 1;
}

.door-num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 26px;
  line-height: 1;
  color: var(--ember-500);
  margin-right: 8px;
}

/* Two column info */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1.5px solid var(--border-ink);
}

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

.info-grid .info-cell {
  padding: 32px 34px;
  background: var(--surface);
}

.info-grid .info-cell:first-child {
  border-right: 1.5px solid var(--border-ink);
}

@media (max-width: 768px) {
  .info-grid .info-cell:first-child {
    border-right: none;
    border-bottom: 1.5px solid var(--border-ink);
  }
}

/* ================================================================
   CONTACT & SECURITY PAGES
   ================================================================ */

/* ---- Contact Channel Cards (large) ---- */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

.channel-large {
  display: flex;
  flex-direction: column;
  padding: 32px;
  text-decoration: none;
  color: inherit;
}

.channel-large:hover {
  text-decoration: none;
}

.channel-large .icon-tile {
  width: 52px;
  height: 52px;
  margin-bottom: 20px;
}

.channel-large h3 {
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--ink);
}

.channel-large p {
  font-size: 15px;
  color: var(--stone-600);
  margin-bottom: 12px;
  line-height: 1.55;
}

.channel-large .link-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--teal-700);
  font-weight: 500;
}

/* ---- Email Cards ---- */
.email-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.email-item {
  background: var(--bg-paper);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.email-item .email-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone-500);
}

.email-item a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--teal-700);
  font-weight: 600;
  text-decoration: none;
}

.email-item a:hover {
  text-decoration: underline;
}

/* ---- Matrix Room Pills ---- */
.room-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.room-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--teal-700);
  background: var(--teal-50);
  border: 1.5px solid var(--teal-400);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  text-decoration: none;
}

.room-pill:hover {
  text-decoration: none;
  background: var(--teal-100);
}

/* ---- Social Row ---- */
.social-row {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.social-row a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}

.social-row a:hover {
  color: var(--teal-700);
  text-decoration: none;
}

/* ---- Security / Key Cards ---- */
.key-card {
  background: var(--stone-900);
  color: var(--stone-50);
  border: 1.5px solid var(--border-ink);
  border-radius: var(--radius-lg);
  padding: 36px;
  font-family: var(--font-mono);
}

.key-card .key-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone-400);
  margin-bottom: 12px;
  display: block;
}

.fingerprint {
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  color: var(--stone-50);
  word-break: break-all;
}

@media (max-width: 640px) {
  .fingerprint {
    font-size: 15px;
    letter-spacing: 0.06em;
  }
}

.key-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

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

.key-type-card {
  background: var(--surface);
  border: 1.5px solid var(--border-ink);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.key-type-card h4 {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--teal-700);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--border-ink);
}

.key-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-strong);
  gap: 16px;
}

.key-row:last-child {
  border-bottom: none;
}

.key-row .key-action {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--stone-500);
  white-space: nowrap;
  flex: none;
  margin-top: 2px;
}

.key-row .key-value {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  text-align: right;
  word-break: break-all;
}

/* ---- Policy Badges ---- */
.policy-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.policy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--teal-700);
  background: var(--teal-50);
  border: 1.5px solid var(--teal-400);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
}

/* ---- Verification Links ---- */
.verify-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.verify-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-ink);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.verify-links a:hover {
  background: var(--bg-surface2);
  text-decoration: none;
}

/* ---- Section Label (for contact sub-sections) ---- */
.section-label {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember-600);
  margin-bottom: 16px;
  display: block;
}

/* ---- Contact Form (enhanced) ---- */
.contact-form-card {
  background: var(--surface);
  border: 1.5px solid var(--border-ink);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--offset-ink);
}

@media (max-width: 640px) {
  .contact-form-card {
    padding: 24px;
  }
}

/* ---- Dark CTA Band (security) ---- */
.dark-cta {
  background: var(--stone-950);
  color: var(--stone-50);
  border: 1.5px solid var(--border-ink);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
}

.dark-cta h3 {
  color: var(--stone-50);
  font-size: 28px;
  margin-bottom: 12px;
}

.dark-cta p {
  color: var(--stone-300);
  font-size: 16px;
  max-width: 480px;
}
