/* Shared stylesheet for static legal pages (terms, privacy).
   Matches the React app's monochrome liquid-glass design. */

:root {
  --color-bg: #FAFAFB;
  --color-surface: #FFFFFF;
  --color-surface-2: #F4F4F5;
  --color-border: #E4E4E7;

  --color-text: #09090B;
  --color-text-muted: #3F3F46;
  --color-text-subtle: #71717A;

  --gradient-brand: linear-gradient(135deg, #2563EB 0%, #4F46E5 50%, #06B6D4 100%);

  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-soft: 0 20px 60px -20px rgba(0, 0, 0, 0.28);

  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(255, 255, 255, 0.55);

  --glass-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.28),
    inset 0 1.5px 0 rgba(255, 255, 255, 1),
    inset 3px 0 6px -3px rgba(255, 255, 255, 0.45),
    inset -3px 0 6px -3px rgba(255, 255, 255, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: "cv11", "ss01", "ss03";
}

/* ---------- Background layers ---------- */

.bg-layers {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-layers::after {
  /* noise */
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  will-change: transform;
}

.aurora-1 {
  top: -10vh;
  left: -10vw;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(9, 9, 11, 0.14), transparent 60%);
  animation: aurora-drift-1 22s ease-in-out infinite;
}

.aurora-2 {
  top: 10vh;
  left: 55vw;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(63, 63, 70, 0.11), transparent 60%);
  animation: aurora-drift-2 26s ease-in-out infinite;
}

.aurora-3 {
  top: 60vh;
  left: 20vw;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgba(113, 113, 122, 0.1), transparent 60%);
  animation: aurora-drift-3 18s ease-in-out infinite;
}

@keyframes aurora-drift-1 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(120px, -60px, 0) scale(1.12); }
}

@keyframes aurora-drift-2 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-100px, 60px, 0) scale(1.08); }
}

@keyframes aurora-drift-3 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(80px, -40px, 0) scale(1.15); }
}

/* ---------- Scroll progress bar ---------- */

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 50;
  transition: transform 0.15s linear;
}

/* ---------- Navbar ---------- */

.navbar {
  position: sticky;
  top: 20px;
  z-index: 40;
  margin: 20px auto 0;
  max-width: 1100px;
  padding: 0 16px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 20px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(22px) saturate(200%) brightness(1.05);
  -webkit-backdrop-filter: blur(22px) saturate(200%) brightness(1.05);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 18px 50px -15px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
}

.logo-chip {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--gradient-brand);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.logo-text {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: white;
  text-decoration: none;
  border-radius: 9999px;
  background: var(--gradient-brand);
  box-shadow:
    0 12px 28px -10px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  transition: transform 0.2s ease;
}

.back-link:hover {
  transform: translateY(-1px);
}

.back-link:active {
  transform: scale(0.98);
}

.back-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.back-link:hover svg {
  transform: translateX(-2px);
}

/* ---------- Hero ---------- */

.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 16px 40px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 9999px;
  backdrop-filter: blur(12px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient-brand);
}

.hero h1 {
  margin-top: 24px;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--color-text);
}

.hero .grad {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .subtitle {
  max-width: 620px;
  margin: 20px auto 0;
  color: var(--color-text-muted);
  font-size: 1.125rem;
  line-height: 1.55;
}

.hero-meta {
  margin-top: 28px;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 9999px;
  backdrop-filter: blur(12px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.meta-chip svg {
  width: 14px;
  height: 14px;
  color: var(--color-text);
}

.meta-chip strong {
  color: var(--color-text);
  font-weight: 600;
}

/* ---------- Layout ---------- */

.layout {
  position: relative;
  max-width: 1100px;
  margin: 40px auto 0;
  padding: 0 16px 80px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 960px) {
  .layout {
    grid-template-columns: 240px 1fr;
    gap: 56px;
  }
}

/* ---------- Table of contents (sidebar) ---------- */

.toc {
  display: none;
}

@media (min-width: 960px) {
  .toc {
    display: block;
    position: sticky;
    top: 110px;
    align-self: start;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
  }
}

.toc-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
  padding: 0 14px 12px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  font-size: 13.5px;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease;
  line-height: 1.3;
}

.toc-link::before {
  content: attr(data-num);
  display: inline-block;
  width: 24px;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--color-text-subtle);
  transition: color 0.2s ease;
}

.toc-link:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.04);
}

.toc-link.active {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

.toc-link.active::before {
  color: var(--color-text);
}

/* ---------- Content sections ---------- */

.content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.intro {
  padding: 28px 32px;
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(200%) brightness(1.05);
  -webkit-backdrop-filter: blur(22px) saturate(200%) brightness(1.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  color: var(--color-text-muted);
  font-size: 15.5px;
}

.intro p + p {
  margin-top: 12px;
}

.section {
  position: relative;
  padding: 36px 36px 32px;
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(200%) brightness(1.05);
  -webkit-backdrop-filter: blur(22px) saturate(200%) brightness(1.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.section.in-view {
  opacity: 1;
  transform: translateY(0);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: white;
  border-radius: 12px;
  background: var(--gradient-brand);
  box-shadow:
    0 10px 24px -10px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.section h2 {
  font-size: clamp(1.25rem, 2.8vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-text);
}

.section p {
  margin-bottom: 14px;
  color: var(--color-text-muted);
  font-size: 15.5px;
}

.section p:last-child {
  margin-bottom: 0;
}

.section ul {
  margin: 12px 0 18px;
  padding-left: 24px;
  list-style: none;
}

.section ul li {
  position: relative;
  margin-bottom: 8px;
  color: var(--color-text-muted);
  font-size: 15.5px;
  padding-left: 4px;
}

.section ul li::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient-brand);
}

.section strong {
  color: var(--color-text);
  font-weight: 600;
}

.section a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(9, 9, 11, 0.35);
  transition: text-decoration-color 0.2s ease;
}

.section a:hover {
  text-decoration-color: rgba(9, 9, 11, 1);
}

/* ---------- Contact card ---------- */

.contact-card {
  position: relative;
  margin-top: 24px;
  padding: 44px 40px;
  text-align: center;
  border-radius: var(--radius-xl);
  background: var(--gradient-brand);
  color: white;
  overflow: hidden;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.contact-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

.contact-card::before {
  /* Top inner light line */
  content: "";
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
}

.contact-card::after {
  /* Soft radial glow */
  content: "";
  position: absolute;
  top: -60%;
  left: 50%;
  width: 80%;
  height: 160%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.12), transparent 70%);
  pointer-events: none;
}

.contact-card h3 {
  position: relative;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.contact-card p {
  position: relative;
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  max-width: 440px;
  margin: 0 auto 24px;
}

.contact-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  background: white;
  border-radius: 9999px;
  box-shadow:
    0 10px 24px -10px rgba(0, 0, 0, 0.5),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.contact-btn:hover {
  transform: translateY(-1px);
}

.contact-btn:active {
  transform: scale(0.98);
}

.contact-btn svg {
  width: 16px;
  height: 16px;
}

/* ---------- Back-to-top button ---------- */

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--gradient-brand);
  color: white;
  border: none;
  border-radius: 50%;
  box-shadow:
    0 14px 32px -10px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.to-top:hover {
  transform: translateY(-2px) scale(1.03);
}

.to-top svg {
  width: 18px;
  height: 18px;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .navbar {
    margin-top: 12px;
    padding: 0 12px;
  }

  .nav-inner {
    padding: 8px 8px 8px 16px;
  }

  .hero {
    padding: 60px 16px 32px;
  }

  .hero h1 {
    font-size: clamp(2.25rem, 10vw, 3rem);
  }

  .layout {
    margin-top: 24px;
    padding: 0 12px 56px;
  }

  .section {
    padding: 28px 22px 24px;
  }

  .section-head {
    gap: 12px;
  }

  .section-num {
    min-width: 40px;
    height: 40px;
  }

  .contact-card {
    padding: 32px 24px;
  }

  .back-link {
    padding: 8px 14px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora { animation: none !important; }
  .section, .contact-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}
