:root {
  --color-bg: #ffffff;
  --color-bg-soft: #f7faf9;
  --color-bg-tint: #edf8f6;
  --color-text: #1B2B3A;
  --color-text-soft: #4a5b6c;
  --color-text-muted: #6b7c8c;
  --color-accent: #4A9E8E;
  --color-accent-hover: #3d8a7b;
  --color-accent-soft: #aedad2;
  --color-border: #e3e8ec;
  --color-border-soft: #eef2f4;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(27, 43, 58, 0.04);
  --shadow-md: 0 4px 16px rgba(27, 43, 58, 0.08);
  --max-width: 1100px;
  --gutter: 1.25rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

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

h1, h2, h3 {
  margin: 0 0 .5em;
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-text);
}
h2 {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  margin-bottom: 1.5rem;
}
h3 { font-size: 1.1rem; }

p { margin: 0 0 1em; color: var(--color-text-soft); }
em { color: inherit; font-style: italic; }
code {
  background: var(--color-bg-tint);
  padding: .12em .38em;
  border-radius: 4px;
  font-size: .92em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--color-text);
}

main > section {
  padding: 4rem var(--gutter);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ===== Header ===== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gutter);
  max-width: var(--max-width);
  margin: 0 auto;
  border-bottom: 1px solid var(--color-border-soft);
}
.logo-link img { height: 30px; width: auto; display: block; }
.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: .92rem;
}
.site-header nav a {
  color: var(--color-text-soft);
}
.site-header nav a:hover {
  color: var(--color-accent);
  text-decoration: none;
}
.lang-switcher {
  font-size: .85rem;
  color: var(--color-text-muted);
  margin-left: .25rem;
}
.lang-switcher a[aria-current="page"] {
  color: var(--color-text);
  font-weight: 600;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding-top: 5rem;
  padding-bottom: 4.5rem;
}
.hero-logo {
  height: 96px;
  width: auto;
  margin: 0 auto 1.75rem;
}
.hero-tagline {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--color-text);
  line-height: 1.25;
}
.hero-tagline strong {
  color: var(--color-accent);
  font-weight: 700;
}
.hero-sub {
  font-size: 1.1rem;
  max-width: 38em;
  margin: 0 auto 2rem;
  color: var(--color-text-soft);
}
.hero-ctas {
  display: flex;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: .8rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s, transform .05s, box-shadow .15s;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--color-accent);
  color: white;
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  color: white;
  text-decoration: none;
}
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  text-decoration: none;
}

/* ===== Features ===== */
.features {
  background: var(--color-bg-soft);
  border-radius: var(--radius-lg);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.feature {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-sm);
}
.feature h3 { margin-bottom: .5rem; }
.feature p { font-size: .95rem; margin: 0; }

.cta-strip { text-align: center; margin-top: 2rem; }

/* ===== Moments / screenshots ===== */
.moments figure {
  margin: 0 0 2rem;
  text-align: center;
}
.moments figure img {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-width: 880px;
  margin: 0 auto;
  background: var(--color-bg-soft);
}
.moments .figure-pdf img {
  max-width: 520px;
}
.moments figcaption {
  margin-top: .85rem;
  font-size: .95rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ===== Why local ===== */
.why-local {
  background: var(--color-bg-tint);
  border-radius: var(--radius-lg);
  max-width: 880px;
}
.why-local p {
  color: var(--color-text);
  font-size: 1.05rem;
}

/* ===== FAQ ===== */
.faq {
  max-width: 800px;
}
.faq details {
  border-bottom: 1px solid var(--color-border-soft);
  padding: 1.1rem 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--color-accent);
  font-weight: 400;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: transform .15s;
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
  margin-top: .75rem;
  margin-bottom: 0;
  color: var(--color-text-soft);
}

/* ===== Download ===== */
.download { text-align: center; }
.download-sub {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}
.dl-card {
  display: block;
  padding: 1.5rem 1.25rem;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  transition: transform .1s, border-color .1s, box-shadow .1s;
}
.dl-card:hover {
  border-color: var(--color-accent);
  text-decoration: none;
  color: var(--color-text);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.dl-card h3 {
  margin: 0 0 .25rem;
  color: var(--color-accent);
}
.dl-card p {
  margin: 0;
  font-size: .9rem;
  color: var(--color-text-muted);
}
/* Expandable card (e.g. Linux deb/rpm) */
.dl-card-expand {
  padding: 0;
  background: white;
}
.dl-card-expand summary {
  list-style: none;
  cursor: pointer;
  padding: 1.5rem 1.25rem;
  position: relative;
  display: block;
}
.dl-card-expand summary::-webkit-details-marker { display: none; }
.dl-card-expand summary::after {
  content: "▾";
  position: absolute;
  top: 1.4rem;
  right: 1.1rem;
  color: var(--color-accent);
  font-size: 1rem;
  transition: transform .15s;
}
.dl-card-expand[open] summary::after { transform: rotate(180deg); }
.dl-card-expand summary h3 {
  margin: 0 0 .25rem;
  color: var(--color-accent);
}
.dl-card-expand summary p {
  margin: 0;
  font-size: .9rem;
  color: var(--color-text-muted);
}
.dl-card-expand[open] {
  border-color: var(--color-accent);
  transform: none;
}
.dl-options {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border-soft);
}
.dl-options a {
  padding: .8rem 1.25rem;
  color: var(--color-text);
  font-size: .92rem;
  border-bottom: 1px solid var(--color-border-soft);
  transition: background .1s;
}
.dl-options a:last-child { border-bottom: none; }
.dl-options a:hover {
  background: var(--color-bg-tint);
  text-decoration: none;
  color: var(--color-text);
}
.dl-options strong {
  display: block;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: .1rem;
}

.dl-card-cli {
  grid-column: 1 / -1;
  background: var(--color-bg-tint);
  padding: 1.5rem;
}
@media (min-width: 720px) {
  .dl-card-cli:not(.dl-card-expand) {
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
  }
  .dl-card-cli:not(.dl-card-expand) h3 { white-space: nowrap; min-width: 12rem; }
  .dl-card-cli:not(.dl-card-expand) p { flex: 1; }
}
.dl-card-cli.dl-card-expand { padding: 0; display: block; }
.dl-card-cli.dl-card-expand > summary { padding: 1.5rem; padding-right: 3rem; background: var(--color-bg-tint); }
.dl-card-cli.dl-card-expand > .dl-options { background: white; }
.download-foot {
  font-size: .9rem;
  color: var(--color-text-muted);
  margin-top: 1.5rem;
}

/* ===== Share ===== */
.share {
  max-width: 760px;
  text-align: center;
}
.coffee-note {
  font-size: .92rem;
  color: var(--color-text-muted);
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border-soft);
}

/* ===== Contact ===== */
.contact { max-width: 600px; }
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--color-text-soft);
}
.contact-form input,
.contact-form textarea {
  padding: .7rem .85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: white;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.contact-form textarea {
  resize: vertical;
  min-height: 6rem;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.contact-form button { align-self: flex-start; }

/* ===== Language banner ===== */
.lang-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg-tint);
  border-bottom: 1px solid var(--color-accent-soft);
  padding: .65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  font-size: .92rem;
  color: var(--color-text);
  flex-wrap: wrap;
  text-align: center;
}
.lang-banner-actions {
  display: inline-flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.lang-banner-yes {
  background: var(--color-accent);
  color: white;
  padding: .35rem .85rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
}
.lang-banner-yes:hover {
  background: var(--color-accent-hover);
  color: white;
  text-decoration: none;
}
.lang-banner-no {
  background: transparent;
  color: var(--color-text-soft);
  border: 1px solid var(--color-border);
  padding: .35rem .85rem;
  border-radius: var(--radius);
  font-size: .9rem;
  cursor: pointer;
  font-family: inherit;
}
.lang-banner-no:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--color-border-soft);
  padding: 2rem var(--gutter);
  text-align: center;
  font-size: .9rem;
  color: var(--color-text-muted);
}
.site-footer p { margin: .25rem 0; color: inherit; }
.site-footer a { color: var(--color-text-soft); }

/* ===== Mobile ===== */
@media (max-width: 640px) {
  main > section { padding: 2.75rem var(--gutter); }
  .hero { padding-top: 3rem; padding-bottom: 3rem; }
  .hero-logo { height: 72px; }
  .site-header nav { gap: .9rem; font-size: .85rem; }
  .feature, .dl-card { padding: 1.25rem; }
  .moments .figure-pdf img { max-width: 100%; }
}

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