/* ==========================================================================
   ELIOS — legal pages (Privacy policy, Terms & conditions)
   Loaded after styles.css. Text only: a title, a last-updated line, then plain
   headings with paragraphs in one reading column. Every font size is a :root token
   (title 64, headings 32, text 16 = --fs-link, small lines 12), fixed px at every desktop width.
   ========================================================================== */

/* the header floats over the top of the first section; the optional announcement bar sits above it */
.legal { padding-top: 12rem; }

/* Two cells on the Contact FAQ's grid (5fr / 8fr): the title on the left, the text on the right.
   Below 1200px they stack, like the FAQ. */
.legal__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 2.5rem 5rem; align-items: start; }

/* ---------- Title (left cell) ---------- */
/* Sticky inside its own grid row, so it stops where the text ends and never reaches the footer. */
.legal__head { display: flex; flex-direction: column; gap: 0.5rem; }
.legal__head .h1 { margin-bottom: 1rem; overflow-wrap: break-word; }   /* a long title word can never run out of its cell */
.legal__updated { max-width: 36ch; }
.legal__notice { max-width: 36ch; margin-top: 0.5rem; opacity: .7; }   /* quieter than the date; ink at 70% on white: 6.7:1 */
@media (min-width: 1201px) {
  .legal__head { position: sticky; top: 9rem; }
}

/* ---------- Sections (right cell) ---------- */
/* A hairline above each heading, the same rule as the FAQ rows. Headings wrap inside the reading column. */
.legal__body { display: flex; flex-direction: column; }
.legal__section { padding: 1.75rem 0 3.5rem; border-top: 1px solid var(--line-light); }
.legal__section .h3 { max-width: var(--legal-measure); margin-bottom: 1.25rem; }
.legal { --legal-measure: 510px; }   /* about 65 characters a line at 16px; fixed px like the type, so every desktop width wraps the same */

.legal__text p, .legal__contact p {
  max-width: var(--legal-measure); font-size: var(--fs-link); line-height: 1.6; letter-spacing: 0; text-wrap: pretty;
}
.legal__text p + p { margin-top: 1rem; }
/* the rich text of a legal section: paragraphs, a subheading, lists, bold, italic and links, in the page's own type */
.legal__text > * + * { margin-top: 1rem; }
.legal__text h3 { max-width: var(--legal-measure); font-size: var(--fs-link); line-height: 1.4; font-weight: 500; margin-top: 1.75rem; }
.legal__text ul, .legal__text ol { max-width: var(--legal-measure); padding-left: 1.25em; font-size: var(--fs-link); line-height: 1.6; text-wrap: pretty; }
.legal__text ul { list-style: square; } .legal__text ol { list-style: decimal; }
.legal__text li + li { margin-top: 0.5rem; }
.legal__text li::marker { color: currentColor; }
.legal__text strong { font-weight: 600; }
.legal__text em { font-style: italic; }
.legal__text a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: opacity .2s ease; }
@media (hover: hover) { .legal__text a:hover { opacity: .6; } }

/* ---------- Closing contact ---------- */
.legal__contact { padding-top: 1.75rem; border-top: 1px solid var(--ink); }
.legal__contact-label { margin-bottom: 1.25rem; }
.legal__contact-text { margin-bottom: 1rem; }
.legal__contact p + p { margin-top: 0.25rem; }
.legal__address { opacity: .7; }
/* each link is its own line, so the focus ring never touches a neighbouring word */
.legal__link { display: inline-block; padding: 0.1em 0.3em; margin: -0.1em -0.3em; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: opacity .2s ease; }
@media (hover: hover) { .legal__link:hover { opacity: .6; } }

/* ---------- Tablet and phone ---------- */
/* Below 1200px the two cells stack: the title on top, the sections under it in one reading column
   (about 70 characters a line on a tablet, the full width on a phone). The title is sticky only in the two-column layout (1201+). */
@media (max-width: 1200px) {
  .legal__inner { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .legal__head { position: static; }
  .legal__content { max-width: 640px; }
}
@media (max-width: 1024px) {
  .legal { padding-top: 9.5rem; }
}
@media (max-width: 760px) {
  .legal__inner { gap: 2rem; }
  .legal__section { padding-bottom: 2.5rem; }
  .legal { --legal-measure: none; }
  .legal__content { max-width: none; }
}
/* mailto and tel: one 44px line each, so the neighbour is never hit by mistake (iPad landscape included) */
@media (max-width: 1200px), (pointer: coarse) {
  .legal__link { display: inline-flex; align-items: center; min-height: 44px; }
  .legal__contact p + p { margin-top: 0; }
  .legal__contact .legal__name { margin-top: 0.75rem; }
}
