/* ==========================================================================
         MANDATORY CSS RESET & BASE STYLING
         ========================================================================== */
* {
  box-sizing: border-box !important;
  margin: 0;
  padding: 0;
}
html,
body {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
  background: #0b0f19;
  color: #a1a1aa;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img,
svg,
canvas,
iframe,
textarea,
input,
select,
button {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

:root {
  --bg-dark: #0b0f19;
  --bg-surface: #111827;
  --bg-card: #151d2e;
  --bg-card-hover: #1a2438;
  --primary-rose: #f43f5e;
  --secondary-amber: #fb923c;
  --text-heading: #ffffff;
  --text-body: #a1a1aa;
  --text-muted: #71717a;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(244, 63, 94, 0.35);
  --sig-gradient: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
  --sig-glow: 0 0 25px rgba(244, 63, 94, 0.35);
}

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--sig-gradient);
  z-index: 1000;
  transition: width 0.1s ease;
}

/* Container Layout */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Signature Gradient Utilities */
.gradient-text {
  background: var(--sig-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* ==========================================================================
         SECTION 1: NAVBAR (HEADER)
         ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 25, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

/* Text Logo */
.logo {
  text-decoration: none;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-heading);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  user-select: none;
}

.logo .logo-box {
  background: var(--sig-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  text-shadow: 0 0 24px rgba(244, 63, 94, 0.5);
}

.logo-dot {
  width: 7px;
  height: 7px;
  background: var(--primary-rose);
  border-radius: 50%;
  margin-left: 2px;
  box-shadow: 0 0 8px var(--primary-rose);
}

/* Desktop Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: #d4d4d8;
  font-size: 0.93rem;
  font-weight: 500;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
  position: relative;
  padding: 6px 0;
}

.nav-links a:hover {
  color: var(--text-heading);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--sig-gradient);
  transition: width 0.25s ease;
  border-radius: 2px;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hamburger Menu Button (hidden on desktop) */
.hamburger-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-heading);
  cursor: pointer;
  padding: 8px 10px;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.hamburger-btn svg {
  width: 24px;
  height: 24px;
  display: block;
  stroke: currentColor;
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 76px;
  left: 0;
  width: 100%;
  height: calc(100vh - 76px);
  background: rgba(11, 15, 25, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 28px 24px;
  border-top: 1px solid var(--border-subtle);
  overflow-y: auto;
  z-index: 99;
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.mobile-drawer.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-nav-list a {
  text-decoration: none;
  color: #e4e4e7;
  font-size: 1.15rem;
  font-weight: 500;
  display: block;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.mobile-nav-list a:hover {
  background: rgba(244, 63, 94, 0.1);
  border-color: var(--primary-rose);
  color: var(--text-heading);
}

/* ==========================================================================
         SECTION 2: LEGAL HEADER
         ========================================================================== */
.legal-header {
  position: relative;
  padding: 72px 0 48px;
  overflow: hidden;
}

.legal-header-bg {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 380px;
  background: radial-gradient(
    circle,
    rgba(244, 63, 94, 0.16) 0%,
    rgba(251, 146, 60, 0.07) 45%,
    rgba(11, 15, 25, 0) 70%
  );
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}

.legal-header-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.badge-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  padding: 6px 16px;
  border-radius: 9999px;
  margin-bottom: 22px;
}

.badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-rose);
  box-shadow: 0 0 10px var(--primary-rose);
}

.badge-text {
  color: #fecdd3;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.legal-title {
  font-size: 3rem;
  line-height: 1.15;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.035em;
  margin-bottom: 18px;
}

.legal-subtitle {
  font-size: 1.15rem;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 26px;
}

.header-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.action-pill-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.15s;
}

.action-pill-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Quick search and filter bar */
.terms-search-wrapper {
  margin-top: 28px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.terms-search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.terms-search-input:focus {
  border-color: var(--primary-rose);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.2);
}

.search-icon-svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
  pointer-events: none;
}

/* ==========================================================================
         SECTION 3: IN-DEPTH TERMS & CONDITIONS DOCUMENTATION
         ========================================================================== */
.document-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 48px;
  padding: 36px 0 72px;
  align-items: start;
}

/* Sticky Sidebar Table of Contents */
.doc-sidebar {
  position: sticky;
  top: 100px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 22px;
}

.toc-title {
  color: var(--text-heading);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc-link {
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  color: var(--text-body);
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
  line-height: 1.4;
}

.toc-link:hover {
  color: var(--text-heading);
  background: rgba(255, 255, 255, 0.04);
}

.toc-link.active {
  color: #ffffff;
  background: rgba(244, 63, 94, 0.12);
  border-left: 2px solid var(--primary-rose);
  font-weight: 600;
}

/* Main Article Body */
.legal-article {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 44px;
}

.article-notice-box {
  background: linear-gradient(
    135deg,
    rgba(244, 63, 94, 0.08) 0%,
    rgba(251, 146, 60, 0.05) 100%
  );
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-left: 4px solid var(--primary-rose);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 40px;
  color: #e4e4e7;
  font-size: 0.95rem;
}

.article-notice-box strong {
  color: #ffffff;
}

.terms-section {
  margin-bottom: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-subtle);
  scroll-margin-top: 110px;
}

.terms-section:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.section-badge-num {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-rose);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.terms-section h2 {
  color: var(--text-heading);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  line-height: 1.3;
}

.terms-section h3 {
  color: #f4f4f5;
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 22px;
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}

.terms-section p {
  margin-bottom: 14px;
  font-size: 0.96rem;
  line-height: 1.75;
  color: #a1a1aa;
}

.terms-section p strong {
  color: #f4f4f5;
  font-weight: 600;
}

.terms-section ul {
  list-style: none;
  margin: 16px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.terms-section ul li {
  position: relative;
  padding-left: 26px;
  font-size: 0.94rem;
  line-height: 1.65;
  color: #d4d4d8;
}

.terms-section ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 8px;
  height: 8px;
  background: var(--sig-gradient);
  border-radius: 50%;
}

.clause-highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 16px 0;
}

.clause-highlight-card p {
  margin-bottom: 0;
  font-size: 0.92rem;
}

/* ==========================================================================
         SECTION 4: KEY TERMS SUMMARY GRID
         ========================================================================== */
.summary-section {
  padding: 64px 0 84px;
  border-top: 1px solid var(--border-subtle);
  background: radial-gradient(
    circle at 50% 10%,
    rgba(244, 63, 94, 0.05) 0%,
    rgba(11, 15, 25, 0) 60%
  );
}

.section-heading-block {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.section-eyebrow {
  font-size: 0.82rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--secondary-amber);
  margin-bottom: 8px;
}

.section-title-large {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.section-desc {
  color: var(--text-body);
  font-size: 1rem;
  line-height: 1.6;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.summary-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--sig-gradient);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.summary-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.4),
    var(--sig-glow);
}

.summary-card:hover::before {
  opacity: 1;
}

.card-icon-bubble {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary-rose);
}

.card-icon-bubble svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
}

.summary-card h3 {
  color: var(--text-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.015em;
}

.summary-card p {
  color: var(--text-body);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
  flex-grow: 1;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fca5a5;
  background: rgba(244, 63, 94, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  width: fit-content;
}

/* ==========================================================================
         SECTION 5: MANDATORY FOOTER
         ========================================================================== */
.site-footer {
  background: #080b13;
  border-top: 1px solid var(--border-subtle);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr;
  gap: 48px;
  margin-bottom: 48px;
}

/* Column 1: Site Bio */
.footer-bio-col {
  max-width: 440px;
}

.footer-logo {
  text-decoration: none;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-heading);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 16px;
}

.footer-bio-text {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #a1a1aa;
  margin-bottom: 18px;
}

.footer-badge-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #71717a;
}

.status-indicator {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

/* Columns 2 & 3: Nav Lists */
.footer-nav-col h4 {
  color: var(--text-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-list a {
  text-decoration: none;
  color: #a1a1aa;
  font-size: 0.92rem;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
  display: inline-block;
}

.footer-links-list a:hover {
  color: var(--text-heading);
  transform: translateX(3px);
}

/* Highlighted Active Link for Terms & Conditions */
.footer-links-list a.active-link {
  color: var(--primary-rose);
  font-weight: 600;
  position: relative;
}

.footer-links-list a.active-link::before {
  content: "•";
  color: var(--secondary-amber);
  margin-right: 6px;
  font-size: 1.1rem;
}

/* Bottom Copyright Bar */
.footer-bottom-bar {
  border-top: 1px solid var(--border-subtle);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.copyright-text {
  color: #71717a;
  font-size: 0.88rem;
}

.footer-compliance-badges {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  color: #71717a;
}

/* Floating Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-heading);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s,
    visibility 0.25s,
    transform 0.2s,
    border-color 0.2s;
  z-index: 90;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  transform: translateY(-3px);
  border-color: var(--primary-rose);
  color: var(--primary-rose);
}

/* Notification Toast */
#toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: #1e293b;
  color: #ffffff;
  border: 1px solid var(--primary-rose);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
  z-index: 999;
}

#toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
         RESPONSIVE MEDIA QUERIES (Mobile < 992px)
         Strict anti-overflow & drawer layout
         ========================================================================== */
@media (max-width: 991px) {
  .nav-links {
    display: none !important;
  }

  .hamburger-btn {
    display: flex !important;
  }

  .mobile-drawer {
    display: block;
  }

  .legal-title {
    font-size: 2.3rem;
  }

  .document-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .doc-sidebar {
    position: relative;
    top: 0;
  }

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .legal-article {
    padding: 28px 20px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .legal-title {
    font-size: 1.85rem;
  }

  .legal-subtitle {
    font-size: 1rem;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .legal-header {
    padding: 48px 0 32px;
  }

  .legal-article {
    padding: 24px 16px;
  }

  .terms-section h2 {
    font-size: 1.35rem;
  }

  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* Print Styles */
@media print {
  .site-header,
  .mobile-drawer,
  .doc-sidebar,
  .terms-search-wrapper,
  .action-pill-btn,
  #back-to-top,
  #scroll-progress,
  .summary-section,
  .site-footer {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #111827 !important;
  }

  .legal-article {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
  }

  .terms-section h2,
  .terms-section h3 {
    color: #000000 !important;
  }

  .terms-section p,
  .terms-section li {
    color: #374151 !important;
  }
}
