/* Waxtape site styles. Layout measured on the Figma home (1728px frame).
   Interaction language: Need for Speed Most Wanted menus — a skewed ink slab snaps in behind
   the item, the text flips colour and kicks a red copy; blocks slam into hard shadows. Fast, stepped. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--ink);
  font: 400 18px/1.2 var(--font-sans); letter-spacing: var(--track);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Wall: the tiled wall photo behind everything (already blurred in the file) ---------- */
.wall { position: relative; isolation: isolate; min-height: 100vh; overflow-x: clip; }
.wall::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: #efe9dc url("/img/wall.jpg") center top / cover no-repeat;
}

/* noise map on cream surfaces */
.noise {
  /* Waxtape noise map: #DED9C9 blots on #ECE6D8 (public/img/camo.svg, tiles seamlessly). */
  --noise-img: url("/img/camo.svg");
  background-color: var(--bg);
  background-image: var(--noise-img);
  background-size: 540px 540px;
}

/* ---------- Header ---------- */
.site-header { display: flex; align-items: flex-end; gap: clamp(24px, 7.6vw, 135px); padding: 30px 19px 0; max-width: 1728px; margin: 0 auto; }
.site-header__logo { flex: none; width: 196px; display: block; padding-bottom: 6px; }
.site-header__logo img { width: 100%; height: auto; }
.nav { flex: 1; min-width: 0; max-width: 1061px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.nav__links { flex: 1; min-width: 0; display: flex; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0 0 7px; }
.nav__link {
  position: relative; isolation: isolate; display: inline-block; padding: 0 6px 4px;
  font-family: var(--font-display); font-size: 40px; line-height: 1; letter-spacing: var(--track); text-transform: lowercase;
  color: var(--ink); text-decoration: none; transition: color 90ms steps(2);
}
.nav__link::before {
  content: ""; position: absolute; inset: 2px -4px 0; z-index: -1; background: var(--ink);
  transform: skewX(-12deg) scaleX(0); transform-origin: left; transition: transform 120ms cubic-bezier(.2, .9, .1, 1);
}
.nav__link:hover, .nav__link:focus-visible { color: var(--bg); }
.nav__link:hover::before, .nav__link:focus-visible::before { transform: skewX(-12deg) scaleX(1); }
.nav__link[aria-current="page"] { background: var(--ink); color: var(--white); padding: 0 10px 4px; }
.nav__link[aria-current="page"]::before { display: none; }

.pill {
  display: inline-block; padding: 0 10px 3px; background: var(--ink); color: var(--white);
  font-family: var(--font-display); font-size: 32px; line-height: 1.15; letter-spacing: var(--track); text-transform: lowercase;
  text-decoration: none; transition: transform 90ms steps(2), box-shadow 90ms steps(2);
}
.pill:hover, .pill:focus-visible { box-shadow: var(--shadow-hit); transform: translate(-2px, -2px) rotate(-2deg); }
.pill:active { transform: translate(2px, 2px); box-shadow: none; }
.pill[aria-current="page"] { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Sheet: the big cream page ---------- */
.sheet { position: relative; isolation: isolate; max-width: min(1634px, calc(100% - 2 * clamp(12px, 2.7vw, 47px))); margin: 58px auto 0; padding: 22px 22px 48px; }
.sheet.noise { background: none; }
.sheet.noise::before { content: ""; position: absolute; inset: 0; z-index: -1; background-color: var(--bg); background-image: var(--noise-img); background-size: 540px 540px; filter: url(#rough-edge); }
.sheet--narrow { padding: 40px clamp(22px, 4vw, 64px) 64px; }

/* ---------- Home layout ---------- */
.home { display: grid; grid-template-columns: minmax(0, 893fr) minmax(0, 614fr); gap: 32px clamp(32px, 4.5vw, 77px); align-items: start; }
.home__new { padding-top: 0; }
.label { margin: 0; font: 900 24px/1.05 var(--font-sans); letter-spacing: var(--track); text-transform: uppercase; }
.label em { font-style: normal; }
.home__new .label { margin-bottom: 27px; }
@media (max-width: 1100px) {
  .home { grid-template-columns: minmax(0, 1fr); }
  .home__feature { order: -1; max-width: 614px; margin-left: 30px; }
}

/* ---------- Product grid + card ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 23px 20px; }
@media (max-width: 760px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; } }
.card { position: relative; min-width: 0; }
.card__link { display: grid; align-content: start; color: var(--ink); text-decoration: none; }
.card__media { position: relative; display: block; aspect-ratio: 206 / 258; background: var(--white); overflow: hidden; transition: transform 110ms cubic-bezier(.2, .9, .1, 1), box-shadow 110ms cubic-bezier(.2, .9, .1, 1); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__hit {
  position: absolute; left: 0; right: 0; bottom: 26px; z-index: 2; padding: 6px 10px 8px; background: var(--ink); color: var(--white); text-decoration: none;
  font-family: var(--font-display); font-size: 28px; line-height: 1; letter-spacing: var(--track); text-transform: lowercase;
  display: flex; justify-content: space-between; align-items: baseline; gap: 6px;
  clip-path: inset(100% 0 0 0); transition: clip-path 120ms cubic-bezier(.2, .9, .1, 1), transform 110ms cubic-bezier(.2, .9, .1, 1), background 80ms steps(1);
}
.card__hit small { font: 900 12px/1 var(--font-sans); letter-spacing: 0; text-transform: uppercase; color: var(--bg); white-space: nowrap; }
.card__hit:hover { background: var(--announce); }
.card__hit:active { transform: translate(-2px, -2px) !important; }
.card__name { position: relative; isolation: isolate; justify-self: start; max-width: 100%; padding: 0 4px; margin: 0 0 0 -4px; font: 900 18px/26px var(--font-sans); letter-spacing: var(--track); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__name::before { content: ""; position: absolute; inset: 3px 0; z-index: -1; background: var(--ink); transform: skewX(-12deg) scaleX(0); transform-origin: left; transition: transform 120ms cubic-bezier(.2, .9, .1, 1); }
.card:hover .card__media, .card:focus-within .card__media { transform: translate(-4px, -4px); box-shadow: var(--shadow-card); }
.card:hover .card__hit, .card:focus-within .card__hit { clip-path: inset(0 0 0 0); transform: translate(-4px, -4px); }
.card:hover .card__name, .card:focus-within .card__name { color: var(--white); }
.card:hover .card__name::before, .card:focus-within .card__name::before { transform: skewX(-12deg) scaleX(1); }
.card__link:active .card__media { transform: translate(2px, 2px); box-shadow: none; }
.card__link:focus-visible { outline: none; }
.card__link:focus-visible .card__media { outline: 3px solid var(--focus); outline-offset: 3px; }
.card[hidden] { display: none; }

.card--soon { pointer-events: none; }
.card--soon .card__media { background: transparent; border: 2px dashed var(--panel); display: grid; place-items: center; }
.card--soon .card__media span { font-family: var(--font-display); font-size: 40px; letter-spacing: var(--track); color: var(--panel); }
.card--soon .card__name { color: var(--ink-soft); font-weight: 400; }

/* ---------- Feature panel (THE RAW) ---------- */
.feature { position: relative; isolation: isolate; background: none; padding: 55px 22px 15px 24px; display: grid; gap: 15px; margin-top: 7px; }
.feature::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--panel); filter: url(#rough-edge-strong); }
.feature__sticker { position: absolute; top: -22px; left: -41px; z-index: 2; width: min(397px, 70%); height: auto; transform: rotate(-7.43deg); transform-origin: 0 50%; pointer-events: none; }
.feature__media { display: block; aspect-ratio: 1; background: var(--white); overflow: hidden; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms cubic-bezier(.2, .9, .1, 1); }
.feature__media:hover img { transform: scale(1.03); }
.feature__text { display: grid; gap: 1.15em; padding-left: 4px; max-width: 564px; }
.feature__text p { margin: 0; font-size: 18px; line-height: 1.15; }
.feature__foot { display: flex; justify-content: flex-end; padding-top: 18px; }

/* ---------- Download actions ---------- */
.go { text-transform: uppercase; display: inline-flex; align-items: baseline; gap: 1px; font: 900 24px/1.05 var(--font-sans); letter-spacing: var(--track); color: var(--ink); text-decoration: none; }
.go b { display: inline-block; font-weight: 900; }
.go:hover b, .go:focus-visible b { color: var(--announce); animation: chev 360ms steps(3) infinite; }
.go:hover b:nth-child(2), .go:focus-visible b:nth-child(2) { animation-delay: 120ms; }
.go:hover b:nth-child(3), .go:focus-visible b:nth-child(3) { animation-delay: 240ms; }
@keyframes chev { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(4px); } }

.dl {
  position: relative; display: flex; align-items: center; justify-content: center; height: 54px; width: 100%;
  background: var(--ink); color: var(--white); text-decoration: none; overflow: hidden;
  font-family: var(--font-display); font-size: 40px; line-height: 1; letter-spacing: var(--track); text-transform: lowercase;
  transition: transform 90ms steps(2), box-shadow 90ms steps(2);
}
.dl::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; background: var(--announce); transform: skewX(-20deg); opacity: 0; }
.dl span { position: relative; padding-bottom: 4px; }
.dl:hover, .dl:focus-visible { box-shadow: var(--shadow-hit); transform: translate(-2px, -2px); }
.dl:hover::before, .dl:focus-visible::before { animation: sweep 420ms cubic-bezier(.2, .9, .1, 1) 1; }
.dl:active { transform: translate(2px, 2px); box-shadow: none; background: var(--announce); }
.dl[aria-disabled="true"] { background: var(--panel); color: var(--ink-soft); pointer-events: none; }
@keyframes sweep { 0% { left: -40%; opacity: 1; } 100% { left: 120%; opacity: 1; } }

/* ---------- Product page ---------- */
.product { display: grid; grid-template-columns: minmax(0, 867fr) minmax(0, 620fr); gap: 40px clamp(32px, 3.6vw, 62px); align-items: start; padding-top: 8px; }
@media (max-width: 1100px) { .product { grid-template-columns: minmax(0, 1fr); } }
.product__media { min-width: 0; }

/* Thumbs column is exactly as tall as the main image: the main image sets the height,
   the thumbs share it in equal rows. */
.gallery { display: grid; grid-template-columns: clamp(64px, 7vw, 112px) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.gallery__thumbs { display: grid; grid-template-rows: repeat(var(--thumbs, 5), minmax(0, 1fr)); gap: 12px; min-height: 0; }
.thumb { display: block; padding: 0; border: 0; background: var(--white); cursor: pointer; position: relative; overflow: hidden; min-height: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { outline: 3px solid var(--ink); outline-offset: -3px; }
.thumb[aria-current="true"]::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 4px var(--ink); }
.gallery__main { background: var(--white); border: 1px solid var(--ink); aspect-ratio: 4 / 5; overflow: hidden; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) {
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery__thumbs { order: 2; grid-template-rows: none; grid-template-columns: repeat(var(--thumbs, 5), minmax(0, 1fr)); }
  .thumb { aspect-ratio: 4 / 5; }
}

/* Category path: Drowner, lowercase */
.tagline { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 18px 0 0; padding: 0; list-style: none; }
.tagline a { position: relative; isolation: isolate; display: inline-block; font-family: var(--font-display); font-size: 34px; line-height: 1.05; letter-spacing: var(--track); text-transform: lowercase; color: var(--ink); text-decoration: none; padding: 0 5px 3px; margin-left: -5px; }
.tagline a::before { content: ""; position: absolute; inset: 0 -2px; z-index: -1; background: var(--ink); transform: skewX(-12deg) scaleX(0); transform-origin: left; transition: transform 110ms cubic-bezier(.2, .9, .1, 1); }
.tagline a:hover, .tagline a:focus-visible { color: var(--bg); }
.tagline a:hover::before, .tagline a:focus-visible::before { transform: skewX(-12deg) scaleX(1); }

.info { display: grid; gap: 22px; max-width: 620px; }
.info__title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 22px; }
.info__title h1 { margin: 0; font: 700 clamp(44px, 4.2vw, 72px)/1 var(--font-sans); letter-spacing: var(--track); overflow-wrap: anywhere; }
.info__collab { font: 900 24px/1.05 var(--font-sans); letter-spacing: var(--track); white-space: nowrap; }
.info__collab i { font-style: normal; margin-right: 14px; }
.info__block { display: grid; gap: 18px; padding-left: 9px; max-width: 34ch; }
.info__block p { margin: 0; }
.info__help { margin: -15px 5px 0 0; text-align: right; font-size: 13px; line-height: 1.2; letter-spacing: -.04em; color: var(--ink-soft); }
.info__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 6px 0 0; padding: 18px 9px 0; border-top: 1px solid var(--ink); }
.info__facts div { min-width: 0; display: grid; gap: 4px; }
.info__facts dt { font: 700 13px/1.1 var(--font-sans); letter-spacing: .02em; text-transform: uppercase; color: var(--ink); }
.info__facts dd { margin: 0; font-size: 16px; line-height: 1.25; color: var(--ink); overflow-wrap: anywhere; }

/* ---------- Listing + simple pages ---------- */
.page-title { margin: 0 0 32px; font-family: var(--font-display); font-weight: 400; font-size: clamp(56px, 6vw, 96px); line-height: 1; letter-spacing: var(--track); text-transform: lowercase; }
.subnav { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: -12px 0 32px; padding: 0; list-style: none; }
.subnav a { font-family: var(--font-display); font-size: 34px; line-height: 1.05; letter-spacing: var(--track); text-transform: lowercase; text-decoration: none; padding: 0 6px 3px; }
.subnav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.subnav a:hover { background: var(--ink); color: var(--bg); }
.empty { max-width: 46ch; }
.empty p { margin: 0 0 1em; }

/* ---------- Footer ---------- */
.site-footer { color: var(--ink); }
.site-footer__in { max-width: 1634px; margin: 0 auto; padding: 56px 24px 24px; display: grid; gap: 40px; }
.site-footer__top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; align-items: stretch; }
@media (max-width: 760px) { .site-footer__top { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; order: 9; } }
.site-footer__brand { display: flex; align-items: flex-end; }
.site-footer__brand img { width: 220px; height: auto; }
.site-footer h2 { margin: 0 0 10px; font: 900 18px/1.1 var(--font-sans); letter-spacing: var(--track); text-transform: uppercase; color: var(--ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer a { position: relative; isolation: isolate; color: var(--ink); text-decoration: none; font-size: 18px; line-height: 1.25; padding: 0 3px; margin-left: -3px; }
.site-footer a::before { content: ""; position: absolute; inset: 1px -2px; z-index: -1; background: var(--ink); transform: skewX(-12deg) scaleX(0); transform-origin: left; transition: transform 110ms cubic-bezier(.2, .9, .1, 1); }
.site-footer a:hover::before, .site-footer a:focus-visible::before { transform: skewX(-12deg) scaleX(1); }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--bg); }
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid var(--ink); padding-top: 14px; font-size: 12px; line-height: 1.3; letter-spacing: -.04em; color: var(--ink); }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .site-header { flex-wrap: wrap; align-items: center; padding: 20px 16px 0; gap: 16px; }
  .site-header__logo { width: 150px; }
  .nav { flex-basis: 100%; flex-wrap: nowrap; align-items: center; gap: 12px; }
  .nav__links { flex-wrap: nowrap; justify-content: flex-start; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 4px 4px 12px; margin: 0 -4px; }
  .nav__links::-webkit-scrollbar { display: none; }
  .nav__link { font-size: 28px; white-space: nowrap; }
  .pill { flex: none; font-size: 24px; margin-bottom: 8px; }
  .home__feature { margin-top: 30px; }
  .sheet { margin-top: 28px; padding: 18px 16px 40px; }
  .feature__sticker { left: -12px; }
  .home__feature { margin-left: 0; }
}

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

/* ---------- List page head: title left, search right ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 32px; }
.page-head .page-title { margin: 0; }
.search { flex: 0 1 420px; margin: 0; }
.search__input { width: 100%; height: 48px; padding: 0 16px; border: 0; border-radius: 0; background: var(--white); color: var(--ink); font: 400 18px/1 var(--font-sans); letter-spacing: var(--track); box-shadow: inset 0 0 0 2px var(--ink); -webkit-appearance: none; appearance: none; }
.search__input::placeholder { color: var(--ink-soft); opacity: 1; }
.search__input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--ink), 4px 4px 0 var(--ink); }
.search__input::-webkit-search-cancel-button { filter: grayscale(1); }
.search__count { min-height: 1.2em; margin: -14px 0 18px; font: 700 13px/1.2 var(--font-sans); letter-spacing: .02em; text-transform: uppercase; color: var(--ink-soft); }
@media (max-width: 640px) { .search { flex-basis: 100%; } }

/* ---------- More like this (product page) ---------- */
.related { margin-top: 36px; display: grid; gap: 16px; }
.grid--related { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 14px; }
.grid--related .card__name { font-size: 15px; }
.grid--related .card__hit { font-size: 20px; padding: 5px 8px 6px; }
.grid--related .card__hit small { display: none; }
@media (max-width: 760px) { .grid--related { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Prose pages (guide, about, ezine) ---------- */
.prose { max-width: 62ch; display: grid; gap: 22px; }
.prose p { margin: 0; }
.prose__lead { font-size: 24px; line-height: 1.25; }
.prose__note { font-size: 15px; line-height: 1.35; color: var(--ink-soft); }
.prose a:not(.go) { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:not(.go):hover { background: var(--ink); color: var(--bg); text-decoration: none; }
.prose code { font: 500 15px/1.4 ui-monospace, Consolas, Menlo, monospace; letter-spacing: 0; }
.steps { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 26px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 18px; row-gap: 8px; }
.steps li::before { content: counter(step, decimal-leading-zero); grid-row: 1 / span 4; font-family: var(--font-display); font-size: 48px; line-height: .9; letter-spacing: var(--track); }
.steps h2 { margin: 0; font: 900 20px/1.1 var(--font-sans); letter-spacing: var(--track); text-transform: uppercase; }
.steps li > * { grid-column: 2; }
.path { display: flex; align-items: stretch; background: var(--ink); color: var(--white); max-width: 100%; }
.path code { flex: 1; min-width: 0; padding: 14px 16px; font-size: 16px; overflow-x: auto; white-space: nowrap; color: var(--white); }
.path__copy { flex: none; border: 0; border-left: 1px solid var(--ink-soft); background: var(--ink); color: var(--white); padding: 0 16px; font: 900 13px/1 var(--font-sans); letter-spacing: .04em; cursor: pointer; }
.path__copy:hover { background: var(--white); color: var(--ink); }

/* ---------- Feature call: >>>DOWNLOAD NOW in an ink pill ---------- */
.feature__foot .go { background: var(--ink); color: var(--white); padding: 8px 14px 9px; transition: transform 90ms steps(2), box-shadow 90ms steps(2); }
.feature__foot .go:hover, .feature__foot .go:focus-visible { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--bg); }
.feature__foot .go:hover b, .feature__foot .go:focus-visible b { color: var(--white); }
.feature__foot .go:active { transform: translate(1px, 1px); box-shadow: none; }
