/* ================================================================
   legal.css — Shared layout for Privacy, Terms, Refund pages
   Spec: §24 Legal Pages
================================================================ */

/* ── Page background ─────────────────────────────────────────── */
body.page-legal {
  background:
    radial-gradient(85% 50% at 80% 0%, rgba(230,193,90,.10), transparent 60%),
    linear-gradient(180deg, #0A1428, #101E3C 55%, #0A1428);
  min-height: 100vh;
  color: #D7DEED;
}

/* ── Breadcrumb ──────────────────────────────────────────────── */
.legal-breadcrumb {
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,.10);
  padding: var(--space-3) 0;
}

.legal-breadcrumb .breadcrumb-list,
.legal-breadcrumb .breadcrumb-sep {
  color: rgba(199,211,230,.55);
}

.legal-breadcrumb a {
  color: rgba(199,211,230,.65);
  text-decoration: none;
}

.legal-breadcrumb a:hover { color: var(--color-gold); }

/* ── Page hero strip ─────────────────────────────────────────── */
.legal-hero {
  background: transparent;
  padding: var(--space-10) 0 var(--space-8);
  position: relative;
}

.legal-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  opacity: 0.4;
}

.legal-hero-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin: 0 0 var(--space-3);
}

.legal-hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 900;
  color: #fff;
  margin: 0 0 var(--space-3);
  letter-spacing: -0.02em;
}

.legal-hero-meta {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  color: rgba(199,211,230,.50);
  margin: 0;
}

/* ── Body layout: sidebar TOC + content ──────────────────────── */
.legal-body {
  padding: var(--space-10) 0 var(--space-16);
  background: transparent;
}

.legal-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-12);
  align-items: start;
  max-width: 980px;
  margin: 0 auto;
}

/* ── Sticky Table of Contents (sidebar) ──────────────────────── */
.legal-toc {
  position: sticky;
  top: 90px;
  background: linear-gradient(160deg, rgba(255,255,255,.12), rgba(255,255,255,.05) 45%, rgba(230,193,90,.07));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.16);
  border-top: 2px solid rgba(230,193,90,.50);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-4);
}

@supports not (backdrop-filter: blur(12px)) {
  .legal-toc { background: rgba(16,26,52,.92); }
}

.legal-toc-title {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(199,211,230,.60);
  margin: 0 0 var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.legal-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.legal-toc-list a {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(199,211,230,.75);
  text-decoration: none;
  line-height: 1.5;
  display: block;
  padding: 2px 0 2px var(--space-3);
  border-left: 2px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}

.legal-toc-list a:hover,
.legal-toc-list a.is-active {
  color: var(--color-gold);
  border-left-color: var(--color-gold);
}

/* ── Legal Content Area ──────────────────────────────────────── */
.legal-content {
  max-width: 720px;
  min-width: 0;
}

.legal-section {
  margin-bottom: var(--space-10);
  padding-top: var(--space-2);
  scroll-margin-top: 100px;
}

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

.legal-section-num {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin: 0 0 var(--space-2);
}

.legal-h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  margin: 0 0 var(--space-4);
  letter-spacing: -0.01em;
  border-bottom: 1px solid rgba(255,255,255,.14);
  padding-bottom: var(--space-3);
}

.legal-content p {
  font-family: var(--font-body);
  font-size: 0.93rem;
  line-height: 1.85;
  color: #D7DEED;
  margin: 0 0 var(--space-4);
}

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

.legal-content ul,
.legal-content ol {
  font-family: var(--font-body);
  font-size: 0.93rem;
  line-height: 1.8;
  color: #D7DEED;
  margin: 0 0 var(--space-4) var(--space-5);
  padding: 0;
}

.legal-content li { margin-bottom: var(--space-2); }
.legal-content li:last-child { margin-bottom: 0; }

.legal-content a {
  color: var(--color-gold);
  text-decoration: underline;
  font-weight: 500;
}

.legal-content a:hover { color: #E8BE74; text-decoration: underline; }

/* Sub-headings inside sections */
.legal-h3 {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin: var(--space-6) 0 var(--space-2);
}

/* Service list table */
.legal-service-list {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-4);
  font-family: var(--font-body);
  font-size: 0.85rem;
}

.legal-service-list th {
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(199,211,230,.60);
  padding: var(--space-2) var(--space-3);
  border-bottom: 2px solid rgba(255,255,255,.14);
}

.legal-service-list td {
  padding: var(--space-3);
  border-bottom: 1px solid rgba(255,255,255,.10);
  color: #D7DEED;
  vertical-align: top;
  line-height: 1.6;
}

.legal-service-list tr:last-child td { border-bottom: none; }
.legal-service-list td:first-child { font-weight: 600; color: #fff; white-space: nowrap; }

/* Callout box (GDPR/DPA notices) */
.legal-callout {
  background: rgba(200,150,62,0.08);
  border-left: 3px solid var(--color-gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-4) var(--space-5);
  margin: var(--space-5) 0;
}

.legal-callout p {
  margin: 0 0 var(--space-2);
  font-size: 0.88rem;
  color: #D7DEED;
}

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

/* Contact card at bottom */
.legal-contact-card {
  background: linear-gradient(160deg, rgba(255,255,255,.12), rgba(255,255,255,.05) 45%, rgba(230,193,90,.07));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  margin-top: var(--space-4);
}

@supports not (backdrop-filter: blur(12px)) {
  .legal-contact-card { background: rgba(16,26,52,.92); }
}

.legal-contact-card p {
  margin: 0 0 var(--space-2);
  color: #D7DEED;
}
.legal-contact-card p:last-child { margin: 0; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .legal-toc {
    position: static;
    background: linear-gradient(160deg, rgba(255,255,255,.12), rgba(255,255,255,.05) 45%, rgba(230,193,90,.07));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.16);
    border-top: 2px solid rgba(230,193,90,.50);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
  }
}

/* ── Refund Policy: Guarantee Card ──────────────────────────── */
.refund-guarantee-card {
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(200,150,62,0.12) 0%, rgba(200,150,62,0.05) 100%);
  padding: var(--space-8) var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  margin: var(--space-2) 0;
  box-shadow: 0 4px 24px rgba(200,150,62,0.15);
}

.refund-guarantee-icon {
  display: flex;
  justify-content: center;
}

.refund-guarantee-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  margin: 0;
  letter-spacing: -0.01em;
}

.refund-guarantee-body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: #D7DEED;
  max-width: 52ch;
  margin: 0;
}

/* ── Refund Policy: Step Flow ─────────────────────────────────── */
.refund-steps {
  list-style: none;
  margin: var(--space-4) 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* Vertical connector line */
.refund-steps::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 38px;
  bottom: 38px;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-gold), rgba(200,150,62,0.1));
}

.refund-step {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  padding: var(--space-5) 0;
}

.refund-step-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-gold);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px rgba(10,20,45,.9);
}

.refund-step-body {
  flex: 1;
  padding-top: var(--space-1);
}

.refund-step-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 var(--space-2);
}

/* Monospace code snippet (subject line) */
.refund-code {
  font-family: var(--font-mono, 'DM Mono', monospace);
  font-size: 0.78rem;
  background: rgba(8,14,28,.65);
  border: 1px solid rgba(160,190,255,.28);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  color: #D7DEED;
  word-break: break-all;
}

/* ── Print styles ────────────────────────────────────────────── */
@media print {
  #site-header,
  #top-bar,
  .floating-whatsapp,
  .legal-toc,
  .legal-breadcrumb,
  .site-footer {
    display: none !important;
  }

  body {
    font-size: 11pt;
    color: #000;
    background: #fff;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .legal-content {
    max-width: 100%;
  }

  .legal-h2 { page-break-after: avoid; }
  .legal-section { page-break-inside: avoid; }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.75em;
    color: #555;
  }
}
