/* Shared chrome for every marketing page: footer, consent banner, legal
   prose and the not-found page. nodara.html and calc.html declare the colour
   tokens themselves; the legal and 404 pages load only this file, so every
   var() carries the same value as its fallback. */

/* ---------- Standalone page shell (legal, 404) ---------- */

.site-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--void, #05070A);
  color: var(--ink, #EEF2F7);
  font-family: var(--sans, "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
}
.site-page main { flex: 1; }

.site-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 5vw, 7rem);
}
.site-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink, #EEF2F7);
  text-decoration: none;
}
.site-bar > a:first-child { font-weight: 600; letter-spacing: 0.04em; }
.site-bar__cta {
  padding: 0 1.1rem;
  border: 1px solid rgba(138, 146, 158, 0.24);
  border-radius: 999px;
  font-family: var(--mono, ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background 0.3s ease, color 0.3s ease;
}
.site-bar a.site-bar__cta:hover { background: var(--ink, #EEF2F7); color: var(--void, #05070A); }

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

.site-footer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 2.5rem clamp(1rem, 5vw, 7rem) 3rem;
  border-top: 1px solid rgba(138, 146, 158, 0.14);
  font-family: var(--sans, "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-soft, #A7B0BD);
}
@media (min-width: 48rem) {
  .site-footer { grid-template-columns: 1.2fr 1fr; align-items: start; }
}
.site-footer__brand {
  margin: 0 0 0.35rem;
  color: var(--ink, #EEF2F7);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.site-footer address { font-style: normal; }
.site-footer a { color: inherit; }
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 48rem) {
  .site-footer__links { justify-content: flex-end; }
}
.site-footer__links a,
.site-footer__links button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft, #A7B0BD);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}
.site-footer__links a:hover,
.site-footer__links button:hover { color: var(--ink, #EEF2F7); }
[data-consent-open][hidden] { display: none; }
.site-footer__links li:has(> [hidden]) { display: none; }
.site-footer__meta {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--mono, ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--titanium-dim, #4A515C);
}

/* ---------- Consent banner ---------- */

.consent {
  position: fixed;
  z-index: 50;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  max-width: 34rem;
  margin-left: auto;
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(138, 146, 158, 0.22);
  border-radius: 14px;
  background: rgba(10, 14, 20, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  color: var(--ink-soft, #A7B0BD);
  font-family: var(--sans, "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif);
  font-size: 0.875rem;
  line-height: 1.5;
}
.consent[hidden] { display: none; }
.consent__title { margin: 0 0 0.25rem; color: var(--ink, #EEF2F7); font-weight: 600; }
.consent__body { margin: 0 0 0.9rem; }
.consent__body a { color: var(--liquid, #4D8BFF); }
.consent__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
/* Reject and Accept are styled identically on purpose: refusing must be as
   easy and as visible as agreeing. */
.consent__btn {
  flex: 1 1 8rem;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid rgba(238, 242, 247, 0.28);
  border-radius: 999px;
  background: transparent;
  color: var(--ink, #EEF2F7);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}
.consent__btn:hover { background: rgba(238, 242, 247, 0.08); }

/* ---------- Legal prose ---------- */

.legal {
  max-width: 44rem;
  margin: 0 auto;
  padding: 3rem clamp(1rem, 5vw, 2rem) 4rem;
  color: var(--ink-soft, #A7B0BD);
  line-height: 1.7;
}
.legal h1 {
  margin: 0 0 0.5rem;
  color: var(--ink, #EEF2F7);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.legal h2 {
  margin: 2.5rem 0 0.5rem;
  color: var(--ink, #EEF2F7);
  font-size: 1.2rem;
  scroll-margin-top: 2rem;
}
.legal h3 { margin: 1.5rem 0 0.25rem; color: var(--ink, #EEF2F7); font-size: 1rem; }
.legal a { color: var(--liquid, #4D8BFF); }
.legal button[data-consent-open] {
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid rgba(238, 242, 247, 0.28);
  border-radius: 999px;
  background: transparent;
  color: var(--ink, #EEF2F7);
  font: inherit;
  cursor: pointer;
}
.legal__updated {
  margin: 0 0 2rem;
  font-family: var(--mono, ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--titanium, #8A929E);
}
.legal table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.legal th,
.legal td {
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid rgba(138, 146, 158, 0.14);
  text-align: left;
  vertical-align: top;
}
.legal th { color: var(--ink, #EEF2F7); font-weight: 600; }

/* ---------- Not found ---------- */

.notfound {
  display: grid;
  align-content: center;
  gap: 1rem;
  max-width: 40rem;
  min-height: 60vh;
  margin: 0 auto;
  padding: 3rem clamp(1rem, 5vw, 2rem);
}
.notfound__code {
  margin: 0;
  font-family: var(--mono, ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace);
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  color: var(--liquid, #4D8BFF);
}
.notfound h1 {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink, #EEF2F7);
}
.notfound p { margin: 0; color: var(--ink-soft, #A7B0BD); }
.notfound__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.notfound__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.1rem;
  border: 1px solid rgba(238, 242, 247, 0.28);
  border-radius: 999px;
  color: var(--ink, #EEF2F7);
  text-decoration: none;
}
.notfound__links a.is-primary {
  border-color: transparent;
  background: var(--ink, #EEF2F7);
  color: var(--void, #05070A);
}

/* ---------- Shared focus ---------- */

.site-bar a:focus-visible,
.site-footer a:focus-visible,
.site-footer button:focus-visible,
.consent a:focus-visible,
.consent__btn:focus-visible,
.legal a:focus-visible,
.legal button:focus-visible,
.notfound__links a:focus-visible {
  outline: 2px solid var(--mint, #5FF2C8);
  outline-offset: 3px;
  border-radius: 4px;
}
