/* ========================================
   JuiceProof — Legal Pages Stylesheet
   Loaded by privacy.html & terms-of-service.html
   ======================================== */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clr-primary: #7B1F3A;
  --clr-primary-dark: #5C142A;
  --clr-accent: #D4871A;
  --clr-accent-dark: #A8670E;
  --clr-accent-light: #E8AA4A;
  --clr-bg: #FDF9F5;
  --clr-surface: #F4EDE4;
  --clr-surface-dark: #EAE0D5;
  --clr-text: #1C1512;
  --clr-text-medium: #4A3B32;
  --clr-text-light: #8C7A6E;
  --clr-white: #FFFFFF;
  --clr-border: #D9CEC2;
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --max-width: 900px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--clr-text);
  background: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--clr-accent-dark); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--clr-primary); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--clr-text);
}

/* ---------- LEGAL HEADER ---------- */
.legal-header {
  background: linear-gradient(135deg, var(--clr-primary-dark) 0%, var(--clr-primary) 60%, #4A0F22 100%);
  color: var(--clr-white);
  padding: 60px 0 56px;
  position: relative;
  overflow: hidden;
}

.legal-header::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(212,135,26,0.12) 0%, transparent 60%);
}

.legal-header .container { position: relative; z-index: 1; }

.legal-header .back-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: #D4C0A8; font-size: 0.9rem; font-weight: 600;
  margin-bottom: 20px;
  transition: color 0.2s;
}
.legal-header .back-link:hover { color: var(--clr-white); }
.back-arrow { font-size: 1.1rem; }

.legal-header h1 {
  color: var(--clr-white);
  font-size: 2.4rem;
  margin-bottom: 8px;
}

.legal-header .effective-date {
  color: #C8B0A0; font-size: 0.9rem;
}

/* ---------- CONTAINER ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- LEGAL CONTENT ---------- */
.legal-content {
  padding: 56px 0 32px;
  background: var(--clr-white);
}

.legal-content .container {
  max-width: var(--max-width);
}

/* ---------- TABLE OF CONTENTS ---------- */
.toc {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  margin-bottom: 44px;
}

.toc h2 {
  font-size: 1.3rem;
  color: var(--clr-primary);
  margin-bottom: 16px;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.toc ol {
  list-style-position: inside;
  columns: 2;
  column-gap: 32px;
}

.toc li {
  margin-bottom: 6px;
  break-inside: avoid;
  font-size: 0.9rem;
}

.toc a {
  color: var(--clr-text-medium);
  padding: 2px 0;
  display: inline;
  border-bottom: 1px dotted var(--clr-border);
  transition: color 0.2s, border-color 0.2s;
}
.toc a:hover { color: var(--clr-accent-dark); border-bottom-color: var(--clr-accent); }

/* ---------- SECTIONS ---------- */
.legal-section {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--clr-border);
}

.legal-section:last-child { border-bottom: none; }

.legal-section h2 {
  font-size: 1.55rem;
  color: var(--clr-primary-dark);
  margin-bottom: 16px;
  scroll-margin-top: 100px;
}

.legal-section h3 {
  font-size: 1.15rem;
  color: var(--clr-text-medium);
  margin: 18px 0 10px;
  font-family: var(--font-body);
  font-weight: 700;
}

.legal-section p {
  color: var(--clr-text-medium);
  margin-bottom: 14px;
  line-height: 1.8;
}

.legal-section ul {
  margin: 0 0 16px 20px;
  color: var(--clr-text-medium);
}

.legal-section li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.legal-section strong { color: var(--clr-text); }

.legal-section address {
  font-style: normal;
  color: var(--clr-text-medium);
  line-height: 1.8;
}

/* ---------- LEGAL FOOTER ---------- */
.legal-footer {
  background: var(--clr-text);
  color: #C0B4A8;
  padding: 32px 0;
  text-align: center;
}

.legal-footer .container {
  max-width: var(--max-width);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

.legal-footer .footer-logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--clr-white);
}
.legal-footer .footer-logo span { color: var(--clr-accent-light); }

.legal-footer a {
  color: #B0A498;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.legal-footer a:hover {
  color: var(--clr-white);
  background: rgba(255,255,255,0.08);
}

.legal-footer .footer-copy {
  width: 100%;
  font-size: 0.78rem;
  color: #7A6C62;
  margin-top: 8px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .legal-header h1 { font-size: 1.8rem; }
  .legal-header { padding: 44px 0 40px; }
  .toc ol { columns: 1; }
  .legal-section h2 { font-size: 1.3rem; }
  .legal-content { padding: 36px 0 20px; }
}

@media (max-width: 480px) {
  .legal-header h1 { font-size: 1.5rem; }
  .legal-footer .container { flex-direction: column; gap: 10px; }
}
