/* «Волшебный мир» — design tokens.
   Every value here can be overridden from the admin (site.json → theme), which
   sets the same custom properties on :root at runtime. Service pages override them
   inside their own .page scope (content/themes.json), so one set of components
   gets many looks. Keep the 8-point rhythm: all spacing is a multiple of 4. */
:root {
  /* colour — white & warm neutral base, storybook accents from «Сказкино» */
  --c-bg: #ffffff;
  --c-surface: #fbf8f3;          /* warm off-white panels */
  --c-surface-2: #f5efe6;        /* deeper panel / pressed */
  --c-line: #ece4d8;             /* hairlines, card borders */
  --c-text: #2b1d17;             /* warm near-black, 15.6:1 on white */
  --c-text-2: #5c4a40;           /* secondary text, still 8.4:1 on white */
  --c-text-on-accent: #ffffff;

  --c-accent: #8a2b1f;           /* burgundy — main buttons, prices */
  --c-accent-hover: #74231a;
  --c-accent-soft: #f8e9e5;

  --c-gold: #f2b51c;             /* stars, «Хит», highlights */
  --c-gold-deep: #c98a00;
  --c-gold-soft: #fff4d6;

  --c-teal: #2f6f6a;             /* «Новинка», calm secondary */
  --c-teal-soft: #e4f1ef;

  --c-sale: #b3261e;             /* discount badge */
  --c-focus: #2f6f6a;

  /* type */
  --f-ui: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-display: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-badge: 16px;
  --fs-small: 16px;              /* nothing on screen is smaller than this */
  --fs-body: 18px;
  --fs-card: 19px;
  --fs-price: 20px;
  --fs-button: 19px;
  --fs-h3: 22px;
  --fs-h2: 26px;
  --fs-h1: 30px;
  --lh-tight: 1.2;
  --lh-body: 1.45;

  /* space — 8-point rhythm */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --gutter: 16px;                /* page side padding */
  --gap: 12px;                   /* grid gap, same across and down */
  --section-gap: 32px;           /* between home sections */
  --page-max: 1280px;

  /* shape */
  --r-card: 20px;
  --r-panel: 24px;
  --r-btn: 16px;
  --r-pill: 999px;
  --cover-ratio: 4 / 5;

  /* depth */
  --sh-1: 0 1px 2px rgba(43, 29, 23, .05), 0 2px 10px rgba(43, 29, 23, .06);
  --sh-2: 0 6px 14px rgba(43, 29, 23, .08), 0 18px 40px rgba(43, 29, 23, .14);
  --sh-bar: 0 -1px 0 var(--c-line), 0 -8px 24px rgba(43, 29, 23, .06);

  /* motion */
  --t-fast: 160ms;
  --t-mid: 260ms;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* touch */
  --tap: 48px;                   /* minimum touch target */
  --btn-h: 56px;

  /* safe areas (messenger fills these in through platform.js) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bar-h: 64px;                 /* top bar */
  --nav-h: 68px;                 /* bottom tabs */
}

@media (min-width: 600px) {
  :root { --gutter: 24px; --gap: 16px; --section-gap: 48px; --fs-h2: 28px; --fs-h1: 34px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 32px; --gap: 20px; --section-gap: 56px; --fs-h2: 30px; --fs-h1: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-mid: 0ms; }
}
