/* ============================================================
   Appic Media — Legal Pages Stylesheet
   Extends cssnew/style.css. Load this AFTER style.css.
   Covers: legal hero variant, at-a-glance cards, TOC + prose
   layout, callouts, data tables, footnote/contact band.
   ============================================================ */

:root{
  /* Falls back to these if style.css hasn't defined them yet */
  --bg:        #060912;
  --bg-alt:    #0b0f1f;
  --surface:   #10152a;
  --surface-2: #151b34;
  --border:    rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);
  --text:      #eceef5;
  --text-dim:  #9aa1b8;
  --text-faint:#6b7290;
  --accent-1:  #5b8cff;
  --accent-2:  #b66bff;
  --accent-grad: linear-gradient(98deg, var(--accent-1), var(--accent-2));
  --radius:    16px;
  --radius-sm: 10px;
  --font-display: 'Syne', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Legal hero (compact variant of homepage hero) ---------- */
.legal-hero{
  position: relative;
  padding: 168px 0 72px;
  overflow: hidden;
  background: var(--bg);
}
.legal-hero .hero-bg{ position:absolute; inset:0; z-index:0; }
.legal-hero .hero-content{ position:relative; z-index:1; max-width: 760px; }
.legal-hero .hero-eyebrow{ margin-bottom: 18px; }
.legal-hero h1{
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 18px;
}
.legal-hero .legal-sub{
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 56ch;
  margin: 0 0 28px;
}
.legal-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
}
.legal-meta-badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  font-size: 0.82rem;
  color: var(--text-dim);
  background: rgba(255,255,255,0.02);
}
.legal-meta-badge .dot{
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-grad);
  flex-shrink: 0;
}
.legal-meta a{
  font-size: 0.82rem;
  color: var(--accent-1);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.legal-meta a:hover{ border-bottom-color: currentColor; }

/* ---------- At-a-glance summary cards (signature element) ---------- */
.glance{
  padding: 0 0 64px;
  background: var(--bg);
}
.glance-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 36px;
}
.glance-card{
  padding: 24px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-alt));
  transition: border-color .2s ease, transform .2s ease;
}
.glance-card:hover{
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.glance-icon{
  font-size: 1.5rem;
  margin-bottom: 14px;
  display: inline-flex;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(91,140,255,0.12);
}
.glance-card h4{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin: 0 0 8px;
}
.glance-card p{
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0;
}

/* ---------- TOC + prose layout ---------- */
.legal-body{
  background: var(--bg-alt);
  padding: 64px 0 96px;
  border-top: 1px solid var(--border);
}
.legal-layout{
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.legal-toc{
  position: sticky;
  top: 104px;
}
.legal-toc-label{
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 14px;
}
.toc-list{
  list-style: none;
  margin: 0; padding: 0;
  border-left: 1px solid var(--border);
}
.toc-list li{ margin: 0; }
.toc-link{
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 9px 0 9px 18px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 0.88rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color .15s ease, border-color .15s ease;
}
.toc-link .toc-num{
  font-family: var(--font-display);
  font-size: 0.76rem;
  color: var(--text-faint);
  flex-shrink: 0;
}
.toc-link:hover{ color: var(--text); }
.toc-link.active{
  color: var(--text);
  border-left-color: var(--accent-1);
}
.toc-link.active .toc-num{ color: var(--accent-1); }

.legal-content{ min-width: 0; }
.legal-section{
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 100px;
}
.legal-section:first-child{ padding-top: 0; }
.legal-section:last-child{ border-bottom: none; }
.legal-section-head{
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
}
.legal-section-head .section-num{
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent-1);
  flex-shrink: 0;
}
.legal-section-head h2{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text);
  margin: 0;
}
.legal-section p{
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--text-dim);
  margin: 0 0 16px;
}
.legal-section p:last-child{ margin-bottom: 0; }
.legal-section h3{
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
  margin: 24px 0 10px;
}
.legal-section ul, .legal-section ol{
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 0.98rem;
  line-height: 1.7;
}
.legal-section li{ margin-bottom: 8px; }
.legal-section li:last-child{ margin-bottom: 0; }
.legal-section a{
  color: var(--accent-1);
  text-decoration: none;
  border-bottom: 1px solid rgba(91,140,255,0.35);
}
.legal-section a:hover{ border-bottom-color: var(--accent-1); }
.legal-section strong{ color: var(--text); font-weight: 600; }

/* Callout box for important notices inside prose */
.callout{
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  margin: 18px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: rgba(91,140,255,0.06);
}
.callout-icon{ font-size: 1.1rem; line-height: 1.5; flex-shrink: 0; }
.callout p{ margin: 0; color: var(--text-dim); font-size: 0.92rem; line-height: 1.6; }
.callout p strong{ color: var(--text); }

/* Data table used for "what we collect / why" style sections */
.legal-table-wrap{
  overflow-x: auto;
  margin: 8px 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
table.legal-table{
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 0.88rem;
  min-width: 560px;
}
table.legal-table th{
  text-align: left;
  font-weight: 600;
  color: var(--text);
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.legal-table td{
  padding: 12px 16px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.legal-table tr:last-child td{ border-bottom: none; }

/* ---------- Contact / footnote band ---------- */
.legal-contact{
  padding: 64px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.legal-contact-box{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 40px 44px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: linear-gradient(135deg, var(--surface), var(--bg-alt));
}
.legal-contact-box h3{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  margin: 0 0 6px;
}
.legal-contact-box p{
  font-family: var(--font-body);
  color: var(--text-dim);
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 880px){
  .legal-layout{ grid-template-columns: 1fr; gap: 0; }
  .legal-toc{
    position: static;
    margin-bottom: 32px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  .toc-list{
    display: flex;
    overflow-x: auto;
    border-left: none;
    gap: 4px;
    padding-bottom: 6px;
  }
  .toc-list li{ flex-shrink: 0; }
  .toc-link{
    padding: 7px 14px;
    margin-left: 0;
    border-left: none;
    border-radius: 100px;
    border: 1px solid var(--border);
    white-space: nowrap;
  }
  .toc-link.active{ border-color: var(--accent-1); background: rgba(91,140,255,0.08); }
}
@media (max-width: 640px){
  .legal-hero{ padding: 140px 0 56px; }
  .legal-contact-box{ padding: 32px 26px; flex-direction: column; align-items: flex-start; }
}
