/* =======================================================================
   LEGAL.CSS - Terms & Privacy Pages
   Premium, readable, matches the design system
   ======================================================================= */

/* ===================== TABLE OF CONTENTS ===================== */
/* 01. Legal Hero Section */
/* 02. Legal Container Layout */
/* 03. Table of Contents (Desktop) */
/* 04. Legal Main Content */
/* 05. Section Styling */
/* 06. Typography Enhancements */
/* 07. Lists & Bullets */
/* 08. Contact Info Block */
/* 09. Mobile Responsive */
/* 10. Print Styles */
/* ============================================================ */

/* ========================================================================
   01. LEGAL HERO SECTION
   ======================================================================== */
.legal-hero {
  padding: 3rem 0 2rem 0;
  background: linear-gradient(135deg, var(--bg) 0%, white 100%);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
}

.legal-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(183, 140, 90, 0.03) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.legal-hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.legal-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 500;
  position: relative;
  padding: 0 2rem;
}

.legal-eyebrow::before,
.legal-eyebrow::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent));
  transform: translateY(-50%);
}

.legal-eyebrow::before {
  left: -20px;
}

.legal-eyebrow::after {
  right: -20px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.legal-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 8vw, 3.5rem);
  line-height: 1.1;
  font-weight: 400;
  margin-bottom: 1rem;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

.legal-title .dot {
  color: var(--accent);
  font-size: clamp(2.2rem, 9vw, 4rem);
  line-height: 0.8;
  margin-left: 2px;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

.legal-subtitle {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================================================
   02. LEGAL CONTAINER LAYOUT
   ======================================================================== */
.legal-content-section {
  padding: 3rem 0 4rem 0;
  background: white;
}

.legal-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .legal-container {
    flex-direction: row;
    gap: 3rem;
  }
}

/* ========================================================================
   03. TABLE OF CONTENTS (Desktop)
   ======================================================================== */
.legal-toc {
  flex: 0 0 240px;
  position: sticky;
  top: 100px;
  align-self: flex-start;
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid var(--border-light);
  box-shadow: 0 15px 30px -12px rgba(0, 0, 0, 0.05);
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}

.legal-toc h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  color: var(--text-dark);
  font-weight: 600;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.legal-toc h3::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.legal-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.legal-toc li {
  margin-bottom: 0.5rem;
}

.legal-toc a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  display: block;
  padding: 0.35rem 0;
  border-bottom: 1px dotted transparent;
}

.legal-toc a:hover {
  color: var(--accent);
  padding-left: 5px;
  border-bottom-color: var(--border-light);
}

/* ========================================================================
   04. LEGAL MAIN CONTENT
   ======================================================================== */
.legal-main {
  flex: 1;
  min-width: 0;
  background: white;
  border-radius: 24px;
  padding: 2rem;
  border: 1px solid var(--border-light);
  box-shadow: 0 15px 30px -12px rgba(0, 0, 0, 0.05);
}

@media (min-width: 480px) {
  .legal-main {
    padding: 2.5rem;
  }
}

@media (min-width: 768px) {
  .legal-main {
    padding: 3rem;
  }
}

.legal-intro {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-soft);
}

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

/* ========================================================================
   05. SECTION STYLING
   ======================================================================== */
.legal-section {
  margin-bottom: 2.5rem;
}

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

.legal-section h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
  position: relative;
}

.legal-section h2::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--accent);
}

.legal-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 1.5rem 0 1rem;
}

.legal-section h3:first-of-type {
  margin-top: 0;
}

.legal-section p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-soft);
  margin-bottom: 1rem;
}

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

/* ========================================================================
   06. TYPOGRAPHY ENHANCEMENTS
   ======================================================================== */
.legal-section strong {
  color: var(--text-dark);
  font-weight: 600;
}

.legal-section em {
  font-style: italic;
  color: var(--accent);
}

.legal-section a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent-light);
  transition: all 0.2s ease;
}

.legal-section a:hover {
  color: var(--text-dark);
  border-bottom-color: var(--text-dark);
}

/* ========================================================================
   07. LISTS & BULLETS
   ======================================================================== */
.legal-section ul,
.legal-section ol {
  margin: 1rem 0 1.5rem 1.5rem;
  padding: 0;
}

.legal-section li {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-soft);
  margin-bottom: 0.5rem;
}

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

.legal-section ul li {
  list-style-type: disc;
}

.legal-section ul li::marker {
  color: var(--accent);
  font-size: 0.8rem;
}

.legal-section ol li {
  list-style-type: decimal;
}

.legal-section ol li::marker {
  color: var(--accent);
  font-weight: 500;
}

/* Nested lists */
.legal-section ul ul,
.legal-section ol ol,
.legal-section ul ol,
.legal-section ol ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.legal-section ul ul li {
  list-style-type: circle;
}

.legal-section ul ul li::marker {
  color: var(--accent-light);
}

/* ========================================================================
   08. CONTACT INFO BLOCK
   ======================================================================== */
.legal-contact-info {
  background: var(--bg);
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1rem;
  border: 1px solid var(--border-light);
  line-height: 1.8;
}

.legal-contact-info p {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

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

.legal-contact-info i {
  color: var(--accent);
  width: 20px;
  font-size: 1rem;
}

.legal-footer-note {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
}

/* ========================================================================
   09. MOBILE RESPONSIVE
   ======================================================================== */
@media (max-width: 767px) {
  .legal-hero {
    padding: 2rem 0 1.5rem 0;
  }

  .legal-eyebrow {
    font-size: 0.6rem;
    letter-spacing: 3px;
    padding: 0 1.5rem;
  }

  .legal-eyebrow::before,
  .legal-eyebrow::after {
    width: 25px;
  }

  .legal-eyebrow::before {
    left: -15px;
  }

  .legal-eyebrow::after {
    right: -15px;
  }

  .legal-subtitle {
    font-size: 0.85rem;
    padding: 0 1rem;
  }

  .legal-content-section {
    padding: 2rem 0 3rem 0;
  }

  .legal-main {
    padding: 1.5rem;
  }

  .legal-toc {
    display: none; /* Hide TOC on mobile */
  }

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

  .legal-section h3 {
    font-size: 1rem;
  }

  .legal-section p,
  .legal-section li {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .legal-main {
    padding: 1.25rem;
  }

  .legal-section {
    margin-bottom: 2rem;
  }

  .legal-section h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .legal-section h3 {
    font-size: 0.95rem;
    margin: 1.25rem 0 0.75rem;
  }

  .legal-section p,
  .legal-section li {
    font-size: 0.85rem;
    line-height: 1.6;
  }

  .legal-section ul,
  .legal-section ol {
    margin-left: 1.25rem;
  }

  .legal-contact-info {
    padding: 1rem;
  }

  .legal-contact-info p {
    font-size: 0.85rem;
    gap: 0.5rem;
  }

  .legal-contact-info i {
    width: 18px;
    font-size: 0.9rem;
  }
}

@media (max-width: 360px) {
  .legal-main {
    padding: 1rem;
  }

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

  .legal-section p,
  .legal-section li {
    font-size: 0.8rem;
  }

  .legal-section ul,
  .legal-section ol {
    margin-left: 1rem;
  }
}

/* ========================================================================
   10. PRINT STYLES
   ======================================================================== */
@media print {
  .top-bar,
  .main-header,
  .mobile-nav,
  .footer,
  .legal-hero::before,
  .legal-toc {
    display: none !important;
  }

  .legal-hero {
    background: white;
    padding: 1cm 0;
    border-bottom: 1pt solid #ddd;
  }

  .legal-content-section {
    padding: 0.5cm 0;
  }

  .legal-main {
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .legal-section h2 {
    font-size: 18pt;
    border-bottom: 1pt solid #000;
  }

  .legal-section h2::after {
    display: none;
  }

  .legal-section h3 {
    font-size: 14pt;
  }

  .legal-section p,
  .legal-section li {
    font-size: 11pt;
    color: #000;
  }

  .legal-section a {
    color: #000;
    text-decoration: underline;
    border-bottom: none;
  }

  .legal-contact-info {
    background: none;
    border: 1pt solid #ddd;
    box-shadow: none;
  }

  .legal-footer-note {
    border-top: 1pt solid #ddd;
  }
}
