/* ==========================================================================
   Hidden3DImage — Contemporary Industrial Poster UI
   Vanilla CSS. No frameworks. Semantic tokens only.
   ========================================================================== */

:root {
  /* Type */
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  /* Surfaces */
  --bg-canvas: #f4f3ef;
  --bg-paper: #ffffff;
  --bg-subtle: #eaeae4;
  --surface-beige: #e7e0d2;
  --surface-khaki: #c9be9e;
  --surface-gray-blue: #6e8296;
  --surface-blue-deep: #3d4d5b;

  /* Text */
  --text-primary: #1f2428;
  --text-secondary: #565f66;
  --text-muted: #7d858b;
  --text-on-dark: #f3f2ec;

  /* Accents */
  --accent-primary: #dd9017;
  --accent-bright: #f5c640;
  --accent-champagne: #d8c494;

  /* Lines */
  --border-subtle: #d9d9d2;
  --border-strong: #a7adb0;
  --border-ink: #2a3138;

  /* Geometry */
  --radius-sm: 4px;
  --radius-md: 6px;

  /* Rhythm */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;

  --measure: 68ch;
  --container: 1160px;
}

/* --------------------------------------------------------------------------
   Reset & base
   -------------------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-canvas);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-4);
  color: var(--text-primary);
}

h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.12rem; }

p { margin: 0 0 var(--space-4); max-width: var(--measure); }
ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; max-width: var(--measure); }
li { margin-bottom: var(--space-2); }

a { color: var(--text-primary); text-decoration-color: var(--accent-primary); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent-primary); }

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

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

hr.rule {
  border: 0;
  border-top: 1px solid var(--border-subtle);
  margin: var(--space-6) 0;
}

.container {
  width: min(100% - 2 * var(--space-4), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text-primary);
  color: var(--text-on-dark);
  padding: var(--space-2) var(--space-4);
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* Visibility toggled via class only — never rely on the `hidden` attribute
   for elements that also receive display values elsewhere. */
.is-hidden { display: none !important; }

/* Eyebrow / spec label — the small engineering caption used across the site */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent-primary);
  flex: none;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  background: var(--bg-paper);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}
.brand:hover { color: var(--text-primary); }

.brand-mark { flex: none; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}
.brand-name span { color: var(--accent-primary); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  cursor: pointer;
  line-height: 0;
  color: var(--text-primary);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text-secondary);
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}
.site-nav a:hover { color: var(--text-primary); }
.site-nav a[aria-current="page"] {
  color: var(--text-primary);
  border-bottom-color: var(--accent-primary);
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-paper);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 8px 20px rgba(31, 36, 40, 0.08);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: var(--space-2) var(--space-4) var(--space-4);
  }
  .site-nav a {
    display: block;
    padding: var(--space-3) var(--space-2);
    border-bottom: 1px solid var(--bg-subtle);
    min-height: 44px;
  }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--accent-primary); }
}

/* --------------------------------------------------------------------------
   Hero (compact)
   -------------------------------------------------------------------------- */

.hero {
  padding: var(--space-6) 0 var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  background:
    linear-gradient(to bottom, var(--bg-paper), var(--bg-canvas));
}

.hero h1 { max-width: 22ch; margin-bottom: var(--space-3); }

.hero p.lede {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 58ch;
  margin-bottom: var(--space-4);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta span::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent-primary);
  border-radius: 1px;
  transform: rotate(45deg);
}

/* --------------------------------------------------------------------------
   Generator layout
   -------------------------------------------------------------------------- */

.generator-section { padding: var(--space-6) 0; }

.generator-grid {
  display: grid;
  gap: var(--space-5);
  align-items: start;
}

@media (min-width: 980px) {
  .generator-grid { grid-template-columns: minmax(320px, 36%) 1fr; }
}

/* Control panel */
.panel {
  background: var(--bg-paper);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.panel-head .index { color: var(--accent-primary); }

.panel-body { padding: var(--space-4); }

.control-group { margin-bottom: var(--space-5); }
.control-group:last-child { margin-bottom: 0; }

.control-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.control-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: var(--space-2) 0 0;
}

/* Mode tabs */
.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.mode-tab {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 12px;
  background: var(--bg-paper);
  border: 0;
  cursor: pointer;
  color: var(--text-secondary);
  min-height: 44px;
  transition: background 150ms ease, color 150ms ease;
}
.mode-tab + .mode-tab { border-left: 1px solid var(--border-strong); }
.mode-tab[aria-selected="true"] {
  background: var(--text-primary);
  color: var(--text-on-dark);
}
.mode-tab:hover:not([aria-selected="true"]) { background: var(--bg-subtle); }

/* Text input */
.text-input {
  width: 100%;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-paper);
  color: var(--text-primary);
  min-height: 44px;
}
.text-input:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 1px;
  border-color: var(--accent-primary);
}

/* Shape swatches */
.shape-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}
.shape-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px 8px;
  background: var(--bg-paper);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  min-height: 44px;
  transition: border-color 150ms ease, background 150ms ease;
}
.shape-btn svg { width: 30px; height: 30px; }
.shape-btn:hover { border-color: var(--border-strong); }
.shape-btn[aria-pressed="true"] {
  border-color: var(--text-primary);
  background: var(--bg-subtle);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--text-primary);
}

/* Pattern swatches — miniature poster cards */
.pattern-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}
.pattern-btn {
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-paper);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease;
}
.pattern-btn canvas {
  width: 100%;
  aspect-ratio: 5 / 3;
  display: block;
}
.pattern-btn .pattern-name {
  display: block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 6px 8px;
  border-top: 1px solid var(--border-subtle);
}
.pattern-btn:hover { border-color: var(--border-strong); }
.pattern-btn[aria-pressed="true"] {
  border-color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--text-primary);
}
.pattern-btn[aria-pressed="true"] .pattern-name {
  color: var(--text-primary);
  background: var(--accent-bright);
  border-top-color: var(--text-primary);
}

/* Depth slider */
.slider-row { display: flex; align-items: center; gap: var(--space-3); }

input[type="range"].depth-slider {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--surface-gray-blue), var(--accent-primary));
  outline-offset: 6px;
}
input[type="range"].depth-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-paper);
  border: 2px solid var(--text-primary);
  cursor: pointer;
}
input[type="range"].depth-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-paper);
  border: 2px solid var(--text-primary);
  cursor: pointer;
}

.value-readout {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 3.4ch;
  text-align: right;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  min-height: 46px;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease, transform 120ms ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--text-primary);
  color: var(--text-on-dark);
  width: 100%;
}
.btn-primary:hover { background: var(--border-ink); color: var(--accent-bright); }

.btn-secondary {
  background: var(--bg-paper);
  color: var(--text-primary);
  border-color: var(--border-strong);
  width: 100%;
}
.btn-secondary:hover { border-color: var(--text-primary); color: var(--text-primary); }
.btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-row { display: grid; gap: var(--space-2); margin-top: var(--space-5); }

.tertiary-link {
  display: inline-block;
  margin-top: var(--space-3);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Spoiler / depth reveal */
details.spoiler { margin-top: var(--space-4); }
details.spoiler summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
details.spoiler canvas {
  margin-top: var(--space-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  width: 100%;
}

/* --------------------------------------------------------------------------
   The Plate — technical-drawing frame around the preview (signature element)
   -------------------------------------------------------------------------- */

.plate {
  position: relative;
  background: var(--bg-paper);
  border: 1px solid var(--border-ink);
  border-radius: var(--radius-sm);
}

/* Corner registration ticks */
.plate::before, .plate::after,
.plate .tick-a, .plate .tick-b {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.plate::before { top: -7px; left: -7px; border-top: 2px solid var(--accent-primary); border-left: 2px solid var(--accent-primary); }
.plate::after { top: -7px; right: -7px; border-top: 2px solid var(--accent-primary); border-right: 2px solid var(--accent-primary); }
.plate .tick-a { bottom: -7px; left: -7px; border-bottom: 2px solid var(--accent-primary); border-left: 2px solid var(--accent-primary); }
.plate .tick-b { bottom: -7px; right: -7px; border-bottom: 2px solid var(--accent-primary); border-right: 2px solid var(--accent-primary); }

.plate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-ink);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.plate-head .fig { color: var(--accent-primary); }
.plate-head .plate-status { color: var(--text-muted); }
.plate-head .plate-status[data-state="ready"] { color: var(--text-secondary); }

.plate-canvas-wrap {
  background:
    repeating-linear-gradient(0deg, transparent, transparent 23px, rgba(31,36,40,0.035) 23px, rgba(31,36,40,0.035) 24px),
    repeating-linear-gradient(90deg, transparent, transparent 23px, rgba(31,36,40,0.035) 23px, rgba(31,36,40,0.035) 24px),
    var(--bg-subtle);
  padding: var(--space-4);
}

.plate-canvas-wrap canvas {
  width: 100%;
  aspect-ratio: 11 / 7;
  background: var(--bg-paper);
  border: 1px solid var(--border-subtle);
}

/* Spec rail */
.plate-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--border-ink);
}
@media (min-width: 640px) {
  .plate-specs { grid-template-columns: repeat(4, 1fr); }
}
.spec {
  padding: var(--space-2) var(--space-4);
  border-right: 1px solid var(--border-subtle);
}
.spec:last-child { border-right: 0; }
.spec dt {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}
.spec dd {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Content sections
   -------------------------------------------------------------------------- */

.section { padding: var(--space-7) 0; }
.section-alt {
  background: var(--bg-paper);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.step-grid, .card-grid {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-5);
}
@media (min-width: 720px) {
  .step-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
}

.step {
  background: var(--bg-paper);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-4) var(--space-3);
}
.section-alt .step { background: var(--bg-canvas); }
.step .step-no {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--surface-khaki);
  display: block;
  margin-bottom: var(--space-2);
}
.step h3 { margin-bottom: var(--space-2); }
.step p { font-size: 0.92rem; color: var(--text-secondary); margin-bottom: var(--space-2); }

.link-card {
  display: block;
  background: var(--bg-paper);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease;
}
.link-card:hover { border-color: var(--accent-primary); transform: translateY(-2px); }
.link-card h3 { margin-bottom: var(--space-2); }
.link-card p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: var(--space-2); }
.link-card .card-cta {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
}

/* Prose pages */
.page-head {
  padding: var(--space-7) 0 var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(to bottom, var(--bg-paper), var(--bg-canvas));
}
.page-head p.lede { color: var(--text-secondary); font-size: 1.05rem; max-width: 60ch; }

.prose { padding: var(--space-6) 0 var(--space-8); }
.prose h2 { margin-top: var(--space-6); }
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { margin-top: var(--space-5); }

.callout {
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  background: var(--bg-paper);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) 0;
  max-width: var(--measure);
  font-size: 0.95rem;
}
.callout p:last-child { margin-bottom: 0; }

/* Explainer diagrams */
figure.figure-diagram {
  margin: var(--space-5) 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-paper);
}
figure.figure-diagram img { width: 100%; height: auto; display: block; }
figure.figure-diagram figcaption {
  padding: var(--space-2) var(--space-4);
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--bg-subtle);
}

/* FAQ */
.faq-item {
  background: var(--bg-paper);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  max-width: 100%;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--accent-primary);
  flex: none;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-answer {
  padding: 0 var(--space-4) var(--space-4);
  color: var(--text-secondary);
  border-top: 1px solid var(--bg-subtle);
}
.faq-item .faq-answer p { padding-top: var(--space-3); margin-bottom: var(--space-2); }

/* Gallery */
.gallery-grid {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-5);
}
@media (min-width: 760px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
.gallery-item {
  background: var(--bg-paper);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.gallery-item canvas.stereo {
  width: 100%;
  aspect-ratio: 8 / 5;
  background: var(--bg-subtle);
}
.gallery-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-subtle);
}
.gallery-caption .g-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}
.gallery-caption .g-meta {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-display);
}
.reveal-details summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
  list-style: none;
  padding: var(--space-2);
}
.reveal-details summary::-webkit-details-marker { display: none; }
.reveal-details canvas {
  width: 120px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin: 0 var(--space-2) var(--space-2);
}

/* Contact */
.contact-block {
  background: var(--bg-paper);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  max-width: 560px;
}
.contact-block .contact-line {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--bg-subtle);
}
.contact-block .contact-line:last-child { border-bottom: 0; }
.contact-block .contact-key {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 90px;
}

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

.site-footer {
  background: var(--surface-blue-deep);
  color: var(--text-on-dark);
  padding: var(--space-7) 0 var(--space-5);
  margin-top: var(--space-7);
}
.section + .site-footer, .section-alt + .site-footer { margin-top: 0; }

.footer-grid {
  display: grid;
  gap: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid rgba(243, 242, 236, 0.18);
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

.site-footer h4 {
  color: var(--text-on-dark);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}
.site-footer p { color: rgba(243, 242, 236, 0.75); font-size: 0.9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: var(--space-2); }
.site-footer a { color: rgba(243, 242, 236, 0.85); text-decoration: none; }
.site-footer a:hover { color: var(--accent-bright); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-4);
  font-size: 0.8rem;
  color: rgba(243, 242, 236, 0.6);
}
