/* Editify landing page. No external fonts or libraries. */

:root {
  --bg: #f4f1ec;
  --bg-2: #ebe7e0;
  --card: #fbfaf7;
  --text: #24221f;
  --muted: #6b675f;
  --line: #d9d4cb;
  --accent: #e8643a;      /* warm coral, from the screenshot's gradient */
  --accent-2: #f2a43a;
  --accent-text: #ffffff;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 12px 32px -12px rgb(40 30 20 / 0.25);
  --radius: 14px;
  color-scheme: light dark;
}

/* Dark: follows the system unless the visitor picked a theme with the
   header button (stored as data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f12;
    --bg-2: #16161b;
    --card: #1a1a20;
    --text: #ecebe8;
    --muted: #a19e98;
    --line: #2b2b33;
    --accent: #ff7a4d;
    --accent-2: #ffb347;
    --accent-text: #1a0e08;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 20px 48px -16px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0f12;
  --bg-2: #16161b;
  --card: #1a1a20;
  --text: #ecebe8;
  --muted: #a19e98;
  --line: #2b2b33;
  --accent: #ff7a4d;
  --accent-2: #ffb347;
  --accent-text: #1a0e08;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 20px 48px -16px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

.wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--card); padding: 8px 14px; border-radius: 8px; z-index: 10;
}
.skip:focus { left: 8px; }

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

/* ---- header ---- */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.top-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { border-radius: 8px; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }
.lang {
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--text); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer;
}
.lang:hover { border-color: var(--muted); }
.theme {
  display: inline-grid; place-items: center; width: 32px; height: 28px; padding: 0;
  color: var(--text); background: transparent; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px;
}
.theme:hover { border-color: var(--muted); }
.theme svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
/* Show the moon in light mode (switch to dark) and the sun in dark mode. */
.theme .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun { display: block; }
  :root:not([data-theme="light"]) .theme .moon { display: none; }
}
:root[data-theme="dark"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: none; }

/* ---- hero ---- */
.hero { text-align: center; padding: 72px 0 40px; }
.eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 5px 14px;
  font-size: 14px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
}
h1 {
  font-size: clamp(34px, 5.4vw, 60px); line-height: 1.08; letter-spacing: -0.02em;
  margin: 0 auto 20px; max-width: 18ch; text-wrap: balance;
}
/* The word "free" in the headline, in the accent gradient. */
.hl {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
@media (forced-colors: active) { .hl { color: CanvasText; background: none; } }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 62ch; margin: 0 auto 32px; text-wrap: pretty; }

.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 12px; font-weight: 600; font-size: 16px;
  text-decoration: none; border: 1px solid transparent; transition: transform .12s ease, background .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-text);
  box-shadow: 0 8px 24px -10px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { border-color: var(--line); background: var(--card); }
.btn.ghost:hover { border-color: var(--muted); }

.dl-icon {
  width: 16px; height: 16px; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M7 1h2v8.2l2.8-2.8 1.4 1.4L8 13 2.8 7.8l1.4-1.4L7 9.2zM2 14h12v2H2z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M7 1h2v8.2l2.8-2.8 1.4 1.4L8 13 2.8 7.8l1.4-1.4L7 9.2zM2 14h12v2H2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.gh { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* Hero: one button per system (the visitor's first), then Buy Me a Coffee. */
.hero-cta { align-items: stretch; }
.hero-cta.win-first #hero-win { order: -1; }
.os-btn { text-align: left; padding: 11px 20px; }
.btn-text { display: flex; flex-direction: column; line-height: 1.2; }
.btn-text small { font-weight: 500; font-size: 12.5px; opacity: 0.8; margin-top: 2px; }
/* Support line under the downloads: smaller, so it doesn't read as a download. */
.hero-support {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  margin: 22px auto 0; padding-top: 18px; max-width: 680px;
  border-top: 1px solid var(--line);
}
.hero-support p { margin: 0; font-size: 14.5px; color: var(--muted); }
.pills { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; }
/* Fixed height: the coffee emoji and the GitHub icon have different natural
   heights, so padding alone gives two pill sizes. */
.hero-support .bmc-small, .hero-support .star-pill {
  height: 38px; padding: 0 16px; line-height: 1; border-radius: 999px; font-size: 14px;
}
.star-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700;
  text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--line);
}
.star-pill:hover { border-color: var(--muted); }
.star-pill .gh { width: 16px; height: 16px; }
.star-count {
  font-weight: 600; color: var(--muted);
  padding-left: 8px; border-left: 1px solid var(--line);
}

.meta { margin: 16px 0 0; font-size: 14px; color: var(--muted); }

.shot {
  margin: 48px auto 0; max-width: 1080px;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  background: var(--bg-2);
}

/* ---- sections ---- */
section { scroll-margin-top: 80px; }
h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.015em; line-height: 1.15; margin: 0 0 12px; text-align: center; text-wrap: balance; }
.sub { text-align: center; color: var(--muted); margin: 0 auto 32px; max-width: 60ch; }

.features { padding: 80px 0 40px; }
.features h2 { margin-bottom: 40px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 20px;
}
.card svg {
  width: 28px; height: 28px; margin-bottom: 10px;
  fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }

.download { padding: 80px 0 40px; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; max-width: 760px; margin: 0 auto; }
.dl-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; text-align: center;
}
.dl-card h3 { margin: 0 0 4px; font-size: 22px; }
.dl-card .req { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.dl-card .size { margin: 10px 0 0; color: var(--muted); font-size: 13.5px; min-height: 1.4em; }
.dl-card .alt { display: inline-block; margin-top: 6px; font-size: 14.5px; color: var(--muted); }
.dl-card.suggested { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

.first-run {
  max-width: 760px; margin: 22px auto 0;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px;
}
.first-run summary { cursor: pointer; font-weight: 600; }
.first-run p, .first-run li { color: var(--muted); font-size: 15.5px; }
.first-run strong { color: var(--text); }
.all { text-align: center; margin-top: 18px; font-size: 15px; color: var(--muted); }

.support { padding: 80px 0 96px; text-align: center; }
.support p { color: var(--muted); max-width: 58ch; margin: 0 auto 24px; }
.center { justify-content: center; align-items: center; }
.bmc {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px;
  background: #ffdd00; color: #1f1a00; font-weight: 700; text-decoration: none;
  border: 1px solid #e6c700;
}
.bmc:hover { filter: brightness(1.04); }
/* The bottom section's coffee and GitHub buttons, same height. */
.support .bmc, .support .btn { height: 52px; padding-block: 0; line-height: 1; }

.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 22px 0; }

@media (max-width: 640px) {
  .nav a:not([href^="https"]) { display: none; }
  .hero { padding-top: 48px; }
  .btn { width: 100%; justify-content: center; }
  .cta.center .bmc { width: 100%; justify-content: center; }
}
