/* Aesthetic & responsive layout for legal and support pages (/privacy.html, /terms.html, /support.html). */

/* Base reset matching index.html (zero-specificity :where() preserves site.css & component cascade). */
html {
  -webkit-text-size-adjust: 100%;
}

:where(.legal-page),
:where(.legal-page) *,
:where(.legal-page) *::before,
:where(.legal-page) *::after {
  box-sizing: border-box;
}

:where(.legal-page) {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

:where(.legal-page) img,
:where(.legal-page) svg {
  display: block;
  max-width: 100%;
}

:where(.legal-page) a {
  color: inherit;
  text-decoration: none;
}

:where(.legal-page) button {
  font: inherit;
  cursor: pointer;
}

:where(.legal-page) p {
  text-wrap: pretty;
}

:where(.legal-page) h1,
:where(.legal-page) h2,
:where(.legal-page) h3,
:where(.legal-page) h4 {
  text-wrap: balance;
}

.legal-page {
  background: var(--bg);
  color: var(--fg);
  overflow-x: clip;
}

.legal-main {
  padding-bottom: clamp(56px, 8vw, 96px);
}

.legal-hero {
  background: linear-gradient(118deg, #ffffff 45%, #fff5ee 100%);
  border-bottom: 1px solid var(--border);
  padding: clamp(44px, 7vw, 84px) var(--content-edge, var(--page-gutter)) clamp(36px, 5vw, 58px);
}

.legal-hero-inner {
  max-width: 860px;
  margin-inline: auto;
}

.legal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  background: #fff0e5;
  border: 1px solid #f7d2ba;
  color: #9e3b06;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.legal-hero h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--fg);
}

.legal-hero .legal-rule {
  width: 48px;
  height: 3px;
  border-radius: 99px;
  background: var(--brand-orange, var(--accent));
  margin: 20px 0 18px;
}

.legal-lede {
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.75;
  color: var(--muted);
  max-width: 44em;
}

.legal-lede .text-accent {
  color: #c84b06;
  font-weight: 650;
}

.legal-date {
  display: inline-flex;
  align-items: center;
  margin-top: 20px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand-orange, var(--accent));
  color: #101010;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.legal-section {
  padding: clamp(36px, 5vw, 60px) var(--content-edge, var(--page-gutter)) 0;
}

.legal-content {
  max-width: 860px;
  margin-inline: auto;
  background: var(--bg);
}

.legal-content > p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--fg);
  margin: 0 0 16px;
}

.legal-content h2 {
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin: 40px 0 14px;
  padding-left: 14px;
  border-left: 4px solid var(--brand-orange, var(--accent));
  color: var(--fg);
}

.legal-content h3 {
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin: 24px 0 10px;
  color: var(--fg);
}

.legal-content ul {
  margin: 0 0 18px;
  padding-left: 1.4em;
  list-style: disc;
}

.legal-content ul li {
  font-size: 15px;
  line-height: 1.85;
  color: var(--fg);
  margin-bottom: 8px;
}

.legal-content a {
  color: #b84306;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.legal-content a:hover {
  color: var(--fg);
}

/* Support page grids & cards */
.support-container {
  max-width: 1020px;
  margin-inline: auto;
}

.support-section-head {
  margin-bottom: 24px;
}

.support-section-head h2 {
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.03em;
  margin: 0;
}

.support-section-head .legal-rule {
  width: 40px;
  height: 3px;
  border-radius: 99px;
  background: var(--brand-orange, var(--accent));
  margin-top: 14px;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.support-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px 26px;
  box-shadow: 0 2px 12px rgb(16 16 16 / .03);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.support-card:hover {
  border-color: color-mix(in srgb, var(--brand-orange, var(--accent)) 42%, var(--border));
  box-shadow: 0 10px 26px rgb(16 16 16 / .05);
  transform: translateY(-2px);
}

.support-card h3 {
  font-size: 18px;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin: 0 0 10px;
}

.support-card p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
}

.support-card p + p {
  margin-top: 8px;
}

.support-card a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: #b84306;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.support-card a:hover {
  color: var(--fg);
}

/* Bottom CTA */
.legal-cta {
  padding: clamp(40px, 6vw, 72px) var(--content-edge, var(--page-gutter)) 0;
}

.legal-cta-box {
  max-width: 860px;
  margin-inline: auto;
  padding: clamp(28px, 4vw, 44px);
  border-radius: 24px;
  background: linear-gradient(115deg, #fff7f1 0%, var(--surface) 100%);
  border: 1px solid #f2d9c8;
  box-shadow: 0 4px 20px rgb(249 104 22 / .06);
  text-align: center;
}

.legal-cta-box.support-cta-box {
  max-width: 1020px;
}

.legal-cta-box h2 {
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.35;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}

.legal-cta-box .text-accent {
  color: #c84b06;
}

.legal-cta-box p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 0 22px;
}

.legal-cta-box .pill-button {
  background: var(--brand-orange, var(--accent));
  color: #101010;
  font-weight: 650;
  text-decoration: none;
  min-height: 48px;
  padding-inline: 26px;
}

.legal-cta-box .pill-button:hover {
  background: color-mix(in srgb, var(--brand-orange, var(--accent)) 88%, #101010);
  color: #101010;
}

@media (prefers-reduced-motion: reduce) {
  .support-card {
    transition: none;
  }
  .support-card:hover {
    transform: none;
  }
}

@media (max-width: 700px) {
  .legal-hero {
    padding: 28px 20px 26px;
  }

  .legal-section {
    padding: 28px 20px 0;
  }

  .legal-content h2 {
    margin-top: 30px;
    padding-left: 12px;
  }

  .legal-content a {
    padding-block: 6px;
  }

  .support-card a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .support-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .support-card {
    padding: 20px;
    border-radius: 16px;
  }

  .legal-cta {
    padding: 32px 20px 0;
  }

  .legal-cta-box {
    padding: 24px 18px;
    border-radius: 18px;
  }

  .legal-cta-box .pill-button {
    width: 100%;
  }
}
