/* KraiAudio store. Dark-first: the app is a player people use at night. */
:root {
  --bg: #0e1013;
  --panel: #161a1f;
  --line: #262c34;
  --fg: #e9e7e3;
  --muted: #98a0aa;
  --accent: #d8a657;
  --accent-fg: #14161a;
  --bad: #f28d86;
  --radius: 10px;
  --measure: 62rem;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfaf8; --panel: #fff; --line: #e2ded7; --fg: #1a1c20;
    --muted: #61666e; --accent: #8a6410; --accent-fg: #fff; --bad: #a8261c;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--measure); margin: 0 auto; padding-inline: 24px; }
.narrow { max-width: 42rem; }

a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: 1.05rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* Header */
header.site {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 14px; flex-wrap: wrap;
}
.brand { font-weight: 700; letter-spacing: -0.02em; text-decoration: none; font-size: 1.05rem; }
.brand span { color: var(--accent); }
nav.site { display: flex; gap: 20px; align-items: center; font-size: .92rem; }

/* Buttons */
.btn {
  display: inline-block; padding: .8rem 1.5rem; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-fg); border: 0;
  font-weight: 650; font-size: 1rem; text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost {
  background: transparent; color: var(--fg); border: 1px solid var(--line);
}
.btn[disabled] { opacity: .55; cursor: progress; }

/* Sections */
section { padding-block: clamp(3rem, 8vw, 5.5rem); }
section + section { border-top: 1px solid var(--line); }
.hero { padding-block: clamp(3.5rem, 10vw, 7rem); }
.lede { font-size: clamp(1.05rem, 2.2vw, 1.2rem); color: var(--muted); margin-top: 1.1rem; max-width: 36rem; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 2.2rem; }
.price { font-size: 1rem; }
.price s { color: var(--muted); }
.price b { font-size: 1.15rem; }

.grid { display: grid; gap: 28px; margin-top: 2.5rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .95rem; }

ul.checks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .7rem; }
ul.checks li { padding-left: 1.6rem; position: relative; color: var(--muted); }
ul.checks li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }

/* Signal path diagram */
.path { display: grid; gap: 10px; margin-top: 2.5rem; }
.path div {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; background: var(--panel);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem;
}
.path div b { color: var(--accent); font-weight: 600; }

dl.faq { margin: 2rem 0 0; display: grid; gap: 1.5rem; }
dl.faq dt { font-weight: 650; margin-bottom: .3rem; }
dl.faq dd { margin: 0; color: var(--muted); }

/* Forms (activation page) */
label { display: block; font-weight: 650; margin: 1.4rem 0 .4rem; }
label .hint { display: block; font-weight: 400; color: var(--muted); font-size: .875rem; }
input, textarea {
  width: 100%; padding: .7rem .8rem; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg); color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem;
}
input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { min-height: 7rem; resize: vertical; word-break: break-all; }
#error { color: var(--bad); margin-top: 1rem; min-height: 1.5rem; }
#result { display: none; margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }

/* Legal copy */
.prose h2 { margin-top: 2.5rem; }
.prose p, .prose li { color: var(--muted); margin-top: .9rem; }

footer.site { border-top: 1px solid var(--line); padding-block: 2.5rem; color: var(--muted); font-size: .9rem; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
footer.site nav { display: flex; gap: 18px; flex-wrap: wrap; }
