/* TASK-217: the public site. Tokens come from docs/marketing/DESIGN.md (the palette of app/static/theme.css).
   No external fonts or requests; light and dark theme through [data-theme] (theme-init.js sets it before paint). */

:root {
  --page: #202124;
  --surface: #292a2d;
  --surface-alt: #25262a;
  --border: #3c4043;
  --text: #e8eaed;
  --text-muted: #9aa0a6;
  --primary: #1a73e8;
  --primary-hover: #1557b0;
  --on-primary: #ffffff;
  --link: #8ab4f8;
  --focus-ring: #8ab4f8;
  --radius-card: 12px;
  --radius-button: 10px;
  --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --page: #f8f9fa;
  --surface: #ffffff;
  --surface-alt: #f1f3f4;
  --border: #dadce0;
  --text: #202124;
  --text-muted: #5f6368;
  --link: #1a62c9;
  --focus-ring: #1a73e8;
  --shadow-float: 0 8px 24px rgba(60, 64, 67, 0.18);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { text-decoration: none; }
:is(a, button, summary):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 16px; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; line-height: 1.3; margin-bottom: 8px; }
p { margin: 0 0 16px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 30; padding: 10px 16px;
  background: var(--primary); color: var(--on-primary); border-radius: var(--radius-button); text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 20; background: var(--page);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.main-nav { display: flex; gap: 20px; margin-left: 16px; font-size: 0.95rem; }
.main-nav a { color: var(--text-muted); text-decoration: none; padding: 6px 2px; }
.main-nav a:hover { color: var(--text); }
.header-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.lang-switch { display: flex; gap: 2px; }
.lang-switch a {
  min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-decoration: none;
}
.lang-switch a[aria-current="true"] { color: var(--text); background: var(--surface); border: 1px solid var(--border); }
.icon-button {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}

/* buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 18px;
  font: inherit; font-size: 0.95rem; font-weight: 600; text-decoration: none; cursor: pointer;
  border-radius: var(--radius-button); border: 1px solid transparent;
}
.button-primary { background: var(--primary); color: var(--on-primary); }
.button-primary:hover { background: var(--primary-hover); }
.button-ghost { color: var(--text); border-color: var(--border); background: transparent; }
.button-ghost:hover { background: var(--surface); }
.button-large { min-height: 48px; padding: 10px 26px; font-size: 1.05rem; }

/* hero */
.hero { padding: 64px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1fr 1.15fr; } }
.badge {
  display: inline-block; margin: 0 0 16px; padding: 4px 12px; font-size: 0.85rem; font-weight: 600;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.lead { font-size: 1.2rem; color: var(--text-muted); max-width: 34em; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 12px; }
.note { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0; }

/* sections */
.section { padding: 80px 0; }
.section-alt { background: var(--surface-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-intro { color: var(--text-muted); max-width: 40em; margin-bottom: 32px; }
.center .section-intro { margin-left: auto; margin-right: auto; }
@media (max-width: 640px) { .section { padding: 48px 0; } .hero { padding: 40px 0 32px; } }

.two-col { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1.3fr 1fr; } }
.plain-list { margin: 0; padding-left: 20px; color: var(--text-muted); }
.plain-list li { margin-bottom: 8px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px; margin: 0;
}
.card p:last-child { margin-bottom: 0; }
.card-accent { border-color: var(--primary); }

.steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step-number {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-bottom: 12px;
  border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 700;
}

.feature-shots { display: grid; gap: 16px; grid-template-columns: 1fr; margin-bottom: 16px; }
@media (min-width: 900px) { .feature-shots { grid-template-columns: 1fr 1fr; } }
.feature-shots figure { padding: 16px; }
.feature-shots figcaption { margin-top: 16px; }
.feature-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }

/* screenshots: the picture of the active theme only */
.shot img { display: block; width: 100%; border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-float); }
.shot-light { display: none; }
:root[data-theme="light"] .shot-light { display: block; }
:root[data-theme="light"] .shot-dark { display: none; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style-position: outside; }
.faq-item p { color: var(--text-muted); margin: 0 0 16px; }

.cta-section { text-align: center; }

/* footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--text-muted); font-size: 0.9rem; }
.footer-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.footer-row p { margin: 0; }
.footer-row nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-row a { color: var(--text-muted); }
.footer-row a:hover { color: var(--text); }

@media (max-width: 860px) { .main-nav { display: none; } }
@media (max-width: 520px) { .header-tools .button-ghost { display: none; } }

/* tap targets of plain links: at least 32 px high */
.footer-row a, .main-nav a, .note a { display: inline-flex; align-items: center; min-height: 32px; }
