@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Syne:wght@700;800&family=JetBrains+Mono:wght@400;500&display=swap");
@import url("root-variables.css");

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

/* ============================================================
   PAGE CONTAINER
   ============================================================ */
.page-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 48px 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "Outfit", sans-serif;

  background-color: #080c14;
  background-image:
    radial-gradient(ellipse 60% 40% at 50% -5%, rgba(58, 124, 255, 0.13) 0%, transparent 55%),
    radial-gradient(ellipse 40% 30% at 90% 80%,  rgba(163, 91, 255, 0.07) 0%, transparent 50%);
  overflow-x: hidden;
}

/* Grid overlay */
.page-container::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(58, 124, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 124, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   BACK BUTTON
   ============================================================ */
.page-container .btn {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 18px;
  border-radius: 20px;
  font-family: "Outfit", sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  color: #94a3b8;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  transition: all 0.2s ease;
}

.page-container .btn::before {
  content: "←";
  font-size: 1rem;
}

.page-container .btn:hover {
  background: rgba(58, 124, 255, 0.1);
  border-color: rgba(58, 124, 255, 0.4);
  color: #fff;
  transform: translateX(-2px);
}

/* ============================================================
   TERMS CARD
   ============================================================ */
.terms-container {
  position: relative;
  z-index: 1;
  width: 70%;
  max-width: 860px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 52px 56px 56px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 0 0 1px rgba(58, 124, 255, 0.05),
    0 32px 64px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  margin-top: 20px;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Top accent line */
.terms-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(58, 124, 255, 0.5), transparent);
  border-radius: 1px;
}

/* ============================================================
   TITLE
   ============================================================ */
.title {
  width: 100%;
  text-align: center;
  margin-bottom: 12px;
}

/* Mono tag above title */
.title::before {
  content: "// LEGAL";
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 500;
  color: #3a7cff;
  letter-spacing: 2px;
  margin-bottom: 14px;
  opacity: 0.8;
}

.title h1 {
  font-family: "Syne", sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
  margin: 0;
  background: linear-gradient(135deg, #ffffff 40%, rgba(130, 180, 255, 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   DESCRIPTION
   ============================================================ */
.desc {
  width: 100%;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.desc p {
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  color: #475569;
  text-align: center;
  line-height: 1.7;
  margin: 0;
}

/* ============================================================
   CONTENT — ORDERED LIST
   ============================================================ */
.content-container {
  width: 100%;
}

.content-container ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  counter-reset: terms-counter;
}

.content-container ol > li {
  counter-increment: terms-counter;
  position: relative;
  padding: 28px 0 28px 52px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

.content-container ol > li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Number badge */
.content-container ol > li::before {
  content: counter(terms-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 30px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: #3a7cff;
  background: rgba(58, 124, 255, 0.1);
  border: 1px solid rgba(58, 124, 255, 0.2);
  border-radius: 8px;
  width: 36px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.3px;
}

.content-container ol > li h3 {
  font-family: "Outfit", sans-serif;
  font-size: 0.975rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 10px;
  letter-spacing: -0.1px;
}

.content-container ol > li p {
  font-family: "Outfit", sans-serif;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.75;
  text-align: left;
  margin: 0 0 8px;
}

.content-container ol > li p:last-child {
  margin-bottom: 0;
}

.content-container ol > li p b {
  color: #94a3b8;
  font-weight: 600;
}

/* Links */
.content-container ol > li p a {
  color: #3a7cff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.content-container ol > li p a:hover {
  color: #6b9fff;
  text-decoration: underline;
}

/* ============================================================
   NESTED UL (User Responsibilities)
   ============================================================ */
.content-container ol > li ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.content-container ol > li ul li {
  font-family: "Outfit", sans-serif;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}

.content-container ol > li ul li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: #3a7cff;
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .terms-container { width: 85%; }
}

@media (max-width: 768px) {
  .page-container {
    padding: 20px 16px 60px;
    align-items: stretch;
  }

  .page-container .btn {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    justify-content: center;
    height: 46px;
    border-radius: 14px;
    font-size: 0.95rem;
    margin-bottom: 24px;
  }

  .terms-container {
    width: 100%;
    border-radius: 20px;
    padding: 32px 24px 40px;
    margin-top: 0;
  }

  .title h1 { font-size: 1.8rem; }

  .content-container ol > li {
    padding: 22px 0 22px 44px;
  }

  .content-container ol > li::before {
    top: 24px;
  }
}

@media (max-width: 480px) {
  .terms-container { padding: 24px 18px 32px; }
  .title h1 { font-size: 1.5rem; }
  .content-container ol > li h3 { font-size: 0.9rem; }
  .content-container ol > li p,
  .content-container ol > li ul li { font-size: 0.83rem; }
}