/* Privacy.css — uses variables from variables.css */

/* ── FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600&display=swap');

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 1.5vw; min-width: 10px; }
::-webkit-scrollbar-track { background: rgba(11, 32, 39, 0.5); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #00D9E8, #00B3C0);
  border-radius: 1vw;
  border: 0.2vw solid rgba(11, 32, 39, 0.5);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #00E8F7, #00C4D2);
  box-shadow: 0 0 1vw rgba(0, 217, 232, 0.5);
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-main);
  min-height: 100vh;
  color: var(--text-primary);
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  font-weight: 300;
  line-height: 1.75;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 55% 45% at 75% 15%, rgba(0, 217, 232, 0.06) 0%, transparent 65%),
    radial-gradient(ellipse 40% 55% at 15% 85%, rgba(46, 139, 192, 0.05) 0%, transparent 60%);
}

/* ── TOPBAR ── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: var(--bg-glass);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.logo-char {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.6rem;
  line-height: 1;
  background: var(--btn-primary-bg);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(0, 217, 232, 0.4));
}

.logo-text {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.back-link {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-glass-light);
  transition: all var(--transition-fast);
}
.back-link:hover {
  color: var(--text-accent);
  border-color: var(--border-normal);
  background: rgba(0, 217, 232, 0.08);
}

/* ── HERO ── */
.hero {
  position: relative;
  z-index: 1;
  padding: 106px 1.5rem 40px;
  max-width: 960px;
  margin: 0 auto;
}

.hero-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-accent);
  margin-bottom: 0.85rem;
}
.hero-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--text-primary);
  margin-bottom: 0.9rem;
  letter-spacing: -0.01em;
}

.hero-accent {
  background: var(--btn-primary-bg);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 14px rgba(0, 217, 232, 0.3));
}

.hero-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── LANGUAGE SELECTOR ── */
.lang-section {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 2.2rem;
}

.lang-label {
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.lang-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.policy-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-glass-light);
  color: var(--text-muted);
  font-size: 0.76rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  backdrop-filter: blur(6px);
  font-family: inherit;
}
.policy-lang-btn:hover {
  border-color: var(--border-normal);
  color: var(--text-primary);
  background: rgba(0, 217, 232, 0.07);
}
.policy-lang-btn.active {
  border-color: var(--accent-primary);
  background: rgba(0, 217, 232, 0.12);
  color: var(--text-accent);
  box-shadow: 0 0 10px rgba(0, 217, 232, 0.15);
}

/* ── DIVIDER ── */
.divider {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto 2.5rem;
  padding: 0 1.5rem;
  border: none;
  border-top: 1px solid var(--border-subtle);
}

/* ── CONTENT WRAP ── */
.content-wrap {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ── TOC ── */
.toc {
  position: sticky;
  top: 80px;
}

.toc-label {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.04rem;
}

.toc-list li a {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.26rem 0.5rem;
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: all var(--transition-fast);
  line-height: 1.4;
}
.toc-list li a:hover {
  color: var(--text-secondary);
  border-left-color: rgba(0, 217, 232, 0.35);
  background: rgba(0, 217, 232, 0.04);
}
.toc-list li a.active {
  color: var(--text-accent);
  border-left-color: var(--accent-primary);
  background: rgba(0, 217, 232, 0.07);
}

/* ── POLICY AREA ── */
.policy-area { min-width: 0; }

/* ── DOCX VIEWER CARD ── */
.docx-viewer {
  background: var(--bg-glass-light);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.docx-viewer:hover {
  border-color: var(--border-normal);
  box-shadow: var(--shadow-glow);
}

.docx-viewer-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 217, 232, 0.03);
}

.docx-file-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--btn-primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  box-shadow: var(--btn-primary-shadow);
}

.docx-file-info { flex: 1; min-width: 0; }

.docx-file-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.docx-file-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.08rem;
}

.docx-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  letter-spacing: 0.04em;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: var(--btn-primary-shadow);
  transition: all var(--transition-fast);
  white-space: nowrap;
  font-family: inherit;
}
.docx-download-btn:hover {
  background: var(--btn-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0, 217, 232, 0.38);
}

/* ── DOCX CONTENT AREA ── */
.docx-content-area {
  max-height: 72vh;
  overflow-y: auto;
}

/* Loading state */
.docx-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 2rem;
  color: var(--text-muted);
  gap: 0.8rem;
  font-size: 0.8rem;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Rendered DOCX */
.docx-rendered {
  padding: 1.8rem 2rem;
  background: rgba(236, 246, 252, 0.97);
  color: #152028;
  font-size: 0.88rem;
  line-height: 1.8;
}
.docx-rendered h1, .docx-rendered h2, .docx-rendered h3 {
  color: #0B2027;
  margin: 1.2rem 0 0.5rem;
  line-height: 1.3;
  font-weight: 700;
}
.docx-rendered h1 {
  font-size: 1.3rem;
  border-bottom: 1px solid #b5ccd8;
  padding-bottom: 0.45rem;
}
.docx-rendered h2 { font-size: 1.05rem; }
.docx-rendered h3 { font-size: 0.92rem; color: #1E5F74; }
.docx-rendered p  { margin-bottom: 0.7rem; }
.docx-rendered ul, .docx-rendered ol {
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}
.docx-rendered li { margin-bottom: 0.2rem; }
.docx-rendered a  { color: #00B3C0; }
.docx-rendered strong { font-weight: 600; }
.docx-rendered table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.82rem;
}
.docx-rendered td, .docx-rendered th {
  border: 1px solid #b5ccd8;
  padding: 0.38rem 0.65rem;
}
.docx-rendered th { background: #d5eaf4; font-weight: 600; }

/* Error state */
.docx-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 2rem;
  text-align: center;
  gap: 0.5rem;
  color: var(--text-muted);
}
.docx-error .err-icon { font-size: 2rem; }
.docx-error .err-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.docx-error .err-sub {
  font-size: 0.75rem;
  line-height: 1.6;
  max-width: 320px;
}
.docx-error code {
  background: rgba(0, 217, 232, 0.1);
  border: 1px solid var(--border-subtle);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.72rem;
  color: var(--text-accent);
}

/* ── FOOTER ── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-subtle);
  padding: 1.8rem 1.5rem;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy { font-size: 0.75rem; color: var(--text-muted); }
.footer-contact a {
  font-size: 0.75rem;
  color: var(--text-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 217, 232, 0.3);
  transition: all var(--transition-fast);
}
.footer-contact a:hover {
  border-color: var(--accent-primary);
}

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .content-wrap { grid-template-columns: 1fr; gap: 1.5rem; }
  .toc { display: none; }
  .hero-title { font-size: 2rem; }
  .docx-rendered { padding: 1.2rem; }
  .docx-viewer-header { flex-wrap: wrap; }
  .docx-content-area { max-height: 65vh; }
}