@font-face {
  font-family: "Press Start 2P";
  src: url("press-start-2p.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
:root {
  --ink: #151613;
  --snow: #f5f5ef;
  --accent: #c6c6c6;
  --header: 4.5rem;
  font-family: "Press Start 2P", monospace;
  font-synthesis: none;
  line-height: 1.7;
  color: var(--snow);
  background: var(--ink);
  scroll-padding-top: var(--header);
}
* { box-sizing: border-box; }
body { margin: 0; }
body, h1, h2, h3, p { margin-block: 0; }
a { color: inherit; }
a:focus-visible { outline: 2px solid #80a4ff; outline-offset: 5px; }
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(#141613dc, #141613dc), url("studio.jpg") center 46% / cover no-repeat, #575a55;
}
.header, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(1rem, 4vw, 4rem);
  background: var(--ink);
}
.header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  position: fixed;
  inset: 0 0 auto;
  z-index: 2;
  height: var(--header);
  border-bottom: 1px solid #ffffff26;
}
.wordmark {
  display: flex;
  align-items: center;
  flex: none;
  width: clamp(4.1rem, 12vw, 7rem);
}
.wordmark img {
  display: block;
  width: 100%;
  height: calc(var(--header) - .75rem);
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.header a, .footer a { text-decoration: none; }
.header nav { display: flex; gap: clamp(1rem, 4vw, 3.5rem); }
.header nav a, .footer a, .label, .button, small {
  font-size: .75rem;
}
.header nav a:hover, .footer a:hover { color: var(--accent); }
.frame { width: min(100%, 100rem); margin-inline: auto; padding-inline: clamp(1.25rem, 6vw, 7rem); }
.hero, .contacts { min-height: 100svh; display: flex; align-items: flex-end; }
.hero { padding-top: calc(var(--header) + 4rem); padding-bottom: clamp(3rem, 9vh, 8rem); }
.label { display: flex; align-items: center; gap: .65rem; text-transform: uppercase; }
h1, h2, h3 { font-weight: 400; }
h1, h2 { line-height: 1.3; }
h1 { font-size: clamp(1rem, 6.4vw, 6rem); margin: 1rem 0 1.5rem; }
h2 { font-size: clamp(1rem, 6.5vw, 5.5rem); }
.intro { max-width: 40rem; font-size: clamp(.75rem, 1.25vw, 1rem); line-height: 1.85; }
.button { display: inline-flex; padding: 1rem 1.3rem; margin-top: 1.75rem; background: var(--accent); color: var(--ink); text-decoration: none; }
.button:hover { background: var(--snow); }
.catalog { background: var(--snow); color: var(--ink); padding-block: clamp(3.5rem, 8vw, 8rem); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding-bottom: 2rem; border-bottom: 1px solid var(--ink); margin-bottom: 1.5rem; }
.section-head h2 { margin-top: 1rem; }
.section-head .label { color: #646464; text-transform: none; }
.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.2rem; }
.product-image {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  padding: 10%;
  background: #e9e7e2;
}
.product-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.product-image .product-preview { display: none; pointer-events: none; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .products article:hover .has-preview > img:first-child { visibility: hidden; }
  .products article:hover .has-preview > .product-preview {
    display: block;
    position: absolute;
    inset: 10%;
    width: 80%;
    height: 80%;
    filter: brightness(1.03);
    mix-blend-mode: multiply;
  }
}
.products h3 { margin-top: 1rem; font-size: clamp(.6875rem, 1.2vw, 1rem); }
.products p { margin-top: .35rem; color: #464741; font-size: .75rem; }
.contacts { min-height: calc(100svh - var(--header) - 5rem); padding-block: 5rem; }
.contact-panel { background: var(--ink); padding: clamp(1.4rem, 4vw, 3.5rem); width: fit-content; }
.contact-panel h2 { margin: 0; font-size: clamp(1rem, 3.8vw, 3.4rem); }
.contact-panel p { font-size: clamp(.6875rem, 1.2vw, .875rem); }
.contact-email-title { margin-top: 1.5rem; font-size: .875rem; }
.email { display: flex; align-items: center; gap: .65rem; margin-top: .65rem; overflow-wrap: anywhere; }
.contact-socials { display: grid; gap: .65rem; padding: 0; margin: 1rem 0 0; list-style: none; font-size: .75rem; }
.contact-socials a { display: inline-flex; align-items: center; gap: .65rem; text-underline-offset: .3em; }
.contact-socials a:hover { color: var(--accent); }
.social-icon { position: relative; display: inline-block; flex: none; width: 1rem; height: 1rem; }
.social-icon-telegram {
  background: currentColor;
  clip-path: polygon(0 43%, 13% 43%, 13% 34%, 38% 34%, 38% 25%, 63% 25%, 63% 16%, 88% 16%, 88% 8%, 100% 8%, 100% 34%, 92% 34%, 92% 59%, 84% 59%, 84% 91%, 70% 91%, 70% 82%, 56% 82%, 56% 72%, 43% 72%, 43% 82%, 32% 82%, 32% 62%, 46% 62%, 46% 52%, 60% 52%, 60% 43%, 72% 43%, 72% 34%, 58% 34%, 58% 43%, 43% 43%, 43% 52%, 28% 52%, 28% 61%, 13% 61%, 13% 53%, 0 53%);
}
.social-icon-instagram { border: 2px solid currentColor; }
.social-icon-instagram::before { content: ""; position: absolute; inset: 3px; border: 1px solid currentColor; }
.social-icon-instagram::after { content: ""; position: absolute; top: 1px; right: 1px; width: 2px; height: 2px; background: currentColor; }
.social-icon-mail { height: .75rem; border: 2px solid currentColor; }
.social-icon-mail::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  clip-path: polygon(0 0, 17% 0, 17% 25%, 33% 25%, 33% 50%, 67% 50%, 67% 25%, 83% 25%, 83% 0, 100% 0, 100% 25%, 83% 25%, 83% 50%, 67% 50%, 67% 75%, 33% 75%, 33% 50%, 17% 50%, 17% 25%, 0 25%);
}
.footer { min-height: 5rem; border-top: 1px solid #ffffff26; }
@media (max-width: 650px) {
  :root { --header: 3.75rem; }
  .header { display: flex; }
  .header nav { gap: .55rem; }
  .header nav a { font-size: clamp(.5rem, 1.9vw, .75rem); }
  .backdrop { background-position: center, center top; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem .8rem; }
  .contacts { padding-block: 3rem; }
}

.products article { position: relative; }
.product-open {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.product-open::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.products article:focus-within, .products article:hover .product-image {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
html:has(.product-dialog[open]) { overflow: hidden; }
.product-dialog {
  --dialog-padding: clamp(1rem, 3vw, 2.5rem);
  width: min(74rem, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  border: 0;
  padding: var(--dialog-padding);
  background: #fff;
  color: var(--ink);
}
.product-dialog::backdrop { background: #151613bf; }
.product-close { display: flex; justify-content: flex-end; margin-bottom: .75rem; }
.product-dialog button { font: inherit; cursor: pointer; }
.product-close button {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--ink);
  color: var(--snow);
  border: 0;
}
.product-details { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(1.5rem, 4vw, 3rem); }
.gallery-stage {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  aspect-ratio: 4 / 5;
  max-height: 72svh;
  background: #fff;
}
.gallery-stage img, .gallery-thumbs img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.gallery img[src^="gas-v1-fit."] { filter: brightness(1.03); }
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: .75rem; }
.gallery-thumbs button {
  width: 3.75rem;
  height: 3.75rem;
  padding: .25rem;
  border: 0;
  background: #fff;
}
.gallery-thumbs button[aria-pressed="true"] { box-shadow: 0 2px 0 var(--ink); }
.product-info h2 { font-size: clamp(1.15rem, 3vw, 2.25rem); margin-bottom: 1.25rem; }
.product-info form { font-size: .75rem; line-height: 1.9; }
.product-info h3 { margin-top: 1.25rem; }
.product-info ul { margin-block: .5rem 0; padding-inline-start: 1.3rem; }
.sizes { padding: 0; margin: 0 0 1.25rem; border: 0; min-width: 0; }
.sizes legend { padding: 0; margin-bottom: .5rem; }
.size-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.size-options label { position: relative; }
.size-options input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.size-options span {
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 1px solid var(--ink);
}
.size-options input:checked + span { background: var(--accent); }
.size-options input:disabled { cursor: not-allowed; }
.size-options input:disabled + span { color: #65665f; border-color: #bcbcb2; text-decoration: line-through; }
.size-options input:focus-visible + span, .product-dialog button:focus-visible {
  outline: 2px solid #416bbb;
  outline-offset: 3px;
}
.add-to-cart { border: 1px solid var(--ink); text-align: left; }
.add-to-cart:disabled { background: #e0e0d9; color: #56574e; cursor: not-allowed; }
.cart-status { min-height: 1.9em; margin-top: .75rem; }
@media (min-width: 651px) {
  .product-close {
    position: absolute;
    inset: var(--dialog-padding) var(--dialog-padding) auto auto;
    margin: 0;
  }
  .product-info { padding-top: 3.25rem; }
}
@media (max-width: 650px) {
  .product-details { grid-template-columns: minmax(0, 1fr); }
  .gallery-stage { max-height: 60svh; }
}

[hidden] { display: none !important; }
.cart-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  gap: .45rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  color: var(--snow);
  margin-inline-start: .45rem;
}
.cart-link:hover { color: var(--accent); }
.cart-icon {
  width: 1.5rem;
  height: 1.5rem;
  background: currentColor;
  clip-path: polygon(0 0, 24% 0, 24% 16%, 100% 16%, 100% 32%, 91% 32%, 91% 49%, 82% 49%, 82% 66%, 32% 66%, 32% 82%, 82% 82%, 82% 100%, 66% 100%, 66% 83%, 48% 83%, 48% 100%, 32% 100%, 32% 83%, 16% 83%, 16% 16%, 0 16%);
}
.cart-count { font-size: .625rem; }
.product-cart-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: .65rem; margin-top: 1.75rem; }
.product-cart-actions .button { margin-top: 0; align-items: center; }
.go-to-cart { border: 1px solid var(--ink); }
.quantity-control { display: inline-flex; align-items: center; border: 1px solid var(--ink); }
.quantity-control button { min-width: 2.25rem; min-height: 2.75rem; border: 0; background: transparent; color: inherit; }
.quantity-control button:hover { background: var(--accent); }
.quantity-control output { min-width: 1.5rem; text-align: center; }
.cart-page { min-height: 100vh; background: #fff; color: var(--ink); }
.cart-page .header { color: var(--snow); }
.cart-main { padding-block: calc(var(--header) + 2.5rem) 4rem; }
.back-to-catalog { display: inline-block; border: 1px solid var(--ink); padding: .8rem 1rem; font-size: .75rem; text-decoration: none; }
.back-to-catalog:hover { background: var(--snow); }
.cart-main h1 { margin: 2rem 0; font-size: clamp(1.45rem, 5vw, 3.5rem); }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); }
.cart-items { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.cart-item { display: grid; grid-template-columns: 5rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid #d6d6d6; }
.cart-item img { width: 100%; height: 6rem; object-fit: contain; }
.cart-item h2, .cart-summary h2 { font-size: clamp(.875rem, 1.5vw, 1.2rem); }
.cart-item-size { color: #5f5f5f; font-size: .6875rem; margin-top: .45rem; }
.cart-item-price { font-size: .75rem; margin-top: .7rem; }
.cart-item-controls { display: flex; justify-self: end; align-items: center; gap: .55rem; font-size: .75rem; }
.cart-item-controls button { font: inherit; cursor: pointer; }
.cart-item-controls button:disabled { color: #656565; background: #eee; cursor: default; }
.cart-remove { width: 2.75rem; height: 2.75rem; border: 0; background: transparent; color: #656565; }
.cart-remove:hover { background: #eee; }
.cart-undo { min-height: 2.75rem; border: 0; padding: 0 .25rem; background: transparent; color: #555; text-decoration: underline; text-underline-offset: .25em; }
.cart-undo:hover { color: var(--ink); }
.cart-item-controls button:focus-visible { outline: 2px solid #416bbb; outline-offset: 2px; }
.cart-update-status:not(:empty) { margin-bottom: .75rem; font-size: .75rem; }
.cart-summary { border-top: 1px solid var(--ink); padding-top: 1rem; }
.cart-total { font-size: clamp(1rem, 2.5vw, 2rem); margin-top: .75rem; }
.checkout { font-family: inherit; cursor: pointer; border: 1px solid var(--ink); }
.checkout:disabled { background: #eee; color: #656565; cursor: default; }
.cart-empty, .checkout-status { font-size: .8125rem; }
.cart-empty .button:hover { background: var(--ink); color: var(--snow); }
@media (max-width: 850px) {
  .cart-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 650px) {
  .cart-item { grid-template-columns: 4rem minmax(0, 1fr); gap: .65rem 1rem; }
  .cart-item-controls { grid-column: 2; }
  .header nav { gap: .4rem; }
  .header nav a { font-size: clamp(.45rem, 1.65vw, .75rem); }
  .cart-link { min-width: 1.75rem; gap: .2rem; margin-inline-start: .2rem; }
  .cart-icon { width: 1.1rem; height: 1.1rem; }
  .cart-count { font-size: .5rem; }
}

.checkout-dialog { max-width: 34rem; }
.checkout-dialog h2 { font-size: clamp(1.05rem, 4vw, 1.6rem); margin-bottom: 1.4rem; }
#checkout-form { font-size: .75rem; }
.checkout-method { display: flex; flex-wrap: wrap; gap: .8rem 1.25rem; padding: 0; border: 0; margin: 0 0 1.25rem; }
.checkout-method legend { padding: 0; margin-bottom: .65rem; }
.checkout-method label { display: inline-flex; gap: .5rem; align-items: center; cursor: pointer; }
.checkout-method input { accent-color: var(--ink); margin: 0; }
.checkout-contact { display: grid; gap: .45rem; }
.contact-input { display: flex; align-items: center; gap: .65rem; border: 1px solid var(--ink); padding-inline: .8rem; }
.contact-input:focus-within { outline: 2px solid #416bbb; outline-offset: 2px; }
.contact-input input { flex: 1; min-width: 0; padding: .85rem 0; border: 0; outline: 0; color: inherit; background: #fff; font: inherit; }
.checkout-contact small { color: #5f5f5f; font-size: .65rem; }
.checkout-status:not(:empty) { margin-top: .75rem; }
.cart-main .order-thanks { max-width: 48rem; font-size: clamp(1.1rem, 4vw, 2.6rem); line-height: 1.55; }

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: .2rem;
}
.header-actions .cart-link { margin-inline-start: clamp(.5rem, 2.2vw, 1.75rem); }
.header-social {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2.5rem;
}
.header-social:hover { color: var(--accent); }
@media (max-width: 650px) {
  .header-social { width: 1.5rem; }
  .header-social .social-icon { width: .85rem; height: .85rem; }
}
@media (max-width: 360px) {
  .header { padding-inline: .65rem; }
  .header-actions { gap: 0; }
}
