/* Kelvora website. Plain CSS: no frameworks, no outside fonts, nothing loaded from other servers. */

:root {
  --ink: #1B1233;
  --violet: #6A3FDB;
  --violet-deep: #5528BC;
  --lavender: #9B7BFF;
  --tint: #EEE8FF;
  --mist: #F5F2FD;
  --white: #FFFFFF;
  --line: #E5DFF5;
  --muted: #625A86;
  --faint: #72699A;

  /* the meaning colors, the same ones the app uses */
  --good: #0B7A52;   --good-bg: #E3F6EE;
  --warn: #9A5B00;   --warn-bg: #FFF2DB;
  --bad: #C2332B;    --bad-bg: #FDECEA;
  --info: #5B34C2;   --info-bg: #EEE8FF;
  --gray: #3F3866;   --gray-bg: #EFEBFA;

  --on-ink: #EDE9FB;
  --on-ink-muted: #B9AEE0;

  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; background: var(--mist); color: var(--ink); font: 400 1.0625rem/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: var(--violet-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--violet); }
:focus-visible { outline: 3px solid var(--lavender); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.7rem 1rem; z-index: 100; border-radius: 0 0 10px 0; }
.skip:focus { left: 0; }

h1, h2, h3 { font-family: var(--font-display); margin: 0; color: var(--ink); }
h1 { font-weight: 800; font-size: clamp(2.3rem, 1rem + 4.4vw, 4rem); line-height: 1.02; letter-spacing: -0.042em; text-wrap: balance; }
h2 { font-weight: 750; font-size: clamp(1.8rem, 1.1rem + 2.4vw, 2.75rem); line-height: 1.1; letter-spacing: -0.03em; text-wrap: balance; }
h3 { font-weight: 700; font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.012em; }
p { margin: 0 0 1rem; max-width: 62ch; }

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 50; background: rgba(245, 242, 253, 0.93); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 2rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); font: 700 1.35rem/1 var(--font-display); letter-spacing: -0.025em; }
.brand:hover { color: var(--ink); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav { display: flex; gap: 1.7rem; margin-left: auto; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.97rem; padding: 0.5rem 0; }
.top nav a:hover { color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0.75rem 1.5rem; border-radius: 12px; font: 650 1.02rem/1 var(--font); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background-color 0.15s, border-color 0.15s; }
.btn-primary { background: var(--violet); color: #fff; }
.btn-primary:hover { background: var(--violet-deep); color: #fff; }
.btn-quiet { background: transparent; color: var(--ink); border-color: #D4CAF0; }
.btn-quiet:hover { border-color: var(--lavender); color: var(--ink); }
.btn-light { background: #fff; color: var(--violet-deep); }
.btn-light:hover { background: var(--tint); color: var(--violet-deep); }
.top .btn { min-height: 44px; padding: 0.55rem 1.15rem; font-size: 0.96rem; }
.top-actions { display: flex; align-items: center; gap: 0.6rem; }

/* ---------------------------------------------------------------- hero */
.hero { padding: clamp(2.6rem, 6vw, 5rem) 0 clamp(3rem, 6vw, 5.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; margin-top: clamp(1.8rem, 3.5vw, 2.8rem); }
.lede { font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem); line-height: 1.5; color: var(--muted); max-width: 33rem; }
.cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.8rem 0 1.2rem; }
.fine { font-size: 0.94rem; color: var(--faint); max-width: 34rem; margin: 0; }

.stage { margin: 0; position: relative; padding: clamp(1rem, 2.6vw, 1.9rem); border-radius: 28px; background: var(--tint); overflow: hidden; isolation: isolate; }
.stage::before { content: ""; position: absolute; right: -16%; bottom: -30%; width: 80%; aspect-ratio: 1; background: url("/logo.svg") center / contain no-repeat; opacity: 0.17; transform: rotate(-9deg); z-index: -1; }
.demo-label { margin: 0 0.25rem 0.9rem; font-size: 0.94rem; font-weight: 600; color: var(--info); max-width: none; }

.trade { background: #fff; border-radius: 20px; padding: clamp(1.1rem, 2.4vw, 1.6rem); box-shadow: 0 20px 44px -20px rgba(70, 35, 160, 0.38); }
.trade-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.pick { font: 700 1.4rem/1.2 var(--font-display); letter-spacing: -0.022em; margin: 0; }
.game { margin: 0.3rem 0 0; font-size: 0.92rem; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; flex: none; }
.pill { display: inline-block; padding: 0.4rem 0.85rem; border-radius: 999px; font: 650 0.88rem/1.2 var(--font); white-space: nowrap; }
.pill[hidden] { display: none; }
.pill-good { background: var(--good-bg); color: var(--good); }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-gray { background: var(--gray-bg); color: var(--gray); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }

.meter { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 1rem; margin: 1.3rem 0 1rem; }
.track { flex: 1 1 8rem; height: 10px; background: #E9E4F8; border-radius: 999px; overflow: hidden; }
.fill { height: 100%; width: 33%; border-radius: 999px; background: var(--info); transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s; }
.js .fill { width: 0; }
.fill.is-good { background: var(--good); }
.fill.is-gray { background: var(--gray); }
.fill.is-bad { background: var(--bad); }
.chance { margin: 0; max-width: none; white-space: nowrap; }
.chance strong { font-weight: 700; font-size: 1.12rem; }
.chance span { margin-left: 0.9rem; color: var(--muted); font-size: 0.96rem; }
.why { margin: 0; color: var(--muted); font-size: 0.97rem; max-width: none; }

.controls { display: grid; gap: 0.9rem; margin: 1.3rem 0.25rem 0; }
.control { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0.15rem 0.8rem; }
.control label { font-weight: 650; font-size: 0.97rem; }
.control output { font: 700 1rem var(--font); font-variant-numeric: tabular-nums; color: var(--violet-deep); }
.control input { grid-column: 1 / -1; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; margin: 0; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--violet) var(--pct, 33%), #fff var(--pct, 33%)); }
input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: #fff; }
input[type="range"]::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--violet); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; background: #fff; border: 3px solid var(--violet); box-shadow: 0 2px 6px rgba(27, 18, 51, 0.25); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--violet); box-shadow: 0 2px 6px rgba(27, 18, 51, 0.25); }
input[type="range"]:focus-visible { outline: 3px solid var(--lavender); outline-offset: 2px; border-radius: 8px; }
.explain { margin: 1.1rem 0.25rem 0; font-size: 0.98rem; line-height: 1.55; max-width: none; min-height: 4.7em; }

/* ---------------------------------------------------------------- sections */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-tight { padding-top: 0; }
.section-head { max-width: 46rem; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.section-head p { color: var(--muted); margin-top: 1rem; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 5.5rem); align-items: start; }
.split > .section-head { position: sticky; top: 6.5rem; margin-bottom: 0; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { position: relative; display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: 1.4rem; padding-bottom: 2.6rem; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--violet); color: #fff; font: 700 1.2rem var(--font-display); }
.steps li::after { content: ""; position: absolute; left: 1.6rem; top: 3.5rem; bottom: 0.3rem; width: 2px; margin-left: -1px; background: linear-gradient(var(--violet), var(--line)); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1.5rem; letter-spacing: -0.02em; margin: 0.45rem 0 0.5rem; }
.steps p { color: var(--muted); margin: 0; }
.after-steps { margin: 2.2rem 0 0; padding-top: 1.4rem; border-top: 1px solid var(--line); }

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); align-items: center; gap: 0.5rem 2rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.rows p { margin: 0; color: var(--muted); }
.rows strong { color: var(--ink); }

.facts { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(2rem, 5vw, 4.5rem); }
.facts > div { padding: 1.4rem 0 1.5rem; border-top: 1px solid var(--line); }
.facts dt { font: 700 1.15rem/1.3 var(--font-display); letter-spacing: -0.012em; margin-bottom: 0.4rem; }
.facts dd { margin: 0; color: var(--muted); max-width: 34rem; }
.facts-one { grid-template-columns: minmax(0, 1fr); }

.band-ink { background: var(--ink); color: var(--on-ink); }
.band-ink h2 { color: #fff; }
.band-ink .section-head p { color: var(--on-ink-muted); }
.honest { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 3.4rem) clamp(2rem, 6vw, 5rem); }
.honest li { padding-top: 1.3rem; border-top: 2px solid rgba(155, 123, 255, 0.55); }
.honest h3 { color: #fff; font-size: clamp(1.3rem, 1rem + 1vw, 1.75rem); line-height: 1.2; letter-spacing: -0.022em; margin-bottom: 0.7rem; }
.honest p { color: var(--on-ink-muted); margin: 0; }

.cta-band { background: var(--violet); color: #fff; }
.cta-band .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem 3rem; align-items: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--on-ink); margin: 0.9rem 0 0; }

.faq { border-top: 1px solid var(--line); max-width: 50rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; position: relative; padding: 1.2rem 2.8rem 1.2rem 0; font: 650 1.1rem/1.35 var(--font); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 0.4rem; top: 50%; width: 11px; height: 11px; border-right: 2.5px solid var(--violet); border-bottom: 2.5px solid var(--violet); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s; }
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq details p { color: var(--muted); margin: 0; padding-bottom: 1.3rem; max-width: 46rem; }

/* ---------------------------------------------------------------- footer and plain pages */
.foot { border-top: 1px solid var(--line); padding: 2.6rem 0 3.2rem; font-size: 0.93rem; color: var(--muted); }
.foot .wrap { display: grid; gap: 1.2rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; }
.foot a { color: var(--ink); font-weight: 600; }
.foot p { margin: 0; max-width: 72ch; }

.doc { padding: clamp(2.4rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem); }
.doc .wrap { max-width: 46rem; }
.doc h1 { font-size: clamp(2.1rem, 1.2rem + 3vw, 3.2rem); margin-bottom: 0.6rem; }
.doc h2 { font-size: 1.5rem; letter-spacing: -0.02em; margin: 2.4rem 0 0.7rem; }
.doc p, .doc li { color: #3A3158; }
.doc ul { padding-left: 1.3rem; margin: 0 0 1rem; max-width: 62ch; }
.doc li { margin-bottom: 0.4rem; }
.updated { color: var(--faint); font-size: 0.95rem; }
.draft-banner { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 0.9rem 1.1rem; font-weight: 600; margin: 0 0 1.6rem; max-width: none; }
.todo { background: var(--warn-bg); color: var(--warn); padding: 0 0.3rem; border-radius: 4px; font-weight: 600; }
.center { min-height: 60vh; display: grid; align-content: center; justify-items: start; padding: 3rem 0; }
.center h1 { margin-bottom: 1rem; }
.center p { color: var(--muted); }
.h1-small { font-size: clamp(2.2rem, 1rem + 4vw, 3.6rem); }

/* ---------------------------------------------------------------- the download section */
.cta-band .wrap { row-gap: 1.6rem; }
.dl-action { text-align: left; }
.dl-meta { margin: 0.7rem 0 0; font-size: 0.93rem; color: var(--on-ink); }
.dl-details { grid-column: 1 / -1; margin-top: 0.6rem; padding-top: 1.8rem; border-top: 1px solid rgba(255, 255, 255, 0.28); }
.dl-details h3 { color: #fff; margin-bottom: 0.8rem; }
.install { margin: 0 0 1.4rem; padding-left: 1.4rem; max-width: 48rem; color: var(--on-ink); }
.install li { margin-bottom: 0.55rem; padding-left: 0.3rem; }
.install strong { color: #fff; }
.dl-check { max-width: 48rem; margin: 0; color: var(--on-ink); }
.dl-hash { margin: 0.7rem 0 0; max-width: 48rem; }
.cta-band code { font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace; font-size: 0.92em; background: rgba(27, 18, 51, 0.32); color: #fff; padding: 0.12em 0.4em; border-radius: 6px; }
.cta-band .dl-hash code { display: block; padding: 0.8rem 1rem; line-height: 1.55; word-break: break-all; font-size: 0.88rem; border-radius: 10px; }
.faq details p.faq-action { padding-bottom: 1.3rem; margin: 0; }
.dl-action { display: grid; justify-items: stretch; gap: 0; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.75); margin-top: 1.1rem; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.16); border-color: #fff; color: #fff; }
.cta-band :focus-visible { outline-color: #fff; }

/* ---------------------------------------------------------------- the support panel (a button at the bottom right that opens a small form) */
.support { display: none; }
.js .support { display: block; position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60; }
.support-open { display: inline-flex; align-items: center; gap: 0.55rem; min-height: 52px; padding: 0.7rem 1.2rem 0.7rem 1.05rem; border: 0; border-radius: 999px; background: var(--violet); color: #fff; font: 650 1rem/1 var(--font); cursor: pointer; box-shadow: 0 14px 30px -10px rgba(70, 35, 160, 0.65), 0 0 0 3px rgba(255, 255, 255, 0.85); transition: background-color 0.15s; }
.support-open:hover { background: var(--violet-deep); }
.support-open svg { flex: none; }
.support-panel { position: absolute; right: 0; bottom: calc(100% + 0.8rem); width: min(23rem, calc(100vw - 2.5rem)); max-height: calc(100vh - 8rem); overflow-y: auto; background: #fff; border-radius: 20px; padding: 1.15rem 1.3rem 1.3rem; box-shadow: 0 26px 60px -16px rgba(40, 20, 100, 0.5), 0 0 0 1px var(--line); }
.support-panel[hidden], .support-done[hidden], .support-form[hidden] { display: none; }
.support-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.support-head h2 { font-size: 1.25rem; letter-spacing: -0.02em; }
.support-close { display: grid; place-items: center; width: 40px; height: 40px; margin-right: -0.5rem; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.support-close:hover { background: var(--gray-bg); color: var(--ink); }
.support-lede { margin: 0.2rem 0 0.3rem; color: var(--muted); font-size: 0.95rem; }
.support-form label { display: block; margin: 0.85rem 0 0.3rem; font-weight: 650; font-size: 0.92rem; }
.support-form label span { font-weight: 400; color: var(--muted); }
.support-form input, .support-form textarea { width: 100%; font: 400 1rem/1.4 var(--font); color: var(--ink); background: var(--mist); border: 1px solid #D4CAF0; border-radius: 10px; padding: 0.65rem 0.8rem; }
.support-form textarea { min-height: 7.2rem; resize: vertical; }
.support-form input:focus, .support-form textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(155, 123, 255, 0.4); }
.support-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.support-warn { margin: 0.8rem 0 0; font-size: 0.88rem; color: var(--muted); }
.support-status { min-height: 1.5em; margin: 0.5rem 0 0.4rem; font-size: 0.93rem; color: var(--muted); }
.support-status.is-error { color: var(--bad); font-weight: 600; }
.support-send { width: 100%; }
.support-send[disabled] { opacity: 0.65; cursor: progress; }
.support-alt { margin: 0.9rem 0 0; font-size: 0.9rem; color: var(--muted); }
.support-done { padding-top: 0.6rem; }
.support-done-title { font: 700 1.2rem/1.3 var(--font-display); color: var(--good); margin: 0 0 0.5rem; }
.support-done p { color: var(--ink); }
.support-done .btn { margin-top: 0.4rem; }
@media print { .support { display: none !important; } }
@media (max-width: 760px) {
  .js .support { right: 0.9rem; bottom: 0.9rem; }
  .support-panel { width: calc(100vw - 1.8rem); max-height: calc(100vh - 6.5rem); }
  .dl-action .btn { width: 100%; }
}

/* ---------------------------------------------------------------- smaller screens */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > .section-head { position: static; margin-bottom: 1.8rem; }
  .cta-band .wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .top nav { display: none; }
  .top-actions { margin-left: auto; }
  .top .join { display: none; }
  .facts, .honest { grid-template-columns: minmax(0, 1fr); }
  .rows li { grid-template-columns: minmax(0, 1fr); }
  .rows li > :first-child { justify-self: start; }
  .trade-head { flex-direction: column; }
  .pills { justify-content: flex-start; }
  .steps li { gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* the narrowest phones: keep the logo, Discord and Download on one line */
@media (max-width: 400px) {
  .top .wrap { gap: 0.6rem; }
  .top .btn { padding: 0.5rem 0.85rem; font-size: 0.92rem; }
  .top-actions { gap: 0.45rem; }
  .brand { font-size: 1.2rem; gap: 0.5rem; }
  .brand img { width: 32px; height: 32px; }
}
@media (max-width: 340px) {
  .brand-name { display: none; }
}

/* pricing: hidden until the server says subscriptions are on */
[hidden] { display: none !important; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.2rem; max-width: 40rem; }
.plan { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 1.5rem 1.6rem; }
.plan-name { margin: 0; font: 600 1rem/1.3 var(--font); color: var(--muted); letter-spacing: 0.01em; }
.plan-price { margin: 0.5rem 0 0; font: 700 1.7rem/1.2 var(--font-display); color: var(--ink); }
.plan-save { margin: 0.6rem 0 0; display: inline-block; padding: 0.15rem 0.7rem; border-radius: 999px; background: var(--good-bg); color: var(--good); font: 600 0.9rem/1.5 var(--font); }
.plan-fine { margin: 1.3rem 0 0; color: var(--muted); font-size: 0.95rem; }

/* the full menu needs room: below this width the header keeps the logo and the two buttons only */
@media (max-width: 960px) {
  .top nav { display: none; }
  .top-actions { margin-left: auto; }
}
