:root {
  color-scheme: light dark;
  --bg: #f7f8f6;
  --surface: rgba(255, 255, 255, 0.72);
  --text: #151817;
  --muted: #626864;
  --line: rgba(21, 24, 23, 0.13);
  --accent: #245f4a;
  --accent-soft: #dcebe4;
  --max: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101311;
    --surface: rgba(28, 33, 30, 0.78);
    --text: #f2f5f3;
    --muted: #aeb7b1;
    --line: rgba(242, 245, 243, 0.14);
    --accent: #91d6b8;
    --accent-soft: #183c2e;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 92% 3%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 25rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.locale-copy { display: none; }
html[lang="en"] .locale-copy[lang="en"],
html[lang="ru"] .locale-copy[lang="ru"],
html[lang="es"] .locale-copy[lang="es"] { display: block; }

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 0.2rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 10;
  padding: 0.7rem 1rem;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
}

.skip-link:focus { top: 1rem; }

.site-header,
.site-footer,
main {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.35rem;
  border-bottom: 1px solid var(--line);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
  font-weight: 760;
  letter-spacing: -0.045em;
  font-size: 1.45rem;
}

.wordmark small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

nav { display: flex; gap: 1rem; flex-wrap: wrap; }

nav a,
.text-link {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 620;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

nav a:hover,
.text-link:hover { color: var(--text); }

main { padding-block: clamp(3.5rem, 9vw, 8rem); }

.hero {
  max-width: 55rem;
  padding-bottom: clamp(4rem, 10vw, 7rem);
}

.eyebrow,
.status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.25rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

h1 {
  max-width: 15ch;
  margin-top: 1.3rem;
  font-size: clamp(3rem, 8vw, 6.8rem);
  font-weight: 720;
}

h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
h3 { font-size: 1.32rem; }

.lede {
  max-width: 42rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1.12rem, 2.4vw, 1.45rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.72rem 1.05rem;
  border: 1px solid var(--text);
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  color: var(--text);
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  display: flex;
  min-height: 20rem;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--surface);
  backdrop-filter: blur(18px);
}

.card.featured {
  background: linear-gradient(145deg, var(--accent-soft), var(--surface) 60%);
}

.card p { max-width: 31rem; color: var(--muted); }
.card h3 { margin-top: 1rem; }

.card-link {
  display: inline-flex;
  width: fit-content;
  color: var(--text);
  font-weight: 720;
  text-underline-offset: 0.28em;
}

.page-header {
  max-width: 52rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--line);
}

.page-header h1 {
  overflow-wrap: anywhere;
  hyphens: auto;
  font-size: clamp(2.7rem, 7vw, 5.4rem);
}

.language-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.language-switcher a {
  display: inline-flex;
  min-width: 2.7rem;
  justify-content: center;
  padding: 0.38rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 720;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.language-switcher a:hover { color: var(--text); }

.language-switcher a[aria-current="page"] {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.site-header .language-switcher {
  flex-wrap: nowrap;
  gap: 0.3rem;
  margin-top: 0;
}

.site-header .language-switcher a {
  min-width: 2.15rem;
  padding: 0.27rem 0.48rem;
  font-size: 0.74rem;
}

.content {
  display: grid;
  grid-template-columns: minmax(10rem, 15rem) minmax(0, 44rem);
  gap: clamp(2rem, 7vw, 7rem);
  padding-top: 3.5rem;
}

.toc {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  display: grid;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.toc a { text-underline-offset: 0.22em; }

.prose { min-width: 0; }

.prose section + section { margin-top: 3.4rem; }
.prose h2 { margin-bottom: 1rem; font-size: clamp(1.55rem, 3vw, 2.2rem); }
.prose h3 { margin-top: 1.8rem; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.55rem; }

.notice {
  margin: 1.6rem 0;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  margin-top: 2rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 1.7rem 2.4rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer p { margin: 0; }

@media (max-width: 48rem) {
  .site-header { align-items: flex-start; flex-wrap: wrap; }
  .header-tools { width: 100%; justify-content: space-between; gap: 0.75rem; }
  .wordmark small { display: none; }
  .product-grid { grid-template-columns: 1fr; }
  .content { grid-template-columns: 1fr; }
  .toc { position: static; }
  .site-footer { flex-direction: column; }
}

@media (max-width: 30rem) {
  .header-tools { align-items: flex-start; flex-direction: column; }
}

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