/* ============================================
   Brain Honey — Legal Pages Stylesheet
   legal.css
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --honey-gold:      #F5A623;
  --honey-deep:      #C97C0A;
  --honey-amber:     #FFC84A;
  --honey-light:     #FFF8E7;
  --honey-glow:      #FFE599;
  --dark-base:       #1A1107;
  --dark-surface:    #231808;
  --dark-card:       #2E1F0A;
  --text-primary:    #FFF8E7;
  --text-secondary:  #D4B483;
  --text-muted:      #8A7050;
  --border-subtle:   rgba(245,166,35,0.18);
  --border-hover:    rgba(245,166,35,0.45);
  --shadow-card:     0 4px 32px rgba(0,0,0,0.45);
  --shadow-glow:     0 0 40px rgba(245,166,35,0.12);
  --radius-md:       12px;
  --radius-lg:       20px;
  --max-width:       860px;
  --font-display:    'Playfair Display', Georgia, serif;
  --font-body:       'DM Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--dark-base);
  color: var(--text-primary);
  line-height: 1.8;
  font-size: 16px;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(245,166,35,0.07) 0%, transparent 70%);
}

/* ---------- Navigation ---------- */
.legal-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26,17,7,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 24px;
}

.legal-nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.legal-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--honey-gold);
  letter-spacing: 0.01em;
}

.legal-nav__brand-icon {
  font-size: 1.4rem;
}

.legal-nav__links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.legal-nav__links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.legal-nav__links a:hover,
.legal-nav__links a.active {
  color: var(--honey-gold);
}

/* ---------- Hero Header ---------- */
.legal-hero {
  padding: 72px 24px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(245,166,35,0.09) 0%, transparent 70%);
  pointer-events: none;
}

.legal-hero__tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--honey-gold);
  background: rgba(245,166,35,0.12);
  border: 1px solid var(--border-subtle);
  border-radius: 99px;
  padding: 5px 16px;
  margin-bottom: 20px;
}

.legal-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 14px;
}

.legal-hero__title span {
  color: var(--honey-gold);
}

.legal-hero__meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---------- TOC ---------- */
.legal-toc {
  max-width: var(--max-width);
  margin: 0 auto 32px;
  padding: 0 24px;
}

.legal-toc__box {
  background: var(--dark-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 28px;
}

.legal-toc__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--honey-gold);
  margin-bottom: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.legal-toc__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 6px 20px;
}

.legal-toc__list a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.legal-toc__list a::before {
  content: '→';
  color: var(--honey-gold);
  font-size: 0.75rem;
}

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

/* ---------- Main Content ---------- */
.legal-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ---------- Sections ---------- */
.legal-section {
  margin-bottom: 40px;
  background: var(--dark-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.legal-section:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.legal-section__number {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--honey-deep);
  margin-bottom: 8px;
}

.legal-section__title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-section p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-size: 0.95rem;
}

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

.legal-section ul,
.legal-section ol {
  color: var(--text-secondary);
  padding-left: 20px;
  margin-bottom: 14px;
  font-size: 0.95rem;
}

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

.legal-section a {
  color: var(--honey-gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(245,166,35,0.3);
  transition: border-color 0.2s;
}

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

/* Highlight box */
.legal-highlight {
  background: rgba(245,166,35,0.07);
  border-left: 3px solid var(--honey-gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin: 18px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.legal-highlight strong {
  color: var(--honey-gold);
  display: block;
  margin-bottom: 4px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Contact Card ---------- */
.legal-contact {
  background: linear-gradient(135deg, rgba(245,166,35,0.1) 0%, rgba(201,124,10,0.06) 100%);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  text-align: center;
  margin-top: 16px;
}

.legal-contact h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.legal-contact p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.legal-contact__email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--honey-gold);
  color: var(--dark-base);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 28px;
  border-radius: 99px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.legal-contact__email:hover {
  background: var(--honey-amber);
  transform: translateY(-2px);
}

/* ---------- Footer ---------- */
.legal-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--dark-surface);
  padding: 28px 24px;
  text-align: center;
}

.legal-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.legal-footer__brand {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--honey-gold);
  font-weight: 600;
}

.legal-footer__links {
  display: flex;
  gap: 20px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.legal-footer__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s;
}

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

.legal-footer__copy {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* ---------- Back to Top ---------- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--honey-gold);
  color: var(--dark-base);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 20px rgba(245,166,35,0.4);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover { background: var(--honey-amber); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .legal-section { padding: 26px 22px; }
  .legal-contact { padding: 28px 22px; }
  .legal-nav__links { gap: 14px; }
  .legal-toc__list { grid-template-columns: 1fr; }
}
