/*
 * Shared layout for the two legal documents: privacy.html and terms.html.
 *
 * These pages are unlike the rest of the site. Every other page is a pitch —
 * short blocks, big type, something to look at. A policy is read, and often
 * read under pressure: someone is about to hand over a resume, or has just been
 * asked where their data went. So the job here is legibility rather than
 * impact, and the choices below all follow from that:
 *
 *   - one measured column (~74ch) instead of the full-width sections used
 *     elsewhere, because a 1400px line of body copy cannot be tracked by eye;
 *   - a sticky contents list on desktop, since the questions people arrive with
 *     are specific ("do you sell this", "how do I delete it") and scrolling a
 *     long document looking for the answer is the worst part of reading one;
 *   - numbered headings generated by a CSS counter, so clauses can be cited in
 *     an email ("section 9") without anyone hand-maintaining the numbers when a
 *     section is added in the middle;
 *   - a print stylesheet that inverts to black-on-white. Legal pages get
 *     printed and attached to things, and the site's near-black background is
 *     both unreadable on paper and an act of vandalism against a toner
 *     cartridge.
 *
 * It stays in the site's palette — gold rules, Cinzel headings, Open Sans body
 * — so the pages read as part of WASHME TV rather than as a pasted-in template.
 */

/* Kept off the <html> element so the rest of the site is unaffected: the fixed
   navigation bar is ~75px tall, and without this every in-page jump lands with
   the heading hidden underneath it. */
.legal-page [id] { scroll-margin-top: 96px; }

/* HERO -------------------------------------------------------------------- */

#hero-legal {
  min-height: 46vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 128px 28px 64px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201, 168, 76, .2), transparent 58%),
    linear-gradient(160deg, #0a0700, #1a0f00, #0a0700);
}
#hero-legal .hero-org {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
  margin-bottom: 20px;
  opacity: .8;
}
.legal-label {
  color: var(--gold);
  font-family: 'Cinzel', 'Cinzel Fallback', serif;
  letter-spacing: 5px;
  text-transform: uppercase;
  font-size: .72rem;
  margin-bottom: 14px;
}
.legal-title {
  font-family: 'Cinzel', 'Cinzel Fallback', serif;
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  line-height: 1.12;
  margin-bottom: 16px;
}
.legal-title span { color: var(--gold); }
.legal-sub {
  color: #c0c0c0;
  font-size: 1.02rem;
  max-width: 640px;
  line-height: 1.85;
}

/* The effective / updated pair. Two facts, and the first thing a reader checks
   to know whether the document in front of them is the current one. */
.legal-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: center;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(201, 168, 76, .26);
}
.legal-dates div {
  color: #8d8d8d;
  font-size: .72rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.legal-dates strong {
  display: block;
  color: var(--gl);
  font-family: 'Cinzel', 'Cinzel Fallback', serif;
  font-size: .82rem;
  letter-spacing: 1px;
  margin-top: 5px;
  font-weight: 400;
}

/* BODY LAYOUT ------------------------------------------------------------- */

#legal-body { padding: 68px 32px 96px; background: var(--bk); }

.legal-wrap {
  max-width: 1150px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 58px;
  align-items: start;
}

/* CONTENTS ---------------------------------------------------------------- */

.legal-toc {
  /* Undoing the site-wide top bar, which `nav` alone selects. */
  position: sticky;
  left: auto;
  right: auto;
  z-index: auto;
  display: block;
  background: none;
  backdrop-filter: none;
  border: none;
  top: 98px;
  border-left: 1px solid rgba(201, 168, 76, .3);
  padding: 0 0 0 20px;
  /* Long documents outrun the viewport; the list scrolls on its own rather
     than clipping its last few entries where they cannot be reached. */
  max-height: calc(100vh - 130px);
  overflow-y: auto;
}
.legal-toc h2 {
  font-family: 'Cinzel', 'Cinzel Fallback', serif;
  color: var(--gold);
  font-size: .7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.legal-toc ol { list-style: none; counter-reset: toc; }
.legal-toc li { counter-increment: toc; margin-bottom: 2px; }
.legal-toc a {
  /* Same story: `nav a` makes links uppercase, bold, and widely tracked. */
  display: flex;
  gap: 9px;
  font-weight: 400;
  letter-spacing: .2px;
  text-transform: none;
  color: #9a9a9a;
  text-decoration: none;
  font-size: .8rem;
  line-height: 1.5;
  padding: 6px 0;
  transition: color .2s;
}
.legal-toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: rgba(201, 168, 76, .55);
  font-family: 'Cinzel', 'Cinzel Fallback', serif;
  font-size: .68rem;
  padding-top: 2px;
  flex-shrink: 0;
}
.legal-toc a:hover { color: var(--gold); }
.legal-toc a:hover::before { color: var(--gold); }

/* DOCUMENT --------------------------------------------------------------- */

.legal-doc { counter-reset: sec; max-width: 74ch; }

.legal-doc > section { padding: 0; margin-bottom: 52px; }
.legal-doc > section:last-of-type { margin-bottom: 0; }

.legal-doc h2 {
  counter-increment: sec;
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-family: 'Cinzel', 'Cinzel Fallback', serif;
  font-size: clamp(1.18rem, 2.3vw, 1.5rem);
  line-height: 1.3;
  color: var(--wh);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(201, 168, 76, .2);
}
.legal-doc h2::before {
  content: counter(sec, decimal-leading-zero);
  color: var(--gold);
  font-size: .8rem;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.legal-doc h3 {
  font-family: 'Cinzel', 'Cinzel Fallback', serif;
  color: var(--gl);
  font-size: 1rem;
  letter-spacing: .5px;
  margin: 28px 0 10px;
}
.legal-doc p {
  color: #c6c6c6;
  font-size: .97rem;
  line-height: 1.95;
  margin-bottom: 16px;
}
.legal-doc p:last-child { margin-bottom: 0; }
.legal-doc strong { color: var(--gl); font-weight: 600; }
.legal-doc a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(201, 168, 76, .35); }
.legal-doc a:hover { color: var(--gl); border-bottom-color: var(--gl); }

.legal-doc ul { list-style: none; margin: 0 0 16px; }
.legal-doc ul li {
  position: relative;
  color: #c6c6c6;
  font-size: .97rem;
  line-height: 1.9;
  padding-left: 22px;
  margin-bottom: 11px;
}
.legal-doc ul li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: .85em;
  width: 6px;
  height: 6px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}
.legal-doc ul li strong { color: var(--gl); }

/* AT A GLANCE ------------------------------------------------------------- */

/* The plain-language summary above the document proper. It is a reading aid,
   not a substitute: the wording says so, because a summary that is treated as
   the agreement is worse than no summary at all. */
.glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 0 0 22px;
}
.glance div {
  background: rgba(201, 168, 76, .05);
  border: 1px solid rgba(201, 168, 76, .26);
  border-radius: 6px;
  padding: 18px 18px 20px;
}
.glance h3 {
  font-family: 'Cinzel', 'Cinzel Fallback', serif;
  color: var(--gold);
  font-size: .82rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin: 0 0 9px;
}
.glance p { color: var(--mt); font-size: .88rem; line-height: 1.8; margin: 0; }

/* CALLOUT ---------------------------------------------------------------- */

/* For the handful of statements a reader must not skim past — what the AI guide
   is not, what we never ask for, the limits on our liability. */
.callout {
  background: rgba(201, 168, 76, .06);
  border: 1px solid rgba(201, 168, 76, .34);
  border-left-width: 3px;
  border-radius: 4px;
  padding: 20px 22px;
  margin: 0 0 18px;
}
.callout p { margin-bottom: 10px; }
.callout p:last-child { margin-bottom: 0; }
.callout .callout-label {
  display: block;
  font-family: 'Cinzel', 'Cinzel Fallback', serif;
  color: var(--gold);
  font-size: .7rem;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* DEFINITION ROWS -------------------------------------------------------- */

/* Used for "what we collect and why" and for retention periods: a label column
   and an explanation, which is a table in substance but behaves far better than
   one on a phone, where a real table either scrolls sideways or squeezes its
   columns into single-word slivers. */
.legal-rows { border-top: 1px solid rgba(201, 168, 76, .18); margin-bottom: 18px; }
.legal-rows > div {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 10px 24px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(201, 168, 76, .13);
}
.legal-rows dt,
.legal-rows .rk {
  font-family: 'Cinzel', 'Cinzel Fallback', serif;
  color: var(--gl);
  font-size: .85rem;
  letter-spacing: .4px;
  line-height: 1.6;
}
.legal-rows dd,
.legal-rows .rv {
  color: #c0c0c0;
  font-size: .93rem;
  line-height: 1.85;
  margin: 0;
}
.legal-rows .rv strong { color: var(--gl); }

/* CONTACT CARD ----------------------------------------------------------- */

.legal-contact {
  border: 1px solid rgba(201, 168, 76, .3);
  background: rgba(201, 168, 76, .04);
  border-radius: 6px;
  padding: 26px 26px 28px;
}
.legal-contact .org {
  font-family: 'Cinzel', 'Cinzel Fallback', serif;
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}
.legal-contact p { margin-bottom: 6px; font-size: .93rem; }

/* The sibling-document link that closes each page. */
.legal-crosslink {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid rgba(201, 168, 76, .2);
}
.legal-crosslink p { color: var(--mt); font-size: .9rem; margin: 0; }
.legal-crosslink a {
  font-family: 'Cinzel', 'Cinzel Fallback', serif;
  font-size: .78rem;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid rgba(201, 168, 76, .4);
  border-radius: 5px;
  padding: 11px 20px;
  transition: .22s;
  white-space: nowrap;
}
.legal-crosslink a:hover { background: var(--gold); color: #1a1a1a; }

/* NARROW SCREENS --------------------------------------------------------- */

@media (max-width: 980px) {
  .legal-wrap { grid-template-columns: 1fr; gap: 36px; }
  /* Unstuck and collapsed into a plain list at the top of the document, where
     it reads as a summary of what follows rather than a floating sidebar. */
  .legal-toc {
    position: static;
    max-height: none;
    border: 1px solid rgba(201, 168, 76, .24);
    border-radius: 6px;
    padding: 20px 22px;
  }
  .legal-toc ol { columns: 2; column-gap: 26px; }
  .legal-doc { max-width: none; }
}

@media (max-width: 620px) {
  #hero-legal { padding: 112px 20px 52px; }
  #legal-body { padding: 52px 20px 76px; }
  .legal-toc ol { columns: 1; }
  .legal-rows > div { grid-template-columns: 1fr; gap: 6px; padding: 14px 0; }
  .legal-crosslink a { width: 100%; text-align: center; }
}

/* PRINT ------------------------------------------------------------------ */

@media print {
  nav, .mm, footer, .legal-toc, .legal-crosslink,
  .cms-zone, .washme-chat, .washme-music, .washme-share { display: none !important; }
  body { background: #fff !important; color: #111 !important; }
  #hero-legal {
    background: none !important;
    min-height: 0;
    padding: 0 0 24px;
    text-align: left;
    align-items: flex-start;
    border-bottom: 2px solid #111;
  }
  #hero-legal .hero-org { display: none; }
  .legal-label, .legal-title span, .legal-doc h2::before,
  .legal-toc h2, .glance h3, .callout .callout-label { color: #6b5310 !important; }
  .legal-title { color: #111 !important; }
  .legal-sub, .legal-doc p, .legal-doc ul li, .glance p,
  .legal-rows dd, .legal-rows .rv { color: #222 !important; }
  .legal-doc h2, .legal-doc h3, .legal-doc strong,
  .legal-rows dt, .legal-rows .rk, .legal-contact .org { color: #111 !important; }
  #legal-body { padding: 18px 0 0; }
  .legal-wrap { display: block; max-width: none; }
  .legal-doc { max-width: none; }
  .legal-doc > section { margin-bottom: 26px; page-break-inside: avoid; }
  .glance div, .callout, .legal-contact {
    background: none !important;
    border-color: #bbb !important;
  }
  .legal-doc a { color: #111 !important; border-bottom: none; }
  /* On paper a link's text is all the reader has, so print the target too. */
  .legal-doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .82em; color: #555; }
}
