/* ============================================================
   Notly — Shared styles for legal pages (Privacy, Terms)
   ============================================================ */

:root {
  --purple-50:  #F7F5FF;
  --purple-100: #F1ECFF;
  --purple-200: #EFE9FF;
  --purple-300: #E0D4FF;
  --purple-400: #C4A0FF;
  --purple-500: #9B7FFF;
  --purple-600: #7B5BFF;
  --purple-700: #5a3de0;
  --ink-900:    #1a1230;
  --ink-700:    #3a2a5a;
  --ink-500:    #5a4a7a;
  --ink-400:    #7a6a9a;
  --ink-300:    #9b8ab8;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--purple-100);
  color: var(--ink-900);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--purple-600); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }

/* ── Reading progress bar ── */
.reading-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: 100; pointer-events: none;
  background: rgba(123,91,255,0.08);
}
.reading-progress__fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--purple-600), var(--purple-400), #FF8FCB);
  box-shadow: 0 0 10px rgba(123,91,255,0.5);
  transition: width 80ms linear;
}

/* ── Hero with animated orbs ── */
.hero {
  position: relative; overflow: hidden;
  padding: 90px 24px 80px;
  text-align: center;
  color: #fff;
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
}
.hero__orb {
  position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: 0.7;
  mix-blend-mode: screen;
  animation: orb-float 14s ease-in-out infinite;
}
.hero__orb--1 { width: 340px; height: 340px; top: -60px; left: 10%; background: #C4A0FF; }
.hero__orb--2 { width: 280px; height: 280px; top: 40%; right: 8%; background: #FF8FCB; animation-delay: -4s; animation-duration: 18s; }
.hero__orb--3 { width: 220px; height: 220px; bottom: -40px; left: 35%; background: #7B5BFF; animation-delay: -8s; animation-duration: 20s; }

@keyframes orb-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(40px, -30px, 0) scale(1.08); }
  66%      { transform: translate3d(-30px, 20px, 0) scale(0.95); }
}

.hero__inner { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; }

.hero__chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.18); backdrop-filter: blur(6px);
  padding: 6px 16px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.25);
  margin-bottom: 22px;
}
.hero__chip svg { opacity: 0.9; }

.hero h1 {
  font-size: 56px; font-weight: 800;
  letter-spacing: -2px; line-height: 1.05;
  margin: 0 0 14px;
}
.hero .sub {
  font-size: 18px; opacity: 0.92; font-weight: 500;
  max-width: 540px; margin: 0 auto 22px;
}
.hero__meta {
  display: inline-flex; align-items: center; gap: 16px;
  background: rgba(255,255,255,0.14); backdrop-filter: blur(6px);
  padding: 10px 22px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.18);
}
.hero__meta-sep { width: 1px; height: 14px; background: rgba(255,255,255,0.3); }
.hero__meta strong { font-weight: 700; }

/* Hero gradient variants */
.hero--privacy .hero__bg { background: linear-gradient(135deg, #7B5BFF 0%, #9B7FFF 60%, #C4A0FF 100%); }
.hero--terms   .hero__bg { background: linear-gradient(135deg, #1a1230 0%, #3d2d6e 55%, #7B5BFF 100%); }

/* ── Key principles ribbon (under hero) ── */
.principles {
  margin: -36px auto 0; max-width: 1100px;
  padding: 0 24px; position: relative; z-index: 5;
}
.principles__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  background: #fff;
  border-radius: 22px; padding: 22px;
  box-shadow: 0 20px 50px rgba(123,91,255,0.18);
}
.principle {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 12px; border-radius: 14px;
  transition: background 200ms;
}
.principle:hover { background: var(--purple-50); }
.principle__icon {
  width: 38px; height: 38px;
  background: var(--purple-200); color: var(--purple-600);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.principle__title { font-size: 13px; font-weight: 700; color: var(--ink-900); }
.principle__sub { font-size: 12px; color: var(--ink-500); line-height: 1.5; }
@media (max-width: 800px) {
  .principles__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 440px) {
  .principles__grid { grid-template-columns: 1fr; }
}

/* ── Page body layout: TOC + content ── */
.page {
  max-width: 1180px; margin: 0 auto;
  padding: 60px 24px 80px;
  display: grid; grid-template-columns: 240px 1fr;
  gap: 48px;
}
@media (max-width: 980px) {
  .page { grid-template-columns: 1fr; gap: 24px; }
  .toc { display: none; }
}

/* ── TOC ── */
.toc {
  position: sticky; top: 80px; align-self: start;
  padding: 24px 20px;
  background: #fff; border-radius: 18px;
  box-shadow: 0 4px 20px rgba(123,91,255,0.06);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.toc__label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--ink-400); margin-bottom: 14px;
}
.toc__list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.toc__link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px;
  font-size: 13px; font-weight: 500; color: var(--ink-500);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background 150ms, color 150ms, border-color 150ms;
}
.toc__link:hover { background: var(--purple-50); color: var(--purple-600); text-decoration: none; }
.toc__link.is-active {
  background: var(--purple-200); color: var(--purple-600);
  border-left-color: var(--purple-600); font-weight: 700;
}
.toc__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 7px;
  font-size: 11px; font-weight: 800;
  background: var(--purple-200); color: var(--purple-600);
  flex-shrink: 0;
}
.toc__link.is-active .toc__num { background: var(--purple-600); color: #fff; }

/* ── Article content ── */
.article { min-width: 0; }

/* TL;DR callout */
.tldr {
  background: linear-gradient(135deg, #1a1230 0%, #3d2d6e 100%);
  color: #fff;
  border-radius: 22px;
  padding: 28px 32px;
  margin-bottom: 28px;
  position: relative; overflow: hidden;
}
.tldr::before {
  content: ""; position: absolute;
  top: -50px; right: -50px; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(196,160,255,0.4), transparent 70%);
  border-radius: 50%;
}
.tldr__label {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px;
  margin-bottom: 14px;
}
.tldr h2 { font-size: 22px; font-weight: 800; margin-bottom: 14px; color: #fff; }
.tldr ul { list-style: none; padding: 0; display: grid; gap: 8px; position: relative; z-index: 1; }
.tldr ul li {
  position: relative; padding-left: 26px;
  font-size: 14px; color: rgba(255,255,255,0.9); line-height: 1.6;
}
.tldr ul li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(135deg, #C4A0FF, #FF8FCB);
  box-shadow: 0 0 0 3px rgba(196,160,255,0.25);
}

/* Section card */
.section {
  background: #fff;
  border-radius: 22px;
  padding: 34px 36px;
  margin-bottom: 18px;
  box-shadow: 0 4px 20px rgba(123,91,255,0.06);
  border: 1px solid rgba(123,91,255,0.06);
  position: relative;
  scroll-margin-top: 90px;
  transition: transform 200ms, box-shadow 200ms;
}
.section:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(123,91,255,0.10); }

.section__head {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px dashed rgba(123,91,255,0.18);
}
.section__num {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--purple-600), var(--purple-400));
  color: #fff; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(123,91,255,0.3);
}
.section__title {
  font-size: 22px; font-weight: 800; color: var(--ink-900);
  flex: 1; line-height: 1.25;
}
.section__icon {
  width: 38px; height: 38px;
  background: var(--purple-200); color: var(--purple-600);
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.section p { margin-bottom: 12px; color: var(--ink-700); font-size: 15px; }
.section p:last-child { margin-bottom: 0; }
.section strong { color: var(--ink-900); font-weight: 700; }
.section ul {
  margin: 8px 0 14px; padding: 0; list-style: none;
  display: grid; gap: 8px;
}
.section ul li {
  position: relative; padding-left: 26px;
  color: var(--ink-700); font-size: 15px;
}
.section ul li::before {
  content: ""; position: absolute; left: 4px; top: 8px;
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-600), var(--purple-400));
}

.callout {
  margin: 16px 0;
  background: linear-gradient(135deg, var(--purple-200), #fff);
  border-left: 4px solid var(--purple-600);
  border-radius: 0 14px 14px 0;
  padding: 14px 18px;
  font-size: 14px; color: var(--ink-700);
  position: relative; padding-left: 48px;
}
.callout::before {
  content: ""; position: absolute; left: 18px; top: 50%;
  width: 18px; height: 18px; transform: translateY(-50%);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237B5BFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='M12 16v-4M12 8h.01'/></svg>");
  background-repeat: no-repeat; background-position: center;
}

/* Contact CTA card */
.cta-card {
  background: linear-gradient(135deg, var(--purple-600), var(--purple-500));
  color: #fff;
  border-radius: 22px;
  padding: 34px 36px;
  text-align: center;
  margin-top: 8px;
  position: relative; overflow: hidden;
}
.cta-card::before {
  content: ""; position: absolute;
  bottom: -60px; left: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.2), transparent 70%);
  border-radius: 50%;
}
.cta-card::after {
  content: ""; position: absolute;
  top: -50px; right: -50px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255,143,203,0.4), transparent 70%);
  border-radius: 50%;
}
.cta-card__icon {
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.2);
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  position: relative; z-index: 1;
}
.cta-card h2 { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 8px; position: relative; z-index: 1; }
.cta-card p { color: rgba(255,255,255,0.9); margin-bottom: 20px; position: relative; z-index: 1; }
.cta-card__btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--purple-600);
  padding: 12px 26px; border-radius: 999px;
  font-weight: 700; font-size: 14px;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(0,0,0,0.15);
  position: relative; z-index: 1;
  transition: transform 150ms;
}
.cta-card__btn:hover { transform: translateY(-2px); text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 700px) {
  .hero { padding: 60px 20px 70px; }
  .hero h1 { font-size: 36px; letter-spacing: -1px; }
  .hero .sub { font-size: 15px; }
  .hero__meta { font-size: 12px; padding: 8px 16px; gap: 10px; }
  .section { padding: 24px 22px; }
  .section__title { font-size: 18px; }
  .section__num { width: 38px; height: 38px; font-size: 13px; }
  .tldr { padding: 24px 22px; }
  .cta-card { padding: 28px 22px; }
  .topnav { padding: 12px 16px; }
}
