/* ==========================================================================
   Xenocortical Mice — field-guide / lab-report editorial design
   Fonts: Fraunces (display) · IBM Plex Sans (body) · IBM Plex Mono (labels)
   ========================================================================== */

:root {
  --paper: #F6F3EC;
  --paper-deep: #EFEAE0;
  --card: #FDFCF9;
  --ink: #131C2E;
  --ink-soft: #3D4658;
  --muted: #6B7280;
  --hairline: #D9D3C5;
  --accent: #C6472E;      /* signal red — fiber tracks */
  --blue: #2E5FB8;
  --green: #2E8A5A;
  --navy-block: #101B31;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;
  --radius: 4px;
  --shadow: 0 2px 10px rgba(19, 28, 46, 0.07);
  --shadow-lift: 0 10px 28px rgba(19, 28, 46, 0.13);
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

::selection { background: #F3D8A0; color: var(--ink); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* --------------------------------------------------------------------------
   Header — solid paper at rest so it reads on light pages everywhere
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 243, 236, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }

.brand-mark {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background:
    linear-gradient(90deg,
      var(--green) 0 33.4%,
      var(--accent) 33.4% 66.7%,
      var(--blue) 66.7% 100%);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px;
  background: var(--paper);
  border-radius: 1px;
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }

.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.brand-tag {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.site-nav { margin-left: auto; display: flex; gap: 26px; align-items: center; }

.site-nav a {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none;
  margin-left: auto;
  flex-shrink: 0;
  width: 44px; height: 40px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  z-index: 60;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle-bar { width: 18px; height: 2px; background: var(--ink); transition: transform 0.2s ease, opacity 0.2s ease; display: block; }
.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--hairline);
  background: var(--paper);
  padding: 8px 24px 18px;
}
.mobile-nav a {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}
.mobile-nav a:last-child { border-bottom: none; }
.nav-open .mobile-nav { display: flex; }

@media (max-width: 860px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
}

/* --------------------------------------------------------------------------
   Kickers, headings, shared bits
   -------------------------------------------------------------------------- */

.kicker {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}
.kicker::before {
  content: "";
  display: inline-block;
  width: 22px; height: 2px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 10px;
}

.section-heading {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}

.section-lede {
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 auto 0;
}

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--navy-block); transform: translateY(-1px); box-shadow: var(--shadow-lift); }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--card); color: var(--accent); border-color: var(--accent); box-shadow: var(--shadow); }

/* --------------------------------------------------------------------------
   Homepage hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 540px at 88% -12%, rgba(46, 95, 184, 0.42), transparent 65%),
    radial-gradient(760px 520px at -12% 115%, rgba(198, 71, 46, 0.24), transparent 60%),
    linear-gradient(160deg, #0D1730 0%, var(--navy-block) 55%, #0A1224 100%);
  color: var(--paper);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(246, 243, 236, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 243, 236, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 32% 42%, #000 25%, transparent 74%);
  mask-image: radial-gradient(ellipse at 32% 42%, #000 25%, transparent 74%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { max-width: 560px; margin: 0 auto; }
}
.hero .kicker { color: #F0B341; }
.hero .kicker::before { background: #F0B341; }

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.6vw, 4.4rem);
  line-height: 1.03;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
  max-width: 15ch;
  text-shadow: 0 2px 24px rgba(10, 18, 36, 0.6);
}
.hero h1 em { font-style: italic; font-weight: 500; color: #F0B341; }

.hero-lede { font-size: clamp(1.05rem, 1.7vw, 1.25rem); line-height: 1.6; color: #C9CFDD; max-width: 54ch; margin: 0 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .btn {
  border-color: #F0B341;
  background: #F0B341;
  color: #1A1408;
  box-shadow: 0 6px 22px rgba(240, 179, 65, 0.28);
}
.hero .btn:hover { background: #FFC95C; border-color: #FFC95C; color: #1A1408; }
.hero .btn-ghost {
  background: rgba(246, 243, 236, 0.07);
  color: var(--paper);
  border-color: rgba(246, 243, 236, 0.55);
  box-shadow: none;
}
.hero .btn-ghost:hover {
  background: rgba(246, 243, 236, 0.16);
  color: var(--paper);
  border-color: var(--paper);
  box-shadow: none;
}

.hero-media {
  position: relative;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(246, 243, 236, 0.24);
  box-shadow:
    0 30px 70px rgba(4, 8, 18, 0.55),
    0 0 90px rgba(240, 179, 65, 0.14);
  transform: rotate(0.5deg);
}
.hero-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(200deg, rgba(240, 179, 65, 0.10), transparent 42%);
  pointer-events: none;
}
.hero-media figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 26px 16px 12px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246, 243, 236, 0.88);
  background: linear-gradient(transparent, rgba(10, 18, 36, 0.88));
}
@media (max-width: 900px) {
  .hero-media img { aspect-ratio: 16 / 10; }
}

/* --------------------------------------------------------------------------
   Numbers band
   -------------------------------------------------------------------------- */

.numbers { background: var(--card); border-bottom: 1px solid var(--hairline); }
.numbers-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 860px) { .numbers-inner { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .numbers-inner { grid-template-columns: 1fr; } }
.number-card { border-left: 3px solid var(--accent); padding-left: 16px; }
.number-card:nth-child(2) { border-color: var(--blue); }
.number-card:nth-child(3) { border-color: var(--green); }
.number-card:nth-child(4) { border-color: #F0B341; }
.number-value { font-family: var(--serif); font-weight: 600; font-size: 1.9rem; line-height: 1.1; margin: 0 0 4px; }
.number-label { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding: clamp(52px, 8vw, 92px) 0; }
.section-tint { background: var(--paper-deep); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head .kicker { justify-content: center; }

/* Explainer trio — asymmetric lab-notebook cards */
.explainer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
@media (max-width: 920px) { .explainer-grid { grid-template-columns: 1fr; } }
.explainer-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-top: 4px solid var(--ink);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.explainer-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.explainer-card.is-red { border-top-color: var(--accent); }
.explainer-card.is-blue { border-top-color: var(--blue); }
.explainer-card.is-green { border-top-color: var(--green); }
.explainer-num { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.explainer-card h3 { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; line-height: 1.2; margin: 0 0 10px; }
.explainer-card p { color: var(--ink-soft); margin: 0 0 16px; font-size: 0.98rem; }
.explainer-card a { font-family: var(--mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; }
.explainer-card a::after { content: " >"; }

/* --------------------------------------------------------------------------
   Post cards (compiled into .blog-grid containers)
   -------------------------------------------------------------------------- */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}
@media (max-width: 760px) { .blog-grid { grid-template-columns: 1fr; } }

.post-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

.post-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-deep); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease; }
.post-card:hover .post-card-media img { transform: scale(1.04); }

.post-card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.post-card-meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.post-card-tags { color: var(--accent); font-weight: 600; }
.post-card-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

.post-card-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; line-height: 1.22; margin: 0; }
.post-card-title a { color: var(--ink); text-decoration: none; }
.post-card-title a:hover { color: var(--accent); }

.post-card-excerpt { color: var(--ink-soft); font-size: 0.96rem; margin: 0; }

/* --------------------------------------------------------------------------
   Quote band
   -------------------------------------------------------------------------- */

.quote-band { background: var(--navy-block); color: var(--paper); }
.quote-inner { max-width: 820px; margin: 0 auto; padding: clamp(52px, 8vw, 88px) 24px; text-align: center; }
.quote-band blockquote {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.35;
  margin: 0 0 20px;
}
.quote-band .quote-cite { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: #F0B341; margin: 0; }

/* --------------------------------------------------------------------------
   Listing pages
   -------------------------------------------------------------------------- */

.listing-head { padding: clamp(40px, 6vw, 64px) 0 36px; border-bottom: 1px solid var(--hairline); }
.listing-head h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.08; margin: 0 0 12px; }
.listing-head p { color: var(--ink-soft); max-width: 60ch; margin: 0; }
.listing-body { padding: 40px 0 clamp(56px, 8vw, 88px); }
.listing-empty { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   Post pages (blog-template layout)
   -------------------------------------------------------------------------- */

.post-hero { border-bottom: 1px solid var(--hairline); background: var(--card); }
.post-hero-inner { max-width: 880px; margin: 0 auto; padding: clamp(44px, 7vw, 76px) 24px 30px; }
.post-title { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.08; letter-spacing: -0.01em; margin: 0 0 16px; }
.post-standfirst { font-size: clamp(1.05rem, 1.8vw, 1.25rem); line-height: 1.55; color: var(--ink-soft); margin: 0 0 20px; }
.post-meta { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.post-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

.post-hero-media { max-width: 1120px; margin: 0 auto; padding: 0 24px 36px; }
.post-hero-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

.post-layout { max-width: 760px; margin: 0 auto; padding: 36px 24px 20px; }

.breadcrumb { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin: 0 0 26px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

[data-blog-toc] {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 34px;
}
[data-blog-toc] .toc-title { font-family: var(--mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
[data-blog-toc] a { display: block; font-size: 0.9rem; color: var(--ink-soft); text-decoration: none; padding: 3px 0; }
[data-blog-toc] a:hover { color: var(--accent); }

.post-body h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.45rem, 2.8vw, 1.85rem);
  line-height: 1.18;
  margin: 44px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
}
.post-body h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.post-body h3 { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; margin: 30px 0 10px; }
.post-body p { margin: 0 0 18px; color: var(--ink); }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-left: 24px; color: var(--ink); }
.post-body li { margin-bottom: 8px; }
.post-body strong { font-weight: 600; }

.key-point {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-left: 4px solid #F0B341;
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 0 0 26px;
}
.key-point .key-point-label { font-family: var(--mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.key-point p { margin: 0; font-family: var(--serif); font-size: 1.08rem; line-height: 1.5; }

.post-body blockquote {
  margin: 26px 0;
  padding: 18px 24px;
  border-left: 3px solid var(--blue);
  background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--ink);
}
.post-body blockquote cite { display: block; margin-top: 10px; font-family: var(--mono); font-style: normal; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.post-figure { margin: 30px 0; }
.post-lead-figure { margin: 0 0 26px; }
.post-lead-figure img { width: 100%; }
.post-lead-figure-portrait img { max-width: 420px; margin: 0 auto; }
.post-figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
.post-figure figcaption { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--muted); margin-top: 8px; line-height: 1.6; }

/* Reference list */
.ref-list { list-style: none; padding: 0; margin: 26px 0 0; counter-reset: ref; }
.ref-list li {
  counter-increment: ref;
  padding: 16px 0 16px 44px;
  border-bottom: 1px solid var(--hairline);
  position: relative;
  font-size: 0.94rem;
  color: var(--ink-soft);
}
.ref-list li::before {
  content: "[" counter(ref) "]";
  position: absolute; left: 0; top: 16px;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 600; color: var(--accent);
}
.ref-list a { color: var(--blue); }

/* Data tables (comparison) */
.compare-table { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: 0.94rem; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); overflow: hidden; }
.compare-table th, .compare-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.compare-table thead th { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; background: var(--navy-block); color: var(--paper); border-bottom: none; }
.compare-table tbody tr:nth-child(even) { background: var(--paper-deep); }
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table td:first-child { font-weight: 600; white-space: nowrap; }
.table-scroll { overflow-x: auto; }

.post-related { max-width: 1120px; margin: 0 auto; padding: 30px 24px 70px; }
.related-heading { font-family: var(--mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin: 0 0 20px; }

/* --------------------------------------------------------------------------
   Papers page
   -------------------------------------------------------------------------- */

.paper-entry {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 20px;
}
@media (max-width: 620px) { .paper-entry { grid-template-columns: 1fr; } }
.paper-no { font-family: var(--mono); font-weight: 600; font-size: 0.8rem; color: var(--accent); }
.paper-entry h3 { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; line-height: 1.3; margin: 0 0 6px; }
.paper-cite { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.03em; color: var(--muted); margin: 0 0 10px; }
.paper-entry p { color: var(--ink-soft); font-size: 0.96rem; margin: 0 0 10px; }
.paper-link { font-family: var(--mono); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   Contact form
   -------------------------------------------------------------------------- */

.contact-section { padding: clamp(48px, 7vw, 80px) 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-form {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.contact-form label { display: block; font-family: var(--mono); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 6px; }
.contact-form input, .contact-form textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.98rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 0 0 18px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(46, 95, 184, 0.15); }
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form .form-hint { font-size: 0.8rem; color: var(--muted); margin: -10px 0 18px; }
#formStatus { margin-top: 12px; font-size: 0.92rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { background: var(--navy-block); color: #C9CFDD; }
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(44px, 6vw, 64px) 24px 30px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}
@media (max-width: 820px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; color: var(--paper); margin: 0 0 12px; }
.footer-col p { font-size: 0.9rem; line-height: 1.65; margin: 0 0 12px; }
.footer-disclaimer { font-size: 0.78rem; color: #8892A6; }
.footer-heading { font-family: var(--mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #F0B341; margin: 0 0 14px; }
.footer-col a { display: block; color: #C9CFDD; text-decoration: none; font-size: 0.9rem; padding: 5px 0; }
.footer-col a:hover { color: var(--paper); text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(246, 243, 236, 0.14);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 24px 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
  color: #8892A6;
}
.footer-bottom p { margin: 0; }
.footer-credit a { opacity: 0.5; font-weight: 300; color: inherit; text-decoration: none; }
.footer-credit a:hover { opacity: 0.8; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
