/* RZ Labs — общий стиль компании: «письмо студии». Только светлая тема. */
:root {
  color-scheme: light;
  --paper: oklch(97.6% 0.011 85);
  --ink: oklch(24% 0.03 268);
  --ink-soft: oklch(45% 0.025 268);
  --rule: oklch(24% 0.03 268 / 0.13);
  --marker-amber: oklch(87% 0.12 80);
  --marker-teal: oklch(88% 0.055 205);
  --craftery: oklch(47% 0.08 215);
  --vremya: oklch(58% 0.14 62);

  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --step-0: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-1: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --step-3: clamp(2rem, 1.45rem + 2.4vw, 3.25rem);
  --step-5: clamp(2.6rem, 1.4rem + 5vw, 5.25rem);
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in oklch, currentColor 35%, transparent);
  transition: text-decoration-color 0.2s;
}
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.page { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }

/* Шапка */
.masthead {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.5rem 1.5rem; padding-block: 1.75rem 1.5rem; border-bottom: 1px solid var(--rule);
}
.wordmark { font: 600 1.375rem/1 var(--serif); letter-spacing: -0.01em; text-decoration: none; }
.masthead nav { display: flex; gap: clamp(1rem, 3vw, 2rem); font-size: 0.9375rem; }
.masthead nav a { color: var(--ink-soft); text-decoration: none; }
.masthead nav a:hover { color: var(--ink); }

/* Вступление */
.intro { padding-block: clamp(3.5rem, 11vw, 8.5rem) clamp(3rem, 8vw, 6rem); }
.intro h1 {
  font: 600 var(--step-5)/1.02 var(--serif);
  letter-spacing: -0.028em;
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
  max-width: 14ch;
  text-wrap: balance;
}
.lead { font-size: var(--step-1); line-height: 1.5; max-width: 36ch; margin: 0; text-wrap: pretty; }

/* Маркер: цвет продукта под словами о нём */
mark {
  color: inherit;
  background: linear-gradient(transparent 58%, var(--mark, var(--marker-amber)) 58% 92%, transparent 92%);
  padding: 0 0.06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.mark-craftery { --mark: var(--marker-teal); }
.mark-vremya { --mark: var(--marker-amber); }

/* Разделы: подпись слева, текст справа */
.section {
  display: grid; gap: 1rem 3rem;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  border-top: 1px solid var(--rule);
}
@media (min-width: 52rem) {
  .section { grid-template-columns: 11rem minmax(0, 46rem); }
}
.label {
  margin: 0.35rem 0 0;
  font: 600 0.78rem/1.4 var(--sans);
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-soft);
}

/* Продукты */
.products { list-style: none; margin: 0; padding: 0; }
.product + .product {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--rule);
}
.product--craftery { --accent: var(--craftery); }
.product--vremya { --accent: var(--vremya); }
.product-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; font-size: 0.875rem; color: var(--ink-soft); }
.product-meta .num { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.product h3 { font: 600 var(--step-3)/1.05 var(--serif); letter-spacing: -0.02em; margin: 0.6rem 0 0.8rem; }
.product h3 a { text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 0.14em; }
.product h3 .alt { font-weight: 400; font-size: 0.5em; letter-spacing: 0; color: var(--ink-soft); margin-left: 0.3em; }
.product p { margin: 0; max-width: 40em; text-wrap: pretty; }
.product .more { margin-top: 1rem; font-weight: 500; }
.product .more a { color: var(--accent); text-decoration-color: currentColor; }

/* Как работаем — прозой */
.notes p { margin: 0 0 1.15rem; max-width: 40em; text-wrap: pretty; }
.notes p:last-child { margin-bottom: 0; }
.notes strong { font-weight: 600; }

/* Реквизиты */
.facts { margin: 0; display: grid; gap: 0.15rem; }
.facts dt { font-size: 0.8125rem; color: var(--ink-soft); margin-top: 1rem; }
.facts dt:first-child { margin-top: 0; }
.facts dd { margin: 0; font-weight: 500; }
@media (min-width: 36rem) {
  .facts { grid-template-columns: 8.5rem 1fr; gap: 0.85rem 1.5rem; }
  .facts dt { margin: 0; padding-top: 0.2rem; }
}

/* Текстовые страницы (политика) */
.prose { padding-block: clamp(3rem, 8vw, 6rem); max-width: 44rem; }
.prose h1 { font: 600 var(--step-3)/1.08 var(--serif); letter-spacing: -0.02em; margin: 0 0 1rem; }
.prose h2 { font: 600 var(--step-1)/1.3 var(--serif); margin: 2.5rem 0 0.5rem; }
.prose p { margin: 0 0 1rem; text-wrap: pretty; }
.prose .meta { color: var(--ink-soft); }
.prose .translation { margin-top: clamp(3.5rem, 8vw, 5rem); padding-top: clamp(2.5rem, 6vw, 3.5rem); border-top: 1px solid var(--rule); }

/* Колофон */
.colophon {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  padding-block: 2rem 3rem; border-top: 1px solid var(--rule);
  font-size: 0.875rem; color: var(--ink-soft);
}
.colophon p { margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 0.8s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}
