/* ============================================
   BRAVOLISA LEGAL PAGES — shared stylesheet
   Serves about / terms / privacy / cookies /
   ai-notice / data-processing-terms / plans.
   Depends on tokens.css (load it first).
   ============================================ */

/* ── RESET & BASE ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--night);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 640px; margin: 0 auto; padding: 0 24px; }

/* ── PAGE HEADER ── */
.page-header {
  background: linear-gradient(180deg, var(--sky-50) 0%, var(--white) 100%);
  padding: 48px 24px 32px;
  text-align: center;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--sky-600);
  text-decoration: none;
  margin-bottom: 24px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.back-link:hover {
  background: rgba(255,255,255,0.6);
  color: var(--sky-700);
}
.back-link:focus-visible {
  outline: 2px solid var(--sky-400);
  outline-offset: 2px;
}

.page-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--night);
  margin-bottom: 8px;
  line-height: var(--leading-tight);
}
.page-updated {
  font-size: var(--text-sm);
  color: var(--slate);
}

/* ── CONTENT ── */
.content { padding: 32px 0 64px; }

.content .lead {
  font-size: var(--text-md);
  color: var(--ink);
  line-height: var(--leading-normal);
  margin-bottom: 28px;
}

.content h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--night);
  margin-top: 32px;
  margin-bottom: 10px;
  line-height: var(--leading-snug);
  scroll-margin-top: 16px;   /* deep links (#clause) don't sit flush to the viewport edge */
}
.content h2:first-child { margin-top: 0; }

/* Part band — a divider above the numbered sections (Privacy Policy: Part I … VI).
   Deliberately not a display heading: it groups without competing with h2. */
.content h2.part {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  line-height: var(--leading-snug);
  margin-top: 48px;
  margin-bottom: 4px;
  padding-top: 20px;
  border-top: 1px solid var(--mist);
}
.content h2.part:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.content h2.part + h2 { margin-top: 12px; }

.content h3 {
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--night);
  margin-top: 22px;
  margin-bottom: 8px;
  line-height: var(--leading-snug);
  scroll-margin-top: 16px;
}

.content p {
  font-size: var(--text-base);
  color: var(--ink);
  line-height: var(--leading-normal);
  margin-bottom: 12px;
}
.content ul,
.content ol {
  margin: 0 0 12px 20px;
  padding: 0;
}
.content li {
  font-size: var(--text-base);
  color: var(--ink);
  line-height: var(--leading-normal);
  margin-bottom: 6px;
}
.content a {
  color: var(--sky-600);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.content a:hover { color: var(--sky-700); }
.content a:focus-visible {
  outline: 2px solid var(--sky-400);
  outline-offset: 2px;
  border-radius: 2px;
}
.content strong { font-weight: var(--weight-semibold); color: var(--night); }

/* ── IDENTITY CARD — label/value pairs (About Us, contact blocks) ── */
.identity {
  background: var(--snow);
  border: 1px solid var(--mist);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin: 0 0 20px;
}
.identity .row {
  padding: 12px 0;
  border-top: 1px solid var(--mist);
}
.identity .row:first-child { padding-top: 0; border-top: none; }
.identity .row:last-child { padding-bottom: 0; }
.identity dt {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  margin-bottom: 4px;
}
.identity dd {
  font-size: var(--text-base);
  color: var(--night);
  line-height: var(--leading-normal);
}
.identity dd + dd { margin-top: 2px; }

/* ── TABLE OF CONTENTS (long docs: terms, privacy) ── */
.toc {
  background: var(--cloud);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 32px;
}
.toc-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  margin-bottom: 10px;
}
/* No list markers: each entry already carries its own number ("1. About …"),
   so an <ol> marker would render it twice. */
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc li {
  font-size: var(--text-sm);
  margin-bottom: 5px;
}
/* Part grouping (Privacy Policy) */
.toc .toc-part {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  text-decoration: none;
  margin: 16px 0 7px;
}
.toc .toc-part:hover { color: var(--ink); }
.toc-list > li:first-child > .toc-part { margin-top: 0; }
.toc-list > li > ol { margin-left: 2px; }

/* ── TABLES (legal bases, retention, cookies) — scroll, never break the page ── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 20px;
  border: 1px solid var(--mist);
  border-radius: var(--radius-md);
}
.table-wrap table {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
}
.table-wrap th,
.table-wrap td {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--mist);
}
.table-wrap th {
  font-weight: var(--weight-semibold);
  color: var(--night);
  background: var(--cloud);
}
.table-wrap td { color: var(--ink); }
.table-wrap tr:last-child td { border-bottom: none; }

/* ── NOTE BOX ── */
.note-box {
  background: var(--cloud);
  border-left: 3px solid var(--sky-400);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin: 20px 0;
  font-size: var(--text-sm);
  color: var(--ink);
  line-height: var(--leading-normal);
}

/* ── FOOTER — two tiers: product, then legal ── */
.footer {
  background: var(--midnight);
  color: white;
  text-align: center;
  padding: 48px 24px;
}
.footer-wordmark {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: 1;
  margin-bottom: 12px;
}
.footer-wordmark .bravo { color: white; }
.footer-wordmark .lisa { color: var(--lavender-300); }
.footer-tagline {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: rgba(255,255,255,0.45);
  margin-bottom: 6px;
}
.footer-url {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--sky-300);
  font-weight: var(--weight-medium);
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
}
.footer-links a {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--sky-300);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.footer-links a:hover {
  color: var(--sky-200);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-links a:focus-visible {
  outline: 2px solid var(--sky-300);
  outline-offset: 3px;
  border-radius: 2px;
}

.footer-legal {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-legal a {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.footer-legal a:hover {
  color: rgba(255,255,255,0.8);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-legal a:focus-visible {
  outline: 2px solid var(--sky-300);
  outline-offset: 3px;
  border-radius: 2px;
}
.footer-legal a[aria-current="page"] {
  color: white;
  font-weight: var(--weight-medium);
}

/* ── DESKTOP ── */
@media (min-width: 560px) {
  .identity .row {
    display: grid;
    grid-template-columns: 168px 1fr;
    gap: 16px;
    align-items: baseline;
  }
  .identity dt { margin-bottom: 0; }
}
@media (min-width: 640px) {
  .page-header { padding: 64px 24px 40px; }
  .page-title { font-size: var(--text-3xl); }
}

/* ── PRINT — legal pages get saved and filed ── */
@media print {
  .back-link, .footer { display: none; }
  .page-header {
    background: none;
    padding: 0 0 16px;
    text-align: left;
  }
  .content { padding: 0; }
  .container { max-width: none; padding: 0; }
  body { color: #000; background: #fff; }
  .identity, .note-box, .toc { background: none; border: 1px solid #ccc; }
  .table-wrap { overflow: visible; }
  .content a { color: #000; }
  .content a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    word-break: break-all;
  }
  h2, h3 { break-after: avoid; }
  .table-wrap, .identity { break-inside: avoid; }
}
