/* ==========================================================================
   RECUR: a concept store by MadeByMyst.
   Bone, ink and one rust accent. Big wide type, real product photos,
   plain words. Light and dark themes share every rule below; only the
   colour tokens change.
   Written mobile-first. Larger screens are added with min-width queries.
   ========================================================================== */

/* DESIGN TOKENS */

:root {
  color-scheme: light;

  /* Colours (light) */
  --bg: #f3f0ea;
  --bg-soft: #ebe7df;
  --surface: #fbfaf7;
  --ink: #1a1917;
  --muted: #5f5a53;
  --line: rgba(26, 25, 23, 0.12);
  --line-strong: rgba(26, 25, 23, 0.24);
  --accent: #cf3b14;
  --accent-ink: #ffffff;
  --photo: #e2ded6; /* behind product photos, the same in both themes */
  --success: #2f6b3a;
  --error: #b3261e;
  --scrim: rgba(26, 22, 18, 0.45);
  --shadow: 0 30px 60px -30px rgba(26, 25, 23, 0.35);

  /* Type */
  --font: "Archivo", system-ui, sans-serif;

  /* Shape & layout */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --container: 1240px;
  --gutter: 24px;
  --header-h: 68px;

  /* Motion: one long, soft ease-out for almost everything */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark theme: picked with the toggle, or by the system when nothing is saved */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131211;
  --bg-soft: #1b1a18;
  --surface: #1f1d1b;
  --ink: #efebe4;
  --muted: #a7a197;
  --line: rgba(239, 235, 228, 0.12);
  --line-strong: rgba(239, 235, 228, 0.24);
  --accent: #ff6a3d;
  --accent-ink: #1a1310;
  --photo: #d9d5cc;
  --success: #86c793;
  --error: #ff8a80;
  --scrim: rgba(0, 0, 0, 0.62);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.85);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #131211;
    --bg-soft: #1b1a18;
    --surface: #1f1d1b;
    --ink: #efebe4;
    --muted: #a7a197;
    --line: rgba(239, 235, 228, 0.12);
    --line-strong: rgba(239, 235, 228, 0.24);
    --accent: #ff6a3d;
    --accent-ink: #1a1310;
    --photo: #d9d5cc;
    --success: #86c793;
    --error: #ff8a80;
    --scrim: rgba(0, 0, 0, 0.62);
    --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.85);
  }
}

/* RESET & BASE */

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

/* Nothing behind a popup should scroll */
html:has(dialog[open]) {
  overflow: hidden;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a {
  color: inherit;
}

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

button {
  cursor: pointer;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* TYPOGRAPHY */

h1,
h2,
h3 {
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.3rem);
}

h3 {
  font-size: 1.25rem;
  font-weight: 750;
  font-stretch: 106%;
  letter-spacing: -0.01em;
}

p {
  color: var(--muted);
  text-wrap: pretty;
}

strong {
  color: var(--ink);
  font-weight: 650;
}

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

.lead {
  max-width: 32em;
  font-size: clamp(1.08rem, 1.5vw, 1.25rem);
}

/* Text links with an underline in the accent colour */
.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: text-underline-offset 0.4s var(--ease-out);
}

.link:hover {
  text-underline-offset: 9px;
}

.link .icon {
  width: 16px;
  height: 16px;
  transition: translate 0.5s var(--ease-out);
}

.link:hover .icon {
  translate: 3px 0;
}

/* Line icons */
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The mark (one line that loops back on itself). It takes the text colour. */
.lemni {
  width: 30px;
  height: 30px;
  flex: none;
  overflow: visible;
}

/* LAYOUT HELPERS */

.container {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.section {
  padding-block: clamp(64px, 8.5vw, 112px);
}

.section-top {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px 40px;
  margin-bottom: clamp(32px, 5vw, 52px);
}

.section-top p {
  max-width: 34em;
  margin-top: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  font-weight: 650;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.concept-note {
  font-size: 0.88rem;
}

/* BUTTONS (ink slides across from the left on hover) */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.98rem;
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: 0.005em;
  text-decoration: none;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
  transition:
    background-size 0.6s var(--ease-out),
    color 0.35s ease,
    border-color 0.35s ease,
    transform 0.5s var(--ease-out);
}

.btn:hover {
  background-size: 100% 100%;
  color: var(--bg);
}

.btn:active {
  transform: scale(0.98);
}

.btn .icon {
  width: 18px;
  height: 18px;
  transition: translate 0.5s var(--ease-out);
}

.btn:hover .icon {
  translate: 4px 0;
}

.btn-primary {
  color: var(--accent-ink);
  background-color: var(--accent);
}

.btn-primary:hover {
  border-color: var(--ink);
}

.btn-ghost {
  color: var(--ink);
  background-color: transparent;
  border-color: var(--ink);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background-size: 0% 100%;
  color: var(--accent-ink);
}

/* Small round buttons in the header and popups */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease;
}

.icon-btn:hover {
  border-color: var(--ink);
}

/* ANNOUNCEMENT BAR (plain text, it doesn't move) */

.notice {
  position: relative;
  overflow: hidden;
  background-color: var(--ink);
}

.notice p {
  padding: 9px 52px;
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
}

/* The X on the right. Once closed, the bar stays closed (see script.js). */
.notice-close {
  position: absolute;
  top: 50%;
  right: max(8px, calc((100% - var(--container)) / 2 - 8px));
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--bg);
  opacity: 0.7;
  translate: 0 -50%;
  transition:
    opacity 0.3s ease,
    background-color 0.3s ease;
}

.notice-close:hover {
  opacity: 1;
  background-color: rgba(127, 127, 127, 0.2);
}

.notice-close .icon {
  width: 16px;
  height: 16px;
  transition: rotate 0.5s var(--ease-out);
}

.notice-close:hover .icon {
  rotate: 90deg;
}

.notice-close:focus-visible {
  outline-color: var(--bg);
  outline-offset: -2px;
}

.notice-closed .notice,
html:not(.js) .notice-close {
  display: none;
}

/* HEADER (hides while scrolling down, comes back when scrolling up) */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg);
  border-bottom: 1px solid transparent;
  transition:
    transform 0.6s var(--ease-out),
    border-color 0.4s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.site-header:focus-within {
  transform: none;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px 40px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand .lemni {
  color: var(--accent);
  transition: rotate 0.9s var(--ease-out);
}

/* Turned upside down, the mark looks the same: it comes back to itself */
.brand:hover .lemni {
  rotate: 180deg;
}

.wordmark {
  font-size: 1.3rem;
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: 0.06em;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 30px;
}

.site-nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 550;
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 2px;
  background-color: var(--accent);
  scale: 0 1;
  transform-origin: right;
  transition: scale 0.5s var(--ease-out);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  scale: 1 1;
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Light/dark switch: shows the theme you'd switch to */
.theme-toggle .icon {
  width: 19px;
  height: 19px;
  transition:
    rotate 0.7s var(--ease-out),
    opacity 0.3s ease;
}

.theme-toggle .icon-sun,
:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

.theme-toggle:hover .icon {
  rotate: -20deg;
}

.bag-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 8px 0 16px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 650;
  transition: border-color 0.3s ease;
}

.bag-toggle:hover {
  border-color: var(--ink);
}

.bag-count {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 999px;
  background-color: var(--ink);
  color: var(--bg);
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bag-count.is-bumped {
  animation: bump 0.6s var(--ease-out);
}

@keyframes bump {
  30% {
    scale: 1.3;
    background-color: var(--accent);
    color: var(--accent-ink);
  }
}

/* The theme and bag buttons need JavaScript */
html:not(.js) .theme-toggle,
html:not(.js) .bag-toggle {
  display: none;
}

/* Menu button (only on small screens, and only with JavaScript) */
.menu-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.menu-toggle .bar {
  position: absolute;
  right: 13px;
  left: 13px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--ink);
  transition:
    translate 0.5s var(--ease-out),
    rotate 0.5s var(--ease-out),
    opacity 0.3s ease;
}

.menu-toggle .bar:nth-child(2) {
  top: 16px;
}

.menu-toggle .bar:nth-child(3) {
  top: 25px;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(2) {
  translate: 0 4.5px;
  rotate: 45deg;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(3) {
  translate: 0 -4.5px;
  rotate: -45deg;
}

@media (max-width: 860px) {
  .header-inner {
    gap: 12px;
  }

  /* Without JavaScript the links simply wrap under the logo */
  html:not(.js) .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding-block: 14px;
  }

  .js .menu-toggle {
    display: block;
  }

  /* The open menu fills the screen below the header */
  .js .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    padding: 8px var(--gutter) 32px;
    overflow-y: auto;
    background-color: var(--bg);
    visibility: hidden;
    opacity: 0;
    translate: 0 -12px;
    transition:
      opacity 0.4s var(--ease-out),
      translate 0.6s var(--ease-out),
      visibility 0s linear 0.6s;
  }

  .js .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    translate: 0 0;
    transition-delay: 0s;
  }

  .js .site-nav a {
    padding: 18px 2px;
    color: var(--ink);
    font-size: 2rem;
    font-weight: 800;
    font-stretch: 112%;
    letter-spacing: -0.02em;
    border-bottom: 1px solid var(--line);
  }

  .js .site-nav a::after {
    display: none;
  }

  .js .site-nav a[aria-current="page"] {
    color: var(--accent);
  }

  /* Links slide in one after another */
  .js .site-nav.is-open > * {
    animation: menu-item-in 0.7s var(--ease-out) backwards;
  }

  .js .site-nav.is-open > :nth-child(2) {
    animation-delay: 0.05s;
  }

  .js .site-nav.is-open > :nth-child(3) {
    animation-delay: 0.1s;
  }

  body.menu-open {
    overflow: hidden;
  }
}

@keyframes menu-item-in {
  from {
    opacity: 0;
    translate: 0 16px;
  }
}

/* HERO */

.hero {
  padding-block: clamp(32px, 6vw, 72px) clamp(16px, 3vw, 40px);
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

.hero-title {
  margin-bottom: 28px;
}

/* Each line slides up from behind a mask when the page loads */
.hero-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}

.hero-title .line > span {
  display: inline-block;
  animation: line-up 1.2s var(--ease-out) 0.05s backwards;
}

.hero-title .line:nth-child(2) > span {
  animation-delay: 0.15s;
}

.hero-title .line:nth-child(3) > span {
  animation-delay: 0.25s;
}

@keyframes line-up {
  from {
    translate: 0 110%;
  }
}

.hero-fade {
  animation: fade-up 1.1s var(--ease-out) 0.4s backwards;
}

.actions.hero-fade {
  animation-delay: 0.5s;
}

.ship-note.hero-fade {
  animation-delay: 0.6s;
}

@keyframes fade-up {
  from {
    opacity: 0;
    translate: 0 20px;
  }
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

/* "Order in the next 2 h 10 min and it ships today" (kept live by script.js) */
.ship-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 26px;
  font-size: 0.94rem;
}

.ship-note::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  margin-top: 0.6em;
  border-radius: 50%;
  background-color: var(--accent);
}

/* Two product photos: a big one and a smaller one tucked under it.
   --drift is set by script.js so the small one moves a little slower. */
.hero-visual {
  --drift: 0;
  position: relative;
  padding: 0 0 18% 14%;
}

.hero-visual a {
  display: block;
  overflow: hidden;
  background-color: var(--photo);
  border-radius: var(--radius);
}

.hero-visual img {
  width: 100%;
  height: auto;
  transition: scale 1.4s var(--ease-out);
}

.hero-visual a:hover img {
  scale: 1.04;
}

.hero-main {
  animation: photo-in 1.4s var(--ease-out) 0.2s backwards;
}

.hero-side {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 44%;
  box-shadow: var(--shadow);
  outline: 6px solid var(--bg);
  translate: 0 calc(var(--drift) * -1px);
  animation: photo-in 1.4s var(--ease-out) 0.4s backwards;
}

@keyframes photo-in {
  from {
    opacity: 0;
    translate: 0 50px;
  }
}

.hero-visual figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 52%;
  font-size: 0.88rem;
  color: var(--muted);
}

.hero-visual figcaption button {
  padding: 0;
  background: none;
  border: 0;
  color: var(--ink);
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.3s ease;
}

.hero-visual figcaption button:hover {
  text-decoration-color: var(--accent);
}

/* PRODUCT CARDS (built by store.js from products.js) */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 14px;
  padding: 0;
  list-style: none;
}

.product-card {
  position: relative;
  min-width: 0;
}

.product-card > a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.product-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background-color: var(--photo);
  border-radius: var(--radius);
}

.product-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    opacity 0.6s ease,
    scale 1.4s var(--ease-out);
}

/* A second colour fades in on hover */
.product-media .alt {
  opacity: 0;
}

.product-card:hover .product-media img {
  scale: 1.04;
}

.product-card:hover .product-media .alt {
  opacity: 1;
}

.product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 4px 9px;
  border-radius: 4px;
  background-color: var(--ink);
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.4;
}

.product-tag.is-back {
  background-color: var(--accent);
  color: var(--accent-ink);
}

/* "Quick look" rises from the bottom on hover (mouse only) */
.product-quick {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 1;
  display: none;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background-color: #fbfaf7;
  color: #1a1917;
  font-size: 0.9rem;
  font-weight: 650;
  text-align: center;
  opacity: 0;
  translate: 0 12px;
  transition:
    opacity 0.4s ease,
    translate 0.6s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .product-quick {
    display: block;
  }

  .product-card:hover .product-quick,
  .product-card > a:focus-visible .product-quick {
    opacity: 1;
    translate: 0 0;
  }
}

.product-info {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  margin-top: 14px;
}

.product-name {
  font-size: 1.02rem;
  font-weight: 700;
  font-stretch: 104%;
  letter-spacing: -0.005em;
  line-height: 1.3;
}

.product-price {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.product-colours {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--c);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.product-colours .swatch:last-of-type {
  margin-right: 4px;
}

/* Cards that arrive after a filter change slide in */
.product-card.is-new {
  animation: fade-up 0.8s var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 50ms);
}

/* A plain-text card in the shop grid */
.grid-note {
  grid-column: 1 / -1;
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.grid-note h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.grid-note .link {
  justify-self: start;
  margin-top: 4px;
}

/* IDEA (the one full-colour block) */

.idea {
  position: relative;
  overflow: hidden;
  padding-block: clamp(80px, 11vw, 140px);
  background-color: var(--accent);
  color: var(--accent-ink);
}

.idea p,
.idea strong {
  color: var(--accent-ink);
}

.idea-grid {
  position: relative;
  display: grid;
  gap: 48px;
}

/* The big mark turns slowly as the block scrolls past (see script.js) */
.idea-mark {
  --turn: 0;
  width: clamp(120px, 22vw, 300px);
  height: auto;
  aspect-ratio: 1;
  color: var(--accent-ink);
  opacity: 0.9;
  rotate: calc(var(--turn) * 180deg);
}

.idea .statement {
  max-width: 24em;
  margin-top: 24px;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 500;
  line-height: 1.4;
}

.idea-points {
  display: grid;
  gap: 28px;
  margin-top: clamp(40px, 6vw, 64px);
  padding: 0;
  list-style: none;
}

.idea-points li {
  padding-top: 18px;
  border-top: 2px solid currentColor;
}

.idea-points h3 {
  margin-bottom: 8px;
}

.idea-points p {
  opacity: 0.88;
}

.idea .link {
  margin-top: 40px;
  color: var(--accent-ink);
  text-decoration-color: currentColor;
}

/* FEATURE (one product, up close) */

.feature-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.feature-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.feature-media a {
  display: block;
  overflow: hidden;
  background-color: var(--photo);
  border-radius: var(--radius);
}

.feature-media a:last-child {
  margin-top: 18%;
}

.feature-media img {
  width: 100%;
  height: auto;
  transition: scale 1.4s var(--ease-out);
}

.feature-media a:hover img {
  scale: 1.04;
}

.feature-text h2 {
  margin-bottom: 18px;
}

.feature-lead {
  max-width: 26em;
  font-size: 1.15rem;
}

.dot-list {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  padding: 0;
  list-style: none;
}

.dot-list li {
  position: relative;
  padding-left: 22px;
}

.dot-list li::before {
  content: "";
  position: absolute;
  top: 0.66em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
}

.feature-price {
  margin: 28px 0 22px;
  color: var(--ink);
  font-weight: 600;
}

/* CATEGORIES */

.category-grid {
  display: grid;
  gap: 14px;
}

.category {
  position: relative;
  display: block;
  overflow: hidden;
  background-color: var(--photo);
  border-radius: var(--radius);
  text-decoration: none;
}

.category img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: scale 1.4s var(--ease-out);
}

.category:hover img {
  scale: 1.05;
}

.category-label {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background-color: #fbfaf7;
  color: #1a1917;
  font-weight: 750;
  font-stretch: 108%;
}

.category-label small {
  color: #5f5a53;
  font-size: 0.86rem;
  font-weight: 500;
  font-stretch: 100%;
}

.category-label .icon {
  width: 18px;
  height: 18px;
  margin-left: auto;
  transition: translate 0.5s var(--ease-out);
}

.category:hover .category-label .icon {
  translate: 4px 0;
}

/* BACK SOON */

.back-soon {
  background-color: var(--bg-soft);
}

.back-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.back-text h2 {
  margin-bottom: 20px;
}

.back-text > p {
  max-width: 30em;
}

.back-media {
  display: block;
  overflow: hidden;
  background-color: var(--photo);
  border-radius: var(--radius);
}

.back-media img {
  width: 100%;
  height: auto;
  transition: scale 1.4s var(--ease-out);
}

.back-media:hover img {
  scale: 1.04;
}

/* Email sign-up for restocks (a demo, nothing is sent) */
.alert-form {
  max-width: 460px;
  margin-top: 28px;
}

.alert-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  font-weight: 550;
}

.alert-row {
  display: flex;
  gap: 8px;
}

.alert-row input {
  flex: 1;
  min-width: 0;
}

.alert-row .btn {
  flex: none;
  min-height: 50px;
  padding: 0 20px;
}

.form-status {
  min-height: 1.6em;
  margin-top: 10px;
  font-size: 0.92rem;
}

.form-status.is-success {
  color: var(--success);
}

.form-status.is-error {
  color: var(--error);
}

/* QUOTE */

.quote {
  max-width: 900px;
}

.quote blockquote p {
  color: var(--ink);
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  font-weight: 650;
  font-stretch: 106%;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.quote figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  color: var(--muted);
}

.stars {
  color: var(--accent);
  letter-spacing: 0.12em;
}

/* PAGE TOP (shop, about, help) */

.page-top {
  padding-block: clamp(40px, 7vw, 88px) clamp(28px, 4vw, 44px);
}

.page-top h1 {
  margin-bottom: 18px;
}

/* SHOP */

.shop-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-block: 16px;
  border-block: 1px solid var(--line);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

.filter:hover {
  border-color: var(--ink);
}

.filter[aria-pressed="true"] {
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.filter-count {
  font-weight: 450;
  opacity: 0.7;
}

.sort {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.94rem;
  color: var(--muted);
}

.sort select {
  width: auto;
  min-height: 40px;
  padding: 0 38px 0 14px;
  border-radius: 999px;
}

.shop-grid {
  padding-block: 32px clamp(72px, 10vw, 120px);
}

.restock {
  background-color: var(--bg-soft);
}

.restock-grid {
  display: grid;
  gap: 32px;
}

.restock-grid h2 {
  margin-bottom: 14px;
}

.restock-list {
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}

.restock-list li {
  border-bottom: 1px solid var(--line-strong);
}

.restock-list button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 20px;
  width: 100%;
  padding: 18px 2px;
  background: none;
  border: 0;
  text-align: left;
  transition: padding-left 0.5s var(--ease-out);
}

.restock-list button:hover {
  padding-left: 12px;
}

.restock-what {
  font-weight: 700;
  font-stretch: 104%;
}

.restock-what small {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 450;
  font-stretch: 100%;
}

.restock-when {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

.restock-when small {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 450;
}

/* ABOUT */

.note-grid {
  display: grid;
  gap: 40px;
  align-items: start;
}

.note-photo {
  overflow: hidden;
  background-color: var(--photo);
  border-radius: var(--radius);
}

.note-photo img {
  width: 100%;
  height: auto;
}

.note-text h2 {
  margin-bottom: 24px;
}

.note-text p + p {
  margin-top: 16px;
}

.note-text .note-lead {
  color: var(--ink);
  font-size: 1.25rem;
}

.note-sign {
  margin-top: 24px;
  color: var(--ink);
  font-weight: 650;
}

.facts {
  display: grid;
  margin-top: 40px;
  border-top: 1px solid var(--line-strong);
}

.facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-strong);
}

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

.facts dd {
  margin: 0;
  font-weight: 750;
  font-stretch: 106%;
  text-align: right;
}

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

.principle {
  display: grid;
  gap: 12px;
  padding-block: 32px;
  border-bottom: 1px solid var(--line-strong);
}

.principle h3 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 800;
  font-stretch: 112%;
}

.principle p {
  max-width: 36em;
}

.mark-section {
  background-color: var(--bg-soft);
}

.mark-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

/* Click the big mark and it turns over */
.mark-turn {
  justify-self: center;
  display: grid;
  place-items: center;
  width: min(100%, 360px);
  aspect-ratio: 1;
  padding: 18%;
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  transition: border-color 0.3s ease;
}

.mark-turn:hover {
  border-color: var(--line-strong);
}

.mark-turn .lemni {
  width: 100%;
  height: 100%;
  transition: rotate 1.4s var(--ease-out);
}

.mark-text h2 {
  margin-bottom: 20px;
}

.mark-text p + p {
  margin-top: 14px;
}

.mark-hint {
  font-size: 0.92rem;
}

.closing {
  text-align: center;
}

.closing h2 {
  margin-bottom: 16px;
}

.closing p {
  max-width: 30em;
  margin-inline: auto;
}

.closing .actions {
  justify-content: center;
}

/* HELP */

.help-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.help-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease,
    color 0.3s ease;
}

.help-nav a:hover {
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.help-section {
  padding-block: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
}

.help-grid {
  display: grid;
  gap: 28px 48px;
}

.help-head p {
  margin-top: 14px;
}

.help-body > * + * {
  margin-top: 18px;
}

.help-body h3 {
  margin-top: 36px;
}

.help-body h3:first-child {
  margin-top: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.size-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.size-table caption {
  padding: 14px 18px 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: left;
}

.size-table th,
.size-table td {
  padding: 12px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.size-table thead th {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 550;
}

.size-table tbody th {
  font-weight: 700;
}

.size-table tbody tr:last-child > * {
  border-bottom: 0;
}

.plain-list {
  display: grid;
  gap: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.plain-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.plain-list li span:last-child {
  color: var(--muted);
}

/* ACCORDIONS (FAQ and product details; animated in script.js) */

.accordion {
  border-bottom: 1px solid var(--line-strong);
}

.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  font-weight: 700;
  font-stretch: 104%;
  list-style: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary:hover {
  color: var(--accent);
}

/* A plus that turns into a minus */
.plus {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
}

.plus::before,
.plus::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background-color: currentColor;
  transition: rotate 0.5s var(--ease-out);
}

.plus::after {
  rotate: 90deg;
}

.accordion[open]:not(.is-closing) .plus::after {
  rotate: 0deg;
}

.accordion-body {
  overflow: hidden;
}

.accordion-body > * {
  padding-bottom: 20px;
}

.faq-list {
  border-top: 1px solid var(--line-strong);
}

.faq-list summary {
  font-size: 1.1rem;
  padding: 22px 0;
}

.faq-list .accordion-body p {
  max-width: 40em;
  padding-right: 40px;
}

/* FORMS */

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.field label,
.field-label {
  font-size: 0.92rem;
  font-weight: 550;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 15px;
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  transition:
    border-color 0.3s ease,
    box-shadow 0.4s var(--ease-out);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px var(--line);
}

::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

select {
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cf3b14' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 16px;
  cursor: pointer;
}

.field-row {
  display: grid;
  gap: 0 14px;
}

/* POPUPS (product quick look and the bag; both are <dialog>) */

dialog {
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

dialog::backdrop {
  background-color: var(--scrim);
  animation: fade-in 0.4s ease;
}

dialog.is-closing::backdrop {
  animation: fade-out 0.35s ease forwards;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  background-color: var(--surface);
}

.dialog-close .icon {
  width: 18px;
  height: 18px;
}

/* Product popup: a sheet from the bottom on phones, a centred card on big screens */
.product-dialog {
  width: 100%;
  margin: auto 0 0;
}

.product-dialog[open] {
  animation: sheet-up 0.6s var(--ease-out);
}

.product-dialog.is-closing {
  animation: sheet-down 0.35s ease forwards;
}

@keyframes sheet-up {
  from {
    translate: 0 100%;
  }
}

@keyframes sheet-down {
  to {
    translate: 0 100%;
  }
}

.pd-inner {
  position: relative;
  display: grid;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.pd-gallery {
  display: grid;
  gap: 10px;
  padding: 10px 10px 0;
}

.pd-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-height: 52vh;
  background-color: var(--photo);
  border-radius: var(--radius);
}

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

.pd-photo img.is-entering {
  animation: photo-swap 0.6s var(--ease-out);
}

@keyframes photo-swap {
  from {
    opacity: 0;
    scale: 1.03;
  }
}

.pd-thumbs {
  display: none;
  gap: 8px;
}

.pd-thumbs:empty {
  display: none;
}

.pd-thumb {
  width: 64px;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background-color: var(--photo);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  transition: border-color 0.3s ease;
}

.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pd-thumb[aria-pressed="true"] {
  border-color: var(--ink);
}

.pd-info {
  padding: 24px 20px 32px;
}

.pd-info h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  padding-right: 40px;
}

.pd-price {
  margin-top: 8px;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 600;
}

.pd-blurb {
  margin-top: 14px;
}

.pd-sold-out {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background-color: var(--bg-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.pd-options {
  margin-top: 24px;
  padding: 0;
  border: 0;
}

.pd-options legend {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  margin-bottom: 10px;
  font-size: 0.94rem;
  font-weight: 650;
}

.pd-options legend span {
  color: var(--muted);
  font-weight: 450;
}

.pd-options legend button {
  padding: 0;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 450;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.pd-options legend button:hover {
  color: var(--ink);
}

.option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option {
  position: relative;
}

.option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.option input:disabled {
  cursor: not-allowed;
}

/* Colour swatches */
.option-swatch span {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--c);
  box-shadow:
    inset 0 0 0 1px var(--line-strong),
    0 0 0 3px var(--surface),
    0 0 0 4px transparent;
  transition: box-shadow 0.3s ease;
}

.option-swatch input:checked + span {
  box-shadow:
    inset 0 0 0 1px var(--line-strong),
    0 0 0 3px var(--surface),
    0 0 0 5px var(--ink);
}

.option-swatch input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 7px;
}

/* Size boxes */
.option-size span {
  display: grid;
  place-items: center;
  min-width: 58px;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.option-size input:hover:not(:disabled) + span {
  border-color: var(--ink);
}

.option-size input:checked + span {
  background-color: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

.option-size input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Sold-out sizes can still be picked, to ask for an email when they're back */
.option-size.is-out span {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--accent);
}

.option-size.is-out input:checked + span {
  color: var(--surface);
}

.option-size.is-low span::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
}

.pd-stock {
  min-height: 1.6em;
  margin-top: 14px;
  font-size: 0.94rem;
}

.pd-stock.is-warning {
  color: var(--ink);
}

.pd-actions {
  margin-top: 16px;
}

.pd-actions .alert-form {
  margin-top: 0;
}

.pd-ship {
  margin-top: 14px;
  font-size: 0.9rem;
}

.pd-details {
  margin-top: 26px;
  border-top: 1px solid var(--line-strong);
}

.pd-details .accordion-body p {
  font-size: 0.97rem;
}

.pd-details .size-table {
  font-size: 0.92rem;
}

.pd-details .size-table th,
.pd-details .size-table td {
  padding: 9px 14px;
}

/* Bag: slides in from the right */
.bag-dialog {
  width: min(440px, 100%);
  height: 100%;
  max-height: 100%;
  margin: 0 0 0 auto;
}

.bag-dialog[open] {
  animation: slide-in 0.6s var(--ease-out);
}

.bag-dialog.is-closing {
  animation: slide-out 0.35s ease forwards;
}

@keyframes slide-in {
  from {
    translate: 100% 0;
  }
}

@keyframes slide-out {
  to {
    translate: 100% 0;
  }
}

.bag-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--surface);
}

.bag-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.bag-head h2 {
  font-size: 1.5rem;
}

.bag-head .dialog-close {
  position: static;
}

.bag-progress {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.bag-progress p {
  color: var(--ink);
}

.bar-track {
  height: 4px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 4px;
  background-color: var(--line);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background-color: var(--accent);
  transform-origin: left;
  scale: var(--p, 0) 1;
  transition: scale 0.8s var(--ease-out);
}

.bag-items {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px;
  list-style: none;
}

.bag-item {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.bag-item.is-new {
  animation: fade-up 0.6s var(--ease-out) backwards;
}

.bag-item img {
  width: 76px;
  height: 95px;
  object-fit: cover;
  background-color: var(--photo);
  border-radius: var(--radius-sm);
}

.bag-item-name {
  color: var(--ink);
  font-weight: 700;
  font-stretch: 104%;
  line-height: 1.3;
}

.bag-item-meta {
  margin-top: 2px;
  font-size: 0.88rem;
}

.qty {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.qty button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
}

.qty button:hover {
  color: var(--accent);
}

.qty output {
  min-width: 22px;
  font-size: 0.92rem;
  font-weight: 650;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.bag-item-side {
  display: flex;
  flex-direction: column;
  align-items: end;
  justify-content: space-between;
}

.bag-item-price {
  color: var(--ink);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.remove {
  padding: 0;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.remove:hover {
  color: var(--ink);
}

.bag-empty {
  flex: 1;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 16px;
  padding: 24px 20px;
}

.bag-empty .lemni {
  width: 44px;
  height: 44px;
  color: var(--accent);
}

.bag-empty h3 {
  font-size: 1.4rem;
}

.bag-foot {
  padding: 18px 20px 22px;
  border-top: 1px solid var(--line);
}

.bag-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
}

.bag-foot p {
  margin: 4px 0 16px;
  font-size: 0.88rem;
}

/* CHECKOUT */

.checkout-header .header-inner {
  justify-content: space-between;
}

.checkout-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 550;
  text-decoration: none;
  transition: color 0.3s ease;
}

.checkout-back:hover {
  color: var(--ink);
}

.checkout-back .icon {
  width: 16px;
  height: 16px;
}

.checkout {
  min-height: 75vh;
  padding-block: clamp(28px, 5vw, 56px) clamp(72px, 10vw, 120px);
}

.checkout h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  margin-bottom: 12px;
}

.checkout-grid {
  display: grid;
  gap: 40px;
  margin-top: 36px;
}

.checkout-form fieldset {
  margin: 0 0 30px;
  padding: 0;
  border: 0;
}

.checkout-form legend {
  margin-bottom: 16px;
  padding: 0;
  font-size: 1.3rem;
  font-weight: 800;
  font-stretch: 110%;
  letter-spacing: -0.01em;
}

.delivery-options {
  display: grid;
  gap: 10px;
}

.delivery-option {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    border-color 0.3s ease,
    background-color 0.3s ease;
}

.delivery-option:has(input:checked) {
  border-color: var(--ink);
  background-color: var(--surface);
}

.delivery-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.delivery-option strong {
  display: block;
  font-weight: 650;
}

.delivery-option small {
  color: var(--muted);
  font-size: 0.88rem;
}

.delivery-price {
  font-weight: 650;
}

.demo-box {
  padding: 18px 20px;
  border-left: 3px solid var(--accent);
  background-color: var(--bg-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.demo-box p {
  color: var(--ink);
}

.demo-box p + p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.94rem;
}

.summary {
  align-self: start;
  padding: clamp(20px, 3vw, 28px);
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.summary h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.summary-items {
  padding: 0;
  list-style: none;
}

.summary-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.summary-item img {
  width: 56px;
  height: 70px;
  object-fit: cover;
  background-color: var(--photo);
  border-radius: var(--radius-sm);
}

.summary-item p {
  font-size: 0.88rem;
}

.summary-item .bag-item-name {
  font-size: 0.97rem;
}

.summary-lines {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.summary-lines div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.summary-lines dt {
  color: var(--muted);
}

.summary-lines dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.summary-lines .summary-total {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line-strong);
  font-size: 1.15rem;
  font-weight: 750;
}

.summary-lines .summary-total dt {
  color: var(--ink);
}

.summary-edit {
  margin-top: 18px;
  padding: 0;
  background: none;
  border: 0;
  font-size: 0.94rem;
}

.checkout-empty,
.checkout-done {
  max-width: 560px;
  padding-block: 24px;
}

.checkout-empty {
  margin-top: 32px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
}

.checkout-empty h2 {
  font-size: 1.7rem;
}

.checkout-empty h2,
.checkout-done h2 {
  margin-bottom: 14px;
}

.checkout-done .lemni {
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
  color: var(--accent);
  animation: done-turn 1.6s var(--ease-out) 0.2s backwards;
}

@keyframes done-turn {
  from {
    rotate: -180deg;
    opacity: 0;
  }
}

.checkout-done p + p {
  margin-top: 12px;
}

.checkout-done .actions {
  margin-top: 28px;
}

[hidden] {
  display: none !important;
}

/* FOOTER */

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

.footer-top {
  display: grid;
  gap: 36px;
  padding-block: 56px 40px;
}

.footer-brand p {
  max-width: 22em;
  margin-top: 14px;
  font-size: 0.97rem;
}

.footer-col h2 {
  margin-bottom: 14px;
  font-size: 1rem;
  font-weight: 750;
  font-stretch: 106%;
  letter-spacing: 0;
}

.footer-col ul {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.footer-col a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-col .alert-form {
  margin-top: 14px;
}

.footer-col > p {
  font-size: 0.95rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 22px 32px;
  border-top: 1px solid var(--line);
}

.footer-bottom p,
.footer-bottom a {
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-bottom a:hover {
  color: var(--ink);
}

/* SCROLL REVEAL (only when JavaScript is on, see script.js) */

.js .reveal,
.js .stagger > * {
  opacity: 0;
  translate: 0 32px;
  transition:
    opacity 1s var(--ease-out),
    translate 1.2s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

.js .reveal.is-visible,
.js .stagger.is-visible > * {
  opacity: 1;
  translate: 0 0;
}

/* Items in a .stagger group arrive one after another */
.stagger > :nth-child(2) {
  --delay: 0.08s;
}
.stagger > :nth-child(3) {
  --delay: 0.16s;
}
.stagger > :nth-child(4) {
  --delay: 0.24s;
}
.stagger > :nth-child(5) {
  --delay: 0.32s;
}
.stagger > :nth-child(6) {
  --delay: 0.4s;
}
.stagger > :nth-child(n + 7) {
  --delay: 0.48s;
}

/* LARGER SCREENS */

@media (min-width: 560px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .field-row.thirds {
    grid-template-columns: 2fr 1fr;
  }
}

@media (min-width: 700px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 44px 18px;
  }

  .grid-note {
    grid-column: span 2;
  }

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

  .category img {
    aspect-ratio: 4 / 5;
  }

  .idea-points {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .principle {
    grid-template-columns: 1fr 1.4fr;
    gap: 40px;
    padding-block: 40px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  /* The product popup becomes a centred card */
  .product-dialog {
    width: min(1060px, 100% - 48px);
    margin: auto;
  }

  .product-dialog[open] {
    animation: pop-in 0.6s var(--ease-out);
  }

  .product-dialog.is-closing {
    animation: pop-out 0.3s ease forwards;
  }

  .pd-inner {
    grid-template-columns: 1.05fr 1fr;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow: hidden;
    border-radius: var(--radius-lg);
  }

  .pd-gallery {
    align-content: start;
    padding: 14px;
  }

  .pd-photo {
    max-height: none;
  }

  .pd-thumbs {
    display: flex;
  }

  .pd-info {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 36px 32px 36px 20px;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    translate: 0 30px;
    scale: 0.98;
  }
}

@keyframes pop-out {
  to {
    opacity: 0;
    translate: 0 16px;
    scale: 0.98;
  }
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
  }

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

  .idea-grid {
    grid-template-columns: auto 1fr;
    gap: 72px;
    align-items: start;
  }

  .feature-grid {
    grid-template-columns: 1.15fr 1fr;
    gap: 72px;
  }

  .back-grid {
    grid-template-columns: 1fr 0.85fr;
    gap: 72px;
  }

  .restock-grid {
    grid-template-columns: 1fr 1.5fr;
    gap: 72px;
  }

  .note-grid {
    grid-template-columns: 0.9fr 1fr;
    gap: 72px;
  }

  .mark-grid {
    grid-template-columns: 1fr 1.1fr;
    gap: 72px;
  }

  .help-grid {
    grid-template-columns: 1fr 2fr;
    gap: 48px 72px;
  }

  .help-head {
    position: sticky;
    top: calc(var(--header-h) + 32px);
    align-self: start;
  }

  .checkout-grid {
    grid-template-columns: 1.3fr 1fr;
    gap: 64px;
  }

  .summary {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }

  .footer-top {
    grid-template-columns: 1.4fr 0.7fr 0.7fr 1.3fr;
    gap: 48px;
  }
}

/* SMALL PHONES */

@media (max-width: 420px) {
  :root {
    --gutter: 18px;
  }

  .actions .btn {
    flex: 1 1 100%;
  }

  /* Keep the delivery bar on one line next to its X */
  .notice p {
    padding-inline: 40px;
    font-size: 0.78rem;
  }

  .bag-toggle {
    padding-left: 12px;
  }

  .alert-row {
    flex-direction: column;
  }
}

/* THEME SWITCH (a slow cross-fade, where the browser supports it) */

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.5s;
  animation-timing-function: ease;
}

/* RESPECT REDUCED MOTION */

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

  *,
  *::before,
  *::after,
  ::backdrop {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .js .reveal,
  .js .stagger > * {
    opacity: 1;
    translate: 0 0;
  }
}
