/*
 * UVibe — Privacy Policy page styles.
 *
 * The look is lifted directly from the UVIBE_Frontend design system
 * (uvibe/design/design.config.js + theme/*). Active theme:
 *   palette  = Mint Coral   typeface = Outfit (+ Inter body)
 *   glass    = Candy         surface  = gradientStroke   glow = medium
 *
 * "Bright canvas, liquid ramp, glass chrome." The page is a bright aurora
 * canvas; the policy sits in one Candy-glass card. A text-heavy legal page
 * needs legibility, so the reading surface uses the design system's
 * "Level 3 text box" opacity (~0.5) rather than the airier 0.22 body.
 */

:root {
  /* Mint Coral palette (paletteMintCoral) */
  --ramp-1: #2ec4b6; /* teal   */
  --ramp-2: #cbf3f0; /* mint   */
  --ramp-3: #ff9f1c; /* amber  */
  --ramp-4: #ff595e; /* coral  */
  --ink: #12332f;
  --ink-soft: #4e7a75;
  --accent: #2ec4b6;
  --glow: #ff9f1c;
  --canvas-1: #d5f6f2;
  --canvas-2: #eafbfa;
  --canvas-3: #ffe6d2;

  --ramp: linear-gradient(135deg, var(--ramp-1), var(--ramp-2) 32%, var(--ramp-3) 70%, var(--ramp-4));

  /* Candy glass preset: blur 34, bg opacity 0.22, saturation 1.8 */
  --glass-blur: 34px;
  --glass-sat: 1.8;

  --radius: 28px;
  --radius-sm: 16px;
  --maxw: 760px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  /* Bright aurora canvas: soft radial blobs in the palette's canvas tints
     over a near-white base, so the glass has colour to bleed. */
  background-color: var(--canvas-2);
  background-image:
    radial-gradient(42rem 42rem at 8% -6%, var(--canvas-1), transparent 60%),
    radial-gradient(38rem 38rem at 100% 0%, var(--canvas-3), transparent 55%),
    radial-gradient(34rem 34rem at 50% 108%, #ffe0ea, transparent 60%),
    radial-gradient(30rem 30rem at 88% 72%, #fff2d6, transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* A faint drifting wash so the canvas feels "alive" like the app aurora. */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(28rem 28rem at 20% 30%, rgba(46, 196, 182, 0.18), transparent 60%),
    radial-gradient(26rem 26rem at 80% 60%, rgba(255, 89, 94, 0.14), transparent 60%);
  filter: blur(10px);
  animation: drift 24s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.05); }
}

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(20px, 5vw, 56px) clamp(16px, 4vw, 32px) 64px;
}

/* ---- Masthead ---------------------------------------------------------- */
.masthead {
  text-align: center;
  margin-bottom: clamp(24px, 4vw, 40px);
}

.brand {
  display: inline-block;
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  padding: 7px 16px;
  border-radius: 999px;
  color: #0c2b27;
  background: var(--ramp);
  box-shadow: 0 10px 24px -10px rgba(255, 159, 28, 0.6);
}

.masthead h1 {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 2.9rem);
  line-height: 1.1;
  margin: 18px 0 10px;
  background: linear-gradient(120deg, var(--ramp-1), var(--ramp-3) 60%, var(--ramp-4));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.masthead .updated {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0;
}

/* ---- Glass card (gradientStroke surface + Candy glass) ----------------- */
.glass {
  position: relative;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  box-shadow:
    0 30px 80px -28px rgba(255, 159, 28, 0.42),   /* glow (amber), medium */
    0 2px 10px rgba(18, 51, 47, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);       /* rim shine */
}

/* gradientStroke: 1px ramp border via mask compositing */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--ramp);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.85;
  pointer-events: none;
}

/* ---- Table of contents (jump nav) ------------------------------------- */
.toc {
  padding: clamp(16px, 3vw, 22px);
  margin-bottom: 22px;
}

.toc h2 {
  font-family: "Outfit", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toc a {
  display: inline-block;
  font-size: 0.86rem;
  text-decoration: none;
  color: #0e2e2a;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(46, 196, 182, 0.12);
  border: 1px solid rgba(46, 196, 182, 0.28);
  transition: background 0.18s ease, transform 0.18s ease;
}

.toc a:hover,
.toc a:focus-visible {
  background: rgba(46, 196, 182, 0.22);
  transform: translateY(-1px);
  outline: none;
}

/* ---- Policy body ------------------------------------------------------- */
.policy {
  padding: clamp(22px, 5vw, 44px);
}

.policy section { scroll-margin-top: 20px; }

.policy section + section {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid rgba(18, 51, 47, 0.08);
}

.policy h2 {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: clamp(1.2rem, 3.4vw, 1.5rem);
  color: var(--ink);
  margin: 0 0 12px;
  padding-left: 14px;
  position: relative;
}

/* ramp tick before each heading */
.policy h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 4px;
  border-radius: 4px;
  background: var(--ramp);
}

.policy p { margin: 0 0 14px; color: #1b3b36; }

.policy ul {
  margin: 0 0 14px;
  padding-left: 0;
  list-style: none;
}

.policy ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 9px;
  color: #214641;
}

.policy ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.18);
}

.policy a { color: #0f8e83; font-weight: 600; }

.lead {
  font-size: 1.05rem;
  color: var(--ink);
}

/* ---- Footer ------------------------------------------------------------ */
.foot {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin-top: 34px;
}

.foot a { color: #0f8e83; }

/* ---- Responsive / a11y ------------------------------------------------- */
@media (max-width: 480px) {
  .toc ul { gap: 6px; }
  .policy { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
}

/* Graceful fallback where backdrop-filter is unsupported */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(255, 255, 255, 0.92); }
}
