/* ============================================================
   Square³ — design tokens
   Palette pulled from the brand mark: a deep institutional
   forest green, paired with an antique brass accent (trust +
   permanence, not another cream/terracotta or acid-green combo).
   ============================================================ */
:root {
  --ink: #0e2a20;          /* primary text on paper */
  --ink-soft: #44544c;     /* secondary text on paper */
  --forest: #0b3d2c;       /* brand primary / dark sections */
  --forest-deep: #082e21;  /* darker still — footer, nav-on-scroll */
  --paper: #f1f3ee;        /* light background, cool sage-white, not cream */
  --paper-raised: #ffffff; /* cards on paper */
  --brass: #b08d3e;        /* accent — CTAs, confidence bars, highlights (fills, not text-on-light) */
  --brass-ink: #84692e;    /* brass, darkened for TEXT/borders on light (paper) backgrounds — 4.65:1 vs paper */
  --brass-soft: #d9c48f;   /* brass, lightened for TEXT on dark (forest) backgrounds — 7.1:1 vs forest */
  --signal: #c22851;       /* NEW — vivid signature colour. Spend it deliberately: primary CTA, one
                               highlighted graph connection, headline emphasis. 5.06:1 vs paper as text,
                               5.65:1 for white text on it as a background — verified before shipping. */
  --signal-deep: #a81f45;  /* signal, hover state */
  --signal-soft: #ff7fa3;  /* signal, lightened for TEXT on dark (forest) backgrounds — 5.1:1 vs forest */
  --sage: #c9d2c3;         /* borders, dividers, quiet fills */
  --sage-line: #dde3d8;
  --rust: #9c4a34;         /* alerts, locked states — sparingly */
  --paper-on-forest: #eef1ea;

  --font-display: 'Newsreader', 'Iowan Old Style', ui-serif, Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --max-width: 1160px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 3px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   Base
   ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--forest-deep);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 460; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }

/* Used sparingly inside headlines for one provocative or emphatic phrase —
   not a general-purpose text-color utility. Large enough in context to
   rely on the 3:1 large-text contrast threshold rather than 4.5:1. */
.highlight {
  color: var(--signal);
  font-style: italic;
}

p { margin: 0 0 1em; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: clamp(64px, 10vw, 128px) 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 1.1em;
}
.eyebrow::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--brass);
  display: inline-block;
  transform: rotate(45deg);
}

/* Signature divider glyph: three offset square outlines — echoes the
   Square³ mark and recurs as the page's one repeated motif. */
.sq3-glyph {
  display: inline-grid;
  width: 34px; height: 34px;
  position: relative;
  flex: none;
}
.sq3-glyph span {
  position: absolute;
  width: 20px; height: 20px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}
.sq3-glyph span:nth-child(1) { top: 0; left: 0; color: var(--forest); opacity: 0.9; }
.sq3-glyph span:nth-child(2) { top: 6px; left: 6px; color: var(--brass); opacity: 0.85; }
.sq3-glyph span:nth-child(3) { top: 12px; left: 12px; color: var(--sage); opacity: 0.95; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 0.85em 1.6em;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
  text-decoration: none;
  line-height: 1;
}
.btn:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}
.btn-primary {
  background: var(--signal);
  color: #ffffff;
}
.btn-primary:hover { background: var(--signal-deep); transform: translateY(-1px); }
.btn-brass {
  background: var(--brass);
  color: var(--forest-deep);
}
.btn-brass:hover { background: #c29d4d; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--forest-deep);
  border-color: var(--sage);
}
.btn-ghost:hover { border-color: var(--forest); }
.btn-ghost-light {
  background: transparent;
  color: var(--paper-on-forest);
  border-color: rgba(241, 243, 238, 0.35);
}
.btn-ghost-light:hover { border-color: var(--paper-on-forest); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }
.btn-block { width: 100%; justify-content: center; }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(241, 243, 238, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sage-line);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.nav-mark {
  display: flex;
  align-items: center;
  gap: 0.65em;
  text-decoration: none;
}
.nav-mark img { width: 34px; height: 34px; border-radius: 3px; }
.nav-wordmark {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--forest-deep);
  letter-spacing: -0.01em;
}
.nav-wordmark sup { color: var(--brass-ink); font-size: 0.65em; margin-left: 0.05em; }
.nav-links {
  display: flex;
  gap: 2.1em;
  list-style: none;
  margin: 0; padding: 0;
  font-size: 0.94rem;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--forest-deep); }
.nav-actions { display: flex; align-items: center; gap: 0.9em; }
.tier-chip {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4em 0.7em;
  border-radius: 20px;
  border: 1px solid var(--sage);
  color: var(--ink-soft);
}
.tier-chip[data-tier="pro"] { border-color: var(--brass-ink); color: var(--brass-ink); background: rgba(176,141,62,0.1); }
.assess-toolbar .tier-chip { border-color: rgba(238,241,234,0.35); color: var(--paper-on-forest); }
.assess-toolbar .tier-chip[data-tier="pro"] { border-color: var(--brass-soft); color: var(--brass-soft); background: rgba(238,241,234,0.08); }
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 44px; height: 44px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 22px; height: 1.5px; background: var(--forest-deep); }

/* Hidden by default at every screen size. Only the mobile media query
   below reveals it (and only once JS adds .open) — without this base
   rule, desktop viewports had no display:none applied at all, so the
   vertical mobile menu sat visible underneath the horizontal desktop
   nav all the time. */
.nav-mobile-panel { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-mobile-panel {
    position: fixed; inset: 76px 0 0 0;
    background: var(--paper);
    z-index: 39;
    padding: 32px var(--gutter);
    overflow-y: auto;
  }
  .nav-mobile-panel.open { display: block; }
  .nav-mobile-panel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.4em; font-size: 1.4rem; font-family: var(--font-display); }
  .nav-mobile-panel a { text-decoration: none; color: var(--forest-deep); }
  .nav-mobile-panel .btn { margin-top: 2.2em; }
}

/* Below ~600px there simply isn't room for logo + tier chip + CTA button +
   hamburger in one 76px-tall bar without overflowing the screen — verified
   by adding up their widths, not assumed. Drop the chip and CTA here; both
   remain reachable one tap away inside the hamburger menu instead. */
@media (max-width: 600px) {
  .nav-actions > .tier-chip,
  .nav-actions > .btn-primary {
    display: none;
  }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: clamp(56px, 9vw, 108px) 0 clamp(40px, 7vw, 80px);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}
.hero-copy p.lede {
  font-size: 1.2rem;
  max-width: 46ch;
  color: var(--ink-soft);
}
.hero-actions { display: flex; gap: 1em; margin-top: 2em; flex-wrap: wrap; }
.hero-meta {
  margin-top: 2.8em;
  display: flex;
  gap: 2.4em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.hero-meta strong { color: var(--forest-deep); display: block; font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; }

/* the signature visual: an animated node graph — square-shaped nodes
   (a quiet nod to "Square³"), thin quiet connections, and ONE connection
   in the signature colour. This is meant to be a literal, honest picture
   of what the product does — not abstract decoration — so it stays as
   the page's one spent-boldness element; everything else stays quiet. */
.hero-signature { position: relative; width: 100%; aspect-ratio: 1 / 1; max-width: 460px; margin: 0 auto; }
.hero-signature svg { width: 100%; height: 100%; overflow: visible; }

.node { transform-origin: center; animation: nodeIn 0.7s var(--ease) both; }
.node.n1 { animation-delay: 0.05s; }
.node.n2 { animation-delay: 0.15s; }
.node.n3 { animation-delay: 0.25s; }
.node.n4 { animation-delay: 0.35s; }
.node.n5 { animation-delay: 0.45s; }
.node.n6 { animation-delay: 0.55s; }
.node.n7 { animation-delay: 0.68s; }
@keyframes nodeIn {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}

.edge { opacity: 0; animation: edgeIn 0.6s var(--ease) forwards; }
.edge.e1 { animation-delay: 0.5s; }
.edge.e2 { animation-delay: 0.58s; }
.edge.e3 { animation-delay: 0.64s; }
.edge.e4 { animation-delay: 0.7s; }
.edge.e5 { animation-delay: 0.76s; }
@keyframes edgeIn { to { opacity: 1; } }

.edge-signal {
  opacity: 0;
  animation: edgeSignalIn 0.6s var(--ease) 0.85s forwards;
  stroke-dasharray: 7 5;
  animation-name: edgeSignalIn, edgePulse;
  animation-duration: 0.6s, 2.6s;
  animation-delay: 0.85s, 1.5s;
  animation-timing-function: var(--ease), linear;
  animation-iteration-count: 1, infinite;
  animation-fill-mode: forwards, none;
}
@keyframes edgeSignalIn { to { opacity: 1; } }
@keyframes edgePulse { to { stroke-dashoffset: -24; } }

@media (prefers-reduced-motion: reduce) {
  .node, .edge, .edge-signal { opacity: 1; transform: none; animation: none; }
}

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-signature { order: -1; max-width: 320px; }
}

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Panels on forest background
   ============================================================ */
.panel-forest {
  background: var(--forest);
  color: var(--paper-on-forest);
}
.panel-forest h2, .panel-forest h3 { color: var(--paper-on-forest); }
.panel-forest p { color: rgba(238, 241, 234, 0.75); }
.panel-forest .eyebrow { color: var(--brass-soft); }

/* ============================================================
   Grid layouts
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 4vw, 56px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px); }
@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.section-head { max-width: 62ch; margin-bottom: 2.6em; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--paper-raised);
  border: 1px solid var(--sage-line);
  border-radius: var(--radius);
  padding: 2em;
}
.card h3 { margin-bottom: 0.5em; }
.card .card-index {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--brass-ink);
  margin-bottom: 1em;
  display: block;
}

/* how it works steps */
.steps { counter-reset: step; }
.step { display: grid; grid-template-columns: 64px 1fr; gap: 1.4em; padding: 1.8em 0; border-top: 1px solid var(--sage-line); }
.step:first-child { border-top: none; }
.step-num { font-family: var(--font-mono); font-size: 0.85rem; color: var(--brass-soft); padding-top: 0.2em; }
.step h3 { margin-bottom: 0.35em; }

/* ============================================================
   Proof strip — a thin, honest credibility band under the hero.
   Numbers only, no invented client logos or testimonials.
   ============================================================ */
.proof-strip {
  border-top: 1px solid var(--sage-line);
  border-bottom: 1px solid var(--sage-line);
  padding: clamp(28px, 4vw, 44px) 0;
}
.proof-strip .container {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 5vw, 64px);
  justify-content: space-between;
}
.proof-item { flex: 1 1 200px; }
.proof-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--signal);
  font-weight: 500;
}
.proof-item span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

/* Challenge → outcome cards: a two-part tag replacing the plain numbered
   index, since these are real problem/outcome pairs, not a sequence. */
.card .card-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass-ink);
  margin-bottom: 1em;
  display: flex;
  gap: 0.6em;
  align-items: center;
}
.card .card-tag .outcome { color: var(--signal); }
.card .card-tag .sep { color: var(--sage); }

/* ============================================================
   Framework grid — the six real ontology domains, presented as
   the point of view/proof this product is actually built on.
   ============================================================ */
.framework-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--sage-line);
  border: 1px solid var(--sage-line);
}
.framework-item {
  background: var(--paper-raised);
  padding: 2em;
  display: flex;
  flex-direction: column;
  gap: 0.6em;
}
.framework-item .fi-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--signal);
  letter-spacing: 0.06em;
}
.framework-item h3 { margin-bottom: 0; }
@media (max-width: 860px) {
  .framework-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .framework-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Closing CTA — the strong closing proposition before the footer.
   ============================================================ */
.cta-close {
  background: var(--forest-deep);
  color: var(--paper-on-forest);
  text-align: center;
  padding: clamp(72px, 10vw, 120px) 0;
}
.cta-close h2 { color: var(--paper-on-forest); max-width: 20ch; margin: 0 auto 0.5em; }
.cta-close p { color: rgba(238,241,234,0.72); max-width: 50ch; margin: 0 auto 1.6em; }
.cta-close .hero-actions { justify-content: center; }

/* ============================================================
   Assess tool
   ============================================================ */
.assess-shell {
  background: var(--paper-raised);
  border: 1px solid var(--sage-line);
  border-radius: 6px;
  overflow: hidden;
}
.assess-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1em 1.6em;
  background: var(--forest);
  color: var(--paper-on-forest);
  flex-wrap: wrap;
  gap: 0.8em;
}
.assess-toolbar .tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass-soft);
}
.assess-body { padding: clamp(20px, 3vw, 40px); }

.dropzone {
  border: 1.5px dashed var(--sage);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 48px);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--brass-ink); background: rgba(176,141,62,0.05); }
.dropzone input { display: none; }
.dropzone .dz-icon { margin: 0 auto 1em; width: 40px; height: 40px; }
.dropzone .dz-hint { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.6em; }

.file-list { list-style: none; margin: 1.4em 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.6em; }
.file-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 1em;
  font-family: var(--font-mono); font-size: 0.85rem;
  background: var(--paper);
  border: 1px solid var(--sage-line);
  border-radius: var(--radius);
  padding: 0.7em 1em;
}
.file-chip .fc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.file-chip .fc-size { color: var(--ink-soft); flex: none; }
.file-chip button {
  background: none; border: none; color: var(--rust); cursor: pointer;
  font-family: var(--font-mono); font-size: 0.95rem;
  padding: 0.4em 0.5em; margin: -0.4em -0.5em; line-height: 1;
}

.assess-notice {
  margin-top: 1.2em;
  padding: 0.9em 1.1em;
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: none;
}
.assess-notice.show { display: block; }
.assess-notice.info { background: rgba(176,141,62,0.1); color: #6f5827; border: 1px solid rgba(176,141,62,0.3); }
.assess-notice.lock { background: rgba(156,74,52,0.08); color: var(--rust); border: 1px solid rgba(156,74,52,0.25); }

.assess-submit-row { display: flex; align-items: center; gap: 1em; margin-top: 1.6em; flex-wrap: wrap; }
.assess-submit-row .hint { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); }

/* loader: three squares pulsing in sequence */
.sq-loader { display: none; gap: 6px; }
.sq-loader.show { display: inline-flex; }
.sq-loader span { width: 10px; height: 10px; background: var(--brass); border-radius: 2px; animation: pulse 1.1s ease-in-out infinite; }
.sq-loader span:nth-child(2) { animation-delay: 0.15s; }
.sq-loader span:nth-child(3) { animation-delay: 0.3s; }
@keyframes pulse { 0%, 80%, 100% { opacity: 0.25; transform: scale(0.8);} 40% { opacity: 1; transform: scale(1);} }

/* output brief */
.brief { margin-top: 2.4em; border-top: 1px solid var(--sage-line); padding-top: 2em; display: none; }
.brief.show { display: block; }
.brief-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1em; margin-bottom: 1.6em; flex-wrap: wrap; }
.brief-mode-badge { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.35em 0.7em; border-radius: 3px; background: var(--sage); color: var(--forest-deep); }
.brief-file { margin-bottom: 1.8em; }
.brief-file-head { display: flex; align-items: baseline; gap: 0.8em; font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 0.9em; flex-wrap: wrap; }
.brief-file-head .fname { color: var(--forest-deep); font-weight: 600; }
.brief-item { display: grid; grid-template-columns: 1fr; gap: 0.4em; padding: 1.1em 1.3em; background: var(--paper); border-left: 3px solid var(--brass); border-radius: 0 3px 3px 0; margin-bottom: 0.8em; }
.brief-item .cat { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brass-ink); }
.brief-item .obs { color: var(--ink); font-weight: 500; }
.brief-item .rec { color: var(--ink-soft); font-size: 0.92rem; }
.confidence { display: flex; align-items: center; gap: 0.6em; margin-top: 0.5em; }
.confidence-track { flex: 1; height: 4px; background: var(--sage-line); border-radius: 2px; overflow: hidden; }
.confidence-fill { height: 100%; background: var(--brass); }
.confidence-label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); flex: none; }
.brief-note { font-size: 0.85rem; color: var(--ink-soft); font-style: italic; margin-top: 1.4em; }

/* ============================================================
   Pricing
   ============================================================ */
.price-card { background: var(--paper-raised); border: 1px solid var(--sage-line); border-radius: 6px; padding: 2.4em; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--brass-ink); box-shadow: 0 0 0 1px var(--brass-ink); }
.price-card .price { font-family: var(--font-display); font-size: 2.2rem; color: var(--forest-deep); margin: 0.3em 0 0.1em; }
.price-card .price span { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-soft); }
.price-card ul { list-style: none; margin: 1.6em 0; padding: 0; display: flex; flex-direction: column; gap: 0.7em; font-size: 0.94rem; }
.price-card li { display: flex; gap: 0.7em; }
.price-card li::before { content: '—'; color: var(--brass-ink); flex: none; }
.price-card .btn { margin-top: auto; }

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(8, 24, 17, 0.55);
  display: none; align-items: center; justify-content: center; z-index: 60; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--paper-raised); border-radius: 6px; max-width: 440px; width: 100%;
  padding: 2.2em; position: relative;
}
.modal-close { position: absolute; top: 1.2em; right: 1.2em; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--ink-soft); line-height: 1; }
.modal h3 { margin-bottom: 0.4em; }
.modal .modal-actions { margin-top: 1.6em; display: flex; gap: 0.8em; flex-wrap: wrap; }

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--forest-deep); color: rgba(238, 241, 234, 0.7); padding: 64px 0 32px; }
.footer .container { }
.footer-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5em; padding-bottom: 3em; border-bottom: 1px solid rgba(238,241,234,0.12); }
.footer-brand { display: flex; align-items: center; gap: 0.7em; margin-bottom: 1em; }
.footer-brand img { width: 30px; height: 30px; border-radius: 3px; }
.footer-brand span { font-family: var(--font-display); color: var(--paper-on-forest); font-size: 1.1rem; }
.footer h4 { color: var(--paper-on-forest); font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1.1em; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7em; font-size: 0.9rem; }
.footer a { text-decoration: none; color: rgba(238,241,234,0.7); }
.footer a:hover { color: var(--paper-on-forest); }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 1.8em; font-size: 0.82rem; flex-wrap: wrap; gap: 1em; }
@media (max-width: 780px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ============================================================
   Utility
   ============================================================ */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
