/* ============================================================
   AICleaner — Legal pages stylesheet
   Aesthetic: clean, calm, "fresh-air" utility app.
   Fresh emerald accent on warm paper, editorial type pairing.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400..700;1,9..144,400&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --paper: #f6f8f5;
  --paper-2: #fbfcfb;
  --ink: #15211c;
  --ink-soft: #41534b;
  --ink-faint: #6d7f76;
  --line: rgba(21, 33, 28, 0.10);
  --line-soft: rgba(21, 33, 28, 0.06);
  --accent: #0f9d6e;
  --accent-deep: #0a7a55;
  --accent-mint: #3fd9a6;
  --accent-wash: rgba(15, 157, 110, 0.08);
  --radius: 16px;
  --maxw: 720px;
  --display: "Fraunces", Georgia, serif;
  --body: "Hanken Grotesk", -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle grain over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Sticky nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(20px, 5vw, 48px);
  background: rgba(246, 248, 245, 0.78);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand .mark {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: linear-gradient(150deg, var(--accent-mint), var(--accent));
  box-shadow: 0 4px 14px rgba(15, 157, 110, 0.35);
}
.brand .mark svg { width: 17px; height: 17px; display: block; }
.brand b { font-weight: 600; }
.brand span { color: var(--accent-deep); }

.tabs { display: flex; gap: 4px; }
.tabs a {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}
.tabs a:hover { color: var(--ink); background: var(--line-soft); }
.tabs a[aria-current="page"] {
  color: var(--accent-deep);
  background: var(--accent-wash);
}

/* ---------- Header ---------- */
.header {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 9vw, 104px) clamp(20px, 5vw, 48px) clamp(40px, 6vw, 64px);
  border-bottom: 1px solid var(--line);
}
.header::after {
  content: "";
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 130%;
  background:
    radial-gradient(40% 60% at 80% 10%, rgba(63, 217, 166, 0.20), transparent 70%),
    radial-gradient(50% 70% at 8% 0%, rgba(15, 157, 110, 0.14), transparent 70%);
  pointer-events: none;
}
.header-inner { position: relative; max-width: var(--maxw); margin: 0 auto; }
.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: 18px;
}
.header h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(38px, 7vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.header .lede {
  margin-top: 20px;
  max-width: 58ch;
  font-size: 18px;
  color: var(--ink-soft);
}
.updated {
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-faint);
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
}
.updated .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ---------- Document body ---------- */
main { padding: clamp(40px, 7vw, 72px) clamp(20px, 5vw, 48px) 40px; }
.doc { max-width: var(--maxw); margin: 0 auto; }

.section { padding: 30px 0; border-top: 1px solid var(--line-soft); }
.section:first-of-type { border-top: none; padding-top: 8px; }

.section h2 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 14px;
}
.section h2 .num {
  flex: none;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-deep);
  background: var(--accent-wash);
  border-radius: 8px;
  padding: 3px 9px;
  transform: translateY(-2px);
}
.section h3 {
  font-family: var(--body);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  margin: 22px 0 8px;
}

.section p { color: var(--ink-soft); margin: 0 0 14px; }
.section p:last-child { margin-bottom: 0; }
.section a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.section a:hover { color: var(--accent); }

.section ul { list-style: none; margin: 4px 0 16px; padding: 0; }
.section ul li {
  position: relative;
  color: var(--ink-soft);
  padding: 6px 0 6px 26px;
}
.section ul li::before {
  content: "";
  position: absolute;
  left: 4px; top: 15px;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--accent-mint);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.section ul li strong { color: var(--ink); font-weight: 700; }

/* EULA legal block — tighter, smaller, monospaced-feel numbering */
.legal-clause { margin: 0 0 16px; }
.legal-clause .ck {
  font-weight: 700;
  color: var(--ink);
}
.fineprint {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-faint);
}
.fineprint.caps { text-transform: none; }

.callout {
  margin: 24px 0;
  padding: 18px 20px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  font-size: 15.5px;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px clamp(20px, 5vw, 48px) 56px;
  background: var(--paper-2);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.footer .brand { font-size: 17px; }
.footer .brand .mark { width: 26px; height: 26px; border-radius: 8px; }
.footer .brand .mark svg { width: 15px; height: 15px; }
.footer nav { display: flex; gap: 20px; }
.footer nav a { font-size: 14px; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.footer nav a:hover { color: var(--accent-deep); }
.footer .copy { width: 100%; font-size: 13px; color: var(--ink-faint); padding-top: 8px; border-top: 1px solid var(--line-soft); }

/* ---------- Load animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .header-inner > *, .section { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .header-inner > *:nth-child(2) { animation-delay: 0.05s; }
  .header-inner > *:nth-child(3) { animation-delay: 0.10s; }
  .header-inner > *:nth-child(4) { animation-delay: 0.15s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

::selection { background: var(--accent-mint); color: var(--ink); }
