/* Qelvori website — shared base (header, footer, buttons) and the privacy page.
   The homepage's cinematic layer lives in home.css. */
@font-face { font-family: 'Cabinet Grotesk'; src: url('assets/fonts/cabinet-grotesk-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Cabinet Grotesk'; src: url('assets/fonts/cabinet-grotesk-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('assets/fonts/satoshi-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('assets/fonts/satoshi-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Satoshi'; src: url('assets/fonts/satoshi-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('assets/fonts/ibm-plex-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --void: #0a0a0b;
  --deep: #141415;
  --ice: #eee8dc;
  --mist: #b7ad9c;
  --dim: #857b6c;
  --signal: #d6a84e;
  --aurora: #c47a45;
  --mint: #8fc46e;
  --amber: #f5b53d;
  --line: rgba(214, 168, 78, 0.14);
  --line-strong: rgba(214, 168, 78, 0.3);
  --panel: rgba(22, 22, 23, 0.78);
  --on-signal: #1a1305;
  --font: 'Satoshi', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --display: 'Cabinet Grotesk', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--ice);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--signal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
code { font-family: var(--mono); font-size: 0.86em; padding: 1px 6px; border-radius: 6px; background: var(--deep); border: 1px solid var(--line); overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* header */
.top {
  position: fixed; inset: 0 0 auto; z-index: 50;
  backdrop-filter: blur(16px) saturate(140%);
  background: rgba(10, 10, 11, 0.62);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ice); text-decoration: none; font: 800 19px var(--display); letter-spacing: 0.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.top nav { margin-left: auto; display: flex; gap: 26px; align-items: center; }
.top nav a { color: var(--mist); text-decoration: none; font-weight: 500; font-size: 15px; }
.top nav a:hover { color: var(--ice); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 26px; border-radius: 999px;
  font: 700 16px var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid var(--line-strong); color: var(--ice); background: rgba(20, 20, 21, 0.5);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s, box-shadow 0.25s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--signal); }
.btn.primary { background: var(--signal); color: var(--on-signal); border-color: transparent; box-shadow: 0 14px 40px -14px var(--signal); }
.btn.primary:hover { box-shadow: 0 18px 50px -12px var(--signal); }
.top nav .btn { height: 38px; padding: 0 18px; font-size: 14px; color: var(--on-signal); }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--dim); font-size: 14.5px; position: relative; background: var(--void); }
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
footer nav { margin-left: auto; display: flex; gap: 20px; }
footer a { color: var(--mist); text-decoration: none; }
footer a:hover { color: var(--ice); }

/* ---------- policy pages: privacy and terms ----------
   A title with the site's glow, a contents rail that follows your reading (assets/policy.js),
   and a reading column kept to a comfortable line length. */
.doc { position: relative; isolation: isolate; padding: 128px 0 104px; }
.doc::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 640px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 58% at 20% 16%, rgba(214, 168, 78, 0.14), transparent 70%),
    radial-gradient(34% 48% at 64% 0%, rgba(196, 122, 69, 0.13), transparent 70%);
}
.doc-head, .doc-body { width: min(1080px, 100% - 32px); margin-inline: auto; }
.doc-head { padding-bottom: 44px; margin-bottom: 56px; border-bottom: 1px solid var(--line); }
.doc-head h1 {
  font: 800 clamp(48px, 8.4vw, 108px)/0.94 var(--display); letter-spacing: -0.045em; margin: 30px 0 20px;
  background: linear-gradient(180deg, #ffffff 30%, #e3c47e 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 80px rgba(214, 168, 78, 0.15);
}
.doc-head .meta { color: var(--mist); margin: 0; max-width: 560px; }
.doc-switch { display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(12px); }
.doc-switch a { padding: 7px 16px; border-radius: 999px; color: var(--mist); font-weight: 700; font-size: 14px; text-decoration: none; transition: color 0.25s, background 0.25s; }
.doc-switch a:hover { color: var(--ice); }
.doc-switch a[aria-current='page'] { background: var(--signal); color: var(--on-signal); }

.doc-body { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 76px; align-items: start; }
.doc-toc { position: sticky; top: 104px; }
.doc-toc-title { margin: 0 0 14px; color: var(--dim); font-size: 14px; font-weight: 700; }
.doc-toc ol { position: relative; list-style: none; margin: 0; padding: 0 0 0 18px; display: grid; gap: 1px; counter-reset: toc; }
.doc-toc ol::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--line); }
.doc-toc li { counter-increment: toc; }
.doc-toc a { position: relative; display: flex; gap: 10px; padding: 5px 0; color: var(--dim); font-size: 14.5px; font-weight: 500; line-height: 1.35; text-decoration: none; transition: color 0.25s; }
.doc-toc a::before { content: counter(toc); flex: none; width: 16px; font-variant-numeric: tabular-nums; opacity: 0.65; }
.doc-toc a::after { content: ''; position: absolute; left: -18px; top: 50%; width: 2px; height: 0; translate: 0 -50%; border-radius: 2px; background: var(--signal); transition: height 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.doc-toc a:hover { color: var(--mist); }
.doc-toc a.on { color: var(--ice); }
.doc-toc a.on::after { height: 20px; box-shadow: 0 0 12px var(--signal); }

.policy { max-width: 720px; }
.policy h2 {
  display: flex; align-items: baseline; gap: 14px; scroll-margin-top: 92px;
  font: 800 clamp(25px, 3vw, 31px)/1.18 var(--display); letter-spacing: -0.015em;
  margin: 60px 0 14px; padding-top: 30px; border-top: 1px solid var(--line);
}
.policy h2 .n { flex: none; min-width: 1.5em; font-size: 0.68em; color: var(--signal); font-variant-numeric: tabular-nums; }
.policy h3 { font: 700 19px/1.3 var(--display); margin: 30px 0 8px; scroll-margin-top: 92px; }
.policy p, .policy li { color: var(--mist); }
.policy ul { padding-left: 20px; }
.policy li { margin: 8px 0; padding-left: 4px; }
.policy li::marker { color: var(--signal); }
.policy strong { color: var(--ice); }

.summary {
  position: relative; padding: 28px 30px 30px; border-radius: 22px; border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(28, 27, 25, 0.92), rgba(20, 20, 21, 0.78));
  box-shadow: 0 40px 90px -50px rgba(214, 168, 78, 0.45);
}
.summary::before {
  content: ''; position: absolute; inset: -1px 16% auto; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--signal), transparent);
}
.policy .summary h2 { display: block; margin: 0 0 20px; padding: 0; border: 0; font: 700 15px var(--font); letter-spacing: 0; color: var(--signal); }
.summary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 34px; margin: 0; }
.summary dt { font: 700 17.5px/1.25 var(--display); color: var(--ice); margin-bottom: 5px; }
.summary dd { margin: 0; color: var(--mist); font-size: 15.5px; line-height: 1.55; }

.callout { padding: 18px 22px; border-left: 3px solid var(--signal); border-radius: 0 14px 14px 0; background: var(--deep); color: var(--ice); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--deep); }
table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15.5px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--mist); }
th { color: var(--ice); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

@media (max-width: 1000px) {
  .doc-body { grid-template-columns: minmax(0, 1fr); }
  .doc-toc { display: none; }
  .policy { max-width: none; }
}
@media (max-width: 640px) {
  .doc { padding-top: 104px; }
  .doc-head { padding-bottom: 32px; margin-bottom: 36px; }
  .summary { padding: 22px 20px 24px; }
  .summary dl { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .policy h2 { margin-top: 44px; padding-top: 24px; }
}

@media (prefers-color-scheme: light) {
  .policy-page {
    --void: #f6f1e7; --deep: #ffffff; --ice: #161617; --mist: #4d473e; --dim: #8a8072;
    --signal: #9c7425; --line: rgba(24, 22, 20, 0.1); --line-strong: rgba(24, 22, 20, 0.2); --on-signal: #fff;
    --panel: rgba(255, 255, 255, 0.8);
    color-scheme: light;
  }
  .policy-page .top { background: rgba(246, 241, 231, 0.8); }
  .doc::before {
    background:
      radial-gradient(38% 58% at 20% 16%, rgba(156, 116, 37, 0.12), transparent 70%),
      radial-gradient(34% 48% at 64% 0%, rgba(160, 100, 50, 0.1), transparent 70%);
  }
  .doc-head h1 { background-image: linear-gradient(180deg, #161617 30%, #6e5420 100%); text-shadow: none; }
  .summary { background: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.82)); box-shadow: 0 30px 70px -45px rgba(156, 116, 37, 0.45); }
  .doc-toc a.on::after { box-shadow: none; }
}

@media (max-width: 760px) {
  .top nav a:not(.btn) { display: none; }
}
