@font-face {
  font-family: Manrope;
  src: url("assets/manrope-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: Manrope;
  src: url("assets/manrope-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  color-scheme: light;
  --paper: #f7f2e9;
  --ink: #261d2a;
  --muted: #615565;
  --plum: #24162d;
  --acid: #ddf478;
  --max-width: 1264px;
  --page-pad: clamp(20px, 5.15vw, 76px);
  font-family: Manrope, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
  min-width: 300px;
  margin: 0;
}

h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
a, button, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, select, input { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid #69498c;
  outline-offset: 4px;
}

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

.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: fixed;
  z-index: 5;
  top: 10px;
  left: 10px;
  padding: 12px 16px;
  color: var(--ink);
  background: var(--acid);
  transform: translateY(calc(-100% - 12px));
}
.skip-link:focus { transform: none; }

.site-header { color: #fff8ef; background: var(--plum); }
.header-inner {
  display: grid;
  min-height: 75px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid #f7e4fa29;
}

.wordmark {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  font-size: clamp(1.08rem, 1.75vw, 1.44rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark svg { width: 23px; height: 23px; }
.site-header .wordmark svg { color: var(--acid); }

.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(20px, 3.5vw, 50px);
}

.site-nav a {
  padding-block: 10px;
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a { color: #e3d5e7; }

.site-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero {
  color: #fff8f1;
  background: var(--plum);
}

.hero-inner {
  display: grid;
  justify-items: center;
  padding-block: clamp(36px, 4vw, 64px);
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.9rem, 11.1vw, 10.25rem);
  font-weight: 800;
  letter-spacing: -0.053em;
  line-height: 0.98;
}

.hero-copy {
  margin: 18px 0 28px;
  color: #e5d7e9;
  font-size: clamp(1rem, 1.8vw, 1.42rem);
  line-height: 1.45;
}

.button {
  display: inline-flex;
  min-height: 55px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 19px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 150ms, color 150ms;
}

.button svg { width: 20px; height: 20px; flex: 0 0 auto; }
.button-accent { color: #25202b; background: var(--acid); }
.button-accent:hover { background: #efffa2; }

.hero a:focus-visible, .site-header a:focus-visible, .site-footer a:focus-visible, .gallery-dialog :focus-visible {
  outline-color: var(--acid);
}

.section { padding-block: clamp(62px, 7.2vw, 104px); }
#collection, #constructor, #order { scroll-margin-top: 24px; }

.section-intro {
  margin-bottom: clamp(21px, 2.7vw, 38px);
}

h2 {
  font-size: clamp(2.05rem, 4.65vw, 4.35rem);
  font-weight: 800;
  letter-spacing: -0.047em;
  line-height: 1.055;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(13px, 1.6vw, 22px);
}

.product { min-width: 0; }

.product-link {
  display: block;
  height: 100%;
  border-radius: 9px;
  text-decoration: none;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.product-image {
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1.03;
  border-radius: 9px;
}

.product-spino { background: #e9e0ed; }
.product-raptor { background: #e4e8d8; }
.product-ptero { background: #f0e3cc; }
.product-anky { background: #e1e6f1; }

.product-image img {
  width: 100%;
  height: 100%;
  padding: 5%;
  object-fit: contain;
  transition: transform 220ms ease;
}

@media (hover: hover) {
  .product-link:hover {
    background-color: #efe8f0;
    box-shadow: 0 0 0 5px #efe8f0;
  }

  .product-link:hover .product-image img { transform: scale(1.035); }
}

.product-content { padding: 12px 1px 0; }
.product h3 {
  font-size: clamp(1rem, 1.8vw, 1.56rem);
  font-weight: 800;
  letter-spacing: -0.042em;
  line-height: 1.2;
}

.product-price {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.studio {
  background: #ede6ec;
  border-block: 1px solid #e2d7e1;
}

.studio-layout {
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.96fr);
  align-items: stretch;
  border: 1px solid #d8c9d7;
  border-radius: 18px;
  background: #fdf9f2;
}

.studio-preview {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-rows: auto minmax(245px, 1fr) auto;
  gap: 9px;
  min-height: 505px;
  padding: clamp(14px, 2vw, 27px);
  background: #efe7ef;
}

.preview-heading {
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  color: #493652;
  font-size: 0.82rem;
  font-weight: 800;
}

.preview-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.preview-label span {
  width: 7px;
  height: 7px;
  border: 1px solid #749247;
  border-radius: 50%;
  background: #b7cb5c;
}

.preview-actions {
  display: inline-flex;
  align-items: stretch;
  gap: 7px;
}

.preview-mode, .preview-light {
  display: inline-flex;
  min-width: 44px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #d3c0d4;
  border-radius: 100px;
  padding: 3px 11px;
  color: #493652;
  background: #fbf5fb;
  font-weight: 800;
}

.preview-mode:hover, .preview-light:hover { background: #eee3ed; }
.preview-mode[aria-pressed="true"] { color: #fff8f1; background: var(--plum); }
.preview-light[aria-pressed="true"] { border-color: #b1844c; color: #3d291c; background: #f4dba9; }
.preview-mode:focus-visible, .preview-light:focus-visible { outline-offset: 1px; }
.preview-light svg { width: 16px; height: 16px; flex: none; }

.preview-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  border: 1px solid #d8c9db;
  border-radius: 12px;
  background: #f2eaf2;
}

.preview-stage[data-light-on] {
  border-color: #302438;
  background: #17151f;
}

.preview-stage[data-light-on] .preview-tools { color: #e4d9e8; }
.preview-stage[data-light-on] :focus-visible { outline-color: #f3d5a8; }

.preview-images { position: absolute; inset: 0; }

.preview-images img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-images::before {
  position: absolute;
  inset: 70% 10% 5%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #73557838, transparent 66%);
  content: "";
}

.preview-canvas {
  position: absolute;
  inset: 0 0 auto;
  display: block;
  width: 100%;
  height: calc(100% - 38px);
  border-radius: 10px;
  cursor: grab;
  touch-action: pinch-zoom;
}

.preview-canvas.is-dragging { cursor: grabbing; }
.preview-canvas:focus-visible { outline-offset: -2px; }

.preview-tools {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  min-height: 38px;
  align-items: center;
  padding-inline: 10px;
  color: #54415d;
  font-size: 0.72rem;
  line-height: 1.35;
}

.studio-preview figcaption {
  z-index: 1;
  color: #5e4c65;
  font-size: 0.73rem;
  line-height: 1.45;
}

.preview-status {
  position: absolute;
  z-index: 1;
  right: 20px;
  bottom: 85px;
  left: 20px;
  max-width: max-content;
  margin-inline: auto;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff8ef;
  font-size: 0.82rem;
  font-weight: 700;
}

.studio-controls {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid #e2d6df;
  padding: clamp(20px, 3.5vw, 48px);
}

.control-model, .control-colors { margin: 0 0 16px; }
.control-model label, .control-colors legend {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
}

.select-wrap { position: relative; margin-top: 8px; }
.select-wrap svg {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  pointer-events: none;
}

.select-wrap select {
  width: 100%;
  min-height: 48px;
  appearance: none;
  border: 1px solid #c5b5c9;
  border-radius: 9px;
  padding: 9px 37px 9px 12px;
  color: var(--ink);
  background: #fffdf8;
  font-weight: 700;
  cursor: pointer;
}

.control-colors { min-inline-size: 0; border: 0; padding: 0; }
.control-colors legend { padding: 0; }
.chosen-name {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.swatch {
  position: relative;
  display: grid;
  width: min(44px, (100% - 24px) / 7);
  height: 44px;
  flex: 0 0 min(44px, (100% - 24px) / 7);
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
}

.swatch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.swatch-dot {
  position: relative;
  width: min(33px, 100% - 7px);
  aspect-ratio: 1;
  border: 1px solid #251c2b45;
  border-radius: 50%;
  background: var(--swatch-color, #f4e7cc);
  pointer-events: none;
}

.swatch input:checked + .swatch-dot {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.swatch input:focus-visible + .swatch-dot {
  outline: 3px dashed #69498c;
  outline-offset: 3px;
}

.swatch input:checked + .swatch-dot::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 5px;
  transform: translate(-50%, -64%) rotate(-45deg);
  border-bottom: 2px solid var(--check-color, #fff);
  border-left: 2px solid var(--check-color, #fff);
  content: "";
}

.studio-more { margin-top: 4px; }

.studio-more summary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 5px;
  color: #624672;
  font-size: 0.81rem;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.studio-more summary::-webkit-details-marker { display: none; }
.studio-more summary svg { width: 16px; height: 16px; }
.studio-more[open] summary svg { transform: rotate(180deg); }

.studio-utilities {
  display: flex;
  flex-wrap: wrap;
  column-gap: 15px;
}

.text-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 4px;
  border: 0;
  padding: 0;
  color: #624672;
  background: transparent;
  font-size: 0.77rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button:hover { color: var(--ink); }
.text-button[aria-disabled="true"] { color: #6d6470; text-decoration: none; cursor: default; }
.text-button svg { width: 19px; height: 19px; }
.share-feedback { color: var(--muted); font-size: 0.76rem; }
.share-feedback p:not(:empty) { margin-bottom: 5px; }

.share-feedback input {
  width: 100%;
  min-height: 42px;
  margin-bottom: 5px;
  border: 1px solid #bdafc2;
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--ink);
  background: white;
  font-size: 0.83rem;
}

.studio-order {
  margin-top: 5px;
  border-top: 1px solid #eadfe6;
  padding-top: 16px;
}

.studio-price {
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 3vw, 1.76rem);
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.order-button {
  width: 100%;
  border-color: #bdce64;
}

.studio-order .order-button { justify-content: space-between; }
.order-button:disabled { opacity: 0.72; cursor: wait; }

.site-footer {
  padding-block: 28px;
  color: #f9eff8;
  background: var(--plum);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
}

.site-footer .wordmark svg { color: var(--acid); }
body:has(.gallery-dialog[open], .order-dialog[open]) { overflow: hidden; }

.order-dialog {
  width: min(450px, calc(100% - 24px));
  max-height: min(92dvh, 790px);
  border: 1px solid #d7c8d7;
  border-radius: 16px;
  padding: 0;
  color: var(--ink);
  background: #fdf9f2;
}

.order-dialog::backdrop { background: #1a101cd8; }
.order-dialog form { padding: clamp(16px, 3vw, 27px); }

.order-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 15px;
}

.order-dialog-header h2 { font-size: clamp(1.34rem, 5vw, 1.85rem); }

.order-close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  border: 1px solid #d8c9d8;
  border-radius: 50%;
  padding: 0;
  color: var(--ink);
  background: transparent;
}

.order-close:hover { background: #eee5ed; }
.order-close:disabled { opacity: 0.72; cursor: wait; }
.order-close svg { width: 21px; height: 21px; }

.order-overview {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 11px;
  border-block: 1px solid #e2d7de;
  padding-block: 11px;
  font-size: 0.9rem;
}

.order-overview [data-order-price] { white-space: nowrap; }
.order-overview .order-colors {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.order-fields {
  min-inline-size: 0;
  margin: 16px 0 0;
  border: 0;
  padding: 0;
}

.order-fields legend {
  padding: 0 0 6px;
  font-size: 0.86rem;
  font-weight: 800;
}

.order-data-use { margin-bottom: 11px; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }

.order-fields label {
  display: block;
  margin: 10px 0 4px;
  font-size: 0.83rem;
  font-weight: 800;
}

.order-fields label:first-of-type { margin-top: 0; }

.order-fields input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbbbcf;
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--ink);
  background: #fffdf8;
  font-size: 1rem;
}

.order-fields input[aria-invalid="true"] { border-color: #9e3a4a; }
.order-fields input:disabled { color: var(--muted); }
.order-error { margin-top: 4px; color: #8a293b; font-size: 0.77rem; }

.order-status {
  margin-top: 13px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.order-status[data-kind="error"] { color: #8a293b; }
.order-status[data-kind="success"] { color: #365528; }
.order-dialog .order-button { min-height: 49px; margin-top: 16px; }

.gallery-dialog {
  width: min(910px, calc(100% - 26px));
  max-height: min(94dvh, 910px);
  border: 1px solid #725b78;
  border-radius: 14px;
  padding: 0;
  color: #fff8f1;
  background: var(--plum);
}

.gallery-dialog::backdrop { background: #17101bdc; }
.gallery-content { padding: clamp(11px, 2.3vw, 24px); }

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
}

.gallery-header h2 {
  font-size: clamp(1.25rem, 3.4vw, 2rem);
  letter-spacing: -0.042em;
}

.gallery-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid #b5a1bf;
  border-radius: 50%;
  padding: 0;
  color: #fff9f3;
  background: #372341;
}

.gallery-icon:hover { color: var(--plum); background: var(--acid); }
.gallery-icon svg { width: 22px; height: 22px; }

.gallery-stage {
  position: relative;
  display: grid;
  height: clamp(176px, 58dvh, 620px);
  overflow: hidden;
  place-items: center;
  border-radius: 8px;
  background: #120d17;
}

.gallery-stage img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.gallery-prev, .gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.gallery-prev { left: 8px; }
.gallery-prev svg { transform: rotate(180deg); }
.gallery-next { right: 8px; }

.gallery-thumbs {
  display: flex;
  align-items: center;
  justify-content: safe center;
  gap: 7px;
  overflow-x: auto;
  padding: 9px 3px;
}

.gallery-thumb {
  width: clamp(47px, 7vw, 66px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 5px;
  padding: 0;
  background: #372341;
}

.gallery-thumb[aria-current="true"] { border-color: var(--acid); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-count {
  color: #ddc9e3;
  font-size: 0.77rem;
  text-align: center;
}

@media (max-width: 1050px) {
  .studio-controls { padding: clamp(20px, 3.2vw, 35px); }
  .studio-layout { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
}

@media (max-width: 770px) {
  .header-inner { min-height: 65px; gap: 14px; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: 0.75rem; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .product h3 { font-size: clamp(1.05rem, 2.9vw, 1.43rem); }
  .studio-layout { grid-template-columns: 1fr; }
  .studio-preview {
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-height: 0;
    height: min(69vw, 480px);
  }
  .preview-canvas { inset-inline: 10px; width: calc(100% - 20px); }
  .studio-controls { border-top: 1px solid #e2d6df; border-left: 0; padding: 24px; }
}

@media (max-width: 565px) {
  .header-inner { min-height: 59px; grid-template-columns: 1fr auto; }
  .wordmark svg { width: 20px; height: 20px; }
  .hero h1 { font-size: clamp(3.05rem, 13.2vw, 3.9rem); }
  .section { padding-block: 52px; }
  .product-content { padding: 8px 1px 0; }
  .studio-preview {
    height: clamp(302px, 82vw, 435px);
    gap: 7px;
    padding: 10px;
  }
  .preview-heading { gap: 4px 7px; font-size: 0.75rem; }
  .preview-actions { gap: 5px; }
  .preview-light { padding-inline: 8px; }
  .preview-light svg { width: 14px; height: 14px; }
  .preview-tools { padding-inline: 7px; }
  .studio-controls { padding: 15px 13px 17px; }
  .control-model, .control-colors { margin-bottom: 12px; }
  .select-wrap { margin-top: 6px; }
  .studio-order { padding-top: 12px; }
  .order-button { min-height: 50px; gap: 8px; padding-inline: 12px; }
}

@media (max-width: 365px) {
  .header-inner { gap: 10px; }
  .site-nav { gap: 11px; }
  .site-nav a { font-size: 0.7rem; }
  .wordmark { font-size: 1.02rem; }
  .preview-light svg { display: none; }
  .studio-utilities .text-button { font-size: 0.73rem; }
  .swatch input:checked + .swatch-dot, .swatch input:focus-visible + .swatch-dot { outline-offset: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
