/* -----------------------------------------------------------------------------
   evah.institute — design system
   Phase 1, hand-authored static. Designed to port cleanly to Astro later.
   Tokens (:root) → reset → base type → layout → components.
   ----------------------------------------------------------------------------- */

:root {
  /* ---- Colour ---- */
  --c-ink:        #2a2a2a;
  --c-ink-soft:   #4b4b4b;
  --c-muted:      #6b7280;
  --c-line:       #e5e7eb;

  --c-bg:         #ffffff;
  --c-bg-alt:     #f8f7f4;
  --c-bg-soft:    #f3f1ec;

  --c-accent:     #2dd4a8;
  --c-accent-ink: #0f8f73;
  --c-maroon:     #8b3a3a;
  --c-rose:       #c99b96;
  --c-rose-ink:   #5e2e2a;

  /* ---- Type ---- */
  --ff-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
              Cambria, Georgia, serif;
  --ff-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
              "Helvetica Neue", Arial, system-ui, sans-serif;

  --fs-xs:    0.8125rem;   /* 13 */
  --fs-sm:    0.9375rem;   /* 15 — detail text */
  --fs-base:  1.0625rem;   /* 17 — body */
  --fs-lg:    1.25rem;     /* 20 — subsection h3 */
  --fs-xl:    1.5rem;      /* 24 */
  --fs-2xl:   2rem;        /* 32 — section h2 max */
  --fs-3xl:   2.75rem;     /* 44 — page H1 base */
  --fs-4xl:   3.5rem;      /* 56 — page H1 max */

  --lh-tight:  1.15;
  --lh-snug:   1.35;
  --lh-detail: 1.45;
  --lh-body:   1.65;

  /* ---- Spacing (4px base) ---- */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.25rem;
  --s-6: 1.75rem;
  --s-7: 2.5rem;
  --s-8: 3.5rem;
  --s-9: 5rem;

  /* ---- Layout ---- */
  --container: 72rem;
  --measure:   38rem;
  --radius:    4px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
}

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

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

body {
  margin: 0;
  font-family: var(--ff-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* Links — colour for affordance, underline only on hover/focus */
a {
  color: var(--c-ink);
  text-decoration: none;
}
a:hover,
a:focus-visible {
  color: var(--c-accent-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--c-accent-ink);
  outline-offset: 3px;
  border-radius: 2px;
}

/* -----------------------------------------------------------------------------
   Heading hierarchy
   Page H1 > section H2 (.display) > subsection H3.
   Page H1 lives inside .hero__title / .page-hero__title so the bare element
   defaults stay calm (44px max) and the page-hero title is the visual H1.
   ----------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--ff-serif);
  font-weight: 500;
  color: var(--c-ink);
  line-height: var(--lh-tight);
  margin: 0 0 var(--s-4);
  letter-spacing: -0.005em;
}
h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); font-weight: 500; }
h4 { font-size: var(--fs-base); }

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 var(--s-5); padding-left: 1.25rem; }
li { margin-bottom: var(--s-2); }
li:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

hr {
  border: 0;
  border-top: 1px solid var(--c-line);
  margin: var(--s-7) 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: var(--s-4);
  background: var(--c-ink);
  color: #fff;
  padding: var(--s-2) var(--s-4);
  z-index: 100;
  border-radius: var(--radius);
}
.skip-link:focus { top: var(--s-4); }

/* -----------------------------------------------------------------------------
   Layout primitives
   ----------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-5);
}
@media (min-width: 48em) {
  .container { padding: 0 var(--s-6); }
}

/* Even section rhythm across alternating bands */
.section { padding: var(--s-7) 0; }
@media (min-width: 48em) { .section { padding: var(--s-8) 0; } }

.section--alt { background: var(--c-bg-alt); }

/* Bring two consecutive .section blocks closer together when they share content,
   used sparingly on intro + body pairs */
.section--tight { padding: var(--s-5) 0; }
@media (min-width: 48em) { .section--tight { padding: var(--s-6) 0; } }

.measure { max-width: var(--measure); }

.eyebrow {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin: 0 0 var(--s-3);
  font-weight: 600;
}

.lede {
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
  color: var(--c-ink-soft);
  max-width: var(--measure);
}

/* Display heading — section H2. Sits clearly below the page H1 in scale. */
.display {
  font-family: var(--ff-serif);
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  color: var(--c-maroon);
  line-height: var(--lh-tight);
  margin: 0 0 var(--s-4);
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* Subsection — used for the smaller in-page headings (e.g. "Industry supply-chain LCI",
   "Adopted EN 15804 Sub-PCRs"). Sans-serif uppercase keeps them distinctly tertiary. */
.subhead {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin: var(--s-6) 0 var(--s-3);
  font-weight: 600;
}

/* Detail text — smaller font + tighter line-height. Apply to dense reference lists,
   product directories, PCR/EPD lists, geography lists, year-blocks, tables. */
.detail {
  font-size: var(--fs-sm);
  line-height: var(--lh-detail);
}
.detail li { margin-bottom: var(--s-1); }

/* Two-column section: display heading on the left, body on the right */
.split {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: 1fr;
}
@media (min-width: 56em) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s-7); }
}

/* -----------------------------------------------------------------------------
   Header / nav
   ----------------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--c-line);
  background: var(--c-bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  padding: var(--s-4) 0;
  flex-wrap: wrap;
}

.brand { text-decoration: none; color: var(--c-ink); }
.brand:hover { color: var(--c-ink); text-decoration: none; }
.brand__name {
  font-family: var(--ff-serif);
  font-size: 1.625rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.005em;
  display: block;
}
.brand__tag {
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  color: var(--c-muted);
  margin-top: 2px;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  flex-wrap: wrap;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--s-5);
  flex-wrap: wrap;
}
.site-nav li { margin: 0; }
.site-nav ul a {
  color: var(--c-ink);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: var(--s-2) 0;
}
.site-nav ul a:hover,
.site-nav ul a:focus-visible {
  color: var(--c-accent-ink);
  text-decoration: none;
}
/* Active state — scoped to the nav list so it doesn't bleed into the .btn pill */
.site-nav ul a[aria-current="page"] {
  color: var(--c-accent-ink);
  font-weight: 600;
}

/* Pill button — always light text on dark pill, including when it's the active page */
.btn {
  display: inline-block;
  background: var(--c-ink);
  color: #fff;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  text-decoration: none;
  border: 1px solid var(--c-ink);
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover,
.btn:focus-visible {
  background: transparent;
  color: var(--c-ink);
  text-decoration: none;
}
.btn[aria-current="page"] {
  background: var(--c-maroon);
  border-color: var(--c-maroon);
  color: #fff;
}
.btn[aria-current="page"]:hover,
.btn[aria-current="page"]:focus-visible {
  background: var(--c-maroon);
  color: #fff;
  opacity: 0.9;
}
.btn--ghost {
  background: transparent;
  color: var(--c-ink);
}
.btn--ghost:hover { background: var(--c-ink); color: #fff; }

/* -----------------------------------------------------------------------------
   Hero — full-bleed (Home)
   100vw, ~80vh, headline overlaid white.
   ----------------------------------------------------------------------------- */
.hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background: #1a1a1a;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
}
.hero__media[data-active="true"] { opacity: 1; }
.hero__media video,
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.40) 0%, rgba(0,0,0,0.25) 45%, rgba(0,0,0,0.55) 100%);
  z-index: -1;
}

.hero__inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--s-9) var(--s-5);
}
@media (min-width: 48em) { .hero__inner { padding: var(--s-9) var(--s-6); } }

.hero__title {
  font-family: var(--ff-serif);
  font-size: clamp(2.25rem, 6vw, 4.5rem);   /* trimmed ~14% from the previous max */
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-5);
  max-width: 16ch;
  color: #fff;
  text-shadow: 0 1px 24px rgba(0,0,0,0.35);
}
.hero__title em {
  font-style: italic;
  color: #fff;
}
.hero__lede {
  font-size: clamp(1rem, 1.5vw, 1.1875rem);
  line-height: var(--lh-snug);
  max-width: 42ch;
  color: #f5f5f5;
  text-shadow: 0 1px 16px rgba(0,0,0,0.4);
}

@media (prefers-reduced-motion: reduce) {
  .hero__media video { display: none; }
}

/* -----------------------------------------------------------------------------
   Page hero — interior pages. One consistent leaves banner across
   Services / EPDs / People / LCA / LCIs. Contact uses Home hero treatment.
   ----------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  min-height: clamp(420px, 65vh, 720px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: #fff;
  background: #1f1f1f;
  isolation: isolate;
}
.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.20) 0%, rgba(0,0,0,0.55) 100%);
  z-index: -1;
}
.page-hero__inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--s-8) var(--s-5);
}
@media (min-width: 48em) { .page-hero__inner { padding: var(--s-8) var(--s-6); } }
.page-hero .eyebrow {
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--s-2);
}
.page-hero__title {
  font-family: var(--ff-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.08;
  margin: 0;
  color: #fff;
  text-shadow: 0 1px 16px rgba(0,0,0,0.4);
}

/* -----------------------------------------------------------------------------
   Preface gallery (Home)
   ----------------------------------------------------------------------------- */
.preface-gallery {
  margin-top: var(--s-6);
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
}
@media (min-width: 40em) {
  .preface-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.preface-gallery figure { margin: 0; }
.preface-gallery img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

/* -----------------------------------------------------------------------------
   Content lists
   ----------------------------------------------------------------------------- */
.card {
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--s-5);
}

/* Dense, columned lists — automatically use detail text scale */
.cols-list {
  columns: 1;
  column-gap: var(--s-7);
  font-size: var(--fs-sm);
  line-height: var(--lh-detail);
}
@media (min-width: 40em) { .cols-list { columns: 2; } }
@media (min-width: 64em) { .cols-list { columns: 3; } }
.cols-list ul { padding-left: 1.1rem; margin: 0; }
.cols-list li {
  break-inside: avoid;
  margin-bottom: var(--s-1);
}

/* Year-grouped client lists (Services page) — detail text */
.year-block { margin-bottom: var(--s-7); }
.year-block:last-child { margin-bottom: 0; }
.year-block h3 {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: var(--s-3);
  font-weight: 600;
}
.year-block > p {
  font-size: var(--fs-sm);
  line-height: var(--lh-detail);
  color: var(--c-ink-soft);
  max-width: var(--measure);
  margin-bottom: var(--s-3);
}

/* Contact block */
.contact-block { font-style: normal; }
.contact-block p { margin-bottom: var(--s-4); }
.contact-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: var(--s-5);
  row-gap: var(--s-2);
  margin: var(--s-5) 0;
}
.contact-dl dt {
  color: var(--c-muted);
  font-size: var(--fs-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.contact-dl dd { margin: 0; }
.contact-cta { margin-top: var(--s-5); }

/* LCA radar figure (Phase-2 TODO: replace) */
.lca-figure { margin: var(--s-6) 0 0; }
.lca-figure img {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  display: block;
}

/* People page */
.person {
  margin-bottom: var(--s-6);
  max-width: 52rem;
}
.person:last-child { margin-bottom: 0; }
.person h3 {
  font-family: var(--ff-serif);
  font-size: var(--fs-lg);
  color: var(--c-maroon);
  font-weight: 500;
  margin-bottom: var(--s-2);
}
.person p {
  font-size: var(--fs-sm);
  line-height: var(--lh-detail);
  color: var(--c-ink-soft);
}
.person__where {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  color: var(--c-muted);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* EPD directory — definition list, 2 columns on desktop, detail scale */
.epd-list { margin: 0; }
@media (min-width: 48em) {
  .epd-list { column-count: 2; column-gap: var(--s-7); }
}
.epd-list dt {
  font-family: var(--ff-serif);
  font-size: var(--fs-base);
  color: var(--c-maroon);
  margin: 0 0 var(--s-1);
  font-weight: 500;
  break-after: avoid;
}
.epd-list dd {
  margin: 0 0 var(--s-4);
  padding-left: 0;
  color: var(--c-ink-soft);
  font-size: var(--fs-sm);
  line-height: var(--lh-detail);
  break-inside: avoid;
}

/* Document download list */
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li {
  border-top: 1px solid var(--c-line);
  padding: var(--s-3) 0;
  margin-bottom: 0;
}
.doc-list li:last-child { border-bottom: 1px solid var(--c-line); }
.doc-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  color: var(--c-ink);
  text-decoration: none;
}
.doc-list a:hover,
.doc-list a:focus-visible {
  color: var(--c-accent-ink);
  text-decoration: none;
}
.doc-list .doc-list__meta {
  font-size: var(--fs-xs);
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* -----------------------------------------------------------------------------
   LCBA metrics table — horizontally scrollable on mobile, detail scale
   ----------------------------------------------------------------------------- */
.lcba-metrics-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: var(--s-5) 0 var(--s-3);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-bg);
}
.lcba-metrics {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  line-height: var(--lh-detail);
}
.lcba-metrics caption {
  caption-side: top;
  text-align: left;
  padding: var(--s-3) var(--s-4);
  font-size: var(--fs-xs);
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--c-bg-alt);
  border-bottom: 1px solid var(--c-line);
}
.lcba-metrics th,
.lcba-metrics td {
  padding: var(--s-2) var(--s-4);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--c-line);
}
.lcba-metrics thead th {
  font-family: var(--ff-sans);
  background: var(--c-bg-soft);
  font-weight: 600;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-muted);
  white-space: nowrap;
}
.lcba-metrics tr.group th {
  background: var(--c-bg-alt);
  color: var(--c-maroon);
  font-family: var(--ff-serif);
  font-size: var(--fs-base);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  padding: var(--s-3) var(--s-4);
}
.lcba-metrics tbody th[scope="row"] {
  font-weight: 600;
  color: var(--c-ink);
  font-family: var(--ff-sans);
}
.lcba-metrics sub { font-size: 0.78em; }
.table-note {
  font-size: var(--fs-xs);
  color: var(--c-muted);
  margin-top: var(--s-2);
}

/* -----------------------------------------------------------------------------
   CRC partners tables (LCIs) — 3-col / 2-col on desktop, stacked on mobile
   ----------------------------------------------------------------------------- */
.crc-partners,
.crc-alliances {
  margin: var(--s-5) 0 var(--s-7);
}
.crc-partners h3,
.crc-alliances h3 {
  font-family: var(--ff-serif);
  font-size: var(--fs-lg);
  color: var(--c-maroon);
  font-weight: 500;
  margin-bottom: var(--s-4);
}
.crc-cols {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: 1fr;
}
@media (min-width: 48em) {
  .crc-partners .crc-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .crc-alliances .crc-cols { grid-template-columns: 1fr 1.6fr; gap: var(--s-7); }
}
.crc-col h4 {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: var(--s-3);
  font-weight: 600;
}
.crc-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-detail);
}
.crc-col li {
  border-top: 1px solid var(--c-line);
  padding: var(--s-2) 0;
  margin-bottom: 0;
}
.crc-col li:last-child { border-bottom: 1px solid var(--c-line); }

/* -----------------------------------------------------------------------------
   Contact form
   ----------------------------------------------------------------------------- */
.contact-form {
  display: grid;
  gap: var(--s-4);
}
.contact-form .form-row {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
}
@media (min-width: 36em) {
  .contact-form .form-row { grid-template-columns: 1fr 1fr; }
}
.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.contact-form label {
  font-family: var(--ff-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-muted);
  font-weight: 600;
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  font-family: var(--ff-serif);
  font-size: var(--fs-base);
  color: var(--c-ink);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--s-3) var(--s-4);
  width: 100%;
  line-height: var(--lh-snug);
  transition: border-color .15s, box-shadow .15s;
}
.contact-form textarea { resize: vertical; min-height: 9rem; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--c-accent-ink);
  box-shadow: 0 0 0 3px rgba(45,212,168,0.18);
}
.contact-form .hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form .form-actions {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  flex-wrap: wrap;
  margin-top: var(--s-2);
}
.contact-form .form-status {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--c-muted);
}
.contact-form .form-status.is-error { color: var(--c-maroon); }
.contact-form button[type="submit"]:disabled { opacity: 0.6; cursor: progress; }

/* -----------------------------------------------------------------------------
   Contact form panels — success + error post-submit states
   ----------------------------------------------------------------------------- */
.form-shell { display: block; }
.form-shell > [hidden] { display: none; }

.form-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--s-5);
  row-gap: var(--s-3);
  padding: var(--s-7) var(--s-6);
  border-radius: var(--radius);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  animation: form-panel-in 0.45s ease-out;
}
.form-panel:focus { outline: none; }
.form-panel:focus-visible {
  outline: 2px solid var(--c-accent-ink);
  outline-offset: 3px;
}

.form-panel__icon {
  grid-row: 1 / span 3;
  width: 3rem;
  height: 3rem;
  flex: none;
}
.form-panel__icon svg { width: 100%; height: 100%; display: block; }

.form-panel__title {
  grid-column: 2;
  font-family: var(--ff-serif);
  font-size: var(--fs-xl);
  font-weight: 500;
  line-height: var(--lh-tight);
  margin: 0;
  letter-spacing: -0.005em;
}
.form-panel__body {
  grid-column: 2;
  margin: 0;
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
  color: var(--c-ink-soft);
}
.form-panel__actions {
  grid-column: 2;
  margin: var(--s-2) 0 0;
}

/* Success — sage-green accent on cream */
.form-panel--success {
  background: #f0f8f4;
  border-color: #cfe6d9;
  color: var(--c-ink);
}
.form-panel--success .form-panel__icon  { color: var(--c-accent-ink); }
.form-panel--success .form-panel__title { color: var(--c-accent-ink); }

/* Error — maroon on warm rose-tinted background */
.form-panel--error {
  background: #faf1ef;
  border-color: #e8cfca;
  color: var(--c-ink);
}
.form-panel--error .form-panel__icon  { color: var(--c-maroon); }
.form-panel--error .form-panel__title { color: var(--c-maroon); }
.form-panel--error a {
  color: var(--c-maroon);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.form-panel--error a:hover,
.form-panel--error a:focus-visible {
  color: var(--c-rose-ink);
}

@keyframes form-panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .form-panel { animation: none; }
}

@media (max-width: 30em) {
  .form-panel {
    grid-template-columns: 1fr;
    column-gap: 0;
    padding: var(--s-6) var(--s-5);
    text-align: left;
  }
  .form-panel__icon { grid-row: auto; grid-column: 1; }
  .form-panel__title,
  .form-panel__body,
  .form-panel__actions { grid-column: 1; }
}

/* -----------------------------------------------------------------------------
   Footer
   ----------------------------------------------------------------------------- */
.site-footer {
  background: var(--c-rose);
  color: #fff;
  padding: var(--s-8) 0 var(--s-6);
  margin-top: var(--s-9);
}
.site-footer a { color: #fff; text-decoration: underline; }
.site-footer a:hover,
.site-footer a:focus-visible { color: var(--c-rose-ink); text-decoration: underline; }

.site-footer__grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
}
@media (min-width: 56em) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: var(--s-8); }
}

.site-footer h2 {
  font-family: var(--ff-serif);
  font-size: var(--fs-2xl);
  color: #fff;
  margin: 0 0 var(--s-4);
  font-weight: 500;
}
.site-footer h3 {
  font-family: var(--ff-serif);
  font-size: var(--fs-lg);
  color: #fff;
  margin: 0 0 var(--s-2);
  font-weight: 500;
}
.site-footer__tag {
  letter-spacing: 0.06em;
  font-size: var(--fs-sm);
  opacity: 0.9;
  margin-bottom: var(--s-5);
}
.site-footer__contact {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.7;
}
.site-footer__contact li { margin-bottom: var(--s-2); }
.site-footer__label {
  display: inline-block;
  min-width: 6rem;
  opacity: 0.85;
}
.site-footer__bar {
  margin-top: var(--s-7);
  padding-top: var(--s-4);
  border-top: 1px solid rgba(255,255,255,0.25);
  text-align: center;
  font-size: var(--fs-xs);
  opacity: 0.9;
}

/* -----------------------------------------------------------------------------
   Utility
   ----------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.mt-0 { margin-top: 0; }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mb-0 { margin-bottom: 0; }
