/* ==========================================================================
   Legal pages — privacy, terms, accessibility
   --------------------------------------------------------------------------
   These deliberately do NOT use the --u system the home page is built on.
   That system pins every length to a 1920-wide artboard, which is right for
   reproducing a design exactly and wrong for a page of running text: a legal
   document has to stay readable on a laptop, a tablet and a phone, and it has
   no artboard to be faithful to.

   Everything else is shared — the same fonts, the same four colours, the same
   hairline purple strokes — so the pages read as part of the same site while
   being laid out on their own terms.
   ========================================================================== */

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

.legal {
  margin: 0;
  overflow-x: clip;   /* nothing here should ever reach a sideways scrollbar */
  background: var(--c-dark);
  color: var(--c-white);
  font-family: var(--f-body);
  font-weight: var(--fw-light);
  /* a step smaller, her call 22 Sep 2026 (was 1rem -> 1.15rem) */
  font-size: clamp(0.875rem, 0.84rem + 0.2vw, 0.975rem);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* The same vertical hairlines that structure the home page, at a fraction of
   the strength: here they are wallpaper, not architecture. */
.legal::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to left, rgba(159, 147, 255, 0.055) 0 1px, transparent 1px 175px);
  z-index: 0;
}

/* Parked above the viewport rather than off to the side. The old left:-9999px
   trick adds ten thousand pixels of scrollable width to the document, which in
   a right-to-left page is real, reachable empty space. */
.legal__skip {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  z-index: 10;
  padding: 0.75rem 1.25rem;
  background: var(--c-purple-light);
  color: var(--c-white);
  text-decoration: none;
  border-end-end-radius: 12px;
  transform: translateY(-150%);
  transition: transform 0.18s ease;
}

.legal__skip:focus { transform: translateY(0); }

.legal__wrap {
  position: relative;
  z-index: 1;
  width: min(72ch, calc(100% - 3rem));
  margin-inline: auto;
}

/* ---- Masthead ----------------------------------------------------------- */
.legal__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2rem;
}

.legal__back,
.legal__home {
  color: var(--c-white);
  text-decoration: none;
  font-size: 0.85rem;
  opacity: 0.75;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.legal__back:hover,
.legal__home:hover { opacity: 1; color: var(--c-purple-light); }

/* The logo carries its own two colours, so it is placed as an image rather
   than tinted. Height-led with width:auto, so its 2905x971 ratio is the one
   thing that decides how wide it gets. */
.legal__home {
  display: block;
  opacity: 1;
  line-height: 0;
}

.legal__home img {
  display: block;
  height: clamp(19px, 2.1vw, 24px);
  width: auto;
  transition: opacity 0.25s ease;
}

.legal__home:hover img { opacity: 0.75; }

/* ---- Title -------------------------------------------------------------- */
.legal__head {
  position: relative;
  /* Less headroom than before: the space above was sized around the oversized
     English word that used to sit here, and without it the page opened on a
     void. */
  padding-block: clamp(2.25rem, 5vw, 3.5rem) clamp(2rem, 5vw, 3rem);
}

.legal__title {
  position: relative;
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2rem, 5.6vw, 3.2rem);   /* was 2.5rem / 7vw / 4rem */
  line-height: 1.05;
  color: var(--c-purple-light);
}

.legal__meta {
  position: relative;
  margin: 1rem 0 0;
  font-size: 0.8rem;
  opacity: 0.55;
}

/* ---- Body --------------------------------------------------------------- */
.legal__body { padding-bottom: clamp(3rem, 8vw, 5rem); }

.legal__body > p {
  margin: 0 0 1.4em;
  opacity: var(--o-body-on-dark);
}

/* The lead paragraph carries the weight of an introduction without needing a
   heading to announce itself. */
.legal__lead {
  font-size: 1.15em;
  line-height: 1.7;
  opacity: 1 !important;
  padding-inline-start: 1.25rem;
  border-inline-start: 2px solid var(--c-purple-light);
}

.legal__body h2 {
  margin: 2.75em 0 0.9em;
  font-family: var(--f-body);
  font-weight: var(--fw-bold);
  font-size: clamp(1.1rem, 0.98rem + 0.55vw, 1.35rem);   /* was 1.25 -> 1.6rem */
  line-height: 1.3;
  color: var(--c-white);
}

/* A short rule above each heading, so the sections are separable at a glance
   in a page that is otherwise an unbroken column of text. */
.legal__body h2::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 1px;
  margin-bottom: 0.9rem;
  background: var(--c-purple-light);
}

.legal__body ul {
  margin: 0 0 1.4em;
  padding: 0;
  list-style: none;
}

.legal__body li {
  position: relative;
  margin-bottom: 0.7em;
  padding-inline-start: 1.4rem;
  opacity: var(--o-body-on-dark);
}

.legal__body li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-purple-light);
}

.legal__body a {
  color: var(--c-purple-light);
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}

.legal__body a:hover { color: var(--c-white); }

/* ---- Contact card ------------------------------------------------------- */
.legal__contact {
  margin-top: 3rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid var(--c-stroke-03);
  border-radius: 12px;
  background: rgba(159, 147, 255, 0.04);
}

.legal__contact h2 { margin-top: 0; }
.legal__contact h2::before { display: none; }

.legal__contact ul { margin-bottom: 0; }
.legal__contact li::before { display: none; }
.legal__contact li { padding-inline-start: 0; }

/* ---- Footer ------------------------------------------------------------- */
.legal__footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(159, 147, 255, 0.18);
  padding-block: 2rem 3rem;
  font-size: 0.8rem;
}

.legal__footer { text-align: center; }

.legal__footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.legal__footer a {
  color: var(--c-white);
  opacity: 0.75;
  text-underline-offset: 0.25em;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.legal__footer a:hover { opacity: 1; color: var(--c-purple-light); }

.legal__footer a[aria-current="page"] {
  opacity: 1;
  color: var(--c-purple-light);
  text-decoration: none;
}

.legal__copy { margin: 0; opacity: 0.5; }

@media (prefers-reduced-motion: reduce) {
  .legal * { transition: none !important; }
}


/* ==========================================================================
   5 Oct 2026 — the legal pages in the site's language (her call)
   The site's logo + menu (css/site-nav.css), the new ink, the hero's glow and
   grid lines, white Cooperative titles, lilac accents, the site's button, the
   fade-in-up (js/legal.js) and the home page's footer bar.
   ========================================================================== */
.legal { background: #0D0914; color: #F7F7F7; }
/* the hero's grid lines, the same file (lines-top.svg), stretched to the window */
.legal::before {
  background: url("../assets/svg/homepage/lines-top.svg") 0 0 / 100% 100% no-repeat;
  opacity: 0.7;
}
/* the hero's glow, fading out down the first screen */
.legal::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 110vh;
  pointer-events: none;
  z-index: 0;
  background: url("../assets/img/homepage/hero-bg.webp") center top / 100% auto no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 100%);
  opacity: 0.85;
}
.legal__wrap { width: min(870px, calc(100% - 3rem)); }
.legal__head { padding-block: clamp(9rem, 16vw, 13rem) clamp(2.5rem, 5vw, 3.5rem); text-align: center; }
.legal__title {
  color: #F7F7F7;
  font-size: clamp(2.6rem, 6.5vw, 5.5rem);
  line-height: 1;
}
.legal__meta {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: #9F93FF;
  opacity: 1;
}
.legal__lead { border-inline-start-color: #9F93FF; }
.legal__body h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); letter-spacing: 0; }
.legal__body h2::before { background: #9F93FF; }
.legal__body a, .legal__body li::before { color: #9F93FF; }
.legal__body li::before { background: #9F93FF; }
.legal__contact {
  border: 1px solid rgba(159, 147, 255, 0.35);
  border-radius: 12px;
  background: rgba(159, 147, 255, 0.05);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}

/* the site's button: white hairline pill, the long arrow, fills lilac */
.legal__end {
  display: inline-flex;
  direction: ltr;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  margin: 0 auto clamp(4rem, 9vw, 6rem);
  padding: 12px 36px;
  border: 1px solid #F7F7F7;
  border-radius: 100px;
  color: #F7F7F7;
  font-size: 1.1rem;
  line-height: 1.591;
  text-decoration: none;
  transition: background-color 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.legal__end span { direction: rtl; }
.legal__end:hover, .legal__end:focus-visible { background: #9F93FF; border-color: #9F93FF; }
.legal__arrow { display: block; width: 56px; height: 11px; transition: transform 0.35s ease; }
.legal__end:hover .legal__arrow { transform: translateX(-6px); }
main#main { display: flex; flex-direction: column; }
main#main > .legal__end { align-self: center; }

/* the footer: the home page's bar — icons, copyright, legal */
.legal__footer { border-top: 1px solid rgba(159, 147, 255, 0.4); background: rgba(25, 29, 36, 0.6); padding: 0; }
.legal__bar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  width: min(1570px, calc(100% - 3rem));
  margin-inline: auto;
  padding-block: 2.5rem;
  font-size: 0.85rem;
}
.legal__bar nav { margin: 0; gap: 1.75rem; }
.legal__icons { display: flex; gap: 20px; }
.legal__icons img { display: block; width: 22px; height: 22px; }
.legal__icons a { opacity: 1; }
.legal__copy { opacity: 0.8; }
@media (max-width: 760px) { .legal__bar { flex-direction: column; text-align: center; } }

/* the site-wide fade-in-up */
.legal [data-anim] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.legal [data-anim].is-in { opacity: 1; transform: none; }
.legal__body > p[data-anim].is-in { opacity: var(--o-body-on-dark, 0.9); }
.legal__lead[data-anim].is-in { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .legal [data-anim] { opacity: 1; transform: none; } }

/* THE FOOTER (her call, 5 Oct): the developers page's own bar, its
   markup copied from index.html and its rules from css/style.css
   .site-footer — on the 1920 frame (--lu), and stacked on a phone */
.legal { --lu: calc(100vw / 1920); }   /* grows past 1920 with the pages (5 Oct) */
.site-footer {
  position: relative;
  z-index: 4;
  height: calc(100 * var(--lu));
  min-height: 64px;
  background: rgba(13, 9, 20, 0.6);
  border-top: 1px solid rgba(159, 147, 255, 0.4);
  font-size: max(13px, calc(16 * var(--lu)));
}
.site-footer__social {
  position: absolute;
  left: calc(175 * var(--lu));
  top: 50%;
  translate: 0 -50%;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  direction: ltr;
  align-items: center;
  gap: calc(20 * var(--lu));
}
.site-footer__social a { display: block; width: max(20px, calc(23.667 * var(--lu))); height: max(20px, calc(23.667 * var(--lu))); opacity: 0.85; transition: opacity 0.35s ease, transform 0.35s ease; }
.site-footer__social a:hover { opacity: 1; transform: translateY(-2px); }
.site-footer__social img { display: block; width: 100%; height: 100%; }
.site-footer__copy {
  position: absolute;
  left: calc(50% + 4.5 * var(--lu));
  top: 50%;
  translate: -50% -50%;
  margin: 0;
  color: #F7F7F7;
  white-space: nowrap;
}
.site-footer__link {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  line-height: 2.16;
  color: #F7F7F7;
  text-decoration: underline;
  text-underline-position: from-font;
  white-space: nowrap;
  opacity: 0.85;
  transition: opacity 0.35s ease, color 0.35s ease;
}
.site-footer__link:hover { opacity: 1; }
.site-footer__link[aria-current="page"] { opacity: 1; color: #9F93FF; }
.site-footer__link--a11y    { right: calc(166 * var(--lu)); }
.site-footer__link--terms   { right: calc(284 * var(--lu)); }
.site-footer__link--privacy { right: calc(425 * var(--lu)); }
@media (max-width: 899px) {
  .site-footer { height: auto; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px 16px; }
  .site-footer > *, .site-footer__link { position: static; translate: none; }
  .site-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
}

/* the coordinator fields still to fill (5 Oct) — marked so they cannot be missed */
.legal__coord mark { padding: 0 0.35em; border-radius: 4px; background: #FFD400; color: #0D0914; font-weight: 600; }
