/* KindlingControl landing page: same dark stage palette as the app. */

:root {
  color-scheme: dark;
  --bg: #0d0e10;
  --bg-2: #131518;
  --surface: #1b1e22;
  --surface-2: #252930;
  --border: #2e333a;
  --text: #eceef1;
  --muted: #a3aab4;
  --accent: #f5a524;
  --accent-ink: #1a1204;
  --flame: #ff8a1f;
  --gate: #5b6470;
  --comp: #2563eb;
  --drive: #ea580c;
  --mod: #7c3aed;
  --delay: #0d9488;
  --reverb: #3f6b8f;
  --max: 1180px;
  accent-color: var(--accent);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.55;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; color: var(--text);
  background:
    radial-gradient(1100px 620px at 70% -120px, rgb(255 138 31 / 0.18), transparent 70%),
    radial-gradient(900px 500px at 0% 30%, rgb(37 99 235 / 0.08), transparent 70%),
    var(--bg);
}
img { max-inline-size: 100%; block-size: auto; display: block; }
a { color: var(--accent); }
a:hover { color: #ffc861; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; inset-inline-start: 1rem; inset-block-start: -3rem; background: var(--accent); color: var(--accent-ink); padding: 0.5rem 0.8rem; border-radius: 0.5rem; z-index: 10; }
.skip:focus { inset-block-start: 1rem; }

/* ---- nav --------------------------------------------------------------------- */

.nav {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.7rem max(1.25rem, calc((100vw - var(--max)) / 2));
  background: rgb(13 14 16 / 0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand, .footer-brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand b, .footer-brand b { font-weight: 400; color: var(--accent); }
.brand img { border-radius: 0.5rem; }
.nav nav { display: flex; gap: 1.25rem; margin-inline-start: auto; }
.nav nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav nav a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 0.6rem; }
@media (width < 820px) { .nav nav { display: none; } .nav-actions { margin-inline-start: auto; } }

/* ---- buttons ----------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.9rem; padding: 0.6rem 1.2rem; border-radius: 0.7rem;
  font-weight: 700; text-decoration: none; color: var(--text);
  background: linear-gradient(#2b3037, #22262c); border: 1px solid var(--border);
}
.btn:hover { color: var(--text); border-color: #4a515c; }
.btn-primary { background: linear-gradient(#f8b746, var(--accent)); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 24px rgb(245 165 36 / 0.25); }
.btn-primary:hover { color: var(--accent-ink); filter: brightness(1.05); }
.btn-small { min-height: 2.4rem; padding: 0.35rem 0.9rem; font-size: 0.95rem; }

/* ---- hero ------------------------------------------------------------------------ */

.hero {
  max-inline-size: var(--max); margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 5rem) 1.25rem 2rem;
  display: grid; gap: 2.5rem; align-items: center;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}
@media (width < 900px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.eyebrow { margin: 0 0 0.75rem; color: var(--accent); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; letter-spacing: -0.02em; }
.hero h1 span {
  background: linear-gradient(90deg, #ffd166, var(--flame) 55%, #e0391c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: 1.15rem; color: #cfd4da; max-inline-size: 36rem; margin: 1.25rem 0 1.5rem; }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.fine { color: var(--muted); font-size: 0.85rem; margin-top: 0.9rem; }

.hero-shots { position: relative; padding-block-end: 2.5rem; }
.device { margin: 0; border-radius: 0.9rem; overflow: hidden; border: 1px solid #3a3f47; box-shadow: 0 30px 80px rgb(0 0 0 / 0.6), 0 0 0 6px #15171a; }
.device-desktop { transform: perspective(1600px) rotateY(-6deg) rotateX(2deg); transform-origin: left center; }
.device-phone {
  position: absolute; inline-size: 27%; inset-inline-end: -1%; inset-block-end: 0;
  border-radius: 1.4rem; box-shadow: 0 24px 60px rgb(0 0 0 / 0.7), 0 0 0 5px #15171a, 0 0 0 6px #3a3f47;
}
.device-phone img { aspect-ratio: 390 / 600; object-fit: cover; object-position: top; }
@media (width < 900px) { .device-desktop { transform: none; } .device-phone { inline-size: 32%; } }
@media (prefers-reduced-motion: reduce) { .device-desktop { transform: none; } }

/* ---- supported amps strip ---------------------------------------------------------- */

.amps {
  max-inline-size: var(--max); margin: 0 auto; padding: 1rem 1.25rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem;
  border-block: 1px solid var(--border);
}
.amps p { margin: 0; color: var(--muted); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.amps ul { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.amps li { padding: 0.3rem 0.8rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: 0.9rem; }

/* ---- sections ---------------------------------------------------------------------- */

.section { max-inline-size: var(--max); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) 1.25rem 0; }
.section h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.15; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
.section-lede { color: #cfd4da; font-size: 1.08rem; max-inline-size: 46rem; margin: 0 0 2rem; }

.features { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.feature {
  position: relative; padding: 1.4rem 1.4rem 1.3rem; border-radius: 1rem;
  background: linear-gradient(color-mix(in srgb, var(--c) 16%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 40%, var(--border));
}
.feature::before {
  content: ''; display: block; inline-size: 0.7rem; aspect-ratio: 1; border-radius: 50%; margin-block-end: 0.9rem;
  background: radial-gradient(circle at 35% 35%, #ffb3ad, #ff3b30 60%); box-shadow: 0 0 10px rgb(255 59 48 / 0.6);
}
.feature h3 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.feature p { margin: 0; color: #c6ccd3; }

/* gallery */
.shots { display: grid; gap: 1.25rem; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: start; }
.shot { margin: 0; grid-column: span 3; }
.shot-wide { grid-column: 1 / -1; }
.shot-phone { grid-column: span 2; }
.shot-phone + .shot { grid-column: span 4; }
.shot img { border-radius: 0.8rem; border: 1px solid #3a3f47; box-shadow: 0 18px 50px rgb(0 0 0 / 0.5); }
.shot-phone img { aspect-ratio: 390 / 560; object-fit: cover; object-position: top; border-radius: 1.2rem; }
.shot figcaption { margin-top: 0.7rem; color: var(--muted); font-size: 0.95rem; }
.shot figcaption strong { color: var(--text); }
@media (width < 760px) {
  .shots { grid-template-columns: minmax(0, 1fr); }
  .shot, .shot-wide, .shot-phone, .shot-phone + .shot { grid-column: auto; }
  .shot-phone img { max-inline-size: 280px; }
}

/* how to */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.steps li { counter-increment: step; padding: 1.3rem; border-radius: 1rem; background: var(--surface); border: 1px solid var(--border); }
.steps li::before {
  content: counter(step); display: grid; place-items: center; inline-size: 2.2rem; aspect-ratio: 1; margin-bottom: 0.8rem;
  border-radius: 50%; font-weight: 800; color: var(--accent-ink); background: linear-gradient(#f8b746, var(--accent));
}
.steps h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.steps p { margin: 0; color: #c6ccd3; }

.platforms { margin-top: 2rem; display: grid; gap: 1rem; }
.platforms table { border-collapse: collapse; inline-size: 100%; max-inline-size: 46rem; }
.platforms caption { text-align: start; font-weight: 800; margin-bottom: 0.5rem; }
.platforms th, .platforms td { text-align: start; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.platforms thead th { color: var(--muted); font-size: 0.85rem; font-weight: 700; }
.platforms tbody th { white-space: nowrap; }
@media (width < 520px) { .platforms tbody th { white-space: normal; } }
.try { margin: 0; color: var(--muted); }

/* credits */
.credit-list { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); margin-bottom: 1.5rem; }
.credit { padding: 1.4rem; border-radius: 1rem; background: var(--surface); border: 1px solid var(--border); border-block-start: 3px solid var(--flame); }
.credit h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.credit p { margin: 0; color: #c6ccd3; }
.credits > p { color: #c6ccd3; max-inline-size: 46rem; }

/* faq */
.faq details { max-inline-size: 50rem; border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; padding: 1rem 0; font-weight: 700; font-size: 1.05rem; list-style-position: outside; }
.faq details p { margin: 0 0 1.1rem; color: #c6ccd3; }

/* footer */
.footer {
  max-inline-size: var(--max); margin: clamp(3rem, 7vw, 5.5rem) auto 0; padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--border); color: var(--muted); font-size: 0.92rem;
}
.footer-brand img { border-radius: 0.45rem; }
.disclaimer { font-size: 0.82rem; max-inline-size: 52rem; }

/* back to top: hidden while the hero is visible (toggled by the inline script) */
.to-top {
  position: fixed; z-index: 6;
  inset-inline-end: max(1rem, env(safe-area-inset-right)); inset-block-end: max(1rem, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 0.35rem;
  min-height: 2.9rem; padding: 0.5rem 1rem; border-radius: 999px;
  font-weight: 800; text-decoration: none; color: var(--accent-ink);
  background: linear-gradient(#f8b746, var(--accent));
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.55), 0 0 0 1px rgb(0 0 0 / 0.3);
  opacity: 0; translate: 0 0.75rem; visibility: hidden;
  transition: opacity 0.2s, translate 0.2s, visibility 0s linear 0.2s;
}
.to-top.show { opacity: 1; translate: 0 0; visibility: visible; transition: opacity 0.2s, translate 0.2s, visibility 0s; }
.to-top:hover { color: var(--accent-ink); filter: brightness(1.05); }
.to-top[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .to-top, .to-top.show { transition: none; } }
.copyright { color: var(--text); }

/* buy me a coffee (header) */
.btn-coffee { gap: 0.4rem; color: #000; background: #ffdd00; border-color: #000; }
.btn-coffee:hover { color: #000; border-color: #000; filter: brightness(1.06); }
.btn-coffee { white-space: nowrap; }
@media (width < 560px) or ((width >= 820px) and (width < 1080px)) { .btn-coffee .coffee-text { display: none; } .btn-coffee { padding-inline: 0.65rem; } }
.nav-actions .btn { white-space: nowrap; }
@media (width < 440px) { .nav .brand > span { display: none; } } /* phones: logo only, so both header buttons fit */

/* ---- Android test invite dialog (site/invite.js) ------------------------------- */

[hidden] { display: none !important; } /* component rules set display; hidden must still win (here and on hub pages) */
button.btn { font: inherit; font-weight: 700; cursor: pointer; }
button.btn:disabled { opacity: 0.6; cursor: progress; }
.linkish { padding: 0; border: 0; background: none; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.linkish:hover { color: #ffc861; }

#invite {
  inline-size: min(32rem, calc(100vw - 2rem)); max-block-size: calc(100dvh - 2rem);
  padding: 1.4rem; border-radius: 1rem; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}
#invite:modal { overscroll-behavior: contain; }
#invite::backdrop { background: rgb(0 0 0 / 0.65); overflow: hidden; overscroll-behavior: contain; }
#invite h2 { margin: 0 0 0.6rem; font-size: 1.3rem; }
#invite p { margin: 0 0 1rem; color: #c6ccd3; }
#invite .dev-link { overflow-wrap: anywhere; }
#invite label { display: block; font-weight: 700; margin-bottom: 0.3rem; }
#invite input:not([type=checkbox]) {
  display: block; inline-size: 100%; margin-bottom: 1rem; padding: 0.6rem 0.75rem;
  font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--border); border-radius: 0.6rem;
}
#invite label.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; margin-bottom: 0.8rem; }
#invite label.check input { margin-top: 0.3rem; flex: none; inline-size: 1.1rem; block-size: 1.1rem; }
#invite .fine { margin-top: 0; }
.invite-hp { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
.invite-status:empty { display: none; }
.invite-status[data-kind=error] { color: #ff8f8f; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
