:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1c2230;
  --muted: #5b6475;
  --border: #e3e6ec;
  --accent: #2f6fdb;
  --accent-soft: #e8f0fd;
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11141a;
    --surface: #1a1f28;
    --text: #e8ebf1;
    --muted: #9aa3b4;
    --border: #2a303c;
    --accent: #6b9cf0;
    --accent-soft: #1f2b40;
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

a {
  color: var(--accent);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.lang {
  display: flex;
  gap: 4px;
  font-size: 0.875rem;
}

.lang a,
.lang span {
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--muted);
}

.lang [aria-current="true"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* Hero */
.hero {
  padding: 64px 0 56px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

/* Sections */
section {
  padding: 40px 0;
}

h2 {
  margin: 0 0 24px;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.icon svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 1.125rem;
}

.card ul {
  margin: 0;
  padding-left: 1.1em;
  color: var(--muted);
}

.card li + li {
  margin-top: 4px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

/* App */
.app {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .app {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.app .tagline {
  margin: 0 0 12px;
  color: var(--text);
  font-weight: 500;
}

.app .features {
  margin: 0;
}

.button {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  filter: brightness(1.08);
}

.button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Footer */
footer {
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 0.875rem;
}

footer .container {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

/* Scroll animations
   Hidden states apply only when JS is running (html.js), so the page
   stays fully visible without JS. */
:root {
  --accent-2: #0f9f8f;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent-2: #2dd4bf;
  }
}

.hl {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.js .reveal {
  opacity: 0;
  translate: 0 28px;
  scale: 0.97;
  filter: blur(10px);
  transition:
    opacity 0.9s var(--ease-out),
    translate 0.9s var(--ease-out),
    scale 0.9s var(--ease-out),
    filter 0.9s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 110ms);
}

.js .reveal.is-visible {
  opacity: 1;
  translate: 0 0;
  scale: 1;
  filter: blur(0);
}

/* Keywords start in the text color and turn into the accent gradient
   once their heading has settled. */
.js .reveal .hl {
  color: var(--text);
  transition: color 0.8s ease;
  transition-delay: calc(var(--i, 0) * 110ms + 600ms);
}

.js .reveal.is-visible .hl {
  color: transparent;
}

.js .stagger > * {
  opacity: 0;
  translate: 16px 0;
  filter: blur(6px);
  transition:
    opacity 0.6s var(--ease-out),
    translate 0.6s var(--ease-out),
    filter 0.6s var(--ease-out);
}

.js .is-visible .stagger > * {
  opacity: 1;
  translate: 0 0;
  filter: blur(0);
}

.stagger > :nth-child(1) { transition-delay: 300ms; }
.stagger > :nth-child(2) { transition-delay: 370ms; }
.stagger > :nth-child(3) { transition-delay: 440ms; }
.stagger > :nth-child(4) { transition-delay: 510ms; }
.stagger > :nth-child(5) { transition-delay: 580ms; }
.stagger > :nth-child(6) { transition-delay: 650ms; }
.stagger > :nth-child(7) { transition-delay: 720ms; }

/* Scroll-linked: main.js sets --p (0 → 1) while the element moves
   through the viewport. */
.js [data-hero] .container {
  opacity: calc(1 - var(--p, 0) * 0.9);
  scale: calc(1 - var(--p, 0) * 0.08);
  filter: blur(calc(var(--p, 0) * 8px));
  transform-origin: 50% 0;
  will-change: opacity, scale, filter;
}

.js [data-zoom].is-visible {
  scale: calc(0.9 + var(--p, 1) * 0.1);
  transition-property: opacity, translate, filter;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .stagger > *,
  .js .reveal .hl {
    opacity: 1;
    translate: none;
    scale: none;
    filter: none;
    transition: none;
  }

  .js .reveal .hl {
    color: transparent;
  }

  .js [data-hero] .container,
  .js [data-zoom].is-visible {
    opacity: 1;
    scale: none;
    filter: none;
  }
}
