/* Auremont. Палитра: бумага, камень, эспрессо, чернила и один акцент (бронза). Шаг сетки 8px. */
:root {
  --paper: #F4EFE7;
  --stone: #E9E1D4;
  --espresso: #4A3428;
  --ink: #2A1F19;
  --muted: #6B5A4F;
  --line: rgba(74, 52, 40, .28);
  --accent: #7D6234;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --pad: 24px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font-text: Onest, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--espresso); font: 400 16px/24px var(--font-text); }
body.no-scroll { overflow: hidden; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
img { display: block; max-width: 100%; }
picture { display: contents; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

h1, h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: 0; line-height: 1.05; }
h1 { font-size: clamp(48px, 13vw, 64px); }
h2 { font-size: clamp(40px, 8vw, 64px); }

.skip { position: absolute; left: var(--pad); top: -72px; z-index: 10; padding: 8px 16px; background: var(--paper); color: var(--espresso); }
.skip:focus { top: 40px; }

/* Верхняя строка и шапка */
.announcement { height: 32px; padding: 0 var(--pad); display: flex; justify-content: space-between; align-items: center; gap: 16px; background: var(--ink); color: var(--paper); font-size: 12px; line-height: 16px; white-space: nowrap; overflow: hidden; }
.announcement span { display: none; }

.header { position: absolute; top: 32px; left: 0; right: 0; z-index: 4; height: 72px; padding: 0 var(--pad); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; color: #fff; }
.wordmark { display: inline-block; justify-self: start; padding: 8px 0; font-size: 16px; font-weight: 600; letter-spacing: .16em; }
.header .wordmark { grid-column: 2; grid-row: 1; }
.menu-toggle { grid-column: 1; grid-row: 1; justify-self: start; width: 40px; height: 40px; margin-left: -8px; padding: 0 8px; display: flex; flex-direction: column; justify-content: center; gap: 8px; background: none; border: 0; }
.menu-toggle i { display: block; height: 1px; background: currentColor; }
.bag { grid-column: 3; grid-row: 1; justify-self: end; height: 40px; padding: 0; background: none; border: 0; font-size: 14px; }
.bag b { margin-left: 4px; font-weight: 500; }
.nav { display: none; font-size: 14px; letter-spacing: .02em; }
.nav a { display: inline-block; padding: 8px 0; }
@media (max-width: 899px) {
  .nav.is-open { display: flex; flex-direction: column; gap: 8px; position: absolute; top: 72px; left: 0; right: 0; padding: 16px var(--pad) 24px; background: var(--espresso); color: var(--paper); }
}

/* Кнопки и ссылки */
.button { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 24px; background: var(--paper); color: var(--espresso); border: 0; font-size: 14px; font-weight: 500; }
.button-dark { background: var(--espresso); color: var(--paper); }
.button:disabled { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); cursor: not-allowed; }
.wide { width: 100%; }
.text-link { display: inline-block; padding: 8px 0; border-bottom: 1px solid var(--accent); font-size: 14px; font-weight: 500; white-space: nowrap; }
.text-btn { padding: 8px 0; background: none; border: 0; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); }
.text-btn:hover { text-decoration-color: currentColor; }

/* Фото: контейнер с кадром и обрезкой */
.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.7); }
.frame { position: relative; overflow: hidden; background: var(--stone); }
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Первый экран: заголовок, затем текст и кнопка на одном левом краю с логотипом */
.hero { position: relative; display: flex; align-items: flex-end; min-height: max(560px, calc(100vh - 32px)); min-height: max(560px, calc(100svh - 32px)); background: var(--ink); color: #fff; overflow: hidden; }
.hero .cover { object-position: 38% center; }
.hero::after, .campaign::after { content: ""; position: absolute; inset: 0; background: rgba(26, 18, 13, .48); }
.hero-copy { position: relative; z-index: 1; width: 100%; padding: 112px var(--pad) calc(56px + var(--safe-b)); }
.hero h1 { max-width: 11ch; text-wrap: balance; line-height: 1.1; }
.hero-actions { display: grid; gap: 24px; justify-items: start; margin-top: 32px; }
.hero-actions p { max-width: 336px; color: #F1EBE2; }

/* Секции */
.section { padding: 72px var(--pad); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 32px; }
.intro { background: var(--stone); }
.intro-grid { display: grid; gap: 32px; }
.intro h2 { max-width: 14ch; }
.intro-grid p { max-width: 424px; }

/* Каталог */
.products { scrollbar-width: thin; scrollbar-color: var(--line) transparent; display: grid; grid-auto-flow: column; grid-auto-columns: 76%; gap: 16px; margin-right: calc(var(--pad) * -1); padding-right: var(--pad); overflow-x: auto; scroll-snap-type: x mandatory; }
.product { scroll-snap-align: start; }
.product .frame { aspect-ratio: 3 / 4; }
.product:nth-child(1) img { object-position: center top; }
.product:nth-child(2) img { object-position: center 20%; }
.product:nth-child(3) img { object-position: center 25%; }
.product:nth-child(4) img { object-position: center 20%; }
.wish { position: absolute; top: 8px; right: 8px; z-index: 1; width: 40px; height: 40px; padding: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 0; }
.wish svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; }
.wish.saved { color: var(--accent); border-color: var(--accent); }
.wish.saved svg { fill: currentColor; }
.product-info { padding-top: 16px; }
.product-info h3 { font-size: 16px; font-weight: 500; }
.product-info p { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.product-info strong { font-weight: 500; }
.add { width: 100%; }

.sizes { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; padding: 0; border: 0; min-width: 0; }
.sizes legend { float: left; width: 100%; margin-bottom: 8px; padding: 0; font-size: 14px; color: var(--muted); }
.sizes label { position: relative; }
.sizes input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sizes span { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); font-size: 14px; }
.sizes input:checked + span { background: var(--espresso); border-color: var(--espresso); color: var(--paper); }
.sizes input:focus-visible + span { outline: 2px solid currentColor; outline-offset: 2px; }

/* Готовый образ */
.campaign { position: relative; display: flex; align-items: flex-end; min-height: 600px; background: var(--espresso); color: var(--paper); overflow: hidden; }
.campaign .cover { object-position: 50% 24%; }
.campaign-copy { position: relative; z-index: 1; max-width: 480px; padding: 56px var(--pad); }
.campaign h2 { font-size: clamp(40px, 8vw, 56px); }
.campaign-copy p { max-width: 304px; margin: 24px 0 32px; }

/* Образы */
.look-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.look { display: flex; flex-direction: column; }
.look-a { grid-row: span 2; }
.look-a .frame { flex: 1; min-height: 496px; }
.look-b .frame, .look-c .frame { height: 264px; }
.look-a img { object-position: 50% top; }
.look-c img { object-position: center top; }
.look figcaption { margin-top: 8px; font-size: 14px; }

/* Доставка и возврат */
.service { background: var(--stone); }
.service h2 { margin-bottom: 32px; }
.service-list { display: grid; gap: 24px; }
.service-list div { padding-top: 8px; border-top: 1px solid var(--line); }
.service-list dt { margin-bottom: 8px; font-weight: 500; }
.service-list dd { max-width: 336px; }

/* Бутик */
.visit-photo { position: relative; height: 360px; overflow: hidden; }
.visit-photo .cover { object-position: center 20%; filter: saturate(.55); }
.visit-content { padding: 56px var(--pad) 64px; }
.visit-text { max-width: 400px; margin-top: 24px; }
.contact-list { display: grid; gap: 24px; margin: 32px 0; }
.contact-list div { padding-top: 8px; border-top: 1px solid var(--line); }
.contact-list dt { margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.contact-list a { display: inline-block; padding: 8px 0; margin: -8px 0; }

/* Подвал */
.footer { display: grid; gap: 24px; padding: 32px var(--pad); background: var(--espresso); color: var(--paper); }
.footer p { font-size: 14px; color: #CDBFAE; }
.footer div { display: flex; gap: 24px; font-size: 14px; }
.footer div a { padding: 8px 0; }
.has-fab .footer { padding-bottom: calc(96px + var(--safe-b)); }

/* Кнопка корзины, плавающая */
.cart-fab { position: fixed; right: 16px; bottom: calc(16px + var(--safe-b)); z-index: 5; display: flex; align-items: center; gap: 24px; height: 48px; padding: 0 24px; background: var(--espresso); color: var(--paper); border: 0; font-size: 14px; }
.cart-fab strong { font-weight: 500; }

/* Корзина */
.cart { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(100%, 448px); height: 100dvh; max-width: none; max-height: none; padding: 0; border: 0; background: var(--paper); color: var(--espresso); }
.cart[open] { display: flex; flex-direction: column; }
.cart::backdrop { background: rgba(26, 18, 13, .5); }
.cart-head { display: flex; justify-content: space-between; align-items: center; height: 72px; padding: 0 var(--pad); border-bottom: 1px solid var(--line); }
.cart-head h2 { font-size: 32px; }
.cart-view, .checkout, .done { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.cart-body { flex: 1; padding: 24px var(--pad); overflow-y: auto; overscroll-behavior: contain; }
.cart-foot { display: grid; gap: 16px; padding: 24px var(--pad) calc(24px + var(--safe-b)); border-top: 1px solid var(--line); }
.cart-empty { display: grid; gap: 24px; justify-items: start; }

.progress-text { font-size: 14px; }
.progress { height: 2px; margin: 8px 0 24px; background: var(--line); }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); }

.cart-list { display: grid; gap: 24px; margin: 0; padding: 0; list-style: none; }
.cart-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.cart-item:first-child { padding-top: 0; border-top: 0; }
.cart-item img { width: 72px; height: 96px; object-fit: cover; background: var(--stone); }
.cart-item h3 { font-size: 16px; font-weight: 500; }
.cart-item-size { margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.cart-item-side { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; }
.cart-item-side strong { font-weight: 500; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); }
.qty button { width: 40px; height: 40px; background: none; border: 0; font-size: 16px; }
.qty button:disabled { color: var(--muted); cursor: not-allowed; }
.qty output { min-width: 24px; text-align: center; }

.sum { display: grid; gap: 8px; }
.sum div { display: flex; justify-content: space-between; }
.sum-total { padding-top: 16px; border-top: 1px solid var(--line); font-weight: 500; }

.checkout-total { margin-bottom: 24px; }
.checkout-total strong { margin-left: 8px; font-weight: 500; }
.field { display: grid; gap: 8px; margin-bottom: 24px; }
.field span { font-size: 14px; color: var(--muted); }
.field input { height: 48px; padding: 0 16px; background: transparent; border: 1px solid var(--line); border-radius: 0; }
.field input[aria-invalid="true"] { border-color: var(--espresso); box-shadow: inset 0 0 0 1px var(--espresso); }
.field small { min-height: 24px; font-size: 14px; }
.form-error { padding: 16px; border: 1px solid var(--espresso); font-size: 14px; }
.done h3 { font-family: var(--font-display); font-size: 40px; font-weight: 500; line-height: 1.05; }
.done-text { max-width: 336px; margin-top: 16px; }

@media (min-width: 700px) {
  :root { --pad: 56px; }
  .announcement span { display: inline; }
  .header { height: 88px; }
  .hero-copy { padding-top: 144px; padding-bottom: 80px; }
  .hero h1 { font-size: clamp(64px, 9vw, 96px); max-width: 12ch; }
  .hero-actions { grid-template-columns: auto auto; align-items: center; justify-content: start; gap: 40px; }
  .section { padding-top: 112px; padding-bottom: 112px; }
  .intro-grid { grid-template-columns: 1.3fr .7fr; align-items: end; gap: 56px; }
  .products { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); gap: 48px 24px; margin: 0; padding: 0; overflow: visible; }
  .campaign { min-height: 688px; }
  .campaign .cover { object-position: 50% 6%; }
  .campaign-copy { padding: 88px var(--pad); }
  .look-grid { grid-template-columns: 1.35fr .85fr .85fr; gap: 24px; align-items: start; }
  .look-a { grid-row: auto; }
  .look-a .frame, .look-b .frame, .look-c .frame { flex: none; min-height: 0; height: 464px; }
  .look-b { margin-top: 80px; }
  .look-c { margin-top: 168px; }
  .service-list { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .visit { display: grid; grid-template-columns: 1fr 1fr; }
  .visit-photo { height: auto; min-height: 624px; }
  .visit-content { padding: 96px var(--pad); }
  .footer { grid-template-columns: 1fr 1fr 1fr; align-items: end; }
  .footer div { justify-content: flex-end; }
  .cart-fab { right: 24px; bottom: 24px; }
}

@media (min-width: 900px) {
  .header .wordmark { grid-column: 1; justify-self: start; }
  .menu-toggle { display: none; }
  .nav { display: flex; grid-column: 2; grid-row: 1; gap: 32px; }
}

@media (min-width: 1100px) {
  :root { --pad: max(72px, calc((100vw - 1440px) / 2)); }
  .hero h1 { font-size: clamp(96px, 8vw, 128px); max-width: 18ch; }
  .hero-copy { padding-bottom: 96px; }
  .products { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .look-a .frame, .look-b .frame, .look-c .frame { height: 560px; }
  .visit-content { padding-left: 88px; padding-right: min(var(--pad), 160px); }
}

/* Движение: только opacity и transform, от 0,3 до 0,6 с, плавное замедление в конце */
.button, .text-btn, .text-link, .wish, .wish svg, .qty button, .cart-fab, .bag, .menu-toggle, .nav a, .sizes span, .progress span, .frame img {
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), fill .3s var(--ease), opacity .3s var(--ease), transform .3s var(--ease), width .4s var(--ease);
}
.button:not(:disabled):active, .cart-fab:active, .wish:active, .qty button:not(:disabled):active, .sizes label:active span { transform: scale(.97); }
.bag:active, .menu-toggle:active, .text-btn:active { opacity: .6; }

@media (hover: hover) {
  .button:not(:disabled):hover { background: var(--accent); color: var(--paper); }
  .cart-fab:hover { background: var(--accent); }
  .text-link:hover { border-color: currentColor; }
  .nav a:hover, .bag:hover { opacity: .7; }
  .frame:hover > picture > img { transform: scale(1.03); }
}

@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
@keyframes cart-in { from { opacity: 0; transform: translateX(48px); } }
@keyframes cart-out { to { opacity: 0; transform: translateX(48px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .hero h1 { animation: rise .6s var(--ease) both; }
  .hero-actions { animation: rise .6s var(--ease) .12s both; }
  .nav.is-open { animation: drop .3s var(--ease) both; }

  .js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease) var(--delay, 0s), transform .5s var(--ease) var(--delay, 0s); }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
  .product:nth-child(2), .look:nth-child(2) { --delay: .05s; }
  .product:nth-child(3), .look:nth-child(3) { --delay: .1s; }
  .product:nth-child(4) { --delay: .15s; }

  .cart[open] { animation: cart-in .4s var(--ease) both; }
  .cart[open]::backdrop { animation: fade-in .4s var(--ease) both; }
  .cart.is-closing { animation: cart-out .3s var(--ease) both; }
  .cart.is-closing::backdrop { animation: fade-out .3s var(--ease) both; }
}
