/* ─── LEGAL PAGES — Alp'Code Solutions ─── */

:root {
  --bg:        #FFFFFF;
  --bg-2:      #F8FAFC;
  --bg-3:      #F1F5F9;
  --border:    #E2E8F0;
  --border-2:  #CBD5E1;
  --text:      #0F172A;
  --text-2:    #475569;
  --text-3:    #94A3B8;
  --brand:     #2E6B56;
  --brand-2:   #3b6357;
  --arko-bg:   #F0F7F4;
  --arko-border: #B2D4C8;
  --radius:    10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --font:      'Inter', system-ui, sans-serif;
  --font-head: 'Space Grotesk', 'Inter', sans-serif;
  --nav-h:     68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ─── NAVBAR ─── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-icon { width: 34px; height: 34px; }

.logo-texts { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name { font-family: var(--font-head); font-size: 1.08rem; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.logo-apos { color: var(--brand); }
.logo-sub  { font-size: 0.65rem; font-weight: 500; color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; }

.navbar__back {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 7px 16px;
  border-radius: 8px;
  transition: all 0.15s;
  text-decoration: none;
}
.navbar__back:hover { color: var(--brand); border-color: var(--arko-border); background: var(--arko-bg); text-decoration: none; }
.navbar__back svg { width: 14px; height: 14px; }

/* ─── LEGAL LAYOUT ─── */
.legal-page {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  max-width: 1160px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 48px) 24px 80px;
  align-items: start;
}

/* ── Sidebar TOC ── */
.legal-toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.legal-toc__inner {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.legal-toc h2 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.legal-toc nav { display: flex; flex-direction: column; gap: 2px; }

.toc-link {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  padding: 6px 10px;
  border-radius: 7px;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1.35;
}
.toc-link:hover { color: var(--brand); background: var(--arko-bg); text-decoration: none; }
.toc-link.active { color: var(--brand); background: var(--arko-bg); font-weight: 600; }

.toc-link--sub { padding-left: 20px; font-size: 0.78rem; }

.legal-toc__meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-3);
  line-height: 1.5;
}

/* ── Main content ── */
.legal-content {}

.legal-hero {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  margin-bottom: 40px;
}

.legal-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--arko-bg);
  border: 1px solid var(--arko-border);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.legal-hero__tag svg { width: 13px; height: 13px; flex-shrink: 0; }

.legal-hero h1 {
  font-family: var(--font-head);
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.2;
}

.legal-hero p {
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 640px;
}

.legal-hero__dates {
  display: flex;
  gap: 24px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.date-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.date-item strong { font-size: 0.8rem; font-weight: 600; color: var(--text); }
.date-item span   { font-size: 0.78rem; color: var(--text-3); }

/* ── Sections ── */
.legal-section {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.legal-section:last-child { border-bottom: none; margin-bottom: 0; }

.legal-section h2 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--arko-bg);
  display: flex;
  align-items: center;
  gap: 10px;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.legal-section h2 .section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--brand);
  color: #fff;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.legal-section h3 {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 8px;
}

.legal-section p {
  font-size: 0.93rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 12px;
}

.legal-section ul, .legal-section ol {
  font-size: 0.93rem;
  color: var(--text-2);
  line-height: 1.75;
  padding-left: 20px;
  margin-bottom: 12px;
}

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

.legal-section strong { color: var(--text); font-weight: 600; }

/* Info boxes */
.info-box {
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 0.88rem;
  line-height: 1.6;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.info-box svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }

.info-box--blue   { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }
.info-box--blue svg { color: #2563EB; }
.info-box--green  { background: var(--arko-bg); border: 1px solid var(--arko-border); color: var(--brand); }
.info-box--green svg { color: var(--brand); }
.info-box--orange { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }
.info-box--orange svg { color: #D97706; }
.info-box--grey   { background: var(--bg-2); border: 1px solid var(--border); color: var(--text-2); }
.info-box--grey svg { color: var(--text-3); }

/* Definition table */
.def-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 16px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.def-table th {
  background: var(--bg-2);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.def-table td {
  padding: 10px 14px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}
.def-table td:first-child { font-weight: 600; color: var(--text); white-space: nowrap; width: 28%; }
.def-table tr:last-child td { border-bottom: none; }
.def-table tr:hover td { background: var(--bg-2); }

/* Placeholder */
.placeholder {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  color: #92400E;
  padding: 1px 6px;
  border-radius: 4px;
  font-style: italic;
  font-size: 0.88em;
  font-weight: 500;
}

/* Contact block */
.contact-block {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 16px 0;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-2);
}
.contact-block strong { display: block; color: var(--text); font-size: 0.95rem; margin-bottom: 4px; }

/* Rights grid */
.rights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.right-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color 0.15s;
}
.right-card:hover { border-color: var(--arko-border); }
.right-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  margin-bottom: 6px;
}
.right-card__title svg { width: 15px; height: 15px; color: var(--brand); flex-shrink: 0; }
.right-card p { font-size: 0.8rem; color: var(--text-2); line-height: 1.5; margin: 0; }

/* ─── FOOTER ─── */
.legal-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 0;
}
.legal-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-3);
  flex-wrap: wrap;
  gap: 12px;
}
.legal-footer__links { display: flex; gap: 20px; flex-wrap: wrap; }
.legal-footer__links a { color: var(--text-3); font-size: 0.82rem; transition: color 0.15s; }
.legal-footer__links a:hover { color: var(--brand); text-decoration: none; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .legal-page { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
  .legal-toc__inner { padding: 14px; }
  .legal-toc nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .toc-link { padding: 4px 10px; font-size: 0.78rem; }
  .toc-link--sub { display: none; }
}

@media (max-width: 600px) {
  .legal-hero { padding: 20px; }
  .legal-hero h1 { font-size: 1.5rem; }
  .rights-grid { grid-template-columns: 1fr; }
  .def-table td:first-child { width: auto; white-space: normal; }
}
