/* Cirrust marketing site — self-contained, dependency-free, theme-aware.
   Palette echoes the app's KDE Breeze tokens. */

:root {
  --accent: #3daee9;
  --accent-ink: #1f6aa5;   /* darker blue for text-on-blue buttons (WCAG-safe) */
  --accent-soft: rgba(61, 174, 233, 0.12);

  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace;

  /* Palette literals live here once; the theme rules below only point the live
     tokens at one set or the other. */
  --l-canvas: #f6f8fa;
  --l-surface: #ffffff;
  --l-surface-2: #eef1f4;
  --l-line: #e2e6ea;
  --l-ink: #1b2227;
  --l-ink-soft: #5b6672;
  --l-shadow: 0 10px 40px -12px rgba(20, 40, 60, 0.18);

  --d-canvas: #14181b;
  --d-surface: #1c2125;
  --d-surface-2: #232a2f;
  --d-line: #2e363c;
  --d-ink: #eef1f2;
  --d-ink-soft: #9aa4ad;
  --d-shadow: 0 16px 50px -14px rgba(0, 0, 0, 0.7);
}

/* Light is the default. `data-theme` on <html> is an explicit visitor choice and
   overrides the OS preference in either direction; with no attribute set, the OS
   decides. Keep this order: defaults, then system-dark, then forced dark. */
:root,
:root[data-theme="light"] {
  --canvas: var(--l-canvas);
  --surface: var(--l-surface);
  --surface-2: var(--l-surface-2);
  --line: var(--l-line);
  --ink: var(--l-ink);
  --ink-soft: var(--l-ink-soft);
  --shadow: var(--l-shadow);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --canvas: var(--d-canvas);
    --surface: var(--d-surface);
    --surface-2: var(--d-surface-2);
    --line: var(--d-line);
    --ink: var(--d-ink);
    --ink-soft: var(--d-ink-soft);
    --shadow: var(--d-shadow);
  }
}

:root[data-theme="dark"] {
  --canvas: var(--d-canvas);
  --surface: var(--d-surface);
  --surface-2: var(--d-surface-2);
  --line: var(--d-line);
  --ink: var(--d-ink);
  --ink-soft: var(--d-ink-soft);
  --shadow: var(--d-shadow);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
code, kbd, pre { font-family: var(--mono); }
kbd {
  font-size: 0.85em; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 6px;
}

/* ─── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.25rem; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent-ink); color: #fff; }
.btn--primary:hover { background: #1a5c90; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Header ──────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem clamp(1rem, 4vw, 2rem);
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
}
.brand__mark {
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 9px; background: var(--accent); color: #fff;
}
.brand--sm { font-size: 1rem; }
.site-nav { display: flex; align-items: center; gap: 1.4rem; font-size: 0.95rem; color: var(--ink-soft); }
.site-nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 720px) {
  .site-nav a:not(.btn) { display: none; }
}

/* ─── Theme toggle ────────────────────────────────────────────────────── */
.theme-toggle {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; padding: 0; flex: none;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink-soft); cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg { display: block; width: 17px; height: 17px; }

/* Show the icon for the theme you would switch *to*. */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme]) .theme-toggle .icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ─── Layout helpers ──────────────────────────────────────────────────── */
main { display: block; }
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 4vw, 2rem); }
.section--muted { background: var(--surface); max-width: none; }
.section--muted > * { max-width: var(--maxw); margin-inline: auto; }
.section__head { max-width: 720px; margin-bottom: 2.5rem; }
.section__head h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.section__head p { color: var(--ink-soft); margin-top: 0.75rem; }

/* ─── Logo lab (concept review) ───────────────────────────────────────── */
.logolab {
  max-width: var(--maxw); margin: 1.5rem auto 0; padding: 1.5rem clamp(1rem, 4vw, 2rem);
}
.logolab__head { margin-bottom: 1.25rem; }
.logolab__head h2 { font-size: 1.15rem; }
.logolab__head p { color: var(--ink-soft); font-size: 0.9rem; margin-top: 0.35rem; }
.logolab__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 820px) { .logolab__grid { grid-template-columns: repeat(2, 1fr); } }
.logolab__item { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.logolab__sizes {
  display: flex; align-items: flex-end; justify-content: center; gap: 0.9rem;
  padding: 1.4rem 1rem; min-height: 96px;
  background:
    linear-gradient(90deg, var(--surface-2) 0 50%, #ffffff 50% 100%);
}
/* Left half uses the app surface, right half is pure white — so you can judge
   each mark on both a tinted and a white background at once. */
.logolab__sizes img { display: block; }
.logolab__item figcaption {
  padding: 0.6rem 0.9rem; font-size: 0.85rem; color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
.logolab__item figcaption strong { color: var(--accent); }

/* ─── Hero ────────────────────────────────────────────────────────────── */
/* Einspaltig: Text oben, darunter die Collage über die volle Breite. Zweispaltig
   bliebe für sie nur ~55 %, und die Einschnitte der hinteren Fenster wären zu
   klein, um noch etwas zu erkennen. */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 2rem) 0;
  display: grid; grid-template-columns: 1fr; gap: clamp(1.5rem, 4vw, 2.5rem);
}
/* Zentriert, weil der Text einspaltig sonst eine große leere Fläche rechts
   neben sich hätte. */
/* px statt ch: `ch` rechnet mit der Body-Schriftgröße und ist für eine
   3,6rem-Headline zu eng — die brach sonst auf drei Zeilen. */
.hero__copy { max-width: 780px; margin-inline: auto; text-align: center; }
.hero__copy .lede { max-width: 62ch; margin-inline: auto; }
.hero__copy .hero__cta { justify-content: center; }

.hero__collage { margin: 0; }
.hero__collage img { display: block; width: 100%; height: auto; }
/* Etwas breiter als die Textspalte, solange der Viewport es hergibt. */
@media (min-width: 1180px) {
  .hero__collage {
    width: min(1400px, calc(100vw - 3rem));
    margin-inline: calc((var(--maxw) - 4rem - min(1400px, 100vw - 3rem)) / 2);
  }
}
.eyebrow {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent);
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0.9rem 0 1rem; }
.lede { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--ink-soft); max-width: 40ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.8rem 0 1rem; }
.hero__meta { font-size: 0.85rem; color: var(--ink-soft); }

/* ─── Screenshot frames ───────────────────────────────────────────────── */
.shot {
  margin: 0; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
}
.shot img { display: block; width: 100%; height: auto; }

/* Theme-matched screenshots: a figure holds both the light and the dark capture
   and only one is displayed. `display: none` also drops the hidden one from the
   accessibility tree, so a screen reader announces the alt text just once —
   which is why both images carry the same alt.
   Same cascade order as the palette: default, then system-dark, then forced. */
.shot__light { display: block; }
.shot__dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .shot__light { display: none; }
  :root:not([data-theme]) .shot__dark { display: block; }
}
:root[data-theme="dark"] .shot__light { display: none; }
:root[data-theme="dark"] .shot__dark { display: block; }
:root[data-theme="light"] .shot__light { display: block; }
:root[data-theme="light"] .shot__dark { display: none; }
/* A small capture (the tray menu) shown at its native size rather than stretched
   to the column width, which would only blur it. */
.shot--inset {
  display: grid; place-items: center;
  padding: clamp(1.5rem, 5vw, 3rem);
  background: var(--surface-2);
}
.shot--inset img { width: auto; max-width: 100%; border-radius: 10px; }

.shot figcaption {
  padding: 0.7rem 1rem; font-size: 0.85rem; color: var(--ink-soft);
  border-top: 1px solid var(--line); background: var(--surface);
}
.shot--placeholder {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  gap: 0.6rem; padding: clamp(1.5rem, 4vw, 2.5rem);
  min-height: 260px; box-shadow: none;
  border-style: dashed; background:
    repeating-linear-gradient(45deg, transparent, transparent 12px,
      color-mix(in srgb, var(--ink-soft) 6%, transparent) 12px,
      color-mix(in srgb, var(--ink-soft) 6%, transparent) 24px),
    var(--surface);
}
.ph__title { font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.ph__desc { color: var(--ink-soft); font-size: 0.95rem; max-width: 46ch; }
.shot--placeholder code {
  font-size: 0.8rem; color: var(--ink-soft);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 7px;
}

/* ─── Strip ───────────────────────────────────────────────────────────── */
.strip {
  max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 720px) { .strip { grid-template-columns: repeat(2, 1fr); } }
.strip__item { background: var(--surface); padding: 1.1rem 1.25rem; display: flex; flex-direction: column; gap: 0.15rem; }
.strip__k { font-weight: 700; color: var(--accent); font-size: 0.9rem; }
.strip__v { color: var(--ink-soft); font-size: 0.9rem; }

/* ─── Features ────────────────────────────────────────────────────────── */
.features { max-width: var(--maxw); margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem); display: flex; flex-direction: column; gap: clamp(3rem, 7vw, 5.5rem); }
.feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.feature--reverse .feature__text { order: 2; }
@media (max-width: 860px) {
  .feature, .feature--reverse { grid-template-columns: 1fr; }
  .feature--reverse .feature__text { order: 0; }
}
.tag {
  display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ink-soft);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 0.25rem 0.6rem; border-radius: 999px; margin-bottom: 1rem;
}
.tag--accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.feature__text h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.85rem; }
.feature__text > p { color: var(--ink-soft); }
.checks { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-direction: column; gap: 0.6rem; }
.checks li { position: relative; padding-left: 1.7rem; color: var(--ink); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 0.85rem; height: 0.45rem;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ─── Card grids ──────────────────────────────────────────────────────── */
.grid3 { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 800px) { .grid3 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.card__icon { color: var(--accent); margin-bottom: 0.75rem; line-height: 0; }
.card__icon svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.card p { color: var(--ink-soft); font-size: 0.95rem; }

/* ─── Download ────────────────────────────────────────────────────────── */
.downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
@media (max-width: 800px) { .downloads { grid-template-columns: 1fr; } }
.dl {
  display: flex; flex-direction: column; gap: 0.15rem; padding: 1.1rem 1.25rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.dl:hover { border-color: var(--accent); transform: translateY(-2px); }
.dl__name { font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.dl__sub { font-size: 0.85rem; color: var(--ink-soft); }

/* The AppImage is the only build published as a release asset. */
.dl--primary { border-color: var(--accent); background: var(--accent-soft); }
.dl__tag {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.15rem 0.45rem; border-radius: 999px;
  background: var(--accent-ink); color: #fff;
}
.codeblock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.codeblock__title { padding: 0.6rem 1rem; font-size: 0.8rem; color: var(--ink-soft); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.codeblock pre { margin: 0; padding: 1.1rem 1.25rem; overflow-x: auto; font-size: 0.9rem; }
.fineprint { margin-top: 1.25rem; font-size: 0.9rem; color: var(--ink-soft); }
.fineprint code { background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }

/* ─── Footer ──────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer__row { max-width: var(--maxw); margin: 0 auto; padding: 1.5rem clamp(1rem, 4vw, 2rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-footer__nav { display: flex; gap: 1.25rem; color: var(--ink-soft); font-size: 0.9rem; }
.site-footer__nav a:hover { color: var(--ink); }
.disclaimer { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem) 2rem; font-size: 0.8rem; color: var(--ink-soft); }

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