/* Advocatenkantoor Eizenga
   ------------------------------------------------------------------------
   Type sizes are in rem so they respond to the visitor's browser font-size
   setting. Dark mode is defined in CSS first (prefers-color-scheme) and only
   overridden by the explicit [data-theme] toggle, so the correct palette is
   painted on the first frame with no flash and no dependency on JavaScript. */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gilda Display';
  src: url('../fonts/gilda-display.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */

:root {
  /* Complete Tusk palette */
  --ivory: #F4F1E6;
  --bone: #E9E2D0;
  --tusk: #E6C9AE;
  --sand: #C2B08A;
  --taupe: #A19072;
  --elephant-grey: #7A7467;
  --earth: #4A443A;
  --charcoal: #22221E;
  --warm-bronze: #B08A5B;
  --aged-copper: #8C6A4A;
  --savannah-gold: #D4AF37;
  --clay: #A86F4D;
  --dusty-olive: #6E6F52;
  --deep-slate: #2F3336;
  --night: #171A1D;

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* Georgia stays the primary display face; Gilda Display (the logo font) is the
     self-hosted fallback so Android and Linux get the brand serif, not Times. */
  --font-serif: Georgia, 'Gilda Display', 'Times New Roman', serif;

  --page-bg: var(--ivory);
  --surface: #f8f5ec;
  --surface-soft: var(--bone);
  --text: var(--charcoal);
  --muted: var(--elephant-grey);
  --line: color-mix(in srgb, var(--taupe) 44%, transparent);
  --hero-bg: var(--bone);
  --panel-dark: var(--deep-slate);
  --panel-dark-text: var(--ivory);
  --card-text-soft: color-mix(in srgb, var(--charcoal) 82%, transparent);
  --shadow: 0 18px 50px rgba(34, 34, 30, .09);
  --radius-lg: 26px;
  --radius-md: 19px;

  /* Set by the script while the consent bar is on screen, so the fixed
     one-screen layout shrinks to fit above it instead of being covered. */
  --consent-h: 0px;

  color-scheme: light;
}

/* System preference, unless the visitor explicitly chose light. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page-bg: var(--night);
    --surface: #1d201f;
    --surface-soft: var(--charcoal);
    --text: var(--ivory);
    --muted: #bdb6a7;
    --line: color-mix(in srgb, var(--sand) 25%, transparent);
    --hero-bg: #20211e;
    --panel-dark: #111416;
    --card-text-soft: color-mix(in srgb, var(--ivory) 84%, transparent);
    --shadow: 0 18px 60px rgba(0, 0, 0, .23);

    color-scheme: dark;
  }
}

/* Explicit choice always wins, in both directions. */
:root[data-theme="dark"] {
  --page-bg: var(--night);
  --surface: #1d201f;
  --surface-soft: var(--charcoal);
  --text: var(--ivory);
  --muted: #bdb6a7;
  --line: color-mix(in srgb, var(--sand) 25%, transparent);
  --hero-bg: #20211e;
  --panel-dark: #111416;
  --card-text-soft: color-mix(in srgb, var(--ivory) 84%, transparent);
  --shadow: 0 18px 60px rgba(0, 0, 0, .23);

  color-scheme: dark;
}

/* ------------------------------------------------------------------- base */

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--page-bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 89% 8%, color-mix(in srgb, var(--sand) 14%, transparent), transparent 24rem),
    var(--page-bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--night);
  color: var(--ivory);
  border-radius: 9px;
  font-size: .875rem;
  transform: translateY(-170%);
}
.skip-link:focus { transform: translateY(0); }

/* ------------------------------------------------------------------ shell */

.page-shell {
  width: min(1540px, calc(100% - 40px));
  height: calc(100dvh - var(--consent-h));
  max-height: 980px;
  min-height: 650px;
  margin: 0 auto;
  display: grid;
  grid-template-rows: 5px 112px minmax(0, 1fr) 58px;
  overflow: hidden;
}

.palette-line {
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg,
    var(--ivory) 0 6.66%,
    var(--bone) 6.66% 13.32%,
    var(--tusk) 13.32% 19.98%,
    var(--sand) 19.98% 26.64%,
    var(--taupe) 26.64% 33.3%,
    var(--elephant-grey) 33.3% 39.96%,
    var(--earth) 39.96% 46.62%,
    var(--charcoal) 46.62% 53.28%,
    var(--warm-bronze) 53.28% 59.94%,
    var(--aged-copper) 59.94% 66.6%,
    var(--savannah-gold) 66.6% 73.26%,
    var(--clay) 73.26% 79.92%,
    var(--dusty-olive) 79.92% 86.58%,
    var(--deep-slate) 86.58% 93.24%,
    var(--night) 93.24% 100%);
}

/* ----------------------------------------------------------------- topbar */

.topbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: clamp(18px, 2vw, 38px);
  min-height: 112px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  text-decoration: none;
  color: #00173e;
}
:root[data-theme="dark"] .brand { color: var(--ivory); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand { color: var(--ivory); }
}

.brand-logo {
  display: block;
  width: clamp(215px, 19vw, 300px);
  height: auto;
  max-height: 78px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(22px, 2.6vw, 44px);
  max-width: 560px;
  min-height: 62px;
}
.topbar-info-block {
  display: grid;
  justify-items: end;
  align-content: center;
  min-height: 62px;
}
.topbar-label {
  font-size: .6875rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1.2;
  color: var(--muted);
}
.topbar-value,
.topbar-meta .contact-slot {
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
}
.topbar-value {
  color: var(--muted);
  margin-top: 6px;
  text-align: right;
}
.topbar-meta .contact-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  color: var(--text);
  align-self: center;
}
.topbar-meta .contact-slot .contact-mask {
  display: inline-block;
  transform: translateY(1px);
}
.topbar-meta .contact-slot a { text-decoration: none; }
.topbar-meta .contact-slot a:hover { color: #FF0000; }

.controls {
  display: flex;
  align-items: center;
  gap: 9px;
}

.language-switch,
.theme-button {
  min-height: 38px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
  border-radius: 999px;
}
.language-switch { display: flex; padding: 3px; }
.lang-button {
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .08em;
}
a.lang-button:not(.is-active):hover { color: var(--text); }
.lang-button.is-active {
  background: var(--earth);
  color: var(--ivory);
}
:root[data-theme="dark"] .lang-button.is-active {
  background: var(--sand);
  color: var(--night);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lang-button.is-active {
    background: var(--sand);
    color: var(--night);
  }
}

.theme-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 82px;
  padding: 0 12px;
  cursor: pointer;
}
.theme-mark {
  display: inline-flex;
  color: var(--savannah-gold);
}
.theme-mark .icon { display: none; }
:root[data-theme-mode="system"] .icon-system,
:root[data-theme-mode="light"] .icon-light,
:root[data-theme-mode="dark"] .icon-dark { display: block; }
/* Before the toggle script runs, data-theme-mode is absent: show the auto mark. */
:root:not([data-theme-mode]) .icon-system { display: block; }

.theme-text {
  font-size: .6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ------------------------------------------------------------------- grid */

.main-grid {
  min-height: 0;
  padding: 20px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, .98fr) minmax(295px, .72fr);
  gap: 16px;
}

.hero-panel,
.specialisms,
.experience-panel {
  min-height: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ------------------------------------------------------------------- hero */

.hero-panel {
  position: relative;
  isolation: isolate;
  padding: clamp(26px, 3.8vh, 46px) clamp(28px, 3.1vw, 50px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--ivory) 50%, transparent), transparent 52%),
    var(--hero-bg);
  border: 1px solid color-mix(in srgb, var(--sand) 50%, transparent);
  box-shadow: var(--shadow);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-panel {
    background:
      linear-gradient(145deg, color-mix(in srgb, var(--aged-copper) 11%, transparent), transparent 53%),
      var(--hero-bg);
  }
}
:root[data-theme="dark"] .hero-panel {
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--aged-copper) 11%, transparent), transparent 53%),
    var(--hero-bg);
}

.eyebrow {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--aged-copper);
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.35;
  text-transform: uppercase;
}
.eyebrow.muted { color: var(--elephant-grey); }
:root[data-theme="dark"] .eyebrow.muted { color: var(--muted); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .eyebrow.muted { color: var(--muted); }
}
.eyebrow.inverse { color: var(--sand); }
.eyebrow-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--savannah-gold);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--savannah-gold) 13%, transparent);
}

.hero-copy h1 {
  max-width: 720px;
  margin: clamp(20px, 3.8vh, 42px) 0 18px;
  color: var(--earth);
  font-family: var(--font-serif);
  font-size: clamp(2.75rem, 4.4vw, 4.6rem);
  font-weight: 400;
  line-height: .96;
  letter-spacing: -.045em;
}
:root[data-theme="dark"] .hero-copy h1 { color: var(--ivory); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-copy h1 { color: var(--ivory); }
}
.hero-copy h1 span,
.hero-copy h1 em { display: block; }
.hero-copy h1 em {
  color: var(--aged-copper);
  font-weight: 400;
}

.hero-intro {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(.9375rem, 1.05vw, 1.125rem);
  line-height: 1.6;
}

.hero-actions {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 20px;
}
.primary-slot {
  min-height: 48px;
  padding: 0 18px 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: 999px;
  background: var(--warm-bronze);
  color: var(--night);
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .03em;
  box-shadow: 0 9px 28px color-mix(in srgb, var(--warm-bronze) 28%, transparent);
  transition: transform .2s ease, background-color .2s ease;
}
.primary-slot:hover {
  transform: translateY(-2px);
  background: var(--savannah-gold);
}
.primary-slot a { text-decoration: none; }
.primary-slot:has(a:focus-visible) {
  outline: 3px solid var(--savannah-gold);
  outline-offset: 3px;
}
.primary-slot a:focus-visible { outline: none; }
.action-arrow { flex: 0 0 auto; }

/* Shown only where the topbar contact block is hidden. */
.mobile-contact {
  display: none;
  min-height: 48px;
  padding: 0 20px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--taupe) 60%, transparent);
  border-radius: 999px;
  color: var(--earth);
  font-size: .9375rem;
  font-weight: 700;
}
.mobile-contact svg { color: var(--aged-copper); }
.mobile-contact a { text-decoration: none; }
:root[data-theme="dark"] .mobile-contact { color: var(--ivory); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mobile-contact { color: var(--ivory); }
}

/* Outside office hours the pill carries a sentence instead of a number, so it
   is set quieter and left free to wrap on the narrowest screens. */
.mobile-contact.is-closed {
  padding: 10px 16px;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
}

.motto {
  margin: 0;
  color: var(--dusty-olive);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-style: italic;
}
:root[data-theme="dark"] .motto { color: var(--sand); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .motto { color: var(--sand); }
}

.tusk-orbit {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--taupe) 34%, transparent);
  pointer-events: none;
}
.orbit-one {
  width: 300px;
  height: 300px;
  right: -115px;
  top: 72px;
  box-shadow: inset 0 0 0 34px color-mix(in srgb, var(--tusk) 18%, transparent);
  animation: orbit-drift 13s ease-in-out infinite alternate;
}
.orbit-two {
  width: 170px;
  height: 170px;
  right: 74px;
  bottom: -76px;
  background: color-mix(in srgb, var(--sand) 14%, transparent);
  border-color: color-mix(in srgb, var(--clay) 30%, transparent);
  animation: orbit-drift 16s ease-in-out -4s infinite alternate-reverse;
}

/* ------------------------------------------------------------ specialisms */

.specialisms {
  display: grid;
  grid-template-rows: minmax(110px, .58fr) 1fr 1fr;
  gap: 12px;
}
.section-heading {
  padding: 12px 16px 12px 17px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.section-heading h2 {
  margin: 10px 0 0;
  color: var(--earth);
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 1.95vw, 2.1rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -.025em;
}
:root[data-theme="dark"] .section-heading h2 { color: var(--ivory); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .section-heading h2 { color: var(--ivory); }
}

.specialism-card {
  position: relative;
  padding: 20px 24px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  overflow: hidden;
  transition: transform .22s ease;
}
.specialism-card:hover { transform: translateY(-2px); }

.asylum-card {
  background: linear-gradient(135deg, color-mix(in srgb, var(--tusk) 86%, var(--ivory)), var(--bone));
  color: var(--charcoal);
  border-color: color-mix(in srgb, var(--clay) 33%, transparent);
}
.contract-card {
  background: linear-gradient(135deg, var(--sand), color-mix(in srgb, var(--taupe) 72%, var(--bone)));
  color: var(--charcoal);
  border-color: color-mix(in srgb, var(--dusty-olive) 35%, transparent);
}
:root[data-theme="dark"] .asylum-card,
:root[data-theme="dark"] .contract-card { color: var(--ivory); }
:root[data-theme="dark"] .asylum-card { background: linear-gradient(135deg, #342c27, #282722); }
:root[data-theme="dark"] .contract-card { background: linear-gradient(135deg, #343126, #292b27); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .asylum-card,
  :root:not([data-theme="light"]) .contract-card { color: var(--ivory); }
  :root:not([data-theme="light"]) .asylum-card { background: linear-gradient(135deg, #342c27, #282722); }
  :root:not([data-theme="light"]) .contract-card { background: linear-gradient(135deg, #343126, #292b27); }
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-index {
  color: var(--aged-copper);
  font-family: var(--font-serif);
  font-size: .875rem;
}
:root[data-theme="dark"] .card-index { color: var(--tusk); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .card-index { color: var(--tusk); }
}
.card-chip {
  padding: 5px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ivory) 62%, transparent);
  color: var(--earth);
  font-size: .625rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .1em;
  white-space: nowrap;
}
:root[data-theme="dark"] .card-chip {
  background: color-mix(in srgb, var(--night) 46%, transparent);
  color: var(--bone);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .card-chip {
    background: color-mix(in srgb, var(--night) 46%, transparent);
    color: var(--bone);
  }
}

.specialism-card h3 {
  margin: 16px 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 1.8vw, 2rem);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -.025em;
}
.specialism-card p {
  max-width: 400px;
  margin: 0;
  align-self: end;
  color: var(--card-text-soft);
  font-size: .8125rem;
  line-height: 1.55;
}
.card-accent {
  position: absolute;
  right: 0;
  top: 24px;
  width: 5px;
  height: 46px;
  border-radius: 999px 0 0 999px;
}
.asylum-card .card-accent { background: var(--clay); }
.contract-card .card-accent { background: var(--dusty-olive); }

/* ------------------------------------------------------------- experience */

.experience-panel {
  padding: 26px 25px 22px;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 18px;
  background:
    radial-gradient(circle at 110% -5%, color-mix(in srgb, var(--warm-bronze) 30%, transparent), transparent 15rem),
    linear-gradient(160deg, var(--deep-slate), var(--night));
  color: var(--panel-dark-text);
  box-shadow: var(--shadow);
}
.experience-copy h2 {
  margin: 18px 0 16px;
  color: var(--ivory);
  font-family: var(--font-serif);
  font-size: clamp(2rem, 2.4vw, 2.7rem);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.035em;
}
.experience-text {
  margin: 0;
  color: color-mix(in srgb, var(--bone) 88%, transparent);
  font-size: .8125rem;
  line-height: 1.6;
}

.trust-row {
  margin: 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--dusty-olive) 58%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--dusty-olive) 18%, transparent);
  color: var(--bone);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.35;
}
.trust-mark {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--dusty-olive);
  color: var(--ivory);
  font-family: var(--font-serif);
  font-size: .9375rem;
}

.contact-stack {
  display: grid;
  gap: 6px;
  padding-top: 15px;
  border-top: 1px solid color-mix(in srgb, var(--taupe) 27%, transparent);
  color: var(--sand);
  font-size: .75rem;
  font-style: normal;
  letter-spacing: .02em;
}
.contact-stack .contact-slot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--tusk);
  font-size: .8125rem;
  font-weight: 800;
}
.contact-stack .stack-icon {
  flex: 0 0 auto;
  color: var(--warm-bronze);
}
.contact-stack .contact-slot a {
  width: fit-content;
  text-decoration: none;
}
.contact-stack .contact-slot a:hover { color: #FF0000; }
.contact-stack > a {
  color: inherit;
  text-decoration: none;
}
.contact-stack > a:hover { color: #FF0000; }

/* Two addresses stacked in one block only read as two if each is announced. */
.contact-stack .address-block {
  display: grid;
  gap: 2px;
}
.contact-stack .address-label {
  font-size: .625rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--taupe);
}

/* ---------------------------------------------------------------- contact */

/* Placeholder shown until the script assembles the real link. */
.contact-mask { letter-spacing: .06em; opacity: .55; }
.contact-mask--primary { opacity: 1; letter-spacing: inherit; }
.contact-noscript { font-size: .75rem; color: var(--muted); }

/* ----------------------------------------------------------------- footer */

.footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
}
.legal-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.legal-links a { text-decoration: none; }
.legal-links a:hover { color: var(--aged-copper); text-decoration: underline; }
.link-meta { opacity: .78; }
.footer-note { text-align: right; }

/* --------------------------------------------------------------- consent */

/* Sits early in the DOM for reading order, pinned to the bottom visually. */
.consent {
  position: fixed;
  z-index: 90;
  inset: auto 0 0 0;
  padding: 14px clamp(14px, 3vw, 28px) calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 -14px 40px rgba(34, 34, 30, .13);
}
.consent[hidden] { display: none; }
:root[data-theme="dark"] .consent { box-shadow: 0 -14px 40px rgba(0, 0, 0, .4); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .consent { box-shadow: 0 -14px 40px rgba(0, 0, 0, .4); }
}

.consent-inner {
  width: min(1540px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 4vw, 48px);
}
.consent-copy { max-width: 78ch; }
.consent-title {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: -.015em;
  color: var(--earth);
}
:root[data-theme="dark"] .consent-title { color: var(--ivory); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .consent-title { color: var(--ivory); }
}
.consent-body {
  margin: 0;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.55;
}
.consent-more {
  display: inline-block;
  margin-top: 6px;
  color: var(--aged-copper);
  font-size: .8125rem;
  font-weight: 700;
}

.consent-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
}
/* Both choices are deliberately identical: refusing must be exactly as easy
   as accepting, so neither button is styled to draw the eye. */
.consent-button {
  min-height: 44px;
  min-width: 118px;
  padding: 0 20px;
  border: 1px solid var(--earth);
  border-radius: 999px;
  background: transparent;
  color: var(--earth);
  cursor: pointer;
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .03em;
  transition: background-color .18s ease, color .18s ease;
}
.consent-button:hover {
  background: var(--earth);
  color: var(--ivory);
}
:root[data-theme="dark"] .consent-button { border-color: var(--sand); color: var(--sand); }
:root[data-theme="dark"] .consent-button:hover { background: var(--sand); color: var(--night); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .consent-button { border-color: var(--sand); color: var(--sand); }
  :root:not([data-theme="light"]) .consent-button:hover { background: var(--sand); color: var(--night); }
}

.consent-reopen {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font-size: inherit;
  text-decoration: none;
}
.consent-reopen:hover { color: var(--aged-copper); text-decoration: underline; }

@media (max-width: 780px) {
  .consent-inner { flex-direction: column; align-items: stretch; gap: 14px; }
  .consent-actions > * { flex: 1 1 0; }
}

/* ------------------------------------------------------------ legal pages */

.doc-body { min-height: 100dvh; }
.doc-shell {
  width: min(1540px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-rows: 5px 112px 1fr auto;
  min-height: 100dvh;
}
.doc-main { padding: clamp(24px, 5vh, 56px) 0 calc(40px + var(--consent-h)); }

/* Breathing room below the footer nav. Scoped to the document pages: the
   homepage footer sits in a fixed 58px grid row, where extra padding would
   push its content out of the one-screen layout. */
.doc-shell .footer { padding-bottom: 10px; }

/* The measure is centred in the shell while the text itself stays ranged left —
   the header and footer keep the full width, so the page still reads as one
   layout rather than a narrow document floating in it. */
.doc {
  max-width: 74ch;
  margin-inline: auto;
  font-size: 1rem;
  line-height: 1.65;
}
.doc h1 {
  margin: 0 0 6px;
  color: var(--earth);
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.035em;
}
.doc h2 {
  margin: 34px 0 10px;
  color: var(--earth);
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 400;
  letter-spacing: -.02em;
}
:root[data-theme="dark"] .doc h1,
:root[data-theme="dark"] .doc h2 { color: var(--ivory); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .doc h1,
  :root:not([data-theme="light"]) .doc h2 { color: var(--ivory); }
}
.doc-updated {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: .8125rem;
}
.doc-intro {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  color: var(--text);
}
.doc p { margin: 0 0 12px; color: var(--muted); }
.doc ul { margin: 0 0 12px; padding-left: 1.25em; color: var(--muted); }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--aged-copper); }

/* Numbered clauses. Native list numbering is kept rather than a CSS counter,
   so the document's own numbering (start="11") survives — and because setting a
   counter offset would need an inline style, which this site's CSP forbids.
   ::marker is styled in the display face so a clause number reads as something
   you can cite. */
.doc-clauses {
  margin: 0 0 18px;
  padding-left: 2.6rem;
  color: var(--muted);
}
.doc-clauses > li {
  margin: 0 0 16px;
  padding-left: .35rem;
}
.doc-clauses > li::marker {
  color: var(--aged-copper);
  font-family: var(--font-serif);
  font-size: 1.0625rem;
}
:root[data-theme="dark"] .doc-clauses > li::marker { color: var(--tusk); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .doc-clauses > li::marker { color: var(--tusk); }
}

/* Marks a translation as non-authoritative. */
.doc-note {
  margin: 0 0 22px;
  padding: 12px 16px;
  border-left: 3px solid var(--warm-bronze);
  border-radius: 0 10px 10px 0;
  background: color-mix(in srgb, var(--warm-bronze) 12%, transparent);
  color: var(--text) !important;
  font-size: .875rem;
  line-height: 1.55;
}

/* Unfilled placeholders are loud on purpose — they must not survive to launch. */
.doc-todo {
  padding: 1px 6px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--savannah-gold) 34%, transparent);
  color: var(--charcoal);
  font-weight: 700;
}
:root[data-theme="dark"] .doc-todo { color: var(--night); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .doc-todo { color: var(--night); }
}

/* Kept on the same measure so it lines up with the text above it. */
.doc-back {
  max-width: 74ch;
  margin: 40px auto 0;
}
.doc-back a { color: var(--aged-copper); font-weight: 700; text-decoration: none; }
.doc-back a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .doc-shell { width: min(100% - 24px, 720px); grid-template-rows: 6px auto 1fr auto; }
}

/* ------------------------------------------------------------ error pages */

.error-body { display: grid; place-items: center; padding: 8vh 20px; }
.error-shell {
  width: min(640px, 100%);
  display: grid;
  gap: 22px;
}
.error-shell .brand-logo { width: min(280px, 70vw); }
.error-code {
  margin: 0;
  color: color-mix(in srgb, var(--taupe) 70%, transparent);
  font-family: var(--font-serif);
  font-size: clamp(4rem, 12vw, 7rem);
  line-height: 1;
}
.error-block h1,
.error-block h2 {
  margin: 0 0 10px;
  color: var(--earth);
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 400;
  letter-spacing: -.02em;
}
:root[data-theme="dark"] .error-block h1,
:root[data-theme="dark"] .error-block h2 { color: var(--ivory); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .error-block h1,
  :root:not([data-theme="light"]) .error-block h2 { color: var(--ivory); }
}
.error-block p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 52ch;
}
.error-block .primary-action {
  min-height: 48px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--warm-bronze);
  color: var(--night);
  text-decoration: none;
  font-size: .8125rem;
  font-weight: 800;
}
.error-block + .error-block {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

/* ------------------------------------------------------------ interaction */

:focus-visible {
  outline: 3px solid var(--savannah-gold);
  outline-offset: 3px;
}

@keyframes orbit-drift {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(-14px, 10px, 0) rotate(5deg); }
}

/* ------------------------------------------------------------ breakpoints */

@media (max-width: 1160px) {
  .page-shell { width: min(100% - 28px, 1380px); }
  .main-grid { grid-template-columns: minmax(0, 1.32fr) minmax(325px, .88fr) minmax(270px, .67fr); }
  .hero-copy h1 { font-size: clamp(2.6rem, 4.9vw, 3.9rem); }
}

@media (max-width: 1040px) {
  .topbar {
    grid-template-columns: minmax(170px, 1fr) auto auto;
    gap: 14px;
  }
  .brand-logo { width: clamp(180px, 18vw, 240px); }
  .topbar-meta {
    gap: 12px;
    max-width: 440px;
  }
  .topbar-label {
    font-size: .625rem;
    letter-spacing: .09em;
  }
  .topbar-value,
  .topbar-meta .contact-slot {
    font-size: .8125rem;
  }
}

@media (max-width: 900px) {
  .topbar {
    min-height: 92px;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .brand-logo { width: min(230px, 50vw); }
  .theme-text { display: none; }
  .theme-button { min-width: 44px; width: 44px; padding: 0; justify-content: center; }
  .lang-button { min-width: 40px; min-height: 32px; }
  .topbar-meta {
    gap: 10px;
    max-width: 360px;
  }
  .topbar-label {
    font-size: .5625rem;
    letter-spacing: .08em;
  }
  .topbar-value,
  .topbar-meta .contact-slot {
    font-size: .75rem;
  }
}

/* Short desktop windows: tighten, but never below a readable floor. */
@media (max-height: 780px) and (min-width: 901px) {
  .page-shell { grid-template-rows: 5px 92px minmax(0, 1fr) 46px; min-height: 600px; }
  .main-grid { padding: 14px 0; gap: 12px; }
  .hero-panel { padding-top: 26px; padding-bottom: 24px; }
  .hero-copy h1 { margin-top: 20px; font-size: clamp(2.5rem, 3.9vw, 3.6rem); }
  .hero-intro { font-size: .9375rem; }
  /* The contact block grew by an address, so the panel above it gives back the
     millimetres rather than clipping the addresses off the bottom. */
  .experience-panel { padding: 18px 20px 14px; gap: 10px; }
  .experience-copy { gap: 6px; }
  .experience-copy h2 { font-size: 1.75rem; margin: 6px 0; }
  .experience-text { line-height: 1.4; }
  .trust-row { padding-top: 8px; padding-bottom: 8px; }
  .contact-stack { padding-top: 10px; gap: 4px; }
  .contact-stack .address-block { gap: 1px; }
  .specialism-card { padding: 15px 20px; }
  .specialism-card h3 { margin-top: 10px; font-size: 1.5rem; }
  .section-heading h2 { margin-top: 6px; font-size: 1.55rem; }
}

/* Below this the fixed viewport can no longer hold readable text: let it flow.
   This is also what catches high browser-zoom levels on desktop. */
@media (max-height: 560px) and (min-width: 901px) {
  .page-shell {
    height: auto;
    max-height: none;
    min-height: calc(100dvh - var(--consent-h));
    overflow: visible;
    grid-template-rows: 5px auto auto auto;
  }
  .main-grid { grid-template-columns: 1fr; }
  .hero-panel { min-height: 420px; }
}

@media (max-width: 900px) {
  .page-shell {
    width: min(100% - 24px, 720px);
    height: auto;
    max-height: none;
    min-height: calc(100dvh - var(--consent-h));
    overflow: visible;
    grid-template-rows: 5px auto auto auto;
  }
  .topbar {
    min-height: 92px;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .brand-logo { width: min(230px, 50vw); }
  .theme-text { display: none; }
  .theme-button { min-width: 44px; width: 44px; padding: 0; justify-content: center; }
  .lang-button { min-width: 40px; min-height: 32px; }
  .main-grid {
    padding: 16px 0 18px;
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .hero-panel { min-height: 540px; padding: 32px 26px; }
  .hero-copy h1 { font-size: clamp(2.75rem, 12vw, 4.3rem); }
  .hero-intro { font-size: 1rem; }
  .specialisms { grid-template-rows: auto auto auto; }
  .section-heading { min-height: 120px; padding: 20px 8px; }
  .section-heading h2 { font-size: 2.1rem; }
  .specialism-card { min-height: 240px; padding: 24px; }
  .specialism-card h3 { font-size: 2.1rem; }
  .specialism-card p { font-size: .9375rem; }
  .experience-panel { min-height: 460px; padding: 32px 27px; }
  .experience-copy h2 { font-size: 2.7rem; }
  .experience-text { font-size: .9375rem; }
  .trust-row { font-size: .8125rem; }
  .contact-stack { font-size: .8125rem; }
  .contact-stack .contact-slot { font-size: .9375rem; }
  .footer { min-height: 80px; padding-bottom: 24px; font-size: .8125rem; }

  /* The phone number belongs on the device that can dial it. */
  .topbar-meta { display: none; }
  .mobile-contact { display: flex; }
}

@media (max-width: 540px) {
  .topbar { align-items: center; }
  .controls { gap: 5px; }
  .hero-copy h1 { font-size: clamp(2.5rem, 12.5vw, 3.6rem); }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 14px; }
  .primary-slot { justify-content: space-between; }
  .footer { flex-direction: column; }
  .footer-note { text-align: left; }
}

/* ---------------------------------------------------------------- a11y/print */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media print {
  .page-shell {
    width: 100%;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
    grid-template-rows: none;
  }
  .main-grid { grid-template-columns: 1fr; gap: 16px; padding: 0; }
  .palette-line,
  .controls,
  .tusk-orbit,
  .skip-link,
  .card-accent { display: none; }
  .hero-panel,
  .specialism-card,
  .experience-panel {
    background: none !important;
    color: #000 !important;
    border: 1px solid #999;
    box-shadow: none;
    break-inside: avoid;
  }
  .experience-copy h2,
  .trust-row,
  .trust-mark,
  .contact-stack,
  .contact-stack .address-label,
  .contact-stack .stack-icon,
  .contact-stack .contact-slot { color: #000 !important; background: none !important; }
  .primary-slot { background: none !important; box-shadow: none; padding: 0; }
  .legal-links a::after { content: " (" attr(href) ")"; font-size: .7rem; }
  body { background: #fff; color: #000; }
}
