/* =============================================
   ZEN WASH STUDIO — legal.css
   Shared styles for Privacy, Terms & Cookies
   ============================================= */

/* ---- PAGE SETUP ---- */
.legal-page {
  background: var(--white);
}

/* ---- LEGAL HERO ---- */
.legal-hero {
  background: var(--off-white);
  border-bottom: 1px solid var(--stone-100);
  padding: 140px 28px 60px;
  position: relative;
  overflow: hidden;
}
.legal-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  border: 1px solid var(--stone-200);
  pointer-events: none;
}
.legal-hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: 10%;
  width: 200px; height: 200px;
  border-radius: 50%;
  border: 1px solid var(--stone-100);
  pointer-events: none;
}

.legal-hero-inner {
  max-width: 1160px;
  margin: 0 auto;
}

.legal-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.legal-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--stone-400);
  letter-spacing: 0.06em;
}
.legal-meta time { color: var(--stone-600); }

/* ---- BODY LAYOUT ---- */
.legal-body {
  max-width: 1160px;
  margin: 0 auto;
  padding: 64px 28px 100px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  align-items: start;
}

/* ---- TABLE OF CONTENTS ---- */
.legal-toc {
  position: sticky;
  top: 100px;
  background: var(--off-white);
  border: 1px solid var(--stone-100);
  border-radius: var(--radius-md);
  padding: 24px;
}

.toc-heading {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone-400);
  margin-bottom: 16px;
}

.legal-toc nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-link {
  font-size: 0.8rem;
  color: var(--stone-600);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
  line-height: 1.4;
}
.toc-link:hover {
  background: var(--stone-100);
  color: var(--ink);
}
.toc-link.active {
  background: var(--accent-light);
  color: var(--accent);
}

/* ---- LEGAL CONTENT ---- */
.legal-content {
  min-width: 0;
}

.legal-section {
  margin-bottom: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--stone-100);
}
.legal-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-section h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.legal-section h3 {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin: 24px 0 10px;
  letter-spacing: 0.01em;
}

.legal-section p {
  font-size: 0.92rem;
  color: var(--stone-600);
  line-height: 1.8;
  margin-bottom: 14px;
}
.legal-section p:last-child { margin-bottom: 0; }

.legal-section strong { color: var(--ink); font-weight: 600; }

.legal-section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}
.legal-section a:hover { opacity: 0.75; }

.legal-section ul,
.legal-section ol {
  padding-left: 0;
  margin: 14px 0 14px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-section ul li,
.legal-section ol li {
  font-size: 0.92rem;
  color: var(--stone-600);
  line-height: 1.7;
  padding-left: 22px;
  position: relative;
}

.legal-section ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--stone-200);
  font-size: 0.8rem;
  top: 3px;
}

.legal-section ol {
  counter-reset: ol-counter;
}
.legal-section ol li {
  counter-increment: ol-counter;
}
.legal-section ol li::before {
  content: counter(ol-counter) '.';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  top: 4px;
}

/* ---- CALLOUT BOX ---- */
.legal-callout {
  margin: 20px 0;
  padding: 18px 22px;
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.88rem;
  color: var(--stone-800);
  line-height: 1.7;
}
.legal-callout strong { color: var(--accent); }
.legal-callout a { color: var(--accent); }

/* ---- CONTACT BLOCK ---- */
.legal-contact-block {
  margin-top: 20px;
  padding: 24px 28px;
  background: var(--off-white);
  border: 1px solid var(--stone-100);
  border-radius: var(--radius-md);
}
.legal-contact-block p {
  font-size: 0.88rem;
  color: var(--stone-600);
  margin-bottom: 6px !important;
  line-height: 1.6;
}
.legal-contact-block p strong { color: var(--ink); }
.legal-contact-block a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- COOKIE TABLE ---- */
.cookie-table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--stone-100);
  border-radius: var(--radius-md);
}

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.cookie-table thead {
  background: var(--off-white);
  border-bottom: 1px solid var(--stone-100);
}

.cookie-table th {
  text-align: left;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-400);
  white-space: nowrap;
}

.cookie-table td {
  padding: 14px 16px;
  color: var(--stone-600);
  vertical-align: top;
  border-bottom: 1px solid var(--stone-100);
  line-height: 1.6;
}
.cookie-table tr:last-child td { border-bottom: none; }
.cookie-table tr:hover td { background: var(--off-white); }

.cookie-table code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--stone-100);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.table-note {
  font-family: var(--font-mono);
  font-size: 0.72rem !important;
  color: var(--stone-400) !important;
  margin-top: 12px !important;
  letter-spacing: 0.02em;
}

/* ---- BADGES ---- */
.badge-essential {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.badge-optional {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(44,95,138,0.2);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.cookie-type-badge {
  margin-left: 8px;
  vertical-align: middle;
}

/* ---- RELATED LINKS ROW ---- */
.legal-links-row {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.legal-related-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--off-white);
  border: 1px solid var(--stone-100);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  transition: var(--transition);
  text-decoration: none !important;
}
.legal-related-link:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  background: var(--accent-light);
}
.legal-related-link span {
  color: var(--accent);
  font-size: 1rem;
}

/* ---- TOC ACTIVE HIGHLIGHT ON SCROLL ---- */
.toc-link.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
}

/* ---- LEGAL MAIN WRAPPER ---- */
.legal-main {
  min-height: 80vh;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .legal-body {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 24px 80px;
  }

  .legal-toc {
    position: static;
  }
}

@media (max-width: 600px) {
  .legal-hero {
    padding: 120px 24px 48px;
  }

  .legal-section h2 {
    font-size: 1.35rem;
  }

  .cookie-table th,
  .cookie-table td {
    padding: 10px 12px;
    font-size: 0.78rem;
  }

  .legal-links-row {
    flex-direction: column;
  }
}
