/* KUVEX legal pages: Terms, Privacy, Refund, Fair Use.
   One sheet for all four so they stay identical. Light and dark palettes follow
   the visitor's system setting; the nav toggle overrides it (html[data-theme]). */

:root {
  color-scheme: light;
  --bg: #fbfaff;
  --surface: #ffffff;
  --surface-2: #f4f1fd;
  --t1: #16131f;
  --t2: #45415a;
  --t3: #6b6683;
  --line: #e6e1f4;
  --line-2: #d6cfee;
  --v: #6d28d9;
  --v-soft: rgba(109, 40, 217, .08);
  --v-ring: rgba(109, 40, 217, .22);
  --ok: #0f7a4a;
  --ok-soft: rgba(15, 122, 74, .09);
  --no: #b42323;
  --no-soft: rgba(180, 35, 35, .08);
  --nav-bg: rgba(251, 250, 255, .86);
  --wordmark: linear-gradient(135deg, #6d28d9 0%, #a21caf 60%, #be185d 100%);
  --shadow: 0 1px 2px rgba(22, 19, 31, .04), 0 8px 24px rgba(22, 19, 31, .05);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #06060c;
    --surface: #0d0c17;
    --surface-2: #14122a;
    --t1: #eeedfb;
    --t2: rgba(238, 237, 251, .74);
    --t3: rgba(238, 237, 251, .52);
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .14);
    --v: #a78bfa;
    --v-soft: rgba(167, 139, 250, .10);
    --v-ring: rgba(167, 139, 250, .28);
    --ok: #4ade80;
    --ok-soft: rgba(74, 222, 128, .10);
    --no: #f87171;
    --no-soft: rgba(248, 113, 113, .10);
    --nav-bg: rgba(6, 6, 12, .82);
    --wordmark: linear-gradient(135deg, #c4b5fd 0%, #e879f9 60%, #f9a8d4 100%);
    --shadow: none;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #06060c;
  --surface: #0d0c17;
  --surface-2: #14122a;
  --t1: #eeedfb;
  --t2: rgba(238, 237, 251, .74);
  --t3: rgba(238, 237, 251, .52);
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --v: #a78bfa;
  --v-soft: rgba(167, 139, 250, .10);
  --v-ring: rgba(167, 139, 250, .28);
  --ok: #4ade80;
  --ok-soft: rgba(74, 222, 128, .10);
  --no: #f87171;
  --no-soft: rgba(248, 113, 113, .10);
  --nav-bg: rgba(6, 6, 12, .82);
  --wordmark: linear-gradient(135deg, #c4b5fd 0%, #e879f9 60%, #f9a8d4 100%);
  --shadow: none;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--t1);
  font-family: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--v); text-decoration: underline; text-decoration-color: var(--v-ring); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--v); outline-offset: 3px; border-radius: 4px; }

/* ---------- nav ---------- */
nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem clamp(1rem, 4vw, 2rem);
  background: var(--nav-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nlogo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--t1); }
.nlogo-mark { width: 34px; height: 34px; display: block; position: relative; flex-shrink: 0; transition: transform .3s; }
.nlogo-mark .kuvex-logo-layer { display: block; position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: 50% 50%; will-change: transform; }
.nlogo-mark .kuvex-logo-layer--outer, .nlogo-mark .kuvex-logo-layer--inner { animation: kuvexRingClockwise 9.5s linear infinite; }
.nlogo-mark .kuvex-logo-layer--middle { animation: kuvexRingAnticlockwise 9.5s linear infinite; }
.nlogo:hover .nlogo-mark { transform: scale(1.05); }
@keyframes kuvexRingClockwise { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes kuvexRingAnticlockwise { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) { .nlogo-mark .kuvex-logo-layer { animation: none; } }
.nlogo-text {
  font-weight: 800; font-size: 17px; letter-spacing: 2.2px; text-transform: uppercase;
  background: var(--wordmark); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.nav-right { display: flex; align-items: center; gap: .75rem; }
.nav-back { font-size: .85rem; color: var(--t3); text-decoration: none; }
.nav-back:hover { color: var(--t1); }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--t2);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--t1); border-color: var(--v-ring); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

/* ---------- page ---------- */
.page-wrap { max-width: 800px; margin: 0 auto; padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1rem, 4vw, 2rem) 6rem; }
.page-eyebrow { font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--v); margin-bottom: .9rem; }
.page-title { font-size: clamp(2rem, 5.5vw, 3rem); font-weight: 800; letter-spacing: -1.2px; line-height: 1.08; margin-bottom: .75rem; text-wrap: balance; }
.page-meta { font-size: .86rem; color: var(--t3); margin-bottom: 2.25rem; padding-bottom: 1.75rem; border-bottom: 1px solid var(--line); }
.page-lede { font-size: 1.12rem; color: var(--t2); margin: -0.75rem 0 2rem; max-width: 62ch; }

h2 { font-size: 1.28rem; font-weight: 700; line-height: 1.35; margin: 2.75rem 0 .75rem; color: var(--t1); scroll-margin-top: 80px; text-wrap: balance; }
h3 { font-size: 1.02rem; font-weight: 700; margin: 1.6rem 0 .45rem; color: var(--t1); }
p { color: var(--t2); margin-bottom: 1rem; max-width: 70ch; }
ul, ol { color: var(--t2); padding-left: 1.4rem; margin-bottom: 1rem; max-width: 68ch; }
li { margin-bottom: .45rem; padding-left: .2rem; }
li::marker { color: var(--t3); }
strong { color: var(--t1); font-weight: 650; }

/* notices */
.notice, .notice-info {
  background: var(--v-soft); border: 1px solid var(--v-ring); border-radius: 12px;
  padding: 1rem 1.2rem; margin: 1.5rem 0; color: var(--t2); font-size: .95rem;
}
.notice-warn {
  background: var(--no-soft); border: 1px solid color-mix(in srgb, var(--no) 30%, transparent); border-radius: 12px;
  padding: 1rem 1.2rem; margin: 1.5rem 0; color: var(--t2); font-size: .95rem;
}

/* the rule: the one sentence the refund page exists to say */
.rule {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow); margin: 0 0 2rem;
}
.rule-cell { padding: 1.35rem 1.4rem 1.4rem; }
.rule-cell + .rule-cell { border-left: 1px solid var(--line-2); }
.rule-tag {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .25rem .6rem; border-radius: 999px; margin-bottom: .7rem;
}
.rule-tag svg { width: 14px; height: 14px; }
.rule-cell--final .rule-tag { color: var(--no); background: var(--no-soft); }
.rule-cell--refund .rule-tag { color: var(--ok); background: var(--ok-soft); }
.rule-head { font-size: 1.2rem; font-weight: 750; line-height: 1.3; color: var(--t1); margin-bottom: .4rem; }
.rule-cell p { font-size: .93rem; margin: 0; }
@media (max-width: 640px) {
  .rule { grid-template-columns: 1fr; }
  .rule-cell + .rule-cell { border-left: 0; border-top: 1px solid var(--line-2); }
}

/* key points with icon tiles */
.keys {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  margin: 0 0 2.5rem;
}
.key { display: grid; grid-template-columns: 40px 1fr; gap: .9rem; align-items: start; background: var(--surface); padding: 1.15rem 1.2rem; }
.key-icon {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: var(--v-soft); color: var(--v); border: 1px solid var(--v-ring);
}
.key-icon svg { width: 20px; height: 20px; }
.key strong { display: block; font-size: .98rem; margin-bottom: .15rem; }
.key span { display: block; color: var(--t2); font-size: .9rem; line-height: 1.6; }
@media (max-width: 640px) { .keys { grid-template-columns: 1fr; } }

/* situation -> answer table */
.answers { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 1rem 0 1.5rem; background: var(--surface); }
.answer { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: .85rem 1.1rem; border-top: 1px solid var(--line); }
.answer:first-child { border-top: 0; }
.answer-q { color: var(--t2); font-size: .95rem; }
.answer-a {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  font-size: .8rem; font-weight: 700; letter-spacing: .02em;
  padding: .28rem .65rem; border-radius: 999px;
}
.answer-a svg { width: 14px; height: 14px; }
.answer-a--no { color: var(--no); background: var(--no-soft); }
.answer-a--yes { color: var(--ok); background: var(--ok-soft); }
@media (max-width: 520px) { .answer { grid-template-columns: 1fr; gap: .45rem; } .answer-a { justify-self: start; } }

/* tables (privacy) */
.data-table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .92rem; }
.data-table th { text-align: left; padding: .7rem 1rem; background: var(--surface-2); color: var(--t1); font-weight: 650; border-bottom: 1px solid var(--line-2); }
.data-table td { padding: .7rem 1rem; color: var(--t2); border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin: 1rem 0 1.5rem; }
.table-scroll .data-table { margin: 0; }

/* contact */
.contact-card { background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; padding: 1.4rem 1.5rem; margin-top: 3rem; box-shadow: var(--shadow); }
.contact-card h2 { margin-top: 0; }
.contact-row { display: flex; gap: .6rem; align-items: center; color: var(--t2); font-size: .93rem; margin-bottom: .45rem; }
.contact-row svg { width: 16px; height: 16px; color: var(--t3); flex-shrink: 0; }

footer { text-align: center; padding: 2rem 1rem; color: var(--t3); font-size: .82rem; border-top: 1px solid var(--line); }
footer a { color: var(--t3); text-decoration: none; }
footer a:hover { color: var(--t1); }
