/* ============================================================
   eHub SMS · Legal / Privacy page
   Built on top of landing.css for tokens & components.
   ============================================================ */

body.legal { background: var(--cream); }

/* ── Page hero ─────────────────────────────────────────────── */
.legal-hero {
  padding: 64px 0 56px;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}
.legal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--magenta-100) 1.4px, transparent 2px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 80% 70% at 25% 30%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 25% 30%, #000 0%, transparent 70%);
  opacity: 0.7;
  pointer-events: none;
}
.legal-hero__inner { position: relative; }

.legal-hero__crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 18px;
}
.legal-hero__crumbs a {
  color: var(--ink-3);
  transition: color .15s;
}
.legal-hero__crumbs a:hover { color: var(--magenta-700); }
.legal-hero__crumbs .sep { opacity: 0.5; }
.legal-hero__crumbs .current { color: var(--ink); font-weight: 600; }

.legal-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.0;
  color: var(--ink);
  margin: 0 0 18px;
  max-width: 14ch;
}
.legal-hero h1 .accent { color: var(--magenta-700); }
.legal-hero__lead {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0;
}
.legal-hero__meta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.legal-hero__meta .chip {
  background: #fff;
  border-color: var(--line);
  color: var(--ink-2);
}
.legal-hero__meta .chip strong {
  color: var(--ink);
  font-weight: 700;
}
.legal-hero__meta .chip svg { width: 12px; height: 12px; color: var(--magenta-700); }

/* ── At-a-glance promise band ──────────────────────────────── */
.glance {
  position: relative;
  padding: 56px 0;
  background: var(--plum-900);
  background-image:
    radial-gradient(ellipse 700px 400px at 80% 0%, rgba(176,38,100,0.32), transparent 60%),
    radial-gradient(ellipse 500px 400px at 10% 100%, rgba(229,168,35,0.18), transparent 60%);
  color: #fff;
}
.glance__hdr {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.glance__hdr h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
}
.glance__hdr h2 .accent { color: var(--gold-400); }
.glance__hdr p {
  font-size: 14.5px;
  line-height: 1.5;
  color: rgba(255,255,255,0.65);
  max-width: 40ch;
  margin: 0;
}
.glance__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.glance__item {
  position: relative;
  padding: 22px 22px 24px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background .2s, transform .2s, border-color .2s;
}
.glance__item:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}
.glance__item .ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(229,168,35,0.18);
  color: var(--gold-400);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.glance__item h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0;
}
.glance__item p {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255,255,255,0.70);
  margin: 0;
}

/* ── Main two-column layout ────────────────────────────────── */
.legal-body {
  padding: 80px 0 100px;
  background: var(--cream);
}
.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 280px;
  gap: 56px;
  align-items: flex-start;
}

/* TOC */
.toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  align-self: flex-start;
  font-size: 13px;
}
.toc__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  margin-bottom: 16px;
}
.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-left: 1px solid var(--line);
  counter-reset: toc;
}
.toc li { counter-increment: toc; }
.toc a {
  display: block;
  padding: 7px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--ink-3);
  font-weight: 500;
  font-size: 13.5px;
  line-height: 1.35;
  transition: color .15s, border-color .15s, background .15s;
  position: relative;
}
.toc a::before {
  content: counters(toc, ".", decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--magenta-700);
  opacity: 0.4;
  margin-right: 8px;
  letter-spacing: 0.05em;
}
.toc a:hover {
  color: var(--ink);
  background: rgba(27,8,16,0.03);
}
.toc a.is-active {
  color: var(--magenta-700);
  border-left-color: var(--magenta-700);
  font-weight: 600;
}
.toc a.is-active::before { opacity: 1; }

/* Article */
.legal-article {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-2);
}
.legal-article h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 56px 0 16px;
  scroll-margin-top: calc(var(--nav-h) + 32px);
  position: relative;
}
.legal-article h2:first-of-type { margin-top: 0; }
.legal-article h2::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 16px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold-500);
}
.legal-article h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 28px 0 6px;
}
.legal-article p {
  margin: 0 0 14px;
  color: var(--ink-2);
}
.legal-article strong {
  color: var(--ink);
  font-weight: 700;
}
.legal-article a {
  color: var(--magenta-700);
  font-weight: 600;
  border-bottom: 1px solid currentColor;
  transition: background .15s, color .15s;
}
.legal-article a:hover {
  background: var(--magenta-50);
  color: var(--magenta-800);
}
.legal-article ul {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.legal-article ul li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-2);
}
.legal-article ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--magenta-700);
  transform: rotate(45deg);
}

/* Term-style definitions for "What we collect" */
.def-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 18px 0 22px;
}
.def-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color .2s;
}
.def-row:hover { border-color: var(--magenta-100); }
.def-row dt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--magenta-700);
  letter-spacing: -0.01em;
}
.def-row dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* Provider card grid */
.provider-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0 22px;
  padding: 0;
  list-style: none !important;
}
.provider-list li {
  padding: 16px 18px !important;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  display: flex !important;
  flex-direction: column;
  gap: 4px;
}
.provider-list li::before { display: none !important; }
.provider-list li strong {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Callout / pull quote */
.callout {
  position: relative;
  padding: 22px 24px 22px 28px;
  background: var(--magenta-50);
  border: 1px solid var(--magenta-100);
  border-left: 4px solid var(--magenta-700);
  border-radius: 14px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
  margin: 22px 0;
  font-weight: 500;
}
.callout strong { color: var(--magenta-800); }

/* Right rail — contact card */
.contact-rail {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contact-card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.contact-card__lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
  margin-bottom: 14px;
}
.contact-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 6px;
}
.contact-card p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 16px;
}
.contact-card__addr {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0 0 14px;
}
.contact-card .btn {
  width: 100%;
  justify-content: center;
}
.contact-card__small {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}

.contact-card--plum {
  background: var(--plum-900);
  background-image: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(176,38,100,0.32), transparent 70%);
  border-color: var(--plum-800);
  color: #fff;
}
.contact-card--plum .contact-card__lbl { color: var(--gold-400); }
.contact-card--plum h3 { color: #fff; }
.contact-card--plum p { color: rgba(255,255,255,0.7); }

/* Print niceties */
@media print {
  .nav-shell, .announcement, .legal-hero__meta, .toc, .contact-rail, footer, .legal-bottomcta { display: none !important; }
  .legal-layout { grid-template-columns: 1fr; gap: 0; }
  .glance { background: #fff !important; color: var(--ink) !important; padding: 24px 0; }
  .glance__item { border: 1px solid var(--line) !important; background: #fff !important; color: var(--ink) !important; }
  .glance__item h3, .glance__hdr h2 { color: var(--ink) !important; }
  .glance__item p, .glance__hdr p { color: var(--ink-2) !important; }
  .legal-article a { color: var(--ink) !important; border-bottom: 1px solid var(--ink-3) !important; }
}

/* ── Bottom CTA strip ──────────────────────────────────────── */
.legal-bottomcta {
  padding: 80px 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  text-align: center;
}
.legal-bottomcta__inner {
  max-width: 640px;
  margin: 0 auto;
}
.legal-bottomcta .kicker {
  display: inline-block;
  margin-bottom: 14px;
}
.legal-bottomcta h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 14px;
}
.legal-bottomcta h2 .accent { color: var(--magenta-700); }
.legal-bottomcta p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 26px;
}
.legal-bottomcta__btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .legal-layout { grid-template-columns: 200px minmax(0, 1fr); }
  .contact-rail { display: none; }
  .glance__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .legal-layout { grid-template-columns: 1fr; gap: 32px; }
  .toc { position: static; }
  .toc ol { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-left: 0; }
  .toc a { padding: 6px 12px; border-left: 0; border-bottom: 1px solid var(--line); }
  .toc a.is-active { background: var(--magenta-50); border-bottom-color: var(--magenta-700); }
  .legal-hero { padding: 48px 0 40px; }
  .legal-body { padding: 56px 0 64px; }
  .legal-article h2::before { display: none; }
  .def-row { grid-template-columns: 1fr; gap: 6px; padding: 14px 16px; }
  .glance { padding: 40px 0; }
  .provider-list { grid-template-columns: 1fr; }
}
