/* =========================================================
   H.I Studio - Legal Pages Stylesheet
   Shared by accessibility.html and privacy.html
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #18181B;
  --bg-soft: #1f1f23;
  --bg-elevated: #232327;
  --line: #2a2a2f;
  --line-strong: #3a3a40;
  --orange: #B45309;
  --orange-bright: #D97706;
  --orange-soft: rgba(180, 83, 9, 0.15);
  --on-orange: #140A03;
  --text: #F4F4F5;
  --text-muted: #A1A1AA;
  --text-dim: #71717A;
  --radius: 14px;
  --radius-lg: 22px;
  --transition: 0.35s cubic-bezier(.2,.7,.3,1);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Rubik', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(180,83,9,0.08), transparent 60%),
    radial-gradient(50% 40% at 0% 30%, rgba(180,83,9,0.04), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--orange-bright); text-decoration: none; transition: color 0.25s; }
a:hover { color: var(--orange); text-decoration: underline; }

.container {
  width: min(100% - 40px, 900px);
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

/* ===== HEADER ===== */
.legal-header {
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  background: rgba(24, 24, 27, 0.85);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.legal-header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon { width: 42px; height: 42px; color: #fff; transition: var(--transition); }
.logo:hover .logo-icon { color: var(--orange); }
.logo-text {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.04em;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-text .dot { color: var(--orange); }
.logo-text .sub {
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--orange);
  letter-spacing: 0.25em;
  margin-top: 3px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
}
.back-link:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-soft);
  text-decoration: none;
}
.back-link .arrow { transition: transform 0.3s; }
html[dir="rtl"] .back-link .arrow { transform: rotate(180deg); }
.back-link:hover .arrow { transform: translateX(-4px); }
html[dir="rtl"] .back-link:hover .arrow { transform: rotate(180deg) translateX(-4px); }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}
.lang-toggle:hover { border-color: var(--orange); color: var(--orange); }
.lang-toggle svg { width: 14px; height: 14px; }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* ===== MAIN ===== */
main.legal-main {
  padding: clamp(40px, 6vw, 80px) 0;
  flex: 1;
}
.legal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
}
.legal-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--orange);
}
.legal-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.legal-updated {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 40px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.legal-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 38px;
  margin-bottom: 14px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.legal-content h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
  color: var(--text);
}
.legal-content p {
  color: var(--text-muted);
  margin-bottom: 14px;
  font-size: 1rem;
}
.legal-content ul, .legal-content ol {
  color: var(--text-muted);
  margin: 0 0 18px;
  padding-inline-start: 24px;
}
.legal-content li { margin-bottom: 8px; }
.legal-content strong { color: var(--text); font-weight: 600; }

.legal-content .info-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 22px 0;
}
.legal-content .info-card.highlight {
  border-color: var(--orange);
  background: linear-gradient(135deg, rgba(180,83,9,0.10), var(--bg-soft));
}
.legal-content .info-card h3 { margin-top: 0; }
.legal-content .info-card p:last-child { margin-bottom: 0; }
.legal-content .info-card a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* ===== FOOTER ===== */
.legal-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  margin-top: 60px;
  text-align: center;
  position: relative;
  z-index: 2;
}
.legal-footer p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0;
}
.legal-footer a { color: var(--text-muted); }
.legal-footer .sep { color: var(--text-dim); margin: 0 8px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .legal-header .nav { flex-wrap: wrap; gap: 10px; }
  .logo-text .sub { display: none; }
  .header-actions { gap: 8px; }
  .back-link { padding: 7px 12px; font-size: 0.82rem; }
  .lang-toggle { padding: 7px 12px; font-size: 0.8rem; }
  .legal-content h2 { font-size: 1.2rem; }
}
