/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  background: #fdfcff;
  color: #1e1b4b;
  overflow-x: hidden;
  position: relative;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===========================
   TOKENS
=========================== */
:root {
  --purple: #7c3aed;
  --purple-light: #a855f7;
  --purple-dark: #4c1d95;
  --purple-50: #f5f3ff;
  --purple-100: #ede9fe;
  --purple-200: #ddd6fe;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-900: #111827;
  --nav-h: 68px;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(124,58,237,0.10);
  --shadow-lg: 0 12px 40px rgba(124,58,237,0.18);
}

/* ===========================
   BUTTONS
=========================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; border-radius: 10px;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: none; transition: all .22s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--purple); color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,0.35);
}
.btn-primary:hover { background: var(--purple-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124,58,237,0.45); }
.btn-outline {
  background: transparent; color: var(--purple);
  border: 1.5px solid var(--purple);
}
.btn-outline:hover { background: var(--purple-50); }
.btn-ghost {
  background: rgba(255,255,255,0.9); color: var(--gray-600);
  border: 1.5px solid rgba(124,58,237,0.2);
}
.btn-ghost:hover { background: #fff; border-color: var(--purple); color: var(--purple); }
.btn-lg { padding: 14px 30px; font-size: 1rem; border-radius: 12px; }
.btn-white { background: #fff; color: var(--purple); font-weight: 700; }
.btn-white:hover { background: var(--purple-50); }
.btn-primary-outline {
  background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
}
.btn-primary-outline:hover { background: rgba(255,255,255,0.15); border-color: #fff; }

/* ===========================
   CONTAINER
=========================== */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ===========================
   NAVBAR
=========================== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(124,58,237,0.08);
  height: var(--nav-h);
  transition: box-shadow .3s;
}
.navbar.scrolled { box-shadow: 0 2px 20px rgba(124,58,237,0.12); }
.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; gap: 32px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--gray-900); }
.logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: #fff; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--purple-100); box-shadow: 0 2px 8px rgba(124,58,237,0.15);
}
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { font-size: 0.92rem; font-weight: 500; color: var(--gray-600); transition: color .2s; }
.nav-links a:hover { color: var(--purple); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--gray-900); border-radius: 2px; transition: all .3s; }

/* ===========================
   PAGE BACKGROUND
=========================== */
.bg-decor {
  position: fixed;
  width: 40vw;
  height: 40vw;
  border-radius: 50%;
  background: var(--purple-50);
  z-index: -1;
  filter: blur(80px);
}
.bg-left { top: -10vw; left: -10vw; }
.bg-right { bottom: -10vw; right: -10vw; background: #f3ebff; }

.bg-dots {
  position: fixed;
  width: 160px;
  height: 160px;
  background-image: radial-gradient(var(--purple-200) 2px, transparent 2px);
  background-size: 16px 16px;
  z-index: -1;
  opacity: 0.5;
}
.dots-left { top: 20%; left: 2%; }
.dots-right { top: 15%; right: 2%; }

/* ===========================
   TERMS CONTAINER
=========================== */
.terms-container {
  width: 90%;
  max-width: 860px;
  margin: calc(var(--nav-h) + 40px) auto 60px;
  padding: 40px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(124, 58, 237, 0.06), 0 1px 3px rgba(0,0,0,0.03);
  color: var(--gray-900);
  position: relative;
  z-index: 10;
}

.terms-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.terms-icon-wrapper {
  width: 60px;
  height: 60px;
  background: var(--purple-50);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--purple-dark);
}
.terms-main-icon {
  width: 30px;
  height: 30px;
}

.terms-title-area h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: #0f172a;
  line-height: 1.2;
}
.effective-date {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--gray-600);
}
.effective-date .highlight {
  color: var(--purple);
  font-weight: 600;
}
.effective-date svg {
  color: var(--purple);
}

.intro-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--gray-600);
  margin-bottom: 32px;
}

.divider {
  height: 1px;
  background: var(--gray-100);
  margin: 32px 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  margin-bottom: 16px;
}

.section-number {
  width: 34px;
  height: 34px;
  background: var(--purple-50);
  color: var(--purple-dark);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}

.section-title h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  padding: 0;
  border: none;
}

.terms-container p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--gray-600);
  margin-bottom: 18px;
}

.terms-container h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--gray-900);
}
.terms-container ul {
  list-style-type: disc;
  margin-left: 20px;
  margin-bottom: 18px;
}
.terms-container ul li {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--gray-600);
  margin-bottom: 6px;
}

/* ===========================
   ROLE FLOW (Section 13)
=========================== */
.role-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
  padding: 14px 20px;
  background: var(--purple-50);
  border-radius: 12px;
  border-left: 3px solid var(--purple);
}
.role-step {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--purple-dark);
  background: #fff;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--purple-200);
  white-space: nowrap;
}
.role-arrow {
  font-size: 1rem;
  color: var(--purple);
  font-weight: 600;
}

/* ===========================
   IMPORTANT BOX
=========================== */
.important-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--purple-50);
  padding: 18px;
  border-radius: 14px;
  margin-top: 24px;
  margin-bottom: 28px;
}
.important-icon {
  width: 38px;
  height: 38px;
  background: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-dark);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(124,58,237,0.08);
}
.important-icon svg {
  width: 20px;
  height: 20px;
}
.important-content h4 {
  color: var(--purple);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.important-content p {
  margin: 0;
  color: #475569;
  font-size: 0.83rem;
  line-height: 1.6;
}

/* ===========================
   INFO CTA
=========================== */
.info-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 100%);
  padding: 28px 32px;
  border-radius: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.info-cta-text h3 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.info-cta-text p {
  color: rgba(255,255,255,0.75);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
}
.info-cta-btn {
  background: #fff !important;
  color: var(--purple) !important;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18) !important;
}
.info-cta-btn:hover {
  background: var(--purple-50) !important;
  transform: translateY(-2px);
}

/* ===========================
   FOOTER
=========================== */
.footer {
  background: var(--purple-50);
  padding: 32px 24px 32px;
}
.footer-card {
  max-width: 1100px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--purple-100);
  box-shadow: 0 4px 24px rgba(124,58,237,0.07);
  overflow: hidden;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap: 0;
  align-items: stretch;
}

/* Brand col */
.footer-brand {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid var(--purple-100);
  background: linear-gradient(160deg, #fdfcff 60%, #f5f3ff 100%);
  position: relative;
  overflow: hidden;
}
.footer-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--purple-50);
  border: 1px solid var(--purple-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.footer-logo-text {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
}
.footer-tagline {
  font-size: 0.85rem;
  color: var(--gray-600);
  line-height: 1.6;
}
.footer-illustration {
  margin-top: auto;
  width: 100%;
  opacity: 0.85;
}
.footer-illustration svg {
  width: 100%;
  height: auto;
}

/* Legal links col */
.footer-legal {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--purple-100);
}
.footer-legal-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--purple-50);
  color: #1e1b4b;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all .2s;
  text-decoration: none;
}
.footer-legal-link:last-child { border-bottom: none; }
.footer-legal-link:hover { color: var(--purple); padding-left: 6px; }
.footer-legal-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--purple-50);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  flex-shrink: 0;
  transition: background .2s;
}
.footer-legal-link:hover .footer-legal-icon {
  background: var(--purple-100);
}

/* Social col */
.footer-social-col {
  padding: 32px 32px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.footer-social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: transform .2s;
}
.footer-social-item:hover { transform: translateY(-3px); }
.footer-social-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--purple-50);
  border: 1px solid var(--purple-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  transition: all .2s;
}
.footer-social-item:hover .footer-social-icon {
  background: var(--purple-100);
}
.footer-social-label {
  font-size: 0.75rem;
  color: var(--gray-600);
  font-weight: 500;
}

/* Bottom bar */
.footer-bottom {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  border-top: 1px solid var(--purple-100);
}
.footer-bottom-line {
  flex: 1;
  height: 1px;
  background: var(--purple-100);
}
.footer-bottom-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--gray-600);
  white-space: nowrap;
}

/* ===========================
   RESPONSIVE
=========================== */

/* --- Tablet (≤1024px) --- */
@media (max-width: 1024px) {
  .terms-container {
    padding: 32px;
    margin: calc(var(--nav-h) + 36px) auto 56px;
  }
}

/* --- Mobile Landscape / Large Phone (≤768px) --- */
@media (max-width: 768px) {
  /* Navbar */
  .nav-inner { padding: 0 16px; gap: 12px; }
  .nav-logo { font-size: 1.05rem; }
  .logo-icon { width: 32px; height: 32px; }
  .nav-actions .btn {
    padding: 8px 14px;
    font-size: 0.82rem;
  }

  /* Container */
  .terms-container {
    width: 93%;
    margin: calc(var(--nav-h) + 24px) auto 48px;
    padding: 22px 20px;
    border-radius: 16px;
  }

  /* Header */
  .terms-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
  }
  .terms-icon-wrapper { width: 52px; height: 52px; border-radius: 12px; }
  .terms-main-icon { width: 26px; height: 26px; }
  .terms-title-area h1 { font-size: 1.25rem; }
  .effective-date { font-size: 0.8rem; }

  /* Intro & text */
  .intro-text { font-size: 0.88rem; margin-bottom: 24px; }
  .divider { margin: 24px 0; }
  .terms-container p { font-size: 0.85rem; margin-bottom: 14px; }
  .terms-container h2 { font-size: 0.95rem; margin-top: 22px; margin-bottom: 8px; }
  .terms-container ul li { font-size: 0.85rem; }

  /* Section title badge */
  .section-title { gap: 10px; margin-top: 24px; margin-bottom: 12px; }
  .section-number { width: 30px; height: 30px; font-size: 0.88rem; }
  .section-title h2 { font-size: 1rem; }

  /* Role flow */
  .role-flow {
    gap: 6px;
    padding: 12px 14px;
    flex-wrap: wrap;
  }
  .role-step { font-size: 0.78rem; padding: 5px 10px; }
  .role-arrow { font-size: 0.9rem; }

  /* Important box */
  .important-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 10px;
  }
  .important-content h4 { font-size: 0.88rem; }
  .important-content p { font-size: 0.8rem; }

  /* Info CTA */
  .info-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 18px;
    gap: 16px;
    border-radius: 14px;
    margin-top: 28px;
  }
  .info-cta-text h3 { font-size: 1rem; }
  .info-cta-text p { font-size: 0.82rem; }
  .info-cta-btn { width: 100%; justify-content: center; }

  /* Contact email button */
  #contactEmailBtn { font-size: 0.85rem; padding: 9px 16px; }

  /* Footer */
  .footer { padding: 20px 14px 24px; }
  .footer-card { border-radius: 16px; }
  .footer-inner {
    display: flex;
    flex-direction: column;
  }
  .footer-brand {
    border-right: none;
    border-bottom: 1px solid var(--purple-100);
    padding: 24px 20px;
  }
  .footer-illustration { display: none; }
  .footer-legal {
    border-right: none;
    border-bottom: 1px solid var(--purple-100);
    padding: 20px;
  }
  .footer-legal-link { padding: 10px 4px; font-size: 0.85rem; }
  .footer-social-col {
    padding: 20px;
    justify-content: center;
    gap: 16px;
  }
  .footer-social-icon { width: 46px; height: 46px; }
  .footer-bottom { padding: 14px 20px; }
  .footer-bottom-content { font-size: 0.74rem; }
}

/* --- Small Phone (≤480px) --- */
@media (max-width: 480px) {
  :root { --nav-h: 60px; }

  /* Navbar tighter */
  .nav-inner { padding: 0 14px; }
  .nav-logo { font-size: 1rem; gap: 8px; }
  .logo-icon { width: 30px; height: 30px; }
  .nav-actions .btn {
    padding: 7px 12px;
    font-size: 0.78rem;
    gap: 5px;
  }

  /* Container edge-to-edge feel */
  .terms-container {
    width: 95%;
    margin: calc(var(--nav-h) + 16px) auto 36px;
    padding: 18px 15px;
    border-radius: 14px;
  }

  /* Typography scale-down */
  .terms-title-area h1 { font-size: 1.08rem; line-height: 1.3; }
  .intro-text { font-size: 0.84rem; }
  .terms-container p { font-size: 0.82rem; line-height: 1.65; }
  .terms-container h2 { font-size: 0.9rem; }
  .terms-container ul li { font-size: 0.82rem; }

  /* Role flow — vertical on very small screens */
  .role-flow {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px 12px;
  }
  .role-arrow { transform: none; font-size: 0.8rem; color: var(--purple-light); }
  .role-step { font-size: 0.78rem; }

  /* Section badge smaller */
  .section-number { width: 28px; height: 28px; font-size: 0.82rem; }
  .section-title h2 { font-size: 0.92rem; }

  /* Info CTA full-width button */
  .info-cta { padding: 18px 14px; }
  .info-cta-text h3 { font-size: 0.95rem; }
  .info-cta-btn { padding: 12px 16px; font-size: 0.88rem; }

  /* Footer minimal */
  .footer { padding: 16px 10px 20px; }
  .footer-brand { padding: 20px 16px; }
  .footer-logo-text { font-size: 1.2rem; }
  .footer-tagline { font-size: 0.8rem; }
  .footer-legal { padding: 16px; }
  .footer-legal-link { font-size: 0.82rem; gap: 10px; }
  .footer-legal-icon { width: 28px; height: 28px; }
  .footer-social-col { padding: 16px; gap: 12px; }
  .footer-social-icon { width: 42px; height: 42px; border-radius: 12px; }
  .footer-social-label { font-size: 0.7rem; }
  .footer-bottom { padding: 12px 16px; }
  .footer-bottom-content { font-size: 0.7rem; gap: 6px; white-space: normal; text-align: center; }
  .footer-bottom-line { display: none; }
  .footer-bottom { justify-content: center; }
}

/* --- Extra small (≤360px) --- */
@media (max-width: 360px) {
  .terms-container { width: 97%; padding: 14px 12px; }
  .terms-title-area h1 { font-size: 1rem; }
  .nav-actions .btn span, .nav-actions .btn svg { display: inline; }
}
