:root {
  --bg: #0b0b0b;
  --text: #f5f0e8;
  --muted: rgba(245, 240, 232, 0.72);
  --muted-2: rgba(245, 240, 232, 0.45);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --gold: #c8a36a;
  --gold-soft: #e8c48f;
  --gold-dim: rgba(200, 163, 106, 0.15);
  --white: #ffffff;
  --panel: rgba(255, 255, 255, 0.03);
  --radius: 16px;
  --container: min(1180px, calc(100% - 40px));
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gold-soft);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-decoration-color: rgba(232, 196, 143, 0.4);
}

.container {
  width: 100%;
  margin: 0 auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(4, 4, 4, 0.92), rgba(4, 4, 4, 0.4));
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: var(--container);
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 2px;
}

.brand:hover{
    text-decoration: none;
}

.brand-eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.brand-name {
  display: inline-flex;
  flex-direction: column;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  letter-spacing: 0.18em;
  color: var(--white);
  font-weight: 500;
}

.header-inner .brand-name {
  font-size: 1.6rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--gold-soft);
  text-decoration: none;
}

.back-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.page-wrap {
  width: var(--container);
  margin: 0 auto;
  padding: 120px 0 96px;
}

.legal-terms .page-wrap {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 64px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 96px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.toc-title {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 16px;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc ol li {
  counter-increment: toc;
  margin-bottom: 10px;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.toc ol li::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 0.62rem;
  color: var(--gold);
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.toc a {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  transition: color 0.2s;
}

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

.page-kicker {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.page-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: 0.01em;
}

.page-meta {
  font-size: 0.8rem;
  color: var(--muted-2);
  margin: 0 0 56px;
  letter-spacing: 0.04em;
}

.legal-terms .page-meta {
  margin-bottom: 48px;
}

.legal-terms .page-divider {
  margin-bottom: 48px;
}

.doc-section {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 96px;
}

.legal-terms .doc-section {
  margin-bottom: 44px;
  padding-bottom: 44px;
}

.doc-section:last-child,
.doc-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.doc-section h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 16px;
  letter-spacing: 0.02em;
}

.legal-terms .doc-section h2 {
  font-size: 1.45rem;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.section-num {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 600;
  font-family: "Inter", sans-serif;
  flex-shrink: 0;
}

.doc-section p {
  color: var(--muted);
  margin: 0 0 14px;
  font-size: 0.95rem;
}

.legal-terms .doc-section p {
  margin-bottom: 12px;
  font-size: 0.93rem;
}

.doc-section p:last-child {
  margin-bottom: 0;
}

.doc-section ul {
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.doc-section ul li {
  color: var(--muted);
  font-size: 0.93rem;
  padding: 6px 0 6px 20px;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.doc-section ul li:last-child {
  border-bottom: none;
}

.doc-section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15px;
  width: 5px;
  height: 1px;
  background: var(--gold);
}

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 0.875rem;
}

.cookie-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  border-bottom: 1px solid var(--line-strong);
  font-family: "Inter", sans-serif;
}

.cookie-table td {
  padding: 14px 16px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.6;
}

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

.cookie-table tr:hover td {
  background: var(--panel);
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.badge-required {
  background: rgba(200, 163, 106, 0.12);
  color: var(--gold-soft);
  border: 1px solid rgba(200, 163, 106, 0.25);
}

.badge-analytics {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid var(--line-strong);
}

.callout {
  margin: 24px 0 0;
  padding: 20px 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(200, 163, 106, 0.2);
  background: var(--gold-dim);
}

.legal-terms .callout {
  margin: 20px 0;
  padding: 18px 22px;
  border-color: rgba(200, 163, 106, 0.18);
}

.callout p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(245, 240, 232, 0.78);
}

.legal-terms .callout p {
  font-size: 0.88rem;
  color: rgba(245, 240, 232, 0.75);
}

.callout strong {
  color: var(--gold-soft);
  font-weight: 600;
}

.btn-settings {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 0 20px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(200, 163, 106, 0.3);
  background: var(--gold-dim);
  color: var(--gold-soft);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-settings:hover {
  background: rgba(200, 163, 106, 0.22);
  border-color: rgba(200, 163, 106, 0.5);
  text-decoration: none;
  color: var(--gold-soft);
}

.legal-spaced {
  margin-top: 20px !important;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.page-footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.legal-terms .page-footer {
  grid-column: 1 / -1;
  margin-top: 64px;
  padding-top: 28px;
}

.page-footer p {
  font-size: 0.75rem;
  color: var(--muted-2);
  margin: 0;
}

.page-footer a {
  font-size: 0.75rem;
  color: var(--muted-2);
}

.page-footer a:hover {
  color: var(--gold-soft);
}

.footer-brand {
  margin-bottom: 10px;
}

.footer-links {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  text-align: right;
}

.footer-links a,
.footer-cookies-link {
  font-size: 0.75rem;
  color: var(--white);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-cookies-link:hover {
  color: var(--gold);
}

@media (max-width: 768px) {
  .legal-terms .page-wrap {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 100px 0 64px;
  }

  .toc {
    position: static;
    order: -1;
    margin-bottom: 40px;
  }

  .legal-terms .page-footer {
    grid-column: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 600px) {
  .page-wrap {
    padding: 100px 0 64px;
  }

  .cookie-table {
    font-size: 0.8rem;
  }

  .cookie-table th,
  .cookie-table td {
    padding: 10px;
  }

  .page-footer,
  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
