:root {
  --paper:#f0eadf;
  --paper-alt:#e5ded2;
  --ink:#18211d;
  --muted:#68716b;
  --line:#cfc6b8;
  --bronze:#89592e;
  --night:#080b09;
}

*,
*::before,
*::after { box-sizing:border-box; }

html.legal-safari-surface {
  width:100%;
  max-width:100%;
  overflow-x:clip;
  scroll-behavior:smooth;
  background:var(--night);
}

body.legal-page {
  width:100%;
  max-width:100%;
  min-height:100vh;
  min-height:100dvh;
  margin:0;
  display:flex;
  flex-direction:column;
  overflow-x:clip;
  color:var(--ink);
  background:var(--night);
  font-family:"Manrope",Arial,sans-serif;
  line-height:1.6;
}

a { color:inherit; text-decoration:none; }
button { font:inherit; }

a:focus-visible,
button:focus-visible {
  outline:3px solid #c28a4b;
  outline-offset:4px;
}

.legal-header {
  flex:0 0 auto;
  min-height:94px;
  padding:28px max(6vw,env(safe-area-inset-right)) 28px max(6vw,env(safe-area-inset-left));
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  border-bottom:1px solid var(--line);
  background:#f8f4ec;
}

.legal-header .brand {
  display:inline-flex;
  align-items:center;
  color:var(--ink);
}

.legal-header .brand span {
  display:flex;
  flex-direction:column;
  line-height:1.12;
}

.legal-header .brand strong {
  font:700 18px "Space Grotesk",sans-serif;
  letter-spacing:-.4px;
}

.legal-header .brand small {
  margin-top:5px;
  color:#777f79;
  font-size:10px;
  font-weight:700;
  letter-spacing:2.4px;
  text-transform:uppercase;
}

.legal-back {
  min-height:44px;
  display:inline-flex;
  align-items:center;
  color:var(--ink);
  font-weight:700;
  touch-action:manipulation;
}

.legal-main {
  width:100%;
  flex:1 0 auto;
  padding:90px 6vw 120px;
  background:var(--paper-alt);
}

.legal-title {
  max-width:1000px;
  margin:0 auto 70px;
}

.eyebrow {
  margin:0 0 22px;
  color:var(--bronze);
  font-size:11px;
  font-weight:800;
  letter-spacing:2.5px;
  text-transform:uppercase;
}

.legal-title h1 {
  margin:12px 0 20px;
  font-family:"Space Grotesk",sans-serif;
  font-size:clamp(48px,8vw,92px);
  font-weight:700;
  line-height:.94;
  letter-spacing:-5px;
}

.legal-title > p:last-child {
  margin:0;
  color:var(--muted);
}

.legal-language {
  max-width:1000px;
  margin:0 auto 14px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
}

.legal-language button {
  min-height:48px;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid var(--line);
  border-radius:14px;
  color:var(--ink);
  background:rgba(255,255,255,.35);
  cursor:pointer;
  font-weight:800;
  touch-action:manipulation;
}

.legal-language button small {
  color:var(--muted);
  font-size:10px;
  font-weight:600;
}

.legal-language button.active {
  color:#fff;
  border-color:var(--bronze);
  background:var(--bronze);
}

.legal-language button.active small { color:rgba(255,255,255,.76); }

.translation-notice {
  max-width:1000px;
  margin:0 auto 44px;
  padding:13px 16px;
  border-left:3px solid var(--bronze);
  color:var(--muted);
  background:rgba(255,255,255,.35);
  font-size:12px;
}

.legal-version[hidden] { display:none; }

.legal-content {
  max-width:1000px;
  margin:auto;
  border-top:1px solid var(--line);
}

.legal-content section {
  padding:42px 0;
  display:grid;
  grid-template-columns:70px minmax(0,1fr);
  gap:25px;
  border-bottom:1px solid var(--line);
}

.legal-content section > span {
  color:var(--bronze);
  font-size:12px;
  font-weight:800;
}

.legal-content h2 {
  margin:0 0 18px;
  font-family:"Space Grotesk",sans-serif;
  font-size:28px;
}

.legal-content p {
  max-width:72ch;
  margin:0 0 14px;
  color:#4d574f;
  line-height:1.75;
  text-wrap:pretty;
}

.legal-content a {
  color:var(--bronze);
  text-decoration:underline;
  text-underline-offset:3px;
  touch-action:manipulation;
}

body.legal-page #site-footer {
  flex:0 0 auto;
  margin-top:auto;
}

@media (min-width:701px) and (max-width:1024px) {
  .legal-main { padding:76px 5vw 100px; }
  .legal-title { margin-bottom:56px; }
  .legal-title h1 { font-size:clamp(58px,8vw,76px); }
  .legal-content section {
    grid-template-columns:54px minmax(0,1fr);
    gap:22px;
  }
}

@media (max-width:700px) {
  .legal-header {
    min-height:calc(76px + env(safe-area-inset-top));
    padding:max(18px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) 18px max(18px,env(safe-area-inset-left));
    gap:18px;
  }

  .legal-header .brand strong { font-size:16px; }
  .legal-back { font-size:13px; }

  .legal-main {
    padding:58px max(18px,env(safe-area-inset-right)) 82px max(18px,env(safe-area-inset-left));
  }

  .legal-title { margin-bottom:38px; }

  .legal-title h1 {
    font-size:clamp(38px,11vw,47px);
    line-height:.98;
    letter-spacing:-.055em;
    overflow-wrap:anywhere;
  }

  .legal-language { grid-template-columns:1fr; }
  .legal-language button { padding:12px 14px; }
  .translation-notice { margin-bottom:28px; }

  .legal-content section {
    grid-template-columns:1fr;
    gap:12px;
    padding-block:28px;
  }

  .legal-content h2 { font-size:clamp(22px,6.5vw,25px); }
  .legal-content p { overflow-wrap:anywhere; }
}

@media (max-width:350px) {
  .legal-header,
  .legal-header .brand { align-items:flex-start; }
  .legal-header { padding-inline:15px; }
  .legal-header .brand small { letter-spacing:1.7px; }
  .legal-back {
    max-width:118px;
    justify-content:flex-end;
    text-align:right;
    line-height:1.25;
  }
  .legal-main { padding-inline:16px; }
  .legal-title h1 { font-size:36px; }
}

@media (prefers-reduced-motion:reduce) {
  html.legal-safari-surface { scroll-behavior:auto; }
}
