:root {
  --vh: 100dvh;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  --c-bg: #f4f7fb;
  --c-bg-alt: #e7eef7;
  --c-surface: #ffffff;
  --c-surface-raised: #ffffff;
  --c-text: #1a2332;
  --c-text-secondary: #4b5563;
  --c-text-muted: #8b97a8;
  --c-text-inverse: #ffffff;
  --c-border: #d5dee9;
  --c-border-strong: #b7c5d4;
  --c-accent: #2c5a8a;
  --c-accent-rgb: 44, 90, 138;
  --c-accent-light: #3a6ea8;
  --c-accent-dark: #1e456c;
  --c-accent-bg: #eaf2f9;
  --c-blush: #e4c4ce;
  --c-powder: #c5d8ea;
  --c-mist: #d9e6f4;
  --c-danger: #c44343;
  --c-danger-light: #fee2e2;
  --c-success: #4f8a4a;
  --c-success-light: #dcfce7;
  --c-warning: #d97706;
  --c-badge-new: #4f8a4a;
  --c-badge-top: #2c5a8a;
  --c-badge-discount: #c44343;
  --c-promo-watermark: rgba(122, 31, 61, 0.72);
  --grad-accent: linear-gradient(180deg, #4a7fb8 0%, var(--c-accent) 100%);
  --grad-hero-overlay: linear-gradient(
    180deg,
    rgba(15, 32, 54, 0.42),
    rgba(15, 32, 54, 0.38) 42%,
    rgba(15, 32, 54, 0.78)
  );

  --ff-base: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    sans-serif;
  --ff-display: "Cormorant Garamond", "Manrope", Georgia, "Times New Roman",
    serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-h2: clamp(1.375rem, 2.5vw, 1.75rem);
  --fs-h1: clamp(1.5rem, 4vw, 2.25rem);
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --lh-tight: 1.2;
  --lh-snug: 1.375;
  --lh-base: 1.5;

  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-8: 3rem;

  --space: 1rem;
  --header-top-h: 2.25rem;
  --header-main-h: 4rem;
  --header-h: calc(var(--header-top-h) + var(--header-main-h) + var(--safe-top));
  --container-max: 72rem;
  --container-pad: var(--sp-4);
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 9999px;
  --shadow-xs: 0 2px 6px rgba(30, 58, 95, 0.08);
  --shadow-sm: 0 8px 22px rgba(30, 58, 95, 0.12);
  --shadow-md: 0 14px 36px rgba(30, 58, 95, 0.16);
  --shadow-lg: 0 24px 52px rgba(30, 58, 95, 0.2);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-drift: ease;
  --ease-reveal: ease-out;
  --duration-fast: 160ms;
  --duration-ui: 200ms;
  --duration-modal: 300ms;
  --motion-drift: 2500ms;
  --motion-slide: 1500ms;
  --motion-reveal: 1000ms;
  --motion-soft: 500ms;
  --motion-stagger: 180ms;
  --t-fast: var(--duration-fast) var(--ease-out);
  --t-base: var(--duration-ui) var(--ease-out);
  --t-slow: var(--motion-soft) var(--ease-out);
  --z-base: 0;
  --z-raised: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-drawer: 300;
  --z-modal: 400;
  --z-toast: 500;

  --color-bg: var(--c-bg);
  --color-text: var(--c-text);
  --header-bg: var(--c-surface);
  --topbar-bg: var(--c-bg-alt);
  --text-main: var(--c-text);
  --text-muted: var(--c-text-secondary);
  --accent-color: var(--c-accent);
  --border-color: var(--c-border);
  --transition-speed: var(--t-base);
  --c-muted: var(--c-text-muted);
}

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

html {
  -webkit-text-size-adjust: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body {
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  overflow-x: hidden;
  font-family: var(--ff-base);
  color: var(--c-text);
  background: var(--c-bg);
}

h1,
h2,
h3,
h4,
.page-title,
.section-title,
.hero__title,
.header-logo__text,
.auth-card__title,
.product-card__name,
.footer-title {
  font-family: var(--ff-display);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.page-main,
.site-footer {
  position: relative;
  z-index: 1;
}

.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.container {
  width: min(var(--container-max), calc(100% - 2 * var(--space)));
  margin-inline: auto;
}

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

.skip-link:focus {
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  left: var(--space);
  top: var(--space);
  z-index: var(--z-toast);
}

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

.page-main {
  flex: 1;
  padding-bottom: calc(var(--space) + var(--safe-bottom));
}

.page-main > .container {
  padding-top: var(--space);
}

.layout-catalog {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space);
}

@media (min-width: 768px) {
  :root {
    --space: 1.25rem;
  }
}

@media (min-width: 900px) {
  .layout-catalog {
    grid-template-columns: 16rem 1fr;
  }
}
