/* ШАМОТ — мастерская керамики. Дизайн-система. */

:root {
  --clay-50: #F7F2E9;
  --clay-100: #EFE7D8;
  --clay-150: #E9DfCC;
  --clay-200: #DFD2BA;
  --clay-300: #C9B89B;
  --terra: #A05C36;
  --terra-deep: #8C4E2D;
  --terra-soft: #C08057;
  --sage: #7D8771;
  --sage-deep: #5F6A55;
  --ink: #2B241C;
  --ink-soft: #5C5347;
  --ink-faint: #8A7E6D;
  --char: #262019;
  --char-2: #322A21;
  --cream-d: #EFE6D7;
  --cream-d-soft: rgba(239, 230, 215, 0.72);
  --line: rgba(43, 36, 28, 0.12);
  --line-d: rgba(239, 230, 215, 0.14);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  font-kerning: normal;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  font-family: "Golos Text", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--clay-50);
  overflow-x: hidden;
}

::selection { background: var(--terra); color: var(--clay-50); }

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; border-radius: 4px; }

/* ---------- Грейн ---------- */
.grain {
  position: fixed; inset: 0; z-index: 80; pointer-events: none;
  opacity: 0.05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Типографика ---------- */
.serif { font-family: "Spectral", Georgia, serif; }

h1, h2, h3 { font-family: "Spectral", Georgia, serif; font-weight: 300; }

.eyebrow {
  font-size: 12px; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--terra);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--terra); opacity: 0.6;
}
.on-dark .eyebrow { color: var(--terra-soft); }

.price { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 56px; }

section { position: relative; }

/* ---------- Reveal ---------- */
.rv { opacity: 0; transform: translateY(26px); filter: blur(5px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); }
.rv.in { opacity: 1; transform: none; filter: none; }
.rv-1 { transition-delay: 0.08s; } .rv-2 { transition-delay: 0.16s; }
.rv-3 { transition-delay: 0.24s; } .rv-4 { transition-delay: 0.32s; }

/* ---------- Header ---------- */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  transition: background 0.5s var(--ease), box-shadow 0.5s var(--ease), padding 0.5s var(--ease);
  padding: 26px 0;
}
header.scrolled {
  background: rgba(247, 242, 233, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
  padding: 14px 0;
}
.header-in { display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: "Spectral", serif; font-size: 24px; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase; }
.logo em { font-style: normal; color: var(--terra); }
nav.main-nav { display: flex; gap: 36px; }
nav.main-nav a {
  font-size: 14px; font-weight: 450; letter-spacing: 0.02em; color: var(--ink-soft);
  position: relative; padding: 4px 0; transition: color 0.3s var(--ease);
}
nav.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--terra); transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease);
}
nav.main-nav a:hover { color: var(--ink); }
nav.main-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.header-tools { display: flex; align-items: center; gap: 18px; }
.cart-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 14px; font-weight: 500;
  background: transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.cart-btn:hover { background: var(--clay-100); border-color: var(--clay-300); }
.cart-count {
  min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px;
  background: var(--terra); color: var(--clay-50);
  font-size: 11.5px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.4s var(--ease);
}
.cart-count.bump { transform: scale(1.35); }

.burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line);
  align-items: center;
}
.burger span {
  display: block; width: 16px; height: 1.5px; background: var(--ink);
  transition: transform 0.45s var(--ease);
}
.burger.open span:first-child { transform: translateY(3.2px) rotate(45deg); }
.burger.open span:last-child { transform: translateY(-3.2px) rotate(-45deg); }

.mnav {
  position: fixed; inset: 0; z-index: 85;
  background: rgba(247, 242, 233, 0.92);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  display: flex; flex-direction: column; justify-content: center; padding: 0 34px;
  opacity: 0; pointer-events: none; transition: opacity 0.5s var(--ease);
}
.mnav.open { opacity: 1; pointer-events: auto; }
.mnav nav a {
  display: block; font-family: "Spectral", serif; font-weight: 300;
  font-size: 40px; line-height: 1.3; padding: 6px 0;
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), color 0.3s var(--ease);
}
.mnav nav a:hover { color: var(--terra); }
.mnav.open nav a { opacity: 1; transform: none; }
.mnav.open nav a:nth-child(1) { transition-delay: 0.08s; }
.mnav.open nav a:nth-child(2) { transition-delay: 0.14s; }
.mnav.open nav a:nth-child(3) { transition-delay: 0.2s; }
.mnav.open nav a:nth-child(4) { transition-delay: 0.26s; }
.mnav.open nav a:nth-child(5) { transition-delay: 0.32s; }
.mnav-foot {
  margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--ink-soft);
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0; transition: opacity 0.6s var(--ease) 0.4s;
}
.mnav.open .mnav-foot { opacity: 1; }

/* ---------- Hero ---------- */
.hero { min-height: 100dvh; display: flex; align-items: center; padding: 150px 0 90px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 72px; align-items: center; }
.hero h1 {
  font-size: clamp(46px, 5.6vw, 84px);
  line-height: 1.02; letter-spacing: -0.015em;
  margin: 26px 0 30px;
}
.hero h1 em { font-style: italic; color: var(--terra); }
.hero-lead {
  font-size: 19px; line-height: 1.6; color: var(--ink-soft);
  max-width: 46ch; margin-bottom: 44px;
}
.hero-meta {
  display: flex; gap: 40px; margin-top: 56px; padding-top: 28px;
  border-top: 1px solid var(--line);
}
.hero-meta div { font-size: 14px; color: var(--ink-soft); line-height: 1.45; }
.hero-meta strong { display: block; font-family: "Spectral", serif; font-size: 26px; font-weight: 400; color: var(--ink); margin-bottom: 3px; }

.hero-visual { position: relative; }
.passe {
  background: var(--clay-100);
  border: 1px solid rgba(43, 36, 28, 0.07);
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: 0 30px 70px -34px rgba(43, 36, 28, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}
.passe > .ph { border-radius: calc(var(--r-lg) - 13px); overflow: hidden; }
.hero-visual .ph { aspect-ratio: 4 / 5; }
.ph { position: relative; background: var(--clay-150); }
.ph img { width: 100%; height: 100%; object-fit: cover; }

.hero-badge {
  position: absolute; top: 34px; left: -28px;
  background: var(--char); color: var(--cream-d);
  border-radius: 999px; padding: 13px 24px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.06em;
  box-shadow: 0 18px 40px -16px rgba(38, 32, 25, 0.5);
  transform: rotate(-4deg);
}
.hero-badge span { color: var(--terra-soft); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  border-radius: 999px; padding: 8px 9px 8px 28px;
  font-size: 15px; font-weight: 500; letter-spacing: 0.01em;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), box-shadow 0.4s var(--ease);
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn .ic {
  width: 38px; height: 38px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.45s var(--ease);
}
.btn:hover .ic { transform: translate(3px, -1px); }
.btn-primary { background: var(--terra); color: #FCF8F1; box-shadow: 0 14px 30px -14px rgba(160, 92, 54, 0.55); }
.btn-primary:hover { background: var(--terra-deep); }
.btn-primary .ic { background: rgba(252, 248, 241, 0.16); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); padding: 12px 28px; }
.btn-ghost:hover { background: var(--clay-100); }
.btn-dark { background: var(--char); color: var(--cream-d); }
.btn-dark:hover { background: var(--char-2); }
.btn-dark .ic { background: rgba(239, 230, 215, 0.12); }

/* ---------- Факты-строка ---------- */
.facts { padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--clay-100); }
.facts-in {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-size: 13.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft);
}
.facts-in span { display: inline-flex; align-items: center; gap: 12px; }
.facts-in i { width: 5px; height: 5px; border-radius: 50%; background: var(--terra); opacity: 0.7; }

/* ---------- Секции общие ---------- */
.sec { padding: 130px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 64px; }
.sec-head h2 { font-size: clamp(34px, 3.6vw, 54px); line-height: 1.08; letter-spacing: -0.01em; margin-top: 18px; }
.sec-head p { max-width: 38ch; color: var(--ink-soft); font-size: 16.5px; }

/* ---------- Коллекции ---------- */
.collections { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 22px; }
.coll {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  aspect-ratio: 3 / 3.6; cursor: pointer;
}
.coll:first-child { grid-row: span 1; aspect-ratio: auto; }
.coll img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.coll:hover img { transform: scale(1.05); }
.coll::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(38,32,25,0) 38%, rgba(38,32,25,0.16) 62%, rgba(38,32,25,0.62) 100%);
}
.coll-cap {
  position: absolute; left: 26px; right: 26px; bottom: 24px; z-index: 2;
  color: var(--cream-d); display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.coll-cap h3 { font-size: 27px; font-weight: 400; }
.coll-cap small { display: block; font-family: "Golos Text", sans-serif; font-size: 13px; opacity: 0.75; margin-top: 5px; }
.coll-cap .ic {
  flex: none; width: 40px; height: 40px; border-radius: 999px;
  background: rgba(239, 230, 215, 0.16); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.4s var(--ease), transform 0.4s var(--ease);
}
.coll:hover .ic { background: var(--terra); transform: translate(2px, -2px); }

/* ---------- Каталог ---------- */
.catalog-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 46px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.fbtn {
  padding: 10px 20px; border-radius: 999px; font-size: 14px; font-weight: 500;
  color: var(--ink-soft); border: 1px solid transparent;
  transition: all 0.35s var(--ease);
}
.fbtn:hover { color: var(--ink); border-color: var(--line); }
.fbtn.on { background: var(--char); color: var(--cream-d); }
.sort {
  font-family: inherit; font-size: 14px; color: var(--ink-soft);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 18px; cursor: pointer;
}

.grid-cat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 22px; }
.card { position: relative; }
.card .passe { padding: 11px; transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease); }
.card:hover .passe { transform: translateY(-6px); box-shadow: 0 38px 70px -30px rgba(43, 36, 28, 0.42), inset 0 1px 1px rgba(255,255,255,0.5); }
.card .ph { aspect-ratio: 1; border-radius: calc(var(--r-lg) - 10px); overflow: hidden; cursor: pointer; }
.card .ph img { transition: transform 1s var(--ease); }
.card:hover .ph img { transform: scale(1.045); }
.card-tag {
  position: absolute; top: 22px; left: 22px; z-index: 3;
  font-size: 11.5px; font-weight: 550; letter-spacing: 0.1em; text-transform: uppercase;
  background: rgba(247, 242, 233, 0.88); backdrop-filter: blur(5px);
  color: var(--ink-soft); border-radius: 999px; padding: 7px 13px;
}
.card-add {
  position: absolute; right: 22px; bottom: 96px; z-index: 3;
  width: 46px; height: 46px; border-radius: 999px;
  background: var(--clay-50); color: var(--ink);
  box-shadow: 0 12px 26px -10px rgba(43, 36, 28, 0.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}
.card:hover .card-add { opacity: 1; transform: none; }
.card-add:hover { background: var(--terra); color: #FCF8F1; }
.card-info { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 16px 6px 0; }
.card-info h3 { font-size: 19.5px; font-weight: 400; cursor: pointer; }
.card-info h3:hover { color: var(--terra-deep); }
.card-info small { display: block; font-family: "Golos Text", sans-serif; font-size: 13.5px; color: var(--ink-faint); margin-top: 4px; }
.card-price { font-size: 17px; font-weight: 550; white-space: nowrap; }

/* ---------- Манифест ---------- */
.manifest { background: var(--char); color: var(--cream-d); padding: 150px 0; }
.manifest .eyebrow { color: var(--terra-soft); }
.manifest .eyebrow::before { background: var(--terra-soft); }
.manifest blockquote {
  font-family: "Spectral", serif; font-weight: 300;
  font-size: clamp(30px, 3.4vw, 50px); line-height: 1.22; letter-spacing: -0.005em;
  max-width: 21em; margin-top: 30px;
}
.manifest blockquote em { font-style: italic; color: var(--terra-soft); }
.manifest figcaption { margin-top: 38px; font-size: 15px; color: var(--cream-d-soft); display: flex; align-items: center; gap: 14px; }
.manifest figcaption::before { content: ""; width: 34px; height: 1px; background: var(--terra-soft); }

/* ---------- О мастерской ---------- */
.about-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 80px; align-items: center; }
.about-grid .passe .ph { aspect-ratio: 4 / 4.4; }
.about-txt h2 { font-size: clamp(32px, 3.4vw, 50px); line-height: 1.1; margin: 20px 0 26px; }
.about-txt p { color: var(--ink-soft); margin-bottom: 18px; max-width: 56ch; }
.about-nums { display: flex; gap: 48px; margin-top: 44px; padding-top: 30px; border-top: 1px solid var(--line); }
.about-nums strong { font-family: "Spectral", serif; font-size: 40px; font-weight: 300; display: block; line-height: 1; }
.about-nums span { font-size: 13.5px; color: var(--ink-faint); display: block; margin-top: 8px; }

/* ---------- Процесс ---------- */
.process { background: var(--clay-100); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.step { padding: 40px 30px 8px 0; border-right: 1px solid var(--line); margin-right: 30px; }
.step:last-child { border-right: none; margin-right: 0; }
.step b {
  font-family: "Spectral", serif; font-weight: 300; font-size: 52px;
  color: var(--terra); display: block; line-height: 1; margin-bottom: 22px;
}
.step h3 { font-size: 21px; font-weight: 400; margin-bottom: 12px; }
.step p { font-size: 15px; color: var(--ink-soft); line-height: 1.6; }

/* ---------- Забота ---------- */
.care-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; }
.care h3 { font-size: 22px; font-weight: 400; margin: 20px 0 12px; }
.care p { font-size: 15.5px; color: var(--ink-soft); }
.care svg { color: var(--terra); }

/* ---------- Подписка ---------- */
.subscribe { background: var(--char); color: var(--cream-d); padding: 110px 0; }
.sub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.sub-grid h2 { font-size: clamp(30px, 3vw, 44px); line-height: 1.12; margin-top: 20px; }
.sub-grid > div p { color: var(--cream-d-soft); margin-top: 18px; max-width: 42ch; }
.sub-form { display: flex; gap: 10px; background: rgba(239, 230, 215, 0.07); border: 1px solid var(--line-d); border-radius: 999px; padding: 7px 7px 7px 26px; }
.sub-form input {
  flex: 1; background: none; border: none; outline: none;
  font-family: inherit; font-size: 15.5px; color: var(--cream-d);
}
.sub-form input::placeholder { color: rgba(239, 230, 215, 0.45); }
.sub-note { font-size: 13px; color: rgba(239, 230, 215, 0.45); margin-top: 14px; padding-left: 26px; }

/* ---------- Footer ---------- */
footer { background: var(--char); color: var(--cream-d); padding: 0 0 56px; }
.foot-in { border-top: 1px solid var(--line-d); padding-top: 64px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.foot-in .logo { font-size: 21px; }
.foot-about { font-size: 14.5px; color: var(--cream-d-soft); max-width: 30ch; margin-top: 18px; line-height: 1.6; }
.foot-col h4 { font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(239,230,215,0.5); font-weight: 500; margin-bottom: 20px; }
.foot-col a { display: block; font-size: 15px; color: var(--cream-d-soft); padding: 5px 0; transition: color 0.3s var(--ease); }
.foot-col a:hover { color: var(--terra-soft); }
.foot-base {
  margin-top: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  font-size: 13px; color: rgba(239, 230, 215, 0.4);
}
.foot-base .sig { font-family: "Spectral", serif; font-style: italic; font-size: 15px; color: rgba(239,230,215,0.55); }

/* ---------- Drawer корзины ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(38, 32, 25, 0.5); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity 0.45s var(--ease);
}
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95;
  width: min(440px, 100vw);
  background: var(--clay-50);
  transform: translateX(102%);
  transition: transform 0.55s var(--ease);
  display: flex; flex-direction: column;
  box-shadow: -30px 0 80px -30px rgba(38, 32, 25, 0.4);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 26px 30px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 24px; font-weight: 400; }
.x-btn { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; transition: background 0.3s var(--ease); }
.x-btn:hover { background: var(--clay-100); }
.drawer-body { flex: 1; overflow-y: auto; padding: 10px 30px; }
.cart-empty { text-align: center; padding: 70px 20px; color: var(--ink-faint); }
.cart-empty .serif { font-size: 22px; color: var(--ink-soft); display: block; margin-bottom: 10px; }
.ci { display: flex; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.ci img { width: 76px; height: 76px; object-fit: cover; border-radius: var(--r-sm); }
.ci-info { flex: 1; }
.ci-info h4 { font-family: "Spectral", serif; font-size: 17.5px; font-weight: 400; }
.ci-info small { color: var(--ink-faint); font-size: 13px; }
.ci-row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.qty { display: inline-flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.qty button { font-size: 16px; line-height: 1; width: 18px; color: var(--ink-soft); }
.qty button:hover { color: var(--terra); }
.qty b { font-size: 14px; font-weight: 550; min-width: 16px; text-align: center; }
.ci-del { font-size: 12.5px; color: var(--ink-faint); border-bottom: 1px solid transparent; }
.ci-del:hover { color: var(--terra-deep); }
.drawer-foot { padding: 24px 30px 30px; border-top: 1px solid var(--line); background: var(--clay-100); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.total-row span { color: var(--ink-soft); font-size: 15px; }
.total-row b { font-family: "Spectral", serif; font-size: 28px; font-weight: 400; }
.drawer-foot .btn { width: 100%; justify-content: space-between; }
.drawer-note { font-size: 12.5px; color: var(--ink-faint); text-align: center; margin-top: 14px; }

/* ---------- Модал товара / чекаут ---------- */
.modal {
  position: fixed; inset: 0; z-index: 96;
  display: flex; align-items: center; justify-content: center; padding: 28px;
  opacity: 0; pointer-events: none; transition: opacity 0.4s var(--ease);
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card {
  background: var(--clay-50); border-radius: var(--r-lg);
  width: min(880px, 100%); max-height: min(640px, 92dvh);
  overflow: hidden; display: grid; grid-template-columns: 1fr 1fr;
  transform: translateY(26px) scale(0.985);
  transition: transform 0.5s var(--ease);
  box-shadow: 0 60px 120px -40px rgba(38, 32, 25, 0.55);
}
.modal.open .modal-card { transform: none; }
.modal-card .ph { height: 100%; min-height: 420px; }
.modal-x { position: absolute; top: 18px; right: 18px; z-index: 5; background: var(--clay-50); }
.modal-body { padding: 44px 42px; overflow-y: auto; position: relative; }
.modal-body h3 { font-size: 31px; font-weight: 400; line-height: 1.12; margin: 14px 0 8px; }
.modal-body .sub { color: var(--ink-faint); font-size: 14.5px; }
.modal-body .desc { color: var(--ink-soft); font-size: 15.5px; margin: 20px 0; }
.specs { border-top: 1px solid var(--line); margin-top: 6px; }
.specs div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.specs dt { color: var(--ink-faint); }
.specs dd { font-weight: 500; text-align: right; }
.modal-buy { display: flex; align-items: center; gap: 16px; margin-top: 28px; }
.modal-buy .price-big { font-family: "Spectral", serif; font-size: 30px; font-weight: 400; }
.modal-buy .btn { margin-left: auto; }
.stock-note { font-size: 13px; color: var(--sage-deep); margin-top: 14px; display: flex; align-items: center; gap: 8px; }
.stock-note i { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); }

/* Чекаут */
.checkout-card { width: min(520px, 100%); display: block; padding: 46px 44px; overflow-y: auto; }
.checkout-card h3 { font-size: 30px; font-weight: 400; margin: 12px 0 6px; }
.checkout-card .sub { color: var(--ink-faint); font-size: 14.5px; margin-bottom: 28px; }
.fld { margin-bottom: 16px; }
.fld label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-bottom: 7px; }
.fld input, .fld textarea {
  width: 100%; font-family: inherit; font-size: 15.5px; color: var(--ink);
  background: var(--clay-100); border: 1px solid transparent; border-radius: 14px;
  padding: 13px 16px; outline: none; transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.fld input:focus, .fld textarea:focus { border-color: var(--terra-soft); background: #F4EDDF; }
.fld textarea { resize: vertical; min-height: 70px; }
.checkout-card .btn { width: 100%; justify-content: space-between; margin-top: 10px; }
.ok-msg { text-align: center; padding: 30px 6px 10px; }
.ok-msg .serif { font-size: 27px; display: block; margin: 18px 0 10px; }
.ok-msg p { color: var(--ink-soft); font-size: 15px; }
.ok-ring {
  width: 64px; height: 64px; margin: 0 auto; border-radius: 50%;
  border: 1.5px solid var(--sage); color: var(--sage-deep);
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Тост ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; z-index: 99;
  transform: translate(-50%, 80px); opacity: 0;
  background: var(--char); color: var(--cream-d);
  border-radius: 999px; padding: 14px 26px; font-size: 14.5px;
  box-shadow: 0 20px 50px -16px rgba(38, 32, 25, 0.6);
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast em { font-style: normal; color: var(--terra-soft); }

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .wrap { padding: 0 36px; }
  .grid-cat { grid-template-columns: repeat(2, 1fr); }
  .collections { grid-template-columns: 1fr 1fr; }
  .coll:first-child { grid-column: span 2; aspect-ratio: 16 / 9; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .step:nth-child(2) { border-right: none; }
  .about-grid, .sub-grid, .hero-grid { gap: 48px; }
}
@media (max-width: 820px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .sec { padding: 84px 0; }
  .hero { padding: 120px 0 60px; min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-visual .ph { aspect-ratio: 4 / 3.4; }
  .hero-badge { left: auto; right: 14px; top: 22px; }
  .hero-meta { gap: 26px; flex-wrap: wrap; }
  nav.main-nav { display: none; }
  .burger { display: flex; }
  .grid-cat { grid-template-columns: 1fr 1fr; gap: 18px 12px; }
  .card-add { opacity: 1; transform: none; bottom: auto; top: 14px; right: 14px; width: 40px; height: 40px; }
  .card-tag { display: none; }
  .card-info { flex-direction: column; gap: 4px; }
  .collections { grid-template-columns: 1fr; }
  .coll:first-child { grid-column: span 1; }
  .coll { aspect-ratio: 4 / 3.2; }
  .about-grid, .sub-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: none; margin-right: 0; padding: 28px 0 8px; border-top: 1px solid var(--line); }
  .step:first-child { border-top: none; }
  .care-grid { grid-template-columns: 1fr; gap: 36px; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-card { grid-template-columns: 1fr; max-height: 94dvh; border-radius: 24px 24px 0 0; width: 100%; }
  .modal-card .ph { min-height: 280px; max-height: 320px; }
  .checkout-card { border-radius: 24px 24px 0 0; padding: 36px 24px; }
  .sec-head { flex-direction: column; align-items: flex-start; }
  .catalog-bar { flex-direction: column; align-items: flex-start; }
}

body.snap .hero { min-height: auto; padding-top: 140px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; filter: none; }
}
