/* «Заказ продуктов» — базовые стили (сброс, типографика, фокус). Владелец: chef. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: light dark;
}
[data-theme="light"] { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; }
a { color: var(--text); text-decoration: underline; }
table { border-collapse: collapse; }
input, textarea, select { font-size: var(--fs-body); } /* 16px — иначе iOS увеличивает страницу */

/* типографика: ровно 4 размера и 2 начертания */
.t-label { font-size: var(--fs-label); line-height: var(--lh-label); }
.t-body { font-size: var(--fs-body); line-height: var(--lh-body); }
.t-heading { font-size: var(--fs-heading); line-height: var(--lh-heading); font-weight: var(--fw-semibold); }
.t-display { font-size: var(--fs-display); line-height: var(--lh-display); font-weight: var(--fw-semibold); }
.t-semibold { font-weight: var(--fw-semibold); }
.t-regular { font-weight: var(--fw-regular); }
.t-muted { color: var(--text-2); }
.t-warn { color: var(--warn); }
.t-danger { color: var(--danger); }
.t-accent { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }

.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
