/* llmuse website. Colours follow the app's dark theme (crates/uikit/src/theme.rs). */

:root {
  --bg: #0b0c0f;
  --bg-2: #101216;
  --surface: #15171b;
  --surface-2: #1b1e23;
  --panel: #23272e;
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);
  --text: #e6e8ec;
  --text-strong: #ffffff;
  --muted: #9aa1ad;
  --accent: #ff8a2a;
  --accent-hover: #ffa255;
  --on-accent: #1b1e23;
  --pink: #ec406e;
  --mint: #3ddbb0;
  --blue: #58a6ff;
  --yellow: #f5c542;
  --grad: linear-gradient(100deg, #ff9230 0%, #ff6a4d 45%, #ec406e 100%);
  --radius: 14px;
  --radius-lg: 22px;
  --gutter: clamp(16px, 4vw, 40px);
  --container: 1240px;
  --wide: 1360px;
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

:lang(ko) { --font: "Inter", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif; }
:lang(ja) { --font: "Inter", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", "Noto Sans JP", system-ui, sans-serif; }
:lang(zh-CN) { --font: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; }
:lang(zh-TW) { --font: "Inter", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

@supports (overflow: clip) { body { overflow-x: clip; } }

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
code, pre { font-family: var(--mono); }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: rgba(255, 138, 42, 0.35); color: #fff; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 20px; height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm { width: 16px; height: 16px; }


.skip {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 650;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container-wide { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }

/* Language-specific line breaking */
:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }
:lang(ja), :lang(zh-CN), :lang(zh-TW) { line-break: strict; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) li { word-break: auto-phrase; }
:lang(de), :lang(nl), :lang(ru), :lang(pl), :lang(tr), :lang(fr), :lang(it), :lang(es), :lang(pt-BR) { hyphens: auto; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 0.9375rem; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: 14px 26px; font-size: 1.0625rem; border-radius: 14px; }
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 8px 30px -10px rgba(255, 138, 42, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-2);
  color: var(--text-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.24); }
.btn:active { transform: translateY(0); }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(11, 12, 15, 0.78);
  border-bottom-color: var(--border);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand img { width: 30px; height: 30px; }

.site-nav { margin-inline: auto; }
.site-nav ul { display: flex; gap: 4px; }
.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, background-color 0.2s;
}
.site-nav a:hover { color: var(--text-strong); background: rgba(255, 255, 255, 0.05); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.site-nav + .header-actions { margin-left: 0; }

.lang { position: relative; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 550;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.lang-btn:hover { background: rgba(255, 255, 255, 0.08); }
.lang-btn .icon-sm { transition: transform 0.2s; }
.lang-btn[aria-expanded="true"] .icon-sm { transform: rotate(180deg); }
.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  width: max-content;
  max-width: min(92vw, 420px);
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border-2);
  border-radius: 14px;
  background: rgba(21, 23, 27, 0.97);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.7);
}
.lang-list a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}
.lang-list a:hover, .lang-list a:focus-visible { background: rgba(255, 255, 255, 0.07); outline-offset: -2px; }
.lang-list a[aria-current="true"] { color: var(--accent); background: rgba(255, 138, 42, 0.1); font-weight: 650; }

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}
.menu-btn .icon-close { display: none; }
.menu-btn[aria-expanded="true"] .icon-open { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 1280px) {
  .menu-btn { display: inline-flex; }
  .site-nav {
    position: absolute;
    left: 0; right: 0; top: var(--header-h);
    margin: 0;
    padding: 8px var(--gutter) 20px;
    background: rgba(11, 12, 15, 0.97);
    border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    display: none;
  }
  .site-header.is-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 12px 4px; font-size: 1.0625rem; color: var(--text); border-radius: 0; border-bottom: 1px solid var(--border); }
  .site-nav li:last-child a { border-bottom: 0; }
  .site-nav + .header-actions { margin-left: auto; }
}

@media (max-width: 560px) {
  .header-download span { display: none; }
  .header-download { padding: 8px 10px; }
  .lang-current { display: none; }
  .lang-btn { padding: 6px 9px; }
  .header-inner { gap: 12px; }
  .lang-list { position: fixed; left: var(--gutter); right: var(--gutter); top: calc(var(--header-h) - 4px); max-width: none; width: auto; }
}

/* ---------- Typography helpers ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow .icon { width: 18px; height: 18px; }
.eyebrow-mint { color: var(--mint); }

h1, h2, h3 { color: var(--text-strong); text-wrap: balance; overflow-wrap: break-word; }
h2 {
  font-size: clamp(2rem, 1.25rem + 2.4vw, 3.4rem);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: -0.032em;
}
h3 { font-size: 1.125rem; font-weight: 680; line-height: 1.3; letter-spacing: -0.01em; }
.lead { color: var(--muted); font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); line-height: 1.6; text-wrap: pretty; }
p { text-wrap: pretty; }
code {
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-strong);
  font-size: 0.9em;
}
strong { color: var(--text-strong); font-weight: 650; }
p code, li code { white-space: nowrap; }

:lang(ko) h1, :lang(ko) h2, :lang(ja) h1, :lang(ja) h2, :lang(zh-CN) h1, :lang(zh-CN) h2, :lang(zh-TW) h1, :lang(zh-TW) h2 {
  letter-spacing: -0.01em;
  line-height: 1.2;
}
:lang(ko) .eyebrow, :lang(ja) .eyebrow, :lang(zh-CN) .eyebrow, :lang(zh-TW) .eyebrow { letter-spacing: 0.04em; }

.section { position: relative; padding-block: clamp(72px, 7.5vw, 128px); }
.section-head { max-width: 47.5rem; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 + .lead { margin-top: 18px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(40px, 6vw, 88px));
  padding-bottom: clamp(56px, 7vw, 110px);
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0 0 18% 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 160px 100%, 40px 100%, 100% 72px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 25%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 25%, #000 25%, transparent 78%);
}
.hero-playhead {
  position: absolute;
  top: 0; bottom: 0;
  left: 12%;
  width: 2px;
  background: linear-gradient(to bottom, rgba(255, 138, 42, 0.9), rgba(255, 138, 42, 0) 85%);
  opacity: 0.4;
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent);
  mask-image: linear-gradient(to bottom, #000 50%, transparent);
}
.hero-playhead::before {
  content: "";
  position: absolute;
  top: calc(var(--header-h) + 4px);
  left: -6px;
  border: 7px solid transparent;
  border-top: 9px solid var(--accent);
}
.hero-glow {
  position: absolute;
  inset: -10% -10% 0 -10%;
  background:
    radial-gradient(40% 45% at 30% 30%, rgba(255, 138, 42, 0.22), transparent 70%),
    radial-gradient(38% 42% at 72% 38%, rgba(236, 64, 110, 0.2), transparent 70%),
    radial-gradient(30% 30% at 50% 85%, rgba(88, 166, 255, 0.08), transparent 70%);
  filter: blur(20px);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-playhead { animation: playhead 18s linear infinite; }
  @keyframes playhead {
    from { left: 6%; }
    to { left: 94%; }
  }
}

.hero-copy { max-width: 75rem; text-align: center; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  padding: 7px 16px 7px 12px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 550;
}
.pill-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(61, 219, 176, 0.18);
}
.hero-title {
  font-size: clamp(2.5rem, 0.9rem + 4.4vw, 5.6rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.hero-title .line { display: block; }
:lang(ko) .hero-title, :lang(ja) .hero-title, :lang(zh-CN) .hero-title, :lang(zh-TW) .hero-title {
  font-size: clamp(2.1rem, 0.8rem + 3.6vw, 4.6rem);
  line-height: 1.15;
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.06em;
}
.hero-lead {
  max-width: 47.5rem;
  margin: 28px auto 0;
  color: var(--muted);
  font-size: clamp(1.0625rem, 0.98rem + 0.45vw, 1.3rem);
  line-height: 1.6;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero .cta-row, .cta-row.center { justify-content: center; }
@media (max-width: 480px) {
  .hero .cta-row .btn, .cta-panel .cta-row .btn { width: 100%; }
}

.release-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 0;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.875rem;
}
.release-meta > * { display: inline-flex; align-items: center; }
.release-meta > :not([hidden]) ~ :not([hidden])::before {
  content: "";
  width: 1px; height: 12px;
  margin-inline: 12px;
  background: var(--border-2);
}
@media (max-width: 560px) {
  .release-meta { gap: 4px 18px; }
  .release-meta > :not([hidden]) ~ :not([hidden])::before { display: none; }
}

/* SHA-256 of the installer, under the hero download button */
.verify { max-width: 46rem; margin: 14px auto 0; color: var(--muted); font-size: 0.875rem; }
.verify summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.verify summary::-webkit-details-marker { display: none; }
.verify summary:hover { color: var(--text-strong); }
.verify summary .icon { transition: transform 0.2s; }
.verify[open] summary .icon { transform: rotate(180deg); }
.verify-body {
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}
.verify-name { margin-bottom: 8px; color: var(--text); font-family: var(--mono); font-size: 0.8125rem; overflow-wrap: anywhere; }
.verify-hash { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.verify-label { color: var(--text); font-weight: 650; }
.verify-hash code { flex: 1 1 18rem; min-width: 0; padding: 6px 8px; font-size: 0.8125rem; line-height: 1.5; overflow-wrap: anywhere; }
.verify-note { margin-top: 10px; line-height: 1.55; }

.hero-shot {
  position: relative;
  max-width: 1760px;
  margin: clamp(40px, 5vw, 72px) auto 0;
  border-radius: clamp(10px, 1.2vw, 18px);
  perspective: 2000px;
}
.hero-shot::before {
  content: "";
  position: absolute;
  inset: 8% 6% -4%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 138, 42, 0.35), rgba(236, 64, 110, 0.18) 45%, transparent 75%);
  filter: blur(60px);
}
.hero-shot picture {
  overflow: hidden;
  border: 1px solid var(--border-2);
  border-radius: inherit;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 50px 120px -30px rgba(0, 0, 0, 0.9);
}

/* ---------- Stats ---------- */

.stats { border-block: 1px solid var(--border); background: linear-gradient(to bottom, rgba(255, 255, 255, 0.015), transparent); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: clamp(24px, 3vw, 40px) clamp(12px, 2vw, 32px);
  text-align: center;
}
.stat + .stat { border-left: 1px solid var(--border); }
.stat-num {
  color: var(--text-strong);
  font-size: clamp(2.2rem, 1.4rem + 2.4vw, 3.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.stat:nth-child(1) .stat-num { color: var(--accent); }
.stat-label { color: var(--muted); font-size: 0.9375rem; line-height: 1.4; }

@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }
}

/* ---------- Frames (screenshots) ---------- */

.frame {
  position: relative;
  border-radius: var(--radius);
}
.frame picture {
  overflow: hidden;
  border: 1px solid var(--border-2);
  border-radius: inherit;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 30px 80px -24px rgba(0, 0, 0, 0.85);
}
.frame::before {
  content: "";
  position: absolute;
  inset: 12% 8% -6%;
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, var(--glow, var(--accent)), transparent 75%);
  opacity: 0.32;
  filter: blur(56px);
}
.frame img, .hero-shot img { width: 100%; }
.frame img.detail { aspect-ratio: 16 / 10; object-fit: cover; }

/* ---------- Modes (tabs) ---------- */

.tabs { display: flex; flex-direction: column; align-items: center; }
.tablist {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--border-2);
  border-radius: 14px;
  background: var(--surface);
  max-width: 100%;
  overflow-x: auto;
}
.tab {
  min-width: 112px;
  min-height: 44px;
  padding: 8px 22px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.tab:hover { color: var(--text-strong); background: rgba(255, 255, 255, 0.05); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.tabpanel { width: 100%; margin-top: 36px; outline-offset: 8px; }
.tab-copy { max-width: 45rem; margin: 0 auto 40px; text-align: center; }
.tab-copy h3 { font-size: clamp(1.4rem, 1.1rem + 0.8vw, 1.8rem); }
.tab-copy p { margin-top: 10px; color: var(--muted); font-size: 1.0625rem; }

@media (prefers-reduced-motion: no-preference) {
  .tabpanel:not([hidden]) { animation: fade-up 0.5s var(--ease); }
  @keyframes fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
  }
}

/* ---------- Feature rows ---------- */

.rows { padding-top: 0; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: center;
}
.row-flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.row + .row { margin-top: clamp(88px, 10vw, 160px); }
.row-flip .row-media { order: 2; }
.row-copy h2 { font-size: clamp(1.9rem, 1.2rem + 1.9vw, 2.9rem); }
.row-copy > p:not(.eyebrow) { margin-top: 18px; color: var(--muted); font-size: 1.0625rem; }
.row-copy .note { margin-top: 22px; font-size: 0.9375rem; }

.checks { display: grid; gap: 12px; margin-top: 26px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.5; }
.checks .icon {
  width: 22px; height: 22px;
  margin-top: 1px;
  padding: 3px;
  border-radius: 7px;
  background: rgba(255, 138, 42, 0.14);
  color: var(--accent);
  stroke-width: 2.4;
}

/* On wide screens the screenshot runs out past the text column towards the window edge */
@media (min-width: 1200px) {
  .row { --bleed: min(120px, max(0px, (100vw - var(--container)) / 2 - 24px)); }
  .row .row-media { margin-left: calc(-1 * var(--bleed)); }
  .row-flip .row-media { margin-left: 0; margin-right: calc(-1 * var(--bleed)); }
}
@media (max-width: 900px) {
  .row, .row-flip { grid-template-columns: minmax(0, 1fr); }
  .row-flip .row-media { order: 0; }
}

/* Singer: two stacked screenshots */
.stack { position: relative; padding-bottom: 18%; }
.frame-float {
  position: absolute;
  left: -4%;
  bottom: 0;
  width: 52%;
  border-radius: 12px;
}
.frame-float picture { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 30px 60px -10px rgba(0, 0, 0, 0.9); }
.frame-float::before { display: none; }
.row-singer .stack > .frame:first-child { margin-left: 8%; }
@media (max-width: 900px) {
  .frame-float { left: 0; }
  .row-singer .stack > .frame:first-child { margin-left: 6%; }
}

/* ---------- Cards grid ---------- */

.more { background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.015) 30%, transparent); }
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  padding: 26px 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  transition: border-color 0.3s, background-color 0.3s, transform 0.3s var(--ease);
}
.card:hover { border-color: rgba(255, 138, 42, 0.4); transform: translateY(-3px); }
.card h3 { margin-top: 18px; }
.card p { margin-top: 8px; color: var(--muted); font-size: 0.96875rem; line-height: 1.55; }
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(255, 138, 42, 0.12);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 138, 42, 0.22);
}
.card-icon .icon { width: 22px; height: 22px; }

@media (max-width: 1100px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .card { display: grid; grid-template-columns: 42px minmax(0, 1fr); column-gap: 16px; padding: 18px; }
  .card .card-icon { grid-row: span 2; width: 42px; height: 42px; }
  .card h3 { margin-top: 0; align-self: center; }
  .card p { grid-column: 2; margin-top: 4px; }
}

/* ---------- Gallery ---------- */

.gallery { padding-top: 0; }
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.shots figure { display: flex; flex-direction: column; gap: 12px; }
.shot-btn {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  background: var(--surface);
  cursor: zoom-in;
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.9);
  transition: border-color 0.3s, transform 0.3s var(--ease);
}
.shot-btn img { width: 100%; transition: transform 0.6s var(--ease); }
.shot-btn:hover { border-color: rgba(255, 138, 42, 0.5); }
.shot-btn:hover img { transform: scale(1.035); }
.shots figcaption { color: var(--muted); font-size: 0.9375rem; line-height: 1.45; }
@media (max-width: 900px) { .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .shots {
    display: flex;
    gap: 14px;
    margin-inline: calc(-1 * var(--gutter));
    padding: 4px var(--gutter) 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    overscroll-behavior-x: contain;
  }
  .shots > li { flex: 0 0 84%; scroll-snap-align: start; }
}

.lightbox {
  width: min(96vw, 1600px);
  max-width: none;
  max-height: 96vh;
  padding: 0;
  border: 1px solid var(--border-2);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(5, 6, 8, 0.85); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox-img { width: 100%; max-height: calc(96vh - 60px); object-fit: contain; background: #000; }
.lightbox-caption { padding: 14px 64px 16px 20px; color: var(--muted); font-size: 0.9375rem; }
.lightbox-close {
  position: absolute;
  right: 10px; bottom: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: var(--panel);
  cursor: pointer;
}
.lightbox-close:hover { background: #2c313a; }

/* ---------- AI ---------- */

.ai { overflow: hidden; background: #0d0f12; border-block: 1px solid var(--border); }
.ai-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(45% 55% at 85% 30%, rgba(61, 219, 176, 0.13), transparent 70%),
    radial-gradient(40% 50% at 10% 85%, rgba(88, 166, 255, 0.1), transparent 70%);
  pointer-events: none;
}
.ai-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 80% 40%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 80% 40%, #000, transparent 75%);
}
.ai-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.ai .section-head { margin-bottom: 36px; }
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
.points li { display: flex; gap: 14px; }
.points p { margin-top: 4px; color: var(--muted); font-size: 0.96875rem; line-height: 1.55; }
.point-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: rgba(61, 219, 176, 0.12);
  color: var(--mint);
  box-shadow: inset 0 0 0 1px rgba(61, 219, 176, 0.22);
}

.ai-demo { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.console {
  overflow: hidden;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  background: rgba(11, 12, 15, 0.9);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.5);
}
.console-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.875rem;
}
.console-title { color: var(--muted); font-weight: 600; }
.console-status { display: inline-flex; align-items: center; gap: 8px; color: var(--mint); font-weight: 600; }
.console-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.console-body { padding: 22px 20px 24px; }
.console-prompt {
  position: relative;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-strong);
  font-size: 1rem;
  line-height: 1.55;
}
.console-calls { display: grid; gap: 2px; margin-top: 18px; counter-reset: call; }
.console-calls li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 7px 4px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  font-family: var(--mono);
  font-size: 0.875rem;
}
.console-calls li:last-child { border-bottom: 0; }
.console-calls li::before {
  content: "";
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--mint);
  transform: translateY(-1px);
}
.console-calls code { padding: 0; background: none; color: var(--mint); font-size: 1em; }
.console-calls span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.codeblock {
  overflow: hidden;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  background: #08090b;
}
.codeblock-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}
.codeblock pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  color: var(--text);
  font-size: 0.875rem;
  line-height: 1.7;
  tab-size: 2;
}
.codeblock pre code { padding: 0; background: none; font-size: 1em; white-space: pre; }
#mcp-cmd code { white-space: pre-wrap; overflow-wrap: anywhere; }
.c-prompt { color: var(--accent); user-select: none; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.09); }
.copy-btn .icon { width: 15px; height: 15px; }
.copy-btn.is-done { color: var(--mint); border-color: rgba(61, 219, 176, 0.5); }
.ai-note { color: var(--muted); font-size: 0.9375rem; line-height: 1.55; }

@media (max-width: 980px) {
  .ai-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .points { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Requirements ---------- */

.req-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.req .section-head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 32px); }
.spec {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}
.spec > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.38fr) minmax(0, 1fr);
  gap: 16px;
  padding: 18px 24px;
}
.spec > div + div { border-top: 1px solid var(--border); }
.spec dt { color: var(--muted); font-size: 0.9375rem; font-weight: 600; }
.spec dd { color: var(--text); }
@media (max-width: 900px) {
  .req-grid { grid-template-columns: minmax(0, 1fr); }
  .req .section-head { position: static; }
}
@media (max-width: 520px) {
  .spec > div { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 16px 18px; }
}

/* ---------- FAQ ---------- */

.faq { padding-top: 0; }
.faq-wrap { max-width: 54rem; }
.faq-list { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 4px;
  color: var(--text-strong);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.2rem);
  font-weight: 620;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-hover); }
.faq summary .icon {
  width: 28px; height: 28px;
  padding: 5px;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  transition: transform 0.3s var(--ease), background-color 0.3s;
}
.faq details[open] summary .icon { transform: rotate(45deg); background: rgba(255, 255, 255, 0.06); }
.faq details > p { padding: 0 4px 22px; color: var(--muted); max-width: 72ch; }
.faq details > p + p { margin-top: -10px; }

/* ---------- CTA ---------- */

.cta { padding-top: 0; }
.cta-panel {
  position: relative;
  padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 64px);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(60% 90% at 50% 0%, rgba(255, 138, 42, 0.22), transparent 70%),
    radial-gradient(40% 60% at 85% 100%, rgba(236, 64, 110, 0.16), transparent 70%),
    var(--bg-2);
}
.cta-logo { width: 64px; height: 64px; margin: 0 auto 24px; filter: drop-shadow(0 10px 30px rgba(255, 106, 77, 0.45)); }
.cta-panel h2 { font-size: clamp(2.2rem, 1.3rem + 3vw, 4rem); }
.cta-panel .lead { margin-top: 14px; }

/* Download counter under the download buttons, Buy Me a Coffee next to them */
.dl-count {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.cta-panel .dl-count { margin-top: 18px; }
.cta-panel .dl-count + .release-meta { margin-top: 8px; }
.btn.bmc .icon { color: var(--yellow); }

/* ---------- Contact form ---------- */

.feedback { padding-top: 0; }
.feedback-wrap { max-width: 50rem; }
.fb-form {
  padding: clamp(20px, 3.5vw, 36px);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
}
.fb-body { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.fb-body[disabled] { opacity: 0.55; }
.fb-label { display: block; color: var(--text); font-size: 0.9375rem; font-weight: 620; }
.fb-cats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 10px; }
.fb-cats .fb-label { margin-right: 6px; }
.fb-chip { position: relative; cursor: pointer; }
.fb-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fb-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 16px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.fb-chip:hover span { color: var(--text-strong); }
.fb-chip input:checked + span { border-color: rgba(255, 138, 42, 0.6); background: rgba(255, 138, 42, 0.12); color: var(--accent-hover); }
.fb-chip input:focus-visible + span { outline: 2px solid var(--accent-hover); outline-offset: 3px; }
.fb-form textarea,
.fb-form input[type="email"],
.fb-form input[type="text"] {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  background: rgba(8, 9, 11, 0.6);
  color: var(--text-strong);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
}
.fb-form textarea { min-height: 170px; resize: vertical; }
.fb-form textarea:focus, .fb-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 138, 42, 0.2); }
.fb-form ::placeholder { color: #6b7280; }
.fb-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; margin-top: 6px; }
.fb-row > div { display: grid; gap: 10px; align-content: start; }
.fb-turnstile { min-height: 65px; margin-top: 8px; }
.fb-turnstile:empty { min-height: 0; }
.fb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 6px; }
.fb-privacy { color: var(--muted); font-size: 0.9375rem; text-underline-offset: 3px; }
.fb-privacy:hover { color: var(--text-strong); }
.fb-status { margin-top: 16px; padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); color: var(--text); font-size: 0.9375rem; }
.fb-status.is-ok { background: rgba(61, 219, 176, 0.1); color: var(--mint); }
.fb-status.is-error { background: rgba(236, 64, 110, 0.12); color: #ff8fab; }
.fb-off { margin-top: 16px; color: var(--muted); font-size: 0.9375rem; }
@media (max-width: 620px) {
  .fb-row { grid-template-columns: minmax(0, 1fr); }
  .fb-actions .btn { width: 100%; }
}

/* ---------- Privacy page ---------- */

.legal { padding-top: calc(var(--header-h) + clamp(32px, 5vw, 64px)); padding-bottom: clamp(56px, 7vw, 96px); }
.legal-wrap { max-width: 50rem; }
.legal h1 { font-size: clamp(2rem, 1.3rem + 2.2vw, 3rem); font-weight: 780; line-height: 1.15; letter-spacing: -0.03em; }
.legal .updated { margin-top: 12px; color: var(--muted); font-size: 0.9375rem; }
.legal h2 { margin-top: 44px; font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); letter-spacing: -0.015em; line-height: 1.3; }
.legal p, .legal ul { margin-top: 14px; color: var(--text); line-height: 1.7; }
.legal ul { padding-left: 1.3em; list-style: disc; }
.legal li + li { margin-top: 6px; }
.legal li::marker { color: var(--muted); }
.legal a { color: var(--accent-hover); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal .lead { margin-top: 18px; }
.legal-langs { display: flex; gap: 6px; margin-left: auto; }
.legal ~ .site-footer { padding-block: 0 40px; }
.legal ~ .site-footer .footer-fine { margin-top: 0; }
.legal ~ .site-footer a { color: inherit; }
.legal-langs a { padding: 6px 10px; border: 1px solid var(--border-2); border-radius: 8px; color: var(--muted); font-size: 0.875rem; text-decoration: none; }
.legal-langs a[aria-current="true"] { color: var(--accent); border-color: rgba(255, 138, 42, 0.5); }

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 64px 40px;
  border-top: 1px solid var(--border);
  background: #08090b;
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(10rem, auto));
  gap: 32px 64px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
.footer-brand p { margin-top: 14px; color: var(--muted); max-width: 30ch; }
.footer-col h2 {
  margin-bottom: 14px;
  color: var(--text-strong);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-col li + li { margin-top: 8px; }
.footer-col a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--text-strong); text-decoration: underline; text-underline-offset: 3px; }
.footer-fine {
  display: grid;
  gap: 10px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  color: #8a919c;
  font-size: 0.84375rem;
  line-height: 1.6;
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Scroll reveal (only with JS and when motion is welcome) ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .js .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
    transition-delay: var(--d, 0s);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js .reveal-shot picture {
    opacity: 0;
    transform: rotateX(16deg) translateY(48px) scale(0.94);
    transform-origin: 50% 0;
    transition: opacity 1s var(--ease) 0.25s, transform 1.4s var(--ease) 0.25s;
  }
  .js .reveal-shot.is-visible picture { opacity: 1; transform: none; }
}

/* Waiting for a saved language to load (assets/js/boot.js lifts this after 1.5 s at most) */
.i18n-wait body { opacity: 0; }
body { transition: opacity 0.25s ease; }
@media (prefers-reduced-motion: reduce) { body { transition: none; } }

/* ---------- Large screens ---------- */

@media (min-width: 1800px) {
  :root { --container: 1400px; --wide: 1560px; }
}
@media (min-width: 2400px) {
  html { font-size: 112.5%; }
  :root { --container: 1560px; --wide: 1760px; }
}
@media (min-width: 3200px) {
  html { font-size: 131.25%; }
  :root { --container: 1800px; --wide: 2040px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn-primary:hover, .card:hover, .shot-btn:hover img { transform: none; }
}

/* ---------- Print ---------- */

@media print {
  .site-header, .hero-bg, .lightbox, .copy-btn { display: none !important; }
  body { background: #fff; color: #000; }
  .js .reveal, .js .reveal-shot picture { opacity: 1 !important; transform: none !important; }
}
