@font-face {
  font-family: "AOFMOKA Font 4";
  src: url("./fonts/aofmoka-font4-web.woff2?v=6") format("woff2");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root {
  --black: #000000;
  --white: #ffffff;
  --line: clamp(8px, 0.65vw, 12px);
  --radius: clamp(24px, 3vw, 52px);
  --type-size: clamp(11px, 0.92vw, 15px);
  --header-height: calc(var(--type-size) + (var(--line) * 4));
}

* {
  box-sizing: border-box;
  font-family: "AOFMOKA Font 4";
  font-size: var(--type-size);
}

html {
  scroll-behavior: smooth;
  background: var(--white);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--white);
  color: var(--black);
  font-family: "AOFMOKA Font 4";
  font-weight: 900;
  white-space: nowrap;
}

a,
button {
  color: inherit;
  font: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: var(--header-height);
  padding: var(--line);
  background: var(--white);
}

.site-header::after {
  position: absolute;
  top: calc(100% - var(--line));
  right: 0;
  left: 0;
  height: clamp(40px, 3.5vw, 60px);
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 1) 12%,
    rgba(255, 255, 255, 0.995) 20%,
    rgba(255, 255, 255, 0.98) 28%,
    rgba(255, 255, 255, 0.94) 36%,
    rgba(255, 255, 255, 0.84) 46%,
    rgba(255, 255, 255, 0.68) 58%,
    rgba(255, 255, 255, 0.48) 69%,
    rgba(255, 255, 255, 0.29) 79%,
    rgba(255, 255, 255, 0.14) 87%,
    rgba(255, 255, 255, 0.055) 93%,
    rgba(255, 255, 255, 0.012) 98%,
    rgba(255, 255, 255, 0) 100%
  );
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease-out;
  will-change: opacity;
}

.site-header-scrolled::after {
  opacity: 1;
}

.header-bar {
  display: flex;
  width: 100%;
  height: calc(var(--header-height) - (var(--line) * 2));
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 999px;
  background: var(--black);
}

.header-logo {
  display: block;
  width: auto;
  height: var(--type-size);
  overflow: visible;
  border-radius: 999px;
}

.header-logo img {
  width: auto;
  height: var(--type-size);
}

main {
  padding: 0 var(--line) var(--line);
  background: var(--white);
}

.collection {
  padding: calc(var(--line) * 2);
  background: var(--white);
  color: var(--black);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: calc(var(--line) * 2);
  row-gap: calc(var(--line) * 2);
}

.product-card {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  appearance: none;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  outline: 0;
  overflow: visible;
  background: transparent;
  color: var(--black);
}

.product-card:focus-visible {
  outline: 0;
}

.product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.12;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius);
  background: var(--white);
}

.product-image img {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  object-fit: contain;
}

.product-meta {
  display: flex;
  min-height: calc(var(--type-size) * 2.5);
  align-items: center;
  justify-content: center;
  padding-block: calc(var(--line) * 0.5);
}

.product-meta h2 {
  display: grid;
  width: auto;
  min-height: calc(var(--type-size) * 2.1);
  place-items: center;
  margin: 0;
  padding: 0 calc(var(--line) * 1.25);
  overflow: visible;
  border-radius: 999px;
  background: transparent;
  color: var(--black);
  font-family: "AOFMOKA Font 4";
  font-size: var(--type-size);
  font-weight: 900;
  line-height: normal;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  transition: background-color 180ms ease, color 180ms ease;
  white-space: nowrap;
}

.product-card:focus-visible h2,
.product-card[aria-expanded="true"] h2 {
  background: var(--black);
  color: var(--white);
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .product-card:hover h2 {
    background: var(--black);
    color: var(--white);
    text-decoration: none;
  }
}

@media (max-width: 1320px) {
  :root {
    --type-size: clamp(11px, 1.15vw, 15px);
  }

  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  :root {
    --type-size: clamp(11px, 1.7vw, 15px);
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  :root {
    --line: 8px;
    --radius: 28px;
    --type-size: clamp(5px, calc(2.0202vw - 0.97px), 11px);
  }

  .collection {
    padding: calc(var(--line) * 1.5);
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--line);
    row-gap: var(--line);
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
