/* QutritLogic brand: navy #0B0F1A, ink #EEF1F6, cyan #2BC4E8, grey #9AA3B5 */
:root {
  --bg: #0B0F1A;
  --bg-2: #10162A;
  --surface: #141B2F;
  --line: #222B45;
  --ink: #EEF1F6;
  --muted: #9AA3B5;
  --accent: #2BC4E8;
  --accent-ink: #06222B;
  --radius: 14px;
  --wrap: 1120px;
  --sans: system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "DejaVu Sans Mono", Menlo, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface); border: 1px solid var(--line); padding: .08em .38em; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.08rem; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand img { height: 44px; width: auto; }
.nav nav { display: flex; gap: 4px; }
.nav nav a { color: var(--muted); font-size: .94rem; padding: 6px 10px; border-radius: 8px; }
.nav nav a:hover { color: var(--ink); background: var(--surface); text-decoration: none; }
/* On phones only the first link and any marked "keep" stay in the menu. */
@media (max-width: 640px) { .nav nav a:not(:first-child):not(.keep) { display: none; } }

/* Hero */
.hero { position: relative; padding: 88px 0 56px; overflow: hidden; }
.glow {
  position: absolute; inset: -20% -10% auto; height: 720px; pointer-events: none;
  background:
    radial-gradient(40% 50% at 50% 20%, rgba(43,196,232,.22), transparent 70%),
    radial-gradient(30% 40% at 80% 0%, rgba(120,90,255,.12), transparent 70%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(60% 50% at 50% 20%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(60% 50% at 50% 20%, #000 20%, transparent 75%);
  opacity: .45;
}
.hero-inner { position: relative; text-align: center; max-width: 820px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 .85rem/1 var(--mono); color: var(--muted);
  border: 1px solid var(--line); background: var(--surface);
  padding: 8px 14px; border-radius: 999px; margin-bottom: 28px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
h1 { font-size: clamp(2.3rem, 6.4vw, 4.4rem); font-weight: 750; letter-spacing: -0.035em; margin-bottom: 22px; }
.accent { background: linear-gradient(90deg, var(--accent), #8FE6FA); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--muted); max-width: 640px; margin: 0 auto 32px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: .98rem; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 30px -8px rgba(43,196,232,.6); }
.btn.primary:hover { background: #4FD2F0; }
.btn.ghost { border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.btn.ghost:hover { border-color: var(--accent); }
.note { margin-top: 18px; font-size: .88rem; color: var(--muted); }

.window {
  position: relative; margin: 56px auto 0; max-width: 1040px;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--surface);
  box-shadow: 0 40px 120px -30px rgba(43,196,232,.28), 0 20px 60px -20px rgba(0,0,0,.8);
}
.window-bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; background: #0E1424; border-bottom: 1px solid var(--line); }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2A3350; }
.window-bar span { margin-left: 10px; font: 500 .78rem var(--mono); color: var(--muted); }

/* Sections */
.section { padding: 96px 0; }
.section.alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.kicker { font: 600 .8rem/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin-bottom: 14px; }
.muted { color: var(--muted); }
.small { font-size: .92rem; margin-top: 24px; }

.split { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.15fr; gap: 64px; } }


.terminal { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #070A12; min-width: 0; }
.terminal pre { margin: 0; padding: 20px 22px; overflow-x: auto; font: 400 .88rem/1.7 var(--mono); }
.terminal code { background: none; border: 0; padding: 0; font-size: inherit; }
.terminal .c { color: #5C6784; }
.terminal .p { color: var(--accent); user-select: none; }

.releases { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 860px) { .releases { grid-template-columns: 1fr 1fr; } }
.release { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; }
.release header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.release h3 { font: 700 1.3rem var(--mono); color: var(--accent); }
.release time { color: var(--muted); font-size: .88rem; }
.release ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .95rem; }
.release li + li { margin-top: 6px; }
.release li::marker { color: var(--accent); }

/* Donate */
.donate { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .donate { grid-template-columns: 1fr 1.1fr; gap: 64px; } }
.btc-card {
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.qr { width: 180px; height: 180px; border-radius: 10px; background: #fff; flex: none; }
.btc-info { display: grid; gap: 10px; flex: 1 1 220px; min-width: 0; justify-items: start; }
.btc-label { font: 600 .8rem/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.addr {
  display: block; width: 100%; padding: 12px 14px; font-size: .9rem; line-height: 1.5;
  overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; cursor: text; color: var(--ink);
}
.hint { font-size: .82rem; color: var(--muted); }

/* Home */
.home-hero { padding: 64px 0 40px; }
.home-hero .lede { margin-bottom: 0; }
/* The homepage's only line: the page heading, styled like the hero's lede text. */
.home-line { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.22rem); font-weight: 400; letter-spacing: normal; line-height: 1.6; max-width: 640px; margin: 0 auto; }
.hero-mark { width: 88px; height: 88px; margin: 0 auto 28px; filter: drop-shadow(0 0 30px rgba(43,196,232,.35)); }
.crumbs { font: 500 .85rem/1 var(--mono); color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { margin: 0 6px; opacity: .6; }

/* One tool fills the row; more sit side by side. */
.products { display: grid; gap: 16px; margin-top: 32px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.product {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; color: var(--ink); transition: border-color .2s ease, transform .2s ease;
}
a.product:hover { text-decoration: none; border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); transform: translateY(-2px); }
.product h3 { font-size: 1.35rem; }
.product p { color: var(--muted); margin: 0; max-width: 62ch; }
.product-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.product-icon {
  width: 48px; height: 48px; padding: 11px; border-radius: 12px;
  background: rgba(43,196,232,.1); border: 1px solid rgba(43,196,232,.25);
  fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.badge { white-space: nowrap; flex: none; font: 600 .8rem/1 var(--mono); color: var(--accent); border: 1px solid rgba(43,196,232,.4); border-radius: 999px; padding: 6px 10px; }
.tags { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font: 500 .78rem/1 var(--mono); color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.more { margin-top: auto; padding-top: 10px; color: var(--accent); font-weight: 600; }
a.product:hover .more span { margin-left: 4px; }
.more span { transition: margin .2s ease; }


/* 404 */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.notfound h1 { font: 700 clamp(4rem, 14vw, 8rem)/1 var(--mono); color: var(--accent); margin-bottom: 12px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner { display: flex; gap: 18px; align-items: center; }
.footer p { margin: 0; color: var(--muted); font-size: .86rem; }

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

/* Platforms, under the hero buttons. */
.platforms { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.platforms li {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .9rem; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
}
.platforms li b { color: var(--ink); font-weight: 600; }
.platforms li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.platforms li.ready::before { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.platforms li.soon { border-style: dashed; }
.platforms li.soon::before { border: 1.5px solid var(--muted); }
.platforms a { color: inherit; text-decoration: none; }
.platforms a:hover b, .platforms a:focus-visible b { text-decoration: underline; }

/* Download */
.downloads { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 860px) { .downloads { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.download {
  display: grid; gap: 14px; align-content: start;
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: var(--radius); padding: 26px; min-width: 0;
}
.download header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.download h3 { font-size: 1.35rem; }
.download p { margin: 0; }
.download .btn { justify-self: start; max-width: 100%; overflow-wrap: anywhere; }
.download .file { font-size: .9rem; }
.download .sum { display: grid; gap: 4px; font-size: .8rem; color: var(--muted); }
.download .sum code { overflow-wrap: anywhere; font-size: .78rem; }
.download.soon { border-style: dashed; border-color: var(--line); background: transparent; }
.download.wide { grid-column: 1 / -1; }
.download.wide p { max-width: 72ch; }
.install { margin-top: 48px; }
.install h3 { font-size: 1.25rem; margin-bottom: 10px; }
.install h3 + p + h3, .install p + h3 { margin-top: 22px; }

/* Donations, on a tool's page: one quiet line that opens the Bitcoin details. */
.section.slim { padding: 40px 0 56px; }
.coffee summary { list-style: none; cursor: pointer; color: var(--muted); font-size: .95rem; }
.coffee summary::-webkit-details-marker { display: none; }
.coffee summary .link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.coffee summary:hover .link { color: #8FE6FA; }
.donate-body { margin-top: 18px; max-width: 760px; }
.donate-body .btc-card { margin-bottom: 4px; }

/* User guide link, in the Download section. */
.manual {
  display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between;
  margin-top: 40px; padding: 22px 26px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.manual h3 { font-size: 1.2rem; margin-bottom: 6px; }
.manual p { margin: 0; max-width: 62ch; }


/* Text pages, such as the privacy notice. */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 12px; }
.prose h2 { font-size: 1.35rem; margin: 40px 0 12px; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 20px; margin: 0 0 1rem; }
.prose li + li { margin-top: 6px; }
.prose b { color: var(--ink); }
.about-pic { width: 100%; max-width: 280px; margin: 8px auto 28px; border-radius: var(--radius); border: 1px solid var(--line); }
@media (min-width: 640px) { .about-pic { float: right; width: 240px; margin: 0 0 24px 32px; } }
.footer a { color: var(--muted); text-decoration: underline; }
.footer a:hover { color: var(--accent); }

/* Hero showcase: a looping recording; the still screenshot for reduced motion. */
.window video { display: block; width: 100%; height: auto; background: #1a1b26; }
.window .still { display: none; }
@media (prefers-reduced-motion: reduce) {
  .window video { display: none; }
  .window .still { display: block; }
}

/* Plain fact lists, such as Features and Privacy. */
.facts { margin: 24px 0 0; padding-left: 20px; color: var(--muted); }
.facts li { margin-bottom: 8px; break-inside: avoid; }
/* Two columns, read top to bottom. */
@media (min-width: 900px) { .facts { columns: 2; column-gap: 56px; } }
.facts li::marker { color: var(--accent); }

/* A tall screenshot, such as a code file, shown at its own width. */
.window.narrow { max-width: 760px; }

/* A hero with a window: clip only sideways, so the window's glow fades out
   below the hero instead of ending in a hard line at its bottom edge. */
.hero:has(.window) { overflow-x: clip; overflow-y: visible; }

/* A full-width photo between sections, fading into the page at top and bottom. */
.photo-band { margin: 48px 0 0; }
.photo-band img {
  width: 100%; height: clamp(240px, 38vw, 560px); object-fit: cover; object-position: 30% 50%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
}
.photo-band figcaption { margin-top: -8px; text-align: right; font: 500 .8rem/1 var(--mono); color: var(--muted); }
.photo-band + .section { padding-top: 72px; }

/* Features in groups, on a tool's page. */
.feature-groups { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 900px) { .feature-groups { grid-template-columns: repeat(2, 1fr); } }
.feature-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; }
.feature-group h3 { font-size: 1.2rem; }
.feature-group .facts { columns: auto; margin-top: 14px; font-size: .97rem; }
.feature-group.safe { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.feature-group.safe h3 { color: var(--accent); }
.feature-note { margin: 28px 0 0; max-width: 75ch; }

/* Questions: each one opens without JavaScript. */
.faq { margin-top: 24px; max-width: 820px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 32px 18px 0; position: relative;
  font-weight: 600; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 400 1.4rem/1.4 var(--mono); color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--accent); }
.faq details p { color: var(--muted); margin: 0 0 18px; max-width: 70ch; }

/* Earlier releases, behind a toggle under the latest one. */
.older { margin-top: 20px; }
.older summary { cursor: pointer; color: var(--accent); font-weight: 600; width: fit-content; }
.older summary .muted { font-weight: 400; }
.older .releases { margin-top: 16px; align-items: start; }

/* A feature shown with a screenshot beside its text. */
.spotlight { display: grid; gap: 32px; align-items: center; margin-top: 32px; }
@media (min-width: 900px) { .spotlight { grid-template-columns: 1fr 1.1fr; gap: 56px; } }
.spotlight h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); margin-bottom: 14px; }
.spotlight .window { margin: 0; max-width: 560px; justify-self: center; width: 100%; }
.spotlight + .feature-groups { margin-top: 56px; }
