/* ============================================================
   Dudeshape — дизайн-токены и внутренности web components.
   Основная стилизация — Tailwind-утилитами в разметке.
   ============================================================ */
:root {
  --brand: #3e2c24;
  --brand-600: #2b1e18;
  --brand-50: #f3ede7;
  --accent: #c98a6b;
  --accent-600: #b5765a;
  --accent-50: #f8efe9;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --bg: #ffffff;
  --surface: #f7f4f0;
  --sand: #f5f1ea;
  --border: #e8e2da;
  /* RGB-каналы — чтобы Tailwind умел модификаторы прозрачности (bg-brand/15) */
  --brand-rgb: 62 44 36;
  --brand-600-rgb: 43 30 24;
  --brand-50-rgb: 243 237 231;
  --accent-rgb: 201 138 107;
  --accent-600-rgb: 181 118 90;
  --accent-50-rgb: 248 239 233;
  --text-rgb: 26 26 26;
  --muted-rgb: 107 107 107;
  --bg-rgb: 255 255 255;
  --surface-rgb: 247 244 240;
  --sand-rgb: 245 241 234;
  --border-rgb: 232 226 218;
  --radius: 16px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --shadow-soft: 0 12px 34px -14px rgba(62, 44, 36, 0.18);
  --shadow-card: 0 26px 50px -24px rgba(62, 44, 36, 0.28);
  --shadow-lift: 0 34px 64px -26px rgba(62, 44, 36, 0.34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
section[id], [id].anchor { scroll-margin-top: 92px; }

/* ---------- Появление секций (только если JS активен).
   Используем свойство `translate`, чтобы не конфликтовать с transform-утилитами hover. ---------- */
html.js .reveal { opacity: 0; translate: 0 26px; transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), translate 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
html.js .reveal.is-visible { opacity: 1; translate: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; translate: none; transition: none; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- до инициализации скрываем модалки и «хвосты» слайдера, чтобы не было вспышки ---------- */
site-modal { display: none; }
ui-carousel { display: block; }
ui-carousel:not([data-ready]) .slides > :not(:first-child) { display: none; }

/* ---------- ui-icon: нормализуем stroke к 2 юнитам Lucide (в наборе stroke-width:1em) ---------- */
ui-icon { display: inline-flex; align-items: center; justify-content: center; }
ui-icon > svg { display: block; }
ui-icon > svg [stroke-width] { stroke-width: 2; }

/* ---------- site-modal ---------- */
site-modal .zc-modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(26, 20, 16, 0.5); backdrop-filter: blur(4px); }
site-modal .zc-modal-panel {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #fff;
  border-radius: 20px; max-width: 480px; width: calc(100% - 32px); max-height: 88vh; overflow: hidden;
  display: flex; flex-direction: column; z-index: 61; box-shadow: var(--shadow-lift);
}
site-modal .zc-modal-body { padding: 30px 28px; overflow: auto; overscroll-behavior: contain; }
site-modal .zc-modal-x {
  position: absolute; top: 12px; right: 12px; border: 0; background: transparent; width: 38px; height: 38px;
  border-radius: 999px; font-size: 24px; line-height: 1; cursor: pointer; color: var(--muted); transition: background 0.2s, color 0.2s;
}
site-modal .zc-modal-x:hover { background: var(--surface); color: var(--text); }

/* ---------- ui-select ---------- */
ui-select { position: relative; display: block; }
ui-select .zc-select-btn {
  width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer;
  font: inherit; color: var(--text); transition: border-color 0.2s, box-shadow 0.2s;
}
ui-select .zc-select-btn:hover { border-color: var(--accent); }
ui-select .zc-select-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-50); border-color: var(--accent); }
ui-select .zc-select-list {
  position: absolute; z-index: 20; width: 100%; margin: 6px 0 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-card); max-height: 260px; overflow: auto;
}
ui-select .zc-select-list li { padding: 10px 12px; border-radius: 9px; cursor: pointer; }
ui-select .zc-select-list li:hover, ui-select .zc-select-list li[aria-selected="true"] { background: var(--surface); }

/* ---------- ui-carousel ---------- */
ui-carousel { display: block; }
/* padding снизу — чтобы тень карточек/картинок внутри не срезалась краем viewport */
ui-carousel .zc-car-viewport { overflow: hidden; padding-bottom: 30px; }
ui-carousel .zc-car-track { display: flex; transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1); will-change: transform; }
ui-carousel .zc-car-slide { flex: 0 0 100%; min-width: 0; }
ui-carousel .zc-car-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 4px; }
ui-carousel .zc-car-arrow {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; color: var(--brand); cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
ui-carousel .zc-car-arrow:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
ui-carousel .zc-car-arrow:active { transform: scale(0.94); }
ui-carousel .zc-car-arrow:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-50); }
ui-carousel .zc-car-dots { display: flex; align-items: center; gap: 9px; }
ui-carousel .zc-car-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: var(--border); cursor: pointer; transition: width 0.25s, background 0.25s; }
ui-carousel .zc-car-dot[aria-current="true"] { width: 26px; background: var(--accent); }

/* ---------- toast ---------- */
.zc-toast-wrap { position: fixed; inset-inline: 0; bottom: 24px; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; padding: 0 16px; }
.zc-toast {
  pointer-events: auto; max-width: 420px; display: flex; align-items: center; gap: 10px;
  background: var(--brand); color: #fff; padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow-lift);
  font-size: 14px; font-weight: 500; transform: translateY(16px); opacity: 0; transition: transform 0.3s, opacity 0.3s;
}
.zc-toast.show { transform: none; opacity: 1; }
.zc-toast svg { width: 18px; height: 18px; }

/* ---------- utility ---------- */
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
