/* ==========================================================================
   Peddler Kicks - base
   Design tokens, reset, typography and the layout primitives every page uses.
   ========================================================================== */

:root {
  /* Colour. Warm paper, near-black ink, one brass accent pulled from the logo. */
  --paper: #f5f2ed;
  --paper-sunk: #ece7df;
  --ink: #16130f;
  --ink-soft: #2a251f;
  --muted: #6c655c;
  --line: #dcd5ca;
  --line-strong: #16130f;
  --accent: #8a6a2c;
  --accent-bright: #c08f43;
  --logo-ink: #0c0f14;

  --font-display: "Archivo Black", "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;

  --shell: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section-gap: clamp(4.5rem, 10vw, 9rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 60rem) {
  :root {
    --gutter: 3.5rem;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.65;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
}

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

img {
  /* Every product photo is a 3:4 portrait, so the frame is fixed and nothing shifts. */
  background: var(--paper-sunk);
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
ul,
ol,
dl,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

/* ------------------------------------------------------------- typography */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.display {
  font-size: clamp(2.4rem, 6.6vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.8rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.h3 {
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-family: var(--font-text);
  font-weight: 700;
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 46ch;
}

.body-text p + p {
  margin-top: 1.1em;
}

.muted {
  color: var(--muted);
}

.accent {
  color: var(--accent);
}

/* Small caps index label used above every section. */
.label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.label--accent {
  color: var(--accent);
}

/* ----------------------------------------------------------------- layout */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--wide {
  max-width: 1480px;
}

.section {
  padding-block: var(--section-gap);
}

.section--tight {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.section--sunk {
  background: var(--paper-sunk);
}

.section--ink {
  background: var(--ink);
  color: var(--paper);
}

.section--ink .muted {
  color: #a49b90;
}

.rule-top {
  border-top: 1px solid var(--line);
}

.section--ink .rule-top {
  border-top-color: #3a332c;
}

/* Section heading block: index label on the left, heading beneath. */
.section-head {
  display: grid;
  gap: 1.1rem;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

@media (min-width: 60rem) {
  .section-head--split {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    align-items: end;
    gap: 2.5rem;
  }

  .section-head--split .section-head__aside {
    padding-bottom: 0.4rem;
  }
}

.section-head__aside {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: flex-start;
}

.cols {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.5rem);
}

@media (min-width: 60rem) {
  .cols--7-5 {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .cols--5-7 {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .cols--3-6 {
    grid-template-columns: minmax(0, 3fr) minmax(0, 6fr);
    gap: clamp(2rem, 6vw, 5rem);
  }
}

.stack > * + * {
  margin-top: var(--stack-gap, 1.15rem);
}

/* ----------------------------------------------------------------- a11y */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% -120%;
  z-index: 90;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1.2rem;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  transition: translate 0.2s var(--ease);
}

.skip:focus-visible {
  translate: -50% 0;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

.section--ink :where(a, button, input):focus-visible,
.site-footer :where(a, button, input):focus-visible {
  outline-color: var(--accent-bright);
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

/* ------------------------------------------------------------- utilities */

.flow-tight {
  margin-top: 0.75rem;
}

.no-scroll {
  overflow: hidden;
}

/* ------------------------------------------------------- scroll reveal */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* A small stagger across grid items, applied only where items sit in a row. */
@media (min-width: 48rem) {
  .js .product-grid .reveal:nth-child(3n + 2) {
    transition-delay: 0.08s;
  }

  .js .product-grid .reveal:nth-child(3n) {
    transition-delay: 0.16s;
  }
}

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

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

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