/* ==========================================================
   LEGAL PAGES  —  /pages/terms.html + /pages/privacy.html
   Both documents share this sheet and the `terms-*` class
   names; there is no second legal stylesheet to keep in sync.

   Same design language as the rest of the site: degular display
   type, Inter body, orange-dot eyebrows, hairline dividers,
   no shadows, no cards. Typography resolves to the global
   tokens in /css/main.css — no new scale is introduced here.

   Two zones:
   HERO   = dark, mirrors the Services / Career hero rhythm.
   BODY   = black editorial reading zone — one centred column,
            capped to a readable measure.
   The quiet section entrance lives in /js/terms.js.
========================================================== */

main {
  --tm-gutter: clamp(1.25rem, 4vw, 2rem);

  /* px kept clear above a jump target — must match HEADER_OFFSET
     in /js/terms.js (fixed 70px nav + air) */
  --tm-header-offset: 100px;

  /* reading-zone palette — the site's black canvas, same hairline
     values the Services / Career sections use */
  --tm-bg: var(--dz-bg);
  --tm-ink: var(--dz-fg);
  --tm-muted: var(--dz-body-color);
  --tm-rule: rgba(var(--dz-fg-rgb), 0.14);
  --tm-rule-soft: rgba(var(--dz-fg-rgb), 0.08);
}


/* ==========================================================
   HERO — one full view: eyebrow, oversized two-line wordmark,
   hairline, then the last-updated stamp on the bottom padding.
========================================================== */

.terms-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;

  padding: calc(var(--tm-header-offset) + 2rem) var(--tm-gutter) 2rem;
}

.terms-hero__eyebrow.dz-eyebrow {
  margin-bottom: clamp(1.5rem, 4vh, 2.5rem);
}

.terms-hero__word {
  margin: 0;

  font-family: var(--dz-font-display);
  font-size: clamp(3rem, 13vw, 13rem);
  line-height: 0.9;
  font-weight: var(--dz-heading-weight);
  letter-spacing: -0.02em;
  color: var(--dz-heading-color);
}

.terms-hero__meta {
  margin-top: clamp(2.5rem, 8vh, 5rem);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(var(--dz-fg-rgb), 0.14);

  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem clamp(2rem, 7vw, 7rem);
}

.terms-hero__updated {
  margin: 0;

  font-family: var(--dz-font-body);
  font-size: 0.78rem;
  font-weight: var(--dz-medium-weight);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(var(--dz-fg-rgb), calc(0.6 + var(--dz-text-lift)));
}

.terms-hero__note {
  margin: 0;
  flex: 0 1 46ch;
  max-width: 46ch;

  font-family: var(--dz-font-body);
  font-size: var(--dz-body-size);
  line-height: var(--dz-body-line);
  color: var(--dz-body-color);
}


/* ==========================================================
   READING ZONE
========================================================== */

.terms-body {
  background: var(--tm-bg);
  color: var(--tm-ink);
  padding: clamp(3.5rem, 10vw, 8rem) var(--tm-gutter) clamp(4rem, 12vw, 9rem);
}

.terms-body__inner {
  max-width: 1440px;
  margin: 0 auto;
}


/* ----------------------------------------------------------
   LEGAL CONTENT
---------------------------------------------------------- */

/* one centred reading column — the measure is what keeps long
   clauses legible now that there is no sidebar beside them */
.terms-content {
  min-width: 0;
  max-width: 70ch;
  margin: 0 auto;
}

.terms-section {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  border-top: 1px solid var(--tm-rule-soft);

  /* the fixed header must never sit on top of a heading when the
     browser (rather than our JS) resolves a #hash */
  scroll-margin-top: var(--tm-header-offset);
}

/* whatever opens the document sits flush against the section padding */
.terms-content > :first-child {
  padding-top: 0;
  border-top: none;
}

/* ----------------------------------------------------------
   OPENING STATEMENT
   The un-numbered lead-in above clause 01. Set a step larger
   than clause copy so it reads as the document's preamble.
---------------------------------------------------------- */

.terms-intro {
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.terms-intro p {
  margin: 0;

  font-family: var(--dz-font-body);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.7;
  color: var(--tm-ink);
}

.terms-section__head {
  display: flex;
  align-items: baseline;
  gap: clamp(0.9rem, 2vw, 1.6rem);
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
}

.terms-section__num {
  flex: 0 0 auto;

  font-family: var(--dz-font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  color: var(--dz-accent);
}

.terms-section__title {
  margin: 0;

  font-family: var(--dz-font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.15;
  font-weight: var(--dz-heading-weight);
  letter-spacing: -0.01em;
  color: var(--tm-ink);
}

.terms-section p {
  margin: 0 0 1.15em;

  font-family: var(--dz-font-body);
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--tm-muted);
}

.terms-section p:last-child {
  margin-bottom: 0;
}

.terms-section strong {
  color: var(--tm-ink);
  font-weight: 600;
}

.terms-section a {
  color: var(--tm-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--tm-rule);
  transition: border-color 0.25s ease, color 0.25s ease;
}

.terms-section a:hover {
  color: var(--dz-accent);
  border-bottom-color: var(--dz-accent);
}

/* bullet lists — hairline markers, not disc bullets */
.terms-section ul {
  list-style: none;
  margin: 0 0 1.3em;
  padding: 0;
}

.terms-section ul:last-child {
  margin-bottom: 0;
}

.terms-section li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.7em;

  font-family: var(--dz-font-body);
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--tm-muted);
}

.terms-section li:last-child {
  margin-bottom: 0;
}

.terms-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;

  width: 10px;
  height: 1px;
  background: rgba(var(--dz-fg-rgb), 0.35);
}

/* a sub-heading inside a long clause */
.terms-section h3 {
  margin: 2em 0 0.85em;

  font-family: var(--dz-font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tm-ink);
}

.terms-section h3:first-child {
  margin-top: 0;
}


/* ----------------------------------------------------------
   CLOSING / CONTACT
   Reads as the end of the document, not another clause.
---------------------------------------------------------- */

.terms-contact {
  border-top: 1px solid var(--tm-rule);
  padding-top: clamp(2.5rem, 6vw, 4rem);
}

/* element-qualified so it outranks the `.terms-section p` body rule —
   this block lives inside clause 22 */
p.terms-contact__name {
  margin: 2.25rem 0 1.75rem;

  font-family: var(--dz-font-display);
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1;
  font-weight: var(--dz-heading-weight);
  letter-spacing: -0.02em;
  color: var(--tm-ink);
}

.terms-contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
  border-top: 1px solid var(--tm-rule-soft);
  padding-top: 1.75rem;
}

.terms-contact__key {
  display: block;
  margin-bottom: 0.6rem;

  font-family: var(--dz-font-body);
  font-size: 0.7rem;
  font-weight: var(--dz-medium-weight);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(var(--dz-fg-rgb), calc(0.45 + var(--dz-text-lift)));
}

p.terms-contact__val {
  margin: 0;

  font-family: var(--dz-font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--tm-ink);
}

.terms-contact__val a {
  color: var(--tm-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--tm-rule);
  transition: border-color 0.25s ease, color 0.25s ease;
}

.terms-contact__val a:hover {
  color: var(--dz-accent);
  border-bottom-color: var(--dz-accent);
}


/* ==========================================================
   SUBTLE ENTRANCE
   Sections lift in once, a few pixels, nothing more. JS adds
   .is-in; without JS everything is already visible.
========================================================== */

.js-terms-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.js-terms-reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js-terms-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 1100px) {
  .terms-section p,
  .terms-section li {
    font-size: 0.97rem;
  }
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 820px) {
  .terms-hero {
    min-height: 100svh;
  }

  .terms-hero__meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .terms-section p,
  .terms-section li {
    font-size: 1rem;
    line-height: 1.72;
  }

  .terms-section__head {
    flex-direction: column;
    gap: 0.6rem;
  }
}

@media (max-width: 480px) {
  .terms-hero__word {
    font-size: clamp(2.6rem, 15vw, 4.5rem);
  }
}
