@font-face { font-family: "Great Vibes"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/greatvibes-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Great Vibes"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/greatvibes-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
:root {
  color-scheme: light;
  --cream: #f8f4ec;
  --paper: #fffcf6;
  --ink: #302923;
  --muted: #62554b;
  --accent: #794837;
  --accent-dark: #5f3527;
  --line: #dfd1c2;
  --serif: "Cormorant", Georgia, serif;
  --sans: "Manrope", system-ui, sans-serif;
  --shadow: 0 14px 35px #51403112;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1rem/1.65 var(--sans);
}
body:has(dialog[open]) { overflow: hidden; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.wrap { width: min(calc(100% - 32px), 70rem); margin-inline: auto; }

.masthead {
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font: 700 clamp(1.55rem, 4.5vw, 2.05rem)/1 var(--serif);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.masthead nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--accent-dark);
  font-size: .875rem;
  font-weight: 700;
  text-underline-offset: .3em;
}
.hero {
  display: grid;
  gap: 1.8rem;
  align-items: center;
  padding-block: 2.45rem 2.75rem;
}
.hero h1 {
  font-size: clamp(3.15rem, 8.5vw, 7rem);
  letter-spacing: -.045em;
  line-height: .86;
}
.hero p {
  max-width: 29rem;
  margin-block: 1.18rem 1.4rem;
  color: var(--muted);
}
.hero-figure {
  min-width: 0;
  padding: .55rem .55rem .5rem;
  border: 1px solid var(--line);
  border-radius: 7rem 7rem 1.2rem 1.2rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.hero-photo {
  aspect-ratio: 1.03;
  border-radius: 6.5rem 6.5rem .65rem .65rem;
}
.hero-photo img { object-position: center 54%; }
.hero-figure figcaption {
  padding: .48rem .35rem .12rem;
  color: var(--muted);
  font-size: .875rem;
  text-align: center;
}

.button {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: .55rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent-dark);
  font-size: .875rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #f0e3d9; }
.button-primary { background: var(--accent); color: var(--paper); }
.button-primary:hover { background: var(--accent-dark); }

.catalog { scroll-margin-top: 1rem; padding-bottom: 2.8rem; }
.section-heading {
  border-top: 1px solid var(--line);
  padding-block: 1.35rem 1.12rem;
}
.section-heading h2 { font-size: clamp(2.3rem, 6vw, 4rem); letter-spacing: -.035em; }
.catalog-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: .62rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.photo {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #e8ddd2;
  cursor: zoom-in;
}
.photo picture, .photo img { display: block; width: 100%; height: 100%; }
.photo img { object-fit: cover; transition: scale 180ms ease; }
@media (hover: hover) {
  .photo:hover img { scale: 1.025; }
}
.card-photo, .placeholder { aspect-ratio: 1.44; border-radius: .8rem; }
.card-photo img { object-position: center 45%; }
.earrings-photo img { object-position: center 60%; }
.photo-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
  grid-template-rows: minmax(0, 1fr);
  gap: .4rem;
  aspect-ratio: 1.44;
}
.photo-pair .card-photo { aspect-ratio: auto; min-height: 0; }
.pink-photo img { object-position: center 70%; }
.white-photo img { object-position: 62% center; }
.placeholder {
  display: grid;
  place-items: center;
  background: #eee4d8;
  color: var(--accent-dark);
}
.placeholder span {
  padding: .42rem .8rem;
  border: 1px solid #c8ac98;
  border-radius: 999px;
  font-size: .875rem;
}
.card-copy { display: flex; flex: 1; flex-direction: column; padding: .95rem .62rem .55rem; }
.card-copy h3 { font-size: clamp(1.95rem, 4.5vw, 2.65rem); }
.card-copy p { margin-block: .44rem 1rem; color: var(--muted); }
.card-order {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: auto;
  padding-top: .7rem;
  border-top: 1px solid var(--line);
}
.price { color: var(--accent-dark); font-size: .875rem; font-weight: 700; overflow-wrap: anywhere; }
.footer {
  padding-block: 1.15rem calc(5.5rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: .875rem;
}
.floating-order {
  position: fixed;
  z-index: 2;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, calc(.5rem + env(safe-area-inset-bottom, 0px)));
  padding-inline: 1.3rem;
  box-shadow: 0 6px 24px #3f291e44;
}

dialog::backdrop { background: #231811b3; }
.order-dialog {
  width: min(calc(100% - 2rem), 27rem);
  max-width: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.order-dialog form { position: relative; padding: 3rem 1.4rem 1.5rem; }
.order-dialog h2 { margin-bottom: 1.25rem; font-size: clamp(2rem, 6vw, 2.7rem); }
.dialog-close, .gallery-controls button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font: 400 1.75rem/1 var(--sans);
  cursor: pointer;
}
.dialog-close { position: absolute; top: .5rem; right: .65rem; border-color: transparent; }
.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: .65rem max(.75rem, env(safe-area-inset-right, 0px)) max(.65rem, env(safe-area-inset-bottom, 0px)) max(.75rem, env(safe-area-inset-left, 0px));
  border: 0;
  background: #211916;
  color: #fff8ee;
  overflow: auto;
}
.lightbox[open] { display: grid; grid-template-rows: 44px minmax(0, 1fr) auto; gap: .6rem; }
.lightbox :focus-visible { outline-color: #fff8ee; }
.lightbox-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  gap: .35rem;
  text-align: center;
  touch-action: pan-y pinch-zoom;
}
.lightbox-stage img { width: 100%; height: 100%; min-height: 0; object-fit: contain; user-select: none; }
.lightbox-stage figcaption { font-size: .875rem; }
.gallery-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.gallery-controls button:hover, .lightbox .dialog-close:hover { background: #ffffff24; }

@media (min-width: 44rem) {
  .wrap { width: min(calc(100% - 72px), 70rem); }
  .masthead { min-height: 5rem; }
  .hero {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5.2rem);
    padding-block: 2.65rem 3.5rem;
  }
  .hero-photo { aspect-ratio: 1.23; }
  .hero-figure { border-radius: 9rem 9rem 1.4rem 1.4rem; }
  .hero-photo { border-radius: 8.4rem 8.4rem .85rem .85rem; }
  .hero p { margin-block: 1.4rem 1.5rem; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.3rem; }
  .card { padding: .75rem; }
  .card-copy { padding: 1.15rem .85rem .72rem; }
  .catalog { padding-bottom: 3.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  .photo img { transition: none; }
}

/* 26.11 клиент: «каталог по середине крупнее» */
.masthead { flex-direction: column; align-items: center; text-align: center; gap: .6rem; }
.masthead nav a { font-size: 1.25rem; font-weight: 700; letter-spacing: .02em; padding: .35rem 1.4rem; border: 1.5px solid currentColor; border-radius: 999px; text-decoration: none; }

/* 26.11 клиент: «убери каталог и мелко мастерская» */
.masthead { display: none; }
.hero { padding-top: 1.5rem; }

/* 26.11 клиент: «коллаж вместо одной фото» */
.kollazh {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: .4rem;
  aspect-ratio: 1;
  border-radius: 6.5rem 6.5rem .65rem .65rem;
  overflow: hidden;
}
.kollazh-tile { display: block; height: 100%; min-height: 0; border-radius: .35rem; overflow: hidden; }
.kollazh-tile img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 44rem) {
  .kollazh { aspect-ratio: 1.1; border-radius: 8.4rem 8.4rem .85rem .85rem; }
}

/* 26.11 клиент: «более красивым шрифтом» */
.hero h1 {
  font-family: "Great Vibes", "Cormorant", Georgia, cursive;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.02;
  font-size: clamp(3.4rem, 9vw, 7.2rem);
}

/* 26.11 клиент: коллаж 6 работ без кликов, кнопки каталог и Авито, рамки в каталоге */
.kollazh { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); aspect-ratio: .82; }
.kollazh-tile { pointer-events: none; }
@media (min-width: 44rem) {
  .kollazh { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; aspect-ratio: 1.25; }
}
.hero-buttons { display: flex; flex-wrap: wrap; gap: .7rem; }
.button-avito { background: var(--paper); color: var(--accent-dark); border: 1.5px solid var(--accent); }
.photo-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.photo-trio .card-photo { aspect-ratio: .75; }
.photo-trio img { width: 100%; height: 100%; object-fit: cover; }

/* 26.11 клиент: контакты маленькими квадратиками MAX, Telegram, Авито */
.contacts { padding-block: 2.2rem 1rem; text-align: center; }
.contacts h2 { margin: 0 0 1.1rem; }
.contact-icons { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.1rem; }
.ic { display: flex; flex-direction: column; align-items: center; gap: .4rem; color: var(--ink); text-decoration: none; font-size: .85rem; font-weight: 600; }
.ic svg { width: 3.6rem; height: 3.6rem; border-radius: 1rem; box-shadow: var(--shadow); }
.ic-max svg { background: linear-gradient(135deg, #3a8bff, #8a3cff); }
.ic-tg svg { background: #2aabee; }
.ic-avito svg { background: #fff; border: 1px solid var(--line); }
.ic:hover svg, .ic:focus-visible svg { transform: translateY(-2px); }
.ic[hidden] { display: none; }
/* 26.11 клиент: контакты над коллажем */
.hero .contacts { padding: 0; margin-top: 1.3rem; text-align: left; }
.hero .contact-icons { justify-content: flex-start; gap: .9rem; }
.hero .ic svg { width: 3.1rem; height: 3.1rem; border-radius: .85rem; }

.contact-symbol {
  width: 3.1rem;
  height: 3.1rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: var(--paper);
  color: var(--accent-dark);
  font-size: 1.5rem;
  box-shadow: var(--shadow);
}
.ic-other { max-width: 10rem; overflow-wrap: anywhere; }
