/* =========================================================
   Mabel — shared styles for the legal & utility pages
   (privacy, thanks). Aligned to the marketing landing page
   (index.html): warm cream, soft-coral accent, rounded,
   Fraunces (display) + Hanken Grotesk (UI) + IBM Plex Mono (labels).
   ========================================================= */

:root {
  /* Palette — warm minimalism, soft-coral accent */
  --cream: #FFF6EE;      /* page background */
  --cream-2: #FFEFE2;    /* secondary warm surface / tints */
  --surface: #FFFFFF;    /* cards, panels */
  --ink: #211B2E;        /* headings, dark panels */
  --ink-soft: #4B4459;   /* body text */
  --muted: #736B80;      /* captions, meta, the .email TLD (AA-contrast on cream) */
  --coral: #ee6a4d;      /* primary accent */
  --coral-2: #d14e2e;    /* hover / press, links */
  --amber: #f2a459;      /* gradient partner, highlights */
  --teal: #18A999;       /* tertiary accent */
  --line: #EBDFD2;       /* warm hairline / borders */

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Shape */
  --r: 22px;        /* cards, panels */
  --r-sm: 14px;     /* small cards, inputs */
  --pill: 100px;
  --container: 1180px;
  --shadow: 0 18px 40px -18px #ee6a4d33, 0 8px 20px -12px #211b2e1f;
}

/* ---------- Reset & base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip; /* stop stray horizontal scroll (decorative blobs bleed past the edge) */
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--coral-2);
  text-decoration: none;
}

a:hover {
  color: var(--coral);
}

button {
  font: inherit;
  cursor: pointer;
}

::selection {
  background: var(--coral);
  color: #fff;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  position: relative;
}

/* ---------- Tag / eyebrow pill ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 700;
  font-size: .76rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--coral-2);
  background: #ee6a4d1a;
  padding: .4rem .8rem;
  border-radius: var(--pill);
}

.tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
}

/* ---------- Header / nav (floating pill) ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  background: #fffdfbcc;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--pill);
  padding: .6rem .6rem .6rem 1.2rem;
  box-shadow: 0 6px 20px -12px #211b2e26;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--ink);
}

.logo {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--coral), var(--amber));
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px -3px #ee6a4d80;
}

.wordmark-text {
  font-size: 1.3rem;
  letter-spacing: -.02em;
}

.wordmark-text .tld {
  color: var(--muted);
  font-weight: 600;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  font-weight: 600;
  font-size: .92rem;
  color: var(--ink-soft);
}

.site-nav a:hover {
  color: var(--ink);
}

.nav-cta {
  background: var(--ink);
  color: #fff !important;
  padding: .6rem 1.1rem;
  border-radius: var(--pill);
}

.nav-cta:hover {
  background: var(--coral);
}

@media (max-width: 760px) {
  .site-nav a:not(.nav-cta) {
    display: none;
  }
}

/* ---------- Type ---------- */

.display {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.6rem, 6.5vw, 4.25rem);
  line-height: 1.0;
  letter-spacing: -.025em;
  margin: 1rem 0 1.2rem;
  color: var(--ink);
  font-variation-settings: "SOFT" 50, "opsz" 144;
}

.display em {
  position: relative;
  font-style: italic;
  font-weight: 500;
  color: var(--coral-2);
  white-space: nowrap;
}

.display em::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: .06em;
  height: .3em;
  background: #f2a45966;
  border-radius: 4px;
  z-index: -1;
}

.heading {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: .9rem 0 .7rem;
  color: var(--ink);
  font-variation-settings: "SOFT" 50, "opsz" 144;
}

.lede {
  font-family: var(--sans);
  font-size: clamp(1.1rem, 1.7vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 1.5rem;
}

.lede-narrow {
  font-family: var(--sans);
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 50ch;
  margin: .8rem 0 0;
}

.mono {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--coral-2);
  font-weight: 500;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  padding: .95rem 1.6rem;
  border-radius: var(--pill);
  border: 2px solid transparent;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s, color .15s;
}

.btn-primary {
  background: var(--coral);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--coral-2);
  color: #fff;
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise .8s cubic-bezier(.2, .7, .3, 1) forwards;
  animation-delay: var(--d, 0ms);
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

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

/* ---------- Legal hero ---------- */

.legal-hero {
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(2rem, 5vw, 3.5rem);
}

.legal-hero-inner {
  max-width: 820px;
}

.legal-hero .display {
  margin-bottom: .75rem;
}

.legal-updated {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

/* Plain-language summary callout — the "good to know" accent box */
.legal-summary {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--coral);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  margin-top: 1.75rem;
}

.legal-summary h2 {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--coral-2);
  margin: 0 0 .75rem;
}

.legal-summary ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.6rem;
}

.legal-summary li {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}

/* Table of contents */
.legal-toc {
  margin: 1.75rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.legal-toc h2 {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 .9rem;
}

.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 1.5rem;
  font-size: 0.95rem;
}

@media (min-width: 640px) {
  .legal-toc ol {
    grid-template-columns: 1fr 1fr;
  }
}

.legal-toc li {
  counter-increment: toc;
  display: flex;
  gap: 0.6rem;
}

.legal-toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--mono);
  color: var(--coral);
  font-size: 0.8125rem;
}

.legal-toc a {
  color: var(--ink-soft);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--coral-2);
}

/* ---------- Legal body ---------- */

.legal-body {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.legal-prose {
  max-width: 760px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: clamp(20px, 3vw, 32px);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 30px 60px -40px #211b2e33;
}

.legal-prose section {
  scroll-margin-top: 96px;
}

.legal-prose section + section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.legal-prose h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-variation-settings: "SOFT" 50, "opsz" 144;
}

.legal-prose h2 .legal-num {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--coral);
}

.legal-prose h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.0625rem;
  margin: 1.5rem 0 .5rem;
  color: var(--ink);
}

.legal-prose p,
.legal-prose li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.legal-prose p {
  margin: 0 0 1rem;
  max-width: 66ch;
}

.legal-prose ul,
.legal-prose ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  max-width: 66ch;
}

.legal-prose li {
  margin-bottom: 0.4rem;
}

.legal-prose li strong {
  color: var(--ink);
}

.legal-prose a {
  color: var(--coral-2);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.legal-prose a:hover {
  color: var(--coral);
}

/* Subprocessor table */
.legal-table-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.legal-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 32rem;
  font-size: 0.9375rem;
}

.legal-table th,
.legal-table td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.5;
  color: var(--ink-soft);
}

.legal-table thead th {
  font-family: var(--mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  background: var(--cream-2);
}

.legal-table td:first-child {
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.legal-table tbody tr:last-child td {
  border-bottom: none;
}

.legal-contact {
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  margin-top: 1.25rem;
}

.legal-contact p {
  margin: 0 0 0.35rem;
}

.legal-contact p:last-child {
  margin-bottom: 0;
}

/* Tips CTA — a real coral button plus a short note on what tapping does.
   Consistent with (not identical to) the home hero CTA. */
.tips-cta {
  margin-top: 2rem;
}

.tips-cta .cta-note {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  max-width: 44ch;
}

.tips-cta .cta-note svg {
  flex: none;
  margin-top: 0.15rem;
  color: var(--coral-2);
}

.tips-cta .cta-note b {
  color: var(--ink);
  font-weight: 700;
}

.tips-cta-back {
  margin: 1.1rem 0 0;
  font-size: 0.9rem;
}

.back-to-top {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
}

.back-to-top:hover {
  color: var(--coral-2);
}

/* ---------- Thanks page ---------- */

.thanks {
  padding-block: clamp(4rem, 12vw, 8rem);
}

.thanks-inner {
  max-width: 720px;
}

.thanks .lede {
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: center;
}

/* Honeypot — invisible to humans, present in DOM for bots */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 3rem 0 2.5rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.footer-tag {
  color: var(--muted);
  margin: .5rem 0 0;
}

.footer-meta {
  font-size: .85rem;
  color: var(--muted);
  text-align: right;
  margin: .2rem 0;
}

.footer-meta a {
  color: var(--muted);
}

.footer-meta a:hover {
  color: var(--coral-2);
}

/* ---------- Focus / a11y ---------- */

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

.btn:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}
