/* ------------------------------------------------------------------
   Bottega Soglia — shared chrome
   Read by EVERY page, index.html included. Holds what more than one
   page needs: the token mapping onto --sg-*, the base reset, the nav
   (with its mobile menu), the footer, and document prose.

   Page-specific styling stays inline in the page that uses it —
   index.html keeps its hero, bento, product list and motion; /about/
   keeps its lead and fact chips. If a rule is needed by two pages it
   belongs here, not in both.

   These rules were duplicated between index.html and this file until
   2026-08-25. Nav and footer had already diverged once by then.
   ------------------------------------------------------------------ */

:root {
  --paper: var(--sg-paper);
  --paper-2: var(--sg-paper-2);
  --ink: var(--sg-ink);
  --ink-soft: var(--sg-ink-soft);
  --stone: var(--sg-stone);
  --line: var(--sg-line);
  --line-strong: var(--sg-line-strong);
  --red: var(--sg-red);
  --red-hover: var(--sg-red-hover);
  --sage: var(--sg-sage);
  --soon: var(--sg-soon);
  --maxw: var(--sg-maxw);
  --font-mono: var(--sg-font-mono);
  --ease: var(--sg-ease);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sg-font-body);
  font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 3.5rem); }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.display { font-weight: 350; letter-spacing: -0.03em; line-height: 1.02; }
@supports not (font-weight: 350) { .display { font-weight: 300; } }
.label { font-family: var(--font-mono); font-size: 0.74rem; text-transform: lowercase; letter-spacing: 0.01em; color: var(--stone); font-weight: 500; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* -------- Nav (mirrors index.html) -------- */
.nav { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--paper) 84%, transparent); backdrop-filter: blur(12px) saturate(1.05); border-bottom: 1px solid var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-weight: 500; font-size: 0.9rem; letter-spacing: 0.06em; }
.brand__mark { width: 12px; height: 12px; background: var(--red); }
.nav__links { display: flex; align-items: center; gap: clamp(1.1rem, 3vw, 2.5rem); }
.nav__links a { text-decoration: none; font-size: 0.86rem; color: var(--ink-soft); position: relative; padding-block: 0.3rem; }
.nav__links a::after { content: ""; position: absolute; left: 0; bottom: 0.05rem; height: 1px; width: 0; background: var(--red); transition: width 0.3s var(--ease); }
.nav__links a:hover::after, .nav__links a:focus-visible::after { width: 100%; }
.nav__right { display: flex; align-items: center; gap: 0.7rem; }
.theme-toggle, .nav__burger { appearance: none; background: transparent; border: 1px solid var(--line-strong); color: var(--ink-soft); width: 2rem; height: 2rem; cursor: pointer; display: grid; place-items: center; font-size: 0.9rem; transition: border-color 0.2s, color 0.2s; }
.theme-toggle:hover, .nav__burger:hover { border-color: var(--ink); color: var(--ink); }
.nav__burger { display: none; }

/* Below the breakpoint the links move into a panel under the bar. They stay in
   the DOM at every width: with the script blocked the CSS below never gets
   `data-open`, so the menu degrades to the inline desktop row rather than to a
   button that does nothing. */
@media (max-width: 600px) {
  .nav__burger { display: grid; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.25rem clamp(1.25rem, 5vw, 3.5rem) 0.75rem;
  }
  .nav__links[data-open] { display: flex; }
  .nav__links a { font-size: 0.95rem; padding-block: 0.8rem; border-top: 1px solid var(--line); }
  .nav__links a::after { display: none; }
}

/* -------- Document head -------- */
.doc__head { padding-top: clamp(3rem, 8vw, 6rem); padding-bottom: clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.doc__head .label { display: block; margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.doc__head h1 { font-size: clamp(2.25rem, 7vw, 5rem); }
.doc__meta { margin: clamp(1.5rem, 3vw, 2.25rem) 0 0; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.02em; color: var(--stone); }

/* -------- Prose (left label / right content, as on the home page) -------- */
.doc { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.doc__grid { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: clamp(1.75rem, 5vw, 4.5rem); align-items: start; }
/* No table of contents — the left column collapses away entirely. Without it the
   prose sat in the first column and left the whole right half empty, which reads
   as a broken layout rather than a deliberate measure, so the column centres. */
.doc__grid--plain { grid-template-columns: minmax(0, 1fr); }
.doc__grid--plain .prose { margin-inline: auto; }

/* Contents. Closed by default: a bare list of eleven links reaches the eye
   before the document does. <details> keeps it native — no script, and it
   still opens for find-in-page and for anything not running JS. */
.doc__nav { position: sticky; top: 5.5rem; border: 1px solid var(--line-strong); }
.doc__nav > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  font-family: var(--font-mono); font-size: 0.72rem; text-transform: lowercase;
  letter-spacing: 0.02em; color: var(--stone); font-weight: 500;
  transition: color 0.2s;
}
.doc__nav > summary::-webkit-details-marker { display: none; }
.doc__nav > summary::after { content: "+"; font-size: 0.95rem; line-height: 1; }
.doc__nav[open] > summary::after { content: "–"; }
.doc__nav > summary:hover { color: var(--ink); }
.doc__nav ul { list-style: none; margin: 0; padding: 0.7rem 0.85rem 0.85rem; display: flex; flex-direction: column; gap: 0.5rem; border-top: 1px solid var(--line); }
.doc__nav a { text-decoration: none; font-size: 0.8rem; color: var(--stone); }
.doc__nav a:hover { color: var(--ink); }
@media (max-width: 820px) { .doc__grid { grid-template-columns: 1fr; gap: 2rem; } .doc__nav { position: static; } }

.prose { max-width: 44rem; }
.prose section { padding-block: clamp(1.5rem, 3vw, 2.25rem); border-top: 1px solid var(--line); }
.prose section:first-child { border-top: 0; padding-top: 0; }
.prose h2 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 500; letter-spacing: -0.01em; margin-bottom: 0.9rem; scroll-margin-top: 6rem; }
.prose p { margin: 0 0 1rem; color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }
.prose ul { margin: 0 0 1rem; padding-left: 1.15rem; color: var(--ink-soft); }
.prose li { margin-bottom: 0.45rem; }
.prose a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); transition: border-color 0.2s, color 0.2s; }
.prose a:hover { color: var(--red); border-color: var(--red); }
.prose strong { color: var(--ink); font-weight: 600; }

/* Registry data — same treatment as the home page's entity block. */
.entity { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 1.75rem; max-width: 36rem; }
.entity dt { font-family: var(--font-mono); font-size: 0.7rem; text-transform: lowercase; letter-spacing: 0.01em; color: var(--stone); font-weight: 500; }
.entity dd { margin: 0; font-size: 0.78rem; color: var(--ink-soft); letter-spacing: 0.01em; }
@media (max-width: 36rem) { .entity { grid-template-columns: 1fr; gap: 0.1rem; } .entity dd { margin-bottom: 0.8rem; } }

/* -------- Footer (mirrors index.html, plus the Legal column) -------- */
footer { border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 5vw, 4rem); }
.foot__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.foot__col .label { display: block; margin-bottom: 1rem; font-family: var(--sg-font-body); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.72rem; }
.foot__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.foot__col a { text-decoration: none; font-size: 0.86rem; color: var(--ink-soft); }
.foot__col a:hover { color: var(--ink); }
.foot__base { margin-top: 2.75rem; font-size: 0.76rem; color: var(--stone); letter-spacing: 0.02em; }
@media (max-width: 720px) { .foot__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .foot__grid { grid-template-columns: 1fr; } }
