/* ============================================
   BEYG Apparel Services — Privacy Policy
   Premium Design System
   ============================================ */

/* --- CSS Variables --- */
:root {
  --navy: #0B1D3A;
  --navy-light: #132B50;
  --navy-mid: #1A3A6B;
  --cyan: #00AEEF;
  --cyan-light: #5CC8F5;
  --cyan-pale: #E8F7FE;
  --cyan-gradient: linear-gradient(135deg, #00AEEF 0%, #0078C8 100%);
  --navy-gradient: linear-gradient(135deg, #0B1D3A 0%, #1A3A6B 100%);
  --hero-gradient: linear-gradient(160deg, #0B1D3A 0%, #132B50 40%, #1A3A6B 100%);
  --card-bg: #FFFFFF;
  --body-bg: #F4F7FB;
  --text-primary: #1E293B;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-light: #F1F5F9;
  --shadow-sm: 0 1px 3px rgba(11,29,58,0.06);
  --shadow-md: 0 4px 16px rgba(11,29,58,0.08);
  --shadow-lg: 0 8px 32px rgba(11,29,58,0.10);
  --shadow-xl: 0 16px 48px rgba(11,29,58,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1280px;
  --content-width: 820px;
  --sidebar-width: 280px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--body-bg);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--body-bg); }
::-webkit-scrollbar-thumb { background: var(--cyan); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--navy-mid); }

/* --- Selection --- */
::selection {
  background: var(--cyan);
  color: #fff;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--hero-gradient);
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  box-shadow: 0 2px 12px rgba(0,174,239,0.25);
  flex-shrink: 0;
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.header-brand span {
  color: var(--cyan-light);
  font-weight: 400;
  font-size: 0.9rem;
  margin-left: 6px;
}

.header-subtitle {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  font-weight: 400;
  letter-spacing: 0.3px;
}

.header-badge {
  margin-left: auto;
  background: rgba(0,174,239,0.15);
  border: 1px solid rgba(0,174,239,0.3);
  color: var(--cyan-light);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 99px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ============================================
   HERO BANNER
   ============================================ */
.hero-banner {
  background: var(--hero-gradient);
  position: relative;
  overflow: hidden;
  padding: 56px 32px 48px;
  text-align: center;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0,174,239,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-banner::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0,174,239,0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0,174,239,0.12);
  border: 2px solid rgba(0,174,239,0.25);
  margin-bottom: 20px;
  font-size: 2rem;
  color: var(--cyan-light);
}

.hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero-description {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.65);
  max-width: 560px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

.hero-meta-item i {
  color: var(--cyan);
  font-size: 0.9rem;
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
}

.hero-wave svg {
  display: block;
  width: 100%;
  height: 40px;
}

/* ============================================
   MAIN LAYOUT — Split with Sidebar
   ============================================ */
.main-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 36px;
  padding: 40px 32px 80px;
  align-items: start;
}

/* --- Sidebar / TOC --- */
.toc-sidebar {
  position: sticky;
  top: 110px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  padding: 24px 0;
}

.toc-sidebar::-webkit-scrollbar { width: 4px; }
.toc-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

.toc-header {
  padding: 0 24px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toc-header i {
  color: var(--cyan);
  font-size: 1rem;
}

.toc-header span {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.toc-list {
  list-style: none;
  padding: 0;
}

.toc-list li {
  position: relative;
}

.toc-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 24px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  border-left: 3px solid transparent;
  line-height: 1.4;
}

.toc-list a:hover {
  color: var(--cyan);
  background: var(--cyan-pale);
  border-left-color: var(--cyan);
}

.toc-list a.active {
  color: var(--cyan);
  background: var(--cyan-pale);
  border-left-color: var(--cyan);
  font-weight: 600;
}

.toc-list a .toc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--body-bg);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition);
}

.toc-list a.active .toc-num,
.toc-list a:hover .toc-num {
  background: var(--cyan);
  color: #fff;
}

/* --- Mobile TOC Toggle --- */
.toc-mobile-toggle {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 900;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  font-size: 1.1rem;
  transition: var(--transition);
  align-items: center;
  justify-content: center;
}

.toc-mobile-toggle:hover {
  background: var(--navy-mid);
  transform: scale(1.05);
}

/* --- Mobile TOC Overlay --- */
.toc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11,29,58,0.5);
  z-index: 950;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.toc-overlay.active {
  opacity: 1;
}

/* ============================================
   CONTENT AREA
   ============================================ */
.content-area {
  min-width: 0;
}

/* --- Section Cards --- */
.policy-section {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 36px 40px;
  margin-bottom: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.policy-section:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(0,174,239,0.15);
}

.policy-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--cyan-gradient);
  border-radius: 0 4px 4px 0;
  opacity: 0;
  transition: var(--transition);
}

.policy-section:hover::before,
.policy-section.in-view::before {
  opacity: 1;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--cyan-pale);
  color: var(--cyan);
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.policy-section:hover .section-icon {
  background: var(--cyan);
  color: #fff;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.3px;
}

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

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

/* --- Sub-sections --- */
.sub-section {
  margin: 20px 0;
  padding: 20px 24px;
  background: var(--body-bg);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--cyan);
}

.sub-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-light);
  margin-bottom: 12px;
}

/* --- Lists --- */
.policy-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.policy-list li {
  position: relative;
  padding: 7px 0 7px 28px;
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.6;
}

.policy-list li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 15px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
}

/* --- Intro Card (before section 1) --- */
.intro-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  margin-bottom: 24px;
  color: #fff;
  box-shadow: var(--shadow-lg);
  border: none;
}

.intro-card p {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  line-height: 1.8;
}

.intro-card .highlight {
  color: var(--cyan-light);
  font-weight: 600;
}

/* --- Notice/Callout Boxes --- */
.notice-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px;
  background: rgba(0,174,239,0.06);
  border: 1px solid rgba(0,174,239,0.15);
  border-radius: var(--radius-md);
  margin: 16px 0;
}

.notice-box i {
  color: var(--cyan);
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.notice-box p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* --- Contact Card --- */
.contact-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--radius-md);
  margin-top: 16px;
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(0,174,239,0.15);
  color: var(--cyan-light);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-name {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}

.contact-email {
  color: var(--cyan-light);
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition);
}

.contact-email:hover {
  color: #fff;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 40px 32px;
  border-top: 3px solid var(--cyan);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  padding: 3px;
}

.footer-brand-name {
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--cyan-light);
  margin-bottom: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
}

.footer-contact {
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.footer-contact a {
  color: var(--cyan-light);
  text-decoration: none;
  transition: var(--transition);
}

.footer-contact a:hover {
  color: #fff;
}

.footer-divider {
  width: 60px;
  height: 2px;
  background: rgba(0,174,239,0.3);
  margin: 18px auto;
  border-radius: 99px;
}

.footer-updated {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

.footer-copyright {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  margin-top: 8px;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 800;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--cyan-gradient);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
}

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

.back-to-top:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 24px rgba(0,174,239,0.35);
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--cyan-gradient);
  z-index: 1100;
  transition: width 0.1s linear;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.policy-section {
  animation: fadeInUp 0.5s ease both;
}

.policy-section:nth-child(1)  { animation-delay: 0.05s; }
.policy-section:nth-child(2)  { animation-delay: 0.10s; }
.policy-section:nth-child(3)  { animation-delay: 0.15s; }
.policy-section:nth-child(4)  { animation-delay: 0.20s; }
.policy-section:nth-child(5)  { animation-delay: 0.25s; }
.policy-section:nth-child(6)  { animation-delay: 0.30s; }
.policy-section:nth-child(7)  { animation-delay: 0.35s; }
.policy-section:nth-child(8)  { animation-delay: 0.40s; }
.policy-section:nth-child(9)  { animation-delay: 0.45s; }
.policy-section:nth-child(10) { animation-delay: 0.50s; }
.policy-section:nth-child(11) { animation-delay: 0.55s; }
.policy-section:nth-child(12) { animation-delay: 0.60s; }
.policy-section:nth-child(13) { animation-delay: 0.65s; }
.policy-section:nth-child(14) { animation-delay: 0.70s; }
.policy-section:nth-child(15) { animation-delay: 0.75s; }
.policy-section:nth-child(16) { animation-delay: 0.80s; }
.policy-section:nth-child(17) { animation-delay: 0.85s; }

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 240px 1fr;
    gap: 24px;
    padding: 32px 24px 64px;
  }

  .policy-section {
    padding: 28px 30px;
  }

  .hero-title {
    font-size: 2rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 80px;
  }

  .header-inner {
    padding: 14px 20px;
  }

  .header-logo {
    width: 40px;
    height: 40px;
  }

  .header-brand {
    font-size: 1.05rem;
  }

  .header-brand span {
    display: none;
  }

  .header-badge {
    display: none;
  }

  .hero-banner {
    padding: 40px 20px 36px;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-icon {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
  }

  .hero-description {
    font-size: 0.93rem;
  }

  /* Switch to single column */
  .main-layout {
    grid-template-columns: 1fr;
    padding: 24px 16px 64px;
    gap: 0;
  }

  .toc-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    z-index: 960;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
    padding-top: 24px;
  }

  .toc-sidebar.mobile-open {
    left: 0;
  }

  .toc-mobile-toggle {
    display: flex;
  }

  .toc-overlay.active {
    display: block;
    opacity: 1;
  }

  .policy-section {
    padding: 24px 22px;
    margin-bottom: 16px;
    border-radius: var(--radius-md);
  }

  .section-header {
    gap: 12px;
    margin-bottom: 16px;
  }

  .section-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .sub-section {
    padding: 16px 18px;
  }

  .intro-card {
    padding: 24px 22px;
  }

  .contact-card {
    flex-direction: column;
    text-align: center;
    padding: 22px 20px;
  }

  .site-footer {
    padding: 32px 20px;
  }

  .back-to-top {
    bottom: 20px;
    right: 16px;
    width: 44px;
    height: 44px;
  }

  .toc-mobile-toggle {
    bottom: 72px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
}

/* Small phones */
@media (max-width: 400px) {
  .hero-title {
    font-size: 1.35rem;
  }

  .policy-section {
    padding: 20px 16px;
  }

  .section-title {
    font-size: 1.02rem;
  }
}

/* Print */
@media print {
  .site-header, .toc-sidebar, .back-to-top, .toc-mobile-toggle, .reading-progress, .hero-wave {
    display: none !important;
  }

  .main-layout {
    display: block;
  }

  .policy-section {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
}
