/* Legal and risk · the Royal Courts as a navy plate, then the notice set as one document:
   a lifted paper sheet, heads in a left margin, each clause on its own hairline. No imagery in the text. */

body[data-page="legal"] {
  --hero: url("../img/photos/hero-legal.jpg");
  --hero-pos: 50% 42%;
  --hero-blend: luminosity;
}

/* a shorter, quieter plate: the document is the point (v7.css now sets the gutter and the hero section's padding) */
body[data-page="legal"] .hero {
  min-height: clamp(400px, 56vh, 560px);
  padding-bottom: calc(clamp(3rem, 7vh, 5rem) + 4.5rem);
  background-image:
    linear-gradient(90deg, rgba(11, 19, 34, .9) 0%, rgba(11, 19, 34, .66) 46%, rgba(11, 19, 34, .3) 100%),
    linear-gradient(0deg, rgba(11, 19, 34, .6), rgba(11, 19, 34, 0) 55%),
    var(--hero);
}

/* the sheet */
body[data-page="legal"] .poster > section.prose {
  position: relative; z-index: 2;
  margin: -4.5rem 0 0;
  padding: clamp(2.2rem, 4.4vw, 4rem) clamp(2rem, 6vw, 5.5rem) clamp(2.8rem, 5.5vw, 4.6rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 45rem);
  column-gap: 0;
  align-items: start;
}
/* Ink's red tab on the sheet's opening rule */
body[data-page="legal"] .poster > section.prose::before {
  content: ""; position: absolute; top: calc(clamp(2.2rem, 4.4vw, 4rem) - 1px); left: clamp(2rem, 6vw, 5.5rem);
  width: 4.5rem; height: 4px; background: var(--red);
}

body[data-page="legal"] .prose > h2 {
  grid-column: 1;
  margin: 2.4rem 0 0; padding: 1.5rem 2.6rem 0 0;
  border-top: 1px solid var(--line);
  font-family: var(--display); font-weight: 700;
  font-size: 1.28rem; line-height: 1.18; letter-spacing: -.018em;
  color: var(--fg);
}
body[data-page="legal"] .prose > p {
  grid-column: 2;
  margin: 0; max-width: 45rem;
  font-family: var(--serif); font-size: 1.16rem; line-height: 1.68; color: #283246;
}
body[data-page="legal"] .prose > h2 + p {
  margin-top: 2.4rem; padding-top: 1.32rem;
  border-top: 1px solid var(--line);
}
body[data-page="legal"] .prose > p + p { margin-top: 1rem }
/* the first clause opens on Ink's navy rule */
body[data-page="legal"] .prose > h2:first-child,
body[data-page="legal"] .prose > h2:first-child + p { margin-top: 0; border-top: 2px solid var(--fg) }
/* the risk clause carries the weight: heads in red */
body[data-page="legal"] .prose > h2:nth-of-type(5) { color: var(--red) }

@media (max-width: 1000px) {
  body[data-page="legal"] .poster > section.prose { grid-template-columns: minmax(0, 1fr) }
  body[data-page="legal"] .prose > h2,
  body[data-page="legal"] .prose > p { grid-column: 1 }
  body[data-page="legal"] .prose > h2 { padding: 1.4rem 0 0; margin-top: 2.2rem }
  body[data-page="legal"] .prose > h2 + p { margin-top: .7rem; padding-top: 0; border-top: 0 }
  body[data-page="legal"] .prose > h2:first-child + p { margin-top: .7rem; border-top: 0 }
  body[data-page="legal"] .prose > p { max-width: 44rem }
}
@media (max-width: 640px) {
  body[data-page="legal"] .hero { min-height: 420px; padding-bottom: 5rem }
  body[data-page="legal"] .poster > section.prose {
    margin-top: -2.4rem;
    padding: 2rem 1.3rem 2.4rem;
  }
  body[data-page="legal"] .poster > section.prose::before { top: calc(2rem - 1px); left: 1.3rem; width: 3rem }
  body[data-page="legal"] .prose > h2 { font-size: 1.2rem }
  body[data-page="legal"] .prose > p { font-size: 1.08rem; line-height: 1.64 }
}

/* narrow screens: the text spans the plate, so the veil runs bottom to top */
@media (max-width: 860px) {
  body[data-page="legal"] .hero {
    background-image:
      linear-gradient(0deg, rgba(11, 19, 34, .9) 0%, rgba(11, 19, 34, .7) 55%, rgba(11, 19, 34, .3) 100%),
      linear-gradient(0deg, rgba(11, 19, 34, 0), rgba(11, 19, 34, 0)),
      var(--hero);
  }
}
