/* Light palette shared by the homepage, legal pages and cookie settings. */
:root[data-theme="light"] {
  color-scheme: light;
  --ia-light-background: #fff;
  --ia-light-surface: #e6e6ea;
  --ia-light-raised: #e6e6ea;
  --ia-light-ink: #636367;
  --ia-light-muted: #4a4a4e;
  --ia-light-rule: #e6e6ea;
  --ia-light-on-accent: #fff;
  --ia-light-accent-hover: #505054;
  background: var(--ia-light-background);
}

/* The exported page defines its own color tokens on the body. */
:root[data-theme="light"] body {
  --token-cba8abe2-a528-468a-ad79-98c63ef4f680: var(--ia-light-background);
  --token-423eae9c-996c-471c-b5b2-670f5538a5ab: var(--ia-light-surface);
  --token-f73c5069-3d3b-4f9e-b26a-63286517b82d: var(--ia-light-raised);
  --token-f33d8e34-3aba-45af-8d38-54d9ab5082b3: var(--ia-light-rule);
  --token-43112e2f-fe06-44ae-9332-5d6005cba8e5: var(--ia-light-ink);
}

/* Shared chrome: legal footer bar + cookie settings dialog.
   Used by the home page and every legal page. */

.legal-bar,
.cookie-dialog {
  --lb-ink: var(--ia-light-ink, #a6a6aa);
  --lb-on-ink: var(--ia-light-on-accent, #000);
  --lb-background: var(--ia-light-background, #000);
  --lb-rule: var(--ia-light-rule, #333337);
  --lb-surface: var(--ia-light-surface, #080808);
  --lb-raised: var(--ia-light-raised, #101010);
  --lb-mono: "Modern Gothic Mono Regular", ui-monospace, monospace;
  --lb-sans: "Modern Gothic Regular", Arial, sans-serif;
  --lb-bold: "Modern Gothic Bold", Arial, sans-serif;
}

/* ---------- footer bar ---------- */
/* Sits on the same frame as the page: 25px outside line, 24px gap, inner line.
   Four equal columns so the cell edges line up with the data row above. */
.legal-bar {
  box-sizing: border-box;
  margin: 0 auto 25px;
  width: calc(100% - 50px);
  max-width: 1870px;
  padding: 0 24px;
  background: var(--lb-background);
  border-inline: 1px solid var(--lb-rule);
  border-block: 1px solid var(--lb-rule);
  color: var(--lb-ink);
  font-family: var(--lb-sans);
  position: relative;
  z-index: 2;
}
.legal-bar * { box-sizing: border-box; }
.legal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--lb-rule);
  border-inline: 1px solid var(--lb-rule);
}
.legal-cell {
  background: var(--lb-background);
  min-height: 92px;
  padding: 14px 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  color: var(--lb-ink);
  text-decoration: none;
  font: inherit;
  text-align: left;
  border: 0;
  border-radius: 0;
  margin: 0;
  cursor: pointer;
  transition: background-color 0.14s steps(2), color 0.14s steps(2);
}
.legal-cell:hover,
.legal-cell:focus-visible {
  background: var(--lb-ink);
  color: var(--lb-on-ink);
}
.legal-cell:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.legal-cell .lc-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font: 400 0.6rem/1 var(--lb-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}
.legal-cell .lc-label {
  font: 400 1rem/1.15 var(--lb-sans);
  letter-spacing: 0.01em;
}
.legal-cell .lc-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}
.legal-cell .lc-arrow { font-family: var(--lb-sans); }

.legal-cell--static { cursor: default; }
.legal-cell--static:hover { background: var(--lb-background); color: var(--lb-ink); }

.legal-social {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.legal-social a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--lb-rule);
  color: var(--lb-ink);
  transition: background-color 0.14s steps(2), color 0.14s steps(2);
}
.legal-social a:hover,
.legal-social a:focus-visible { background: var(--lb-ink); color: var(--lb-on-ink); border-color: var(--lb-ink); }
.legal-social a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.legal-social svg { width: 17px; height: 17px; fill: currentColor; display: block; }

.legal-cell--wide { grid-column: span 2; }
.legal-copy { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.legal-copy .lc-top { opacity: 1; }
.legal-copy a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--lb-rule); }
.legal-copy a:hover { border-bottom-color: var(--lb-ink); }

/* The Framer export has its own thin copyright strip. This bar replaces it. */
[data-framer-name="Copyright Row"] { display: none !important; }

@media (max-width: 809.98px) {
  .legal-bar { margin: 0 10px 10px; width: auto; max-width: none; padding: 0 10px; }
  .legal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-cell { min-height: 84px; padding: 12px; }
}

/* ---------- cookie settings dialog ---------- */
.cookie-dialog {
  box-sizing: border-box;
  width: min(640px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  margin: auto;
  background: var(--lb-surface);
  color: var(--lb-ink);
  border: 1px solid var(--lb-ink);
  border-radius: 0;
  font-family: var(--lb-sans);
  overflow: auto;
}
.cookie-dialog::backdrop { background: rgba(0, 0, 0, 0.82); }
.cookie-dialog * { box-sizing: border-box; }
.cd-head {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  border-bottom: 1px solid var(--lb-rule);
}
.cd-head h2 {
  margin: 0;
  padding: 18px 20px;
  font: 400 clamp(1.4rem, 4vw, 1.9rem)/1 var(--lb-sans);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.cd-x {
  width: 58px;
  border: 0;
  border-left: 1px solid var(--lb-rule);
  border-radius: 0;
  background: transparent;
  color: var(--lb-ink);
  font: 400 1.4rem/1 var(--lb-sans);
  cursor: pointer;
}
.cd-x:hover, .cd-x:focus-visible { background: var(--lb-ink); color: var(--lb-on-ink); }
.cd-intro {
  margin: 0;
  padding: 16px 20px;
  font: 400 0.8rem/1.6 var(--lb-mono);
  border-bottom: 1px solid var(--lb-rule);
}
.cd-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--lb-rule);
  align-items: start;
}
.cd-row h3 {
  margin: 0;
  font: 400 1.05rem/1.2 var(--lb-sans);
  text-transform: uppercase;
}
.cd-row p {
  grid-column: 1;
  margin: 0;
  font: 400 0.75rem/1.6 var(--lb-mono);
  color: var(--ia-light-muted, #a6a6aa);
}
.cd-tag {
  grid-row: 1;
  grid-column: 2;
  padding: 4px 8px;
  border: 1px solid var(--lb-rule);
  font: 400 0.62rem/1 var(--lb-mono);
  text-transform: uppercase;
  white-space: nowrap;
}
.cd-switch {
  grid-row: 1 / span 2;
  grid-column: 2;
  position: relative;
  width: 52px;
  height: 28px;
}
.cd-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}
.cd-switch span {
  position: absolute;
  inset: 0;
  border: 1px solid var(--lb-ink);
  background: var(--lb-background);
  pointer-events: none;
}
.cd-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: var(--lb-ink);
  transition: transform 0.14s steps(3);
}
.cd-switch input:checked + span { background: var(--lb-ink); }
.cd-switch input:checked + span::after { background: var(--lb-background); transform: translateX(24px); }
.cd-switch input:focus-visible + span { outline: 2px solid var(--ia-light-ink, #fff); outline-offset: 2px; }
.cd-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cd-actions button {
  min-height: 56px;
  padding: 10px 12px;
  border: 0;
  border-right: 1px solid var(--lb-rule);
  border-radius: 0;
  background: var(--lb-background);
  color: var(--lb-ink);
  font: 400 0.85rem/1.1 var(--lb-sans);
  text-transform: uppercase;
  cursor: pointer;
}
.cd-actions button:last-child { border-right: 0; }
.cd-actions button:hover,
.cd-actions button:focus-visible { background: var(--lb-ink); color: var(--lb-on-ink); }
.cd-actions .cd-primary { background: var(--lb-ink); color: var(--lb-on-ink); }
.cd-actions .cd-primary:hover { background: var(--ia-light-accent-hover, #fff); }
.cd-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--lb-rule);
  font: 400 0.7rem/1.4 var(--lb-mono);
}
.cd-foot a { color: var(--lb-ink); }
.cd-status { min-height: 1em; }

@media (max-width: 480px) {
  .cd-actions { grid-template-columns: 1fr; }
  .cd-actions button { border-right: 0; border-bottom: 1px solid var(--lb-rule); }
  .cd-actions button:last-child { border-bottom: 0; }
}

/* Reduce-motion preference chosen in cookie settings */
html[data-motion="reduce"] *,
html[data-motion="reduce"] *::before,
html[data-motion="reduce"] *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* Language: the page is hidden only while a non-English page is being translated
   (see i18n.js, which clears the attribute as soon as it is done). */
html[data-i18n-pending] body { visibility: hidden; }
