/* ============================================================
   WAH IN THE CITY 2027. Legal page (privacy.html), fully branded
   (Adam 5 Nov): the sign-up page with the document where the panel sits.
   Same photo + lockup. An amber title block, then a forest reading sheet.
   No white anywhere.

   COLOUR (see style.css): cream #F2E9D6 on forest #0D2114 reading copy
   13.9:1; amber #FEA901 on forest (h2, links) 9.1:1; forest on amber 9.1:1;
   meta #B9C0A8 on forest 9.0:1.
   ============================================================ */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/Archivo-wdth.woff2?v=20261105-8") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
}

:root {
  --ground: #06140A;
  --amber:  #FEA901;
  --forest: #0D2114;
  --cream:  #FFF3DE;
  --read:   #F2E9D6;
  --meta:   #B9C0A8;
  --line:   #2A4432;
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --lawn: min(67vw, 54vh);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

/* Ground on html, never body (gotcha 16). */
html { background: var(--ground); -webkit-text-size-adjust: 100%; }
body.legal-wrap {
  margin: 0;
  background: transparent;
  color: var(--read);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The plate: exactly the sign-up page's rules. */
.bg {
  position: absolute;
  top: calc(var(--lawn) - 67vw);
  left: 0;
  right: 0;
  aspect-ratio: 1080 / 1824;
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 74%, transparent);
          mask-image: linear-gradient(#000 74%, transparent);
  background: url("/assets/images/bg-mobile.jpg?v=20261105-8") center top / 100% auto no-repeat;
  background-image: image-set(url("/assets/images/bg-mobile.webp?v=20261105-8") type("image/webp"), url("/assets/images/bg-mobile.jpg?v=20261105-8") type("image/jpeg"));
}
@media (min-aspect-ratio: 1/1) {
  .bg {
    position: fixed;
    inset: 0;
    aspect-ratio: auto;
    -webkit-mask-image: none;
            mask-image: none;
    background: url("/assets/images/bg-desktop.jpg?v=20261105-8") 100% 62% / cover no-repeat;
    background-image: image-set(url("/assets/images/bg-desktop.webp?v=20261105-8") type("image/webp"), url("/assets/images/bg-desktop.jpg?v=20261105-8") type("image/jpeg"));
  }
}

.legal-page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- lockup on the lawn (phones), held on the photo (desktop) ---------- */
.legal-hero {
  width: calc(100% - 2 * var(--gutter));
  max-width: 560px;
  padding: var(--lawn) 0 18px;
}
.legal-hero picture { display: block; }
.legal-hero__lockup, .legal-hero__line {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 14px rgba(4,12,6,.55));
}
.legal-hero__line { margin-top: clamp(10px, 2.4vw, 16px); }

.legal__back {
  position: absolute;
  z-index: 2;
  top: clamp(12px, 2vw, 22px);
  left: clamp(12px, 3vw, 28px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px 7px 12px;
  background: var(--amber);
  color: var(--forest);
  font-stretch: 62%;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-decoration: none;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: background-color .15s ease;
}
.legal__back:hover { background: #FFC24A; }
.legal__back-arrow { display: flex; flex: 0 0 auto; width: 18px; height: 18px; }
.legal__back-arrow svg { width: 100%; height: 100%; }

/* ---------- the document ---------- */
.legal {
  width: calc(100% - 2 * var(--gutter));
  max-width: 680px;
  --slant: clamp(26px, 5vw, 44px);
}
/* same slanted edge as the sign-up sheet */
.legal__head {
  padding: calc(var(--slant) + 16px) clamp(20px, 4vw, 44px) clamp(20px, 3vw, 30px);
  clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%);
  color: var(--forest);
  background: var(--amber) url("/assets/images/grain.webp?v=20261105-8");
}
/* the panel title: forest, then the panel turned inside out on a strip */
.legal h1 {
  margin: 0 0 14px;
  font-stretch: 62%;
  font-weight: 900;
  font-size: clamp(3rem, 13vw, 4.4rem);
  line-height: .98;
  letter-spacing: .002em;
  text-transform: uppercase;
}
.legal h1 em {
  font-style: normal;
  display: inline-block;
  margin-top: .05em;
  padding: .01em .24em .03em .22em;
  color: var(--amber);
  background: var(--forest);
  clip-path: polygon(.13em 0, 100% 0, calc(100% - .13em) 100%, 0 100%);
}
.legal__intro { margin: 0; font-size: 17px; line-height: 1.5; max-width: 52ch; }

.legal__body {
  padding: clamp(24px, 4vw, 40px) clamp(20px, 4vw, 44px) clamp(30px, 5vw, 48px);
  background: var(--forest);
  box-shadow: 0 30px 60px -22px rgba(2,8,4,.8);
}
.legal__body p {
  margin: 0 0 13px;
  color: var(--read);
  overflow-wrap: anywhere;
}
.legal__body p strong { color: var(--amber); font-weight: 800; }
.legal__body h2 {
  margin: clamp(30px, 4.6vw, 44px) 0 12px;
  padding-top: clamp(20px, 3vw, 28px);
  border-top: 1px solid var(--line);
  font-stretch: 62%;
  font-size: clamp(1.7rem, 6vw, 2.1rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: .012em;
  color: var(--amber);
}
.legal__body p.sub {
  margin: 20px 0 8px;
  font-weight: 800;
  color: var(--cream);
}
/* the source types its bullets, so hang them rather than touch the wording */
.legal__body p.b { padding-left: 1em; text-indent: -1em; }
.legal__body p.b--sub { padding-left: 2.1em; text-indent: -1em; }
.legal__body a { color: var(--amber); text-underline-offset: 2px; }
.legal .legal__meta {
  margin: clamp(26px, 4vw, 38px) 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--meta);
}

/* ---------- footer, on the photo as on the sign-up page ---------- */
.foot {
  flex-shrink: 0;
  width: 100%;
  margin: auto 0 0;                /* pinned to the foot of a short page; otherwise same as style.css */
  padding: 14px var(--gutter) 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  text-shadow: 0 1px 6px rgba(2,8,4,.8);
}
.foot__right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.foot__legal { margin: 0; font-size: 12px; color: var(--cream); }
.foot__legal a { color: var(--cream); text-decoration: none; }
.foot__legal a:hover { color: var(--amber); }
.foot__links a + a,
.foot__legal [data-louder-consent-open] {
  margin-left: .75em;
  padding-left: .85em;
  border-left: 1px solid rgba(255,243,222,.45);
}
.site-built { margin: 0; }
.site-built a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid rgba(255,243,222,.4);
  border-radius: 999px;
  font-size: 12px;
  color: var(--cream);
  text-decoration: none;
  background: rgba(6,20,10,.55);
  transition: border-color .18s ease;
}
.site-built a:hover { border-color: var(--amber); }
.site-built img { display: block; opacity: .9; }
@media (max-width: 899px) {
  .foot { justify-content: center; text-align: center; }
  .foot__right { justify-content: center; }
}
@media (max-width: 480px) {
  .foot { flex-direction: column; align-items: center; gap: 10px; padding-bottom: 22px; }
  .foot__right { flex-direction: column; align-items: center; gap: 10px; }
}

/* ---------- two-up: lockup held at the middle of the screen at left, the
   document scrolling where the panel sits. Covers landscape phones too. ---------- */
@media (min-width: 640px) and (min-aspect-ratio: 1/1) {
  :root {
    --pl: clamp(20px, 4.6vw, 96px);
    --pr: clamp(16px, 6vw, 130px);
    --sheet: min(680px, 56vw);
    --gap: clamp(20px, 4vw, 80px);
  }
  .legal-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sheet);
    column-gap: var(--gap);
    align-items: start;
    padding: 0 var(--pr) 0 var(--pl);
  }
  .legal-hero {
    position: sticky;
    top: 0;
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100svh;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .legal-hero picture, .legal-hero__line { width: min(100%, 78vh); margin-left: auto; margin-right: auto; }
  .legal-hero__line { margin-top: clamp(12px, 2vh, 20px); }
  .legal { width: var(--sheet); max-width: none; margin: clamp(16px, 8vh, 72px) 0 0; }
  .foot { grid-column: 1 / -1; width: auto; margin: clamp(10px, 3vh, 28px) calc(-1 * var(--pr)) 0 calc(-1 * var(--pl)); }
}

a:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.legal__back:focus-visible { outline: 2px solid var(--forest); outline-offset: -5px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
