/* The Workwear Co. — global design system
   Warm stone palette · Outfit type · editorial spacing */

:root {
  /* Palette — Banner */
  --cream: #ffffff;
  --paper: #eef4fa;
  --bone:  #e6e6e8;
  --soft:  #dadadd;
  --sand:  #bbbbc0;
  --sand-deep: #84848a;
  --ink:   #091f2c;
  --ink-soft: #091f2c;
  --ink-mute: #091f2c;
  --accent: #0c84c6;
  --accent-soft: #1ba6e0;
  --white: #ffffff;
  --line:  rgba(9,31,44,0.10);
  --line-strong: rgba(9,31,44,0.22);

  /* Banner brand gradients */
  --banner-grad: linear-gradient(90deg, #0061af 0%, #00a3e2 100%);
  --banner-grad-hover: linear-gradient(90deg, #00558f 0%, #0090c8 100%);
  --banner-grad-v: linear-gradient(180deg, #0a5fb0 0%, #009fe0 100%);

  /* Type */
  --font: "Outfit", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --tracking-wide: 0.16em;
  --tracking-mid:  0.06em;
  --tracking-tight: -0.02em;
  --tracking-display: -0.035em;

  /* Spacing */
  --gutter: clamp(20px, 4vw, 64px);
  --section: clamp(72px, 10vw, 160px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02";
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: default; }
img { display: block; max-width: 100%; }

/* ─────────── Type scale ─────────── */
.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ink-mute);
}
.eyebrow-ink { color: var(--ink); }
.display {
  font-weight: 300;
  letter-spacing: var(--tracking-display);
  line-height: 0.96;
  font-size: clamp(56px, 8.2vw, 152px);
  margin: 0;
}
.h1 {
  font-weight: 300;
  letter-spacing: var(--tracking-display);
  line-height: 1.0;
  font-size: clamp(44px, 5.6vw, 96px);
  margin: 0;
}
.h2 {
  font-weight: 300;
  letter-spacing: var(--tracking-tight);
  line-height: 1.04;
  font-size: clamp(32px, 3.6vw, 56px);
  margin: 0;
}
.h3 {
  font-weight: 400;
  letter-spacing: var(--tracking-tight);
  line-height: 1.15;
  font-size: clamp(22px, 2vw, 30px);
  margin: 0;
}
.lede {
  font-weight: 300;
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--ink-soft);
  margin: 0;
}
.body { font-weight: 400; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.small { font-size: 13px; line-height: 1.5; color: var(--ink-mute); }
.serial { font-variant-numeric: tabular-nums; }

em { font-style: italic; font-weight: 300; }

/* ─────────── Layout primitives ─────────── */
.shell { min-height: 100vh; background: var(--cream); }
.container {
  max-width: 1680px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.container-wide {
  max-width: 1840px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section { padding-top: var(--section); padding-bottom: var(--section); }
.section-sm { padding-top: clamp(56px, 6vw, 96px); padding-bottom: clamp(56px, 6vw, 96px); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.rule-strong { height: 1px; background: var(--line-strong); border: 0; margin: 0; }

/* ─────────── Header / nav ─────────── */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
  padding: 0 var(--gutter);
}
.nav-left, .nav-right { display: flex; align-items: center; gap: 28px; }
/* Pin the logo to the true horizontal centre of the page on desktop */
@media (min-width: 881px) {
  .nav-inner > .wordmark {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%); z-index: 1;
  }
}
.nav-link {
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: var(--ink-soft);
  padding: 4px 0;
  position: relative;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); }
.nav-link.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--ink);
}

/* ─────────── Nav dropdown ─────────── */
.nav-dropdown {
  position: absolute; top: calc(100% + 14px); left: -20px;
  min-width: 240px;
  background: var(--cream);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  box-shadow: 0 16px 40px -12px rgba(20, 22, 28, 0.18), 0 2px 6px rgba(20, 22, 28, 0.06);
  padding: 8px;
  display: flex; flex-direction: column; gap: 2px;
  z-index: 40;
  animation: navDropdownIn 0.18s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes navDropdownIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-dropdown-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px;
  border-radius: 2px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.12s ease;
}
.nav-dropdown-item:hover { background: var(--paper); }
.nav-dropdown-label {
  font-family: var(--font); font-weight: 500; font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.nav-dropdown-sub {
  font-size: 11.5px; color: var(--ink-mute);
  letter-spacing: 0.01em;
}

/* Mega menu links — subtle fade on hover */
.mega-link { transition: opacity 0.12s ease; }
.mega-link:hover { opacity: 0.62; }

/* ─────────── Mobile menu ─────────── */
/* Hamburger button is hidden on desktop, shown below 880px. */
.nav-hamburger {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: transparent; border: 0; padding: 0;
  color: var(--ink); cursor: pointer;
  margin-right: 4px;
}
.nav-hamburger:hover { opacity: 0.7; }

.mobile-menu {
  position: fixed; inset: 0;
  background: var(--cream);
  z-index: 100;
  display: flex; flex-direction: column;
  overflow-y: auto;
  animation: mobile-menu-in 0.22s ease;
}
@keyframes mobile-menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mobile-menu-bar {
  display: grid; grid-template-columns: 40px 1fr 40px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
  background: var(--cream);
  z-index: 2;
}
.mobile-menu-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: transparent; border: 0; padding: 0;
  color: var(--ink); cursor: pointer;
}
.mobile-menu-icon-empty { pointer-events: none; }
.mobile-menu-title {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font);
  font-size: 18px; font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.mobile-menu-body {
  flex: 1;
  padding: 12px 0 48px;
}
.mobile-menu-list {
  list-style: none; margin: 0; padding: 0;
}
.mobile-menu-list-primary { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 12px; }
.mobile-menu-list-secondary .mobile-menu-row span { font-size: 17px; font-weight: 400; color: var(--ink-soft); }
.mobile-menu-row {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  background: transparent; border: 0;
  font-family: var(--font);
  font-size: 20px; font-weight: 500; letter-spacing: -0.005em;
  color: var(--ink);
  cursor: pointer; text-align: left;
}
.mobile-menu-row:active { background: rgba(9,31,44,0.04); }
.mobile-menu-footer {
  padding: 28px 24px 8px;
}

@media (max-width: 880px) {
  .nav-hamburger { display: inline-flex; }
  .nav-left, .nav-right { display: none; }
  .nav-inner {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
  }
  .nav-inner > .wordmark { justify-self: center; }
  /* Hide the desktop mega-menu on mobile (we use mobile-menu instead) */
  .nav-mega { display: none !important; }
}

/* Wordmark */
.wordmark {
  display: inline-flex; align-items: center;
  line-height: 0;
}
.wordmark img {
  height: 32px; width: auto;
  display: block;
}
.wordmark.is-compact img { height: 28px; }
.wordmark.is-large img { height: 36px; }

/* Text wordmark — Freshers Week */
.wordmark-text {
  font-family: var(--font);
  font-weight: 600;
  font-size: 23px;
  letter-spacing: -0.018em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 0.28em;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark-text .wm-week { font-weight: 300; color: var(--accent); }
.wordmark-text.is-compact { font-size: 20px; }
.wordmark-text.is-light { color: #fff; }
.wordmark-text.is-light .wm-week { color: #fff; opacity: 0.82; }

/* ─────────── Buttons ─────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  font-size: 13.5px; font-weight: 500;
  letter-spacing: 0.005em;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--banner-grad); color: #fff;
  transition: background 0.2s, color 0.2s, transform 0.2s, filter 0.2s;
}
.btn:hover { filter: brightness(1.06); background: var(--banner-grad-hover); }
.btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--accent);
}
.btn-ghost:hover { background: var(--banner-grad); color: #fff; border-color: transparent; }
.btn-light {
  background: var(--white); color: var(--ink); border-color: var(--line-strong);
}
.btn-light:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.btn .arrow {
  width: 14px; height: 10px; display: inline-block; position: relative;
  transition: transform 0.25s ease;
}
.btn:hover .arrow { transform: translateX(3px); }

.txtlink {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 500; color: var(--ink);
  padding-bottom: 2px; border-bottom: 1px solid var(--ink);
}
.txtlink-mute {
  color: var(--ink-mute); border-color: var(--line-strong);
}
.txtlink:hover { color: var(--accent); border-color: var(--accent); }

/* ─────────── Product placeholder ─────────── */
.ph {
  position: relative;
  background: linear-gradient(180deg, #e6e6e8 0%, #dadadd 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border-radius: 6px;
}
.ph-paper { background: linear-gradient(180deg, #f3f3f4 0%, #e6e6e8 100%); }
.ph-photo { background: #ffffff; border: 1px solid var(--line); border-radius: 10px; }
.ph-photo::after { display: none; }
.ph-photo .ph-label, .ph-photo .ph-caption { color: var(--ink-mute); }

/* ─────────── Scroll-triggered animations ─────────── */
[data-anim] {
  will-change: transform, opacity;
}
[data-anim="fade-up"] {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.8s cubic-bezier(0.22,0.71,0.22,1), transform 0.8s cubic-bezier(0.22,0.71,0.22,1);
  transition-delay: var(--anim-delay, 0s);
}
[data-anim="text-fade"] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease-out, transform 0.7s cubic-bezier(0.22,0.71,0.22,1);
  transition-delay: var(--anim-delay, 0s);
}
[data-anim="line-draw"] {
  display: block;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1s cubic-bezier(0.22,0.71,0.22,1);
  transition-delay: var(--anim-delay, 0s);
}
[data-anim].in-view {
  opacity: 1;
  transform: translateY(0) scaleX(1);
}
[data-anim="line-draw"].in-view {
  transform: scaleX(1);
}
@media (prefers-reduced-motion: reduce) {
  [data-anim] { transition: none !important; opacity: 1 !important; transform: none !important; }
}
.anim-line {
  height: 1px;
  background: var(--ink);
  width: 100%;
}
.img-actions {
  position: absolute; right: 16px; bottom: 16px; z-index: 2;
  display: flex; gap: 8px;
}
.logo-badge {
  position: absolute; left: 16px; top: 16px; z-index: 3;
  width: 64px; height: 64px; border-radius: 999px;
  background: url('assets/add-your-logo.png') center/contain no-repeat;
  border: 0; padding: 0;
  cursor: default;
  filter: drop-shadow(0 4px 12px rgba(12,132,198,0.28));
  transition: transform 0.18s ease, filter 0.18s ease;
}
.logo-badge:hover { transform: scale(1.06); filter: drop-shadow(0 6px 14px rgba(12,132,198,0.4)); }
.logo-badge > * { display: none; }
.img-action {
  width: 36px; height: 36px; border-radius: 999px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); cursor: default;
  transition: background 0.15s, transform 0.15s;
}
.img-action:hover { background: var(--accent); color: var(--white); border-color: var(--accent); }
.img-action.ok { background: var(--accent); color: var(--white); border-color: var(--accent); }
.img-toast {
  position: absolute; right: 16px; bottom: 60px;
  background: var(--ink); color: var(--cream);
  font-family: var(--font); font-size: 11.5px; letter-spacing: 0.02em;
  padding: 6px 10px; border-radius: 2px;
  opacity: 0; transform: translateY(4px); pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
}
.img-toast.show { opacity: 1; transform: translateY(0); }
.ph-deep  { background: linear-gradient(180deg, #cfcfd3 0%, #bbbbc0 100%); }
.ph-ink   { background: linear-gradient(180deg, #21304a 0%, #1a2332 100%); color: var(--cream); }
.ph::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,0.6) 0%, transparent 55%),
    radial-gradient(80% 60% at 50% 100%, rgba(26,35,50,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.ph-label {
  position: absolute; left: 14px; top: 14px; z-index: 2;
  font-size: 10.5px; font-weight: 500; letter-spacing: var(--tracking-wide);
  text-transform: uppercase; color: var(--ink-mute);
}
.ph-deep .ph-label, .ph-paper .ph-label { color: var(--ink-mute); }
.ph-ink .ph-label { color: rgba(245, 242, 236, 0.7); }
.ph-caption {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  font-size: 11.5px; color: var(--ink-mute);
  letter-spacing: 0.02em;
}
.ph-ink .ph-caption { color: rgba(245, 242, 236, 0.65); }
.ph svg.silhouette { position: relative; z-index: 1; }

/* ─────────── Grid utilities ─────────── */
.grid { display: grid; gap: 1px; background: var(--line); }
.grid > * { background: var(--cream); }

.card-hover { transition: transform 0.4s cubic-bezier(.2,.7,.2,1), opacity 0.3s; }
.card-hover:hover { transform: translateY(-2px); }

/* Color swatches */
.swatch {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line);
  cursor: default;
  transition: transform 0.15s;
}
.swatch.active { box-shadow: 0 0 0 1px var(--cream), 0 0 0 2px var(--ink); }
.swatch:hover { transform: scale(1.08); }

/* ─────────── Animations ─────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.fade-up { animation: fadeUp 0.7s cubic-bezier(.2,.7,.2,1) both; }
.fade-in { animation: fadeIn 0.6s ease both; }
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.40s; }
.delay-6 { animation-delay: 0.48s; }

/* ─────────── Marquee trust strip ─────────── */
.marquee {
  overflow: hidden; position: relative;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.marquee-track {
  display: flex; gap: 80px; padding: 28px 0; width: max-content;
  animation: scroll 50s linear infinite;
}
@keyframes scroll { to { transform: translateX(-50%); } }
.marquee-item {
  font-size: 14px; font-weight: 500; color: var(--ink);
  letter-spacing: 0.04em; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 80px;
}
.marquee-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--sand); }

/* ─────────── Mobile view stage (legacy iOS frame mock — removed) ─────────── */

/* ─────────── Footer — centred text across all viewports ─────────── */
footer .container { text-align: center; }
footer .container .eyebrow,
footer .container .body,
footer .container .small { text-align: center; }
footer .container ul,
footer .container li { text-align: center; }
footer .container > div > div { display: flex; flex-direction: column; align-items: center; }
footer .container > div > div p { margin-left: auto; margin-right: auto; }
/* Bottom legal row — desktop has it as space-between; center it. */
footer hr + div {
  justify-content: center !important;
  text-align: center;
}

/* ─────────── Banner footer — blue gradient, white text ─────────── */
footer { color: #fff; }
footer .eyebrow { color: rgba(255,255,255,0.72) !important; }
footer .body   { color: rgba(255,255,255,0.88) !important; }
footer .small  { color: rgba(255,255,255,0.78) !important; }
footer a:hover { color: #fff; }
footer .rule, footer hr { background: rgba(255,255,255,0.22) !important; }

/* ─────────── Mobile preview FAB + overlay ─────────── */
.mobile-preview-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: var(--ink); color: var(--cream);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font); font-size: 13px; font-weight: 500;
  letter-spacing: 0.005em;
  box-shadow: 0 12px 32px -8px rgba(9,31,44,0.45);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}
.mobile-preview-fab:hover { transform: translateY(-2px); }
.mobile-preview-fab svg { display: block; }

@media (max-width: 780px) {
  /* On real mobile, the toggle isn't useful — you ARE on mobile. Hide. */
  .mobile-preview-fab { display: none; }
}

.mobile-preview-overlay {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(9,31,44,0.72);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
  animation: mobilePreviewIn 0.2s ease;
}
@keyframes mobilePreviewIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.mobile-preview-stage {
  /* Scale the device down on shorter screens so it always fits. */
  transform-origin: center center;
  max-height: 100%;
}
@media (max-height: 940px) {
  .mobile-preview-stage { transform: scale(0.86); }
}
@media (max-height: 820px) {
  .mobile-preview-stage { transform: scale(0.74); }
}
@media (max-height: 720px) {
  .mobile-preview-stage { transform: scale(0.64); }
}

/* ─────────── Forms ─────────── */
.field {
  display: flex; flex-direction: column; gap: 8px;
}
.field label {
  font-size: 11px; font-weight: 500; letter-spacing: var(--tracking-wide);
  text-transform: uppercase; color: var(--ink-mute);
}
.field input, .field textarea, .field select {
  font-family: var(--font); font-size: 15px; font-weight: 400;
  color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--line-strong);
  padding: 12px 0 10px;
  outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--ink);
}
.field textarea { resize: vertical; min-height: 96px; }

/* Accordion */
.accordion-row {
  border-bottom: 1px solid var(--line);
}
.accordion-row summary {
  list-style: none; cursor: default;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0; font-size: 16px; font-weight: 400;
}
.accordion-row summary::-webkit-details-marker { display: none; }
.accordion-row .plus {
  width: 14px; height: 14px; position: relative; flex: none;
}
.accordion-row .plus::before, .accordion-row .plus::after {
  content: ""; position: absolute; background: var(--ink); inset: auto;
}
.accordion-row .plus::before { left: 0; right: 0; top: 50%; height: 1px; margin-top: -0.5px; }
.accordion-row .plus::after  { top: 0; bottom: 0; left: 50%; width: 1px; margin-left: -0.5px; transition: transform 0.25s; }
.accordion-row[open] .plus::after { transform: rotate(90deg); opacity: 0; }
.accordion-body { padding: 0 0 22px; max-width: 64ch; color: var(--ink-soft); }

/* Selection */
::selection { background: var(--ink); color: var(--cream); }

/* Utility */
.flex { display: flex; }
.col { flex-direction: column; }
.center { align-items: center; justify-content: center; }
.between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.gap-24 { gap: 24px; } .gap-32 { gap: 32px; } .gap-48 { gap: 48px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; }
.mt-96 { margin-top: 96px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; } .mb-64 { margin-bottom: 64px; }
.mb-96 { margin-bottom: 96px; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.row-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
@media (max-width: 900px) {
  .row-2, .row-3, .row-4 { grid-template-columns: 1fr; }
}

/* ─────────── Brand card taglines — fixed two-line height ─────────── */
.brand-tagline {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(2em * 1.6); /* reserve two lines of body text */
}

/* ─────────────────────────────────────────────────────────────
   MOBILE — make the full site stack cleanly on phones.
   The site previously used a separate iOS-frame mock for mobile;
   now everything is one responsive layout. These rules collapse
   the multi-column grids, drop nested splits, and tighten section
   padding so nothing reads as one-word-per-line.
   ───────────────────────────────────────────────────────────── */
@media (max-width: 780px) {
  /* Tighter section + gutter rhythm so big chunks don't run off-screen. */
  :root {
    --gutter: 20px;
    --section: 72px;
  }

  /* Block all horizontal scroll on phones. Any rogue element that's too
     wide (marquee, mis-sized card row, a stray inline style) will be
     clipped rather than letting the page bounce-scroll sideways. */
  html, body { overflow-x: hidden; max-width: 100vw; }

  body { font-size: 15.5px; }

  .container, .container-wide { max-width: 100%; }

  /* Stack EVERY inline 2/3/4/5-column grid the home + page bodies use.
     We can't edit each inline style, so collapse anything that uses
     `grid-template-columns: repeat(N, ...)` or N-fraction splits. */
  [style*="grid-template-columns: repeat(5"],
  [style*="grid-template-columns:repeat(5"],
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: 1fr 1fr !important;
  }
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr 1fr !important;
  }
  [style*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns:repeat(2"] {
    grid-template-columns: 1fr !important;
  }
  /* Two-column splits expressed as fractions — stack them. */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1.4fr 1fr"],
  [style*="grid-template-columns:1.4fr 1fr"],
  [style*="grid-template-columns: 1.6fr 1fr"],
  [style*="grid-template-columns:1.6fr 1fr"],
  [style*="grid-template-columns: 1.1fr 1fr"],
  [style*="grid-template-columns:1.1fr 1fr"],
  [style*="grid-template-columns: 1fr 1.1fr"],
  [style*="grid-template-columns:1fr 1.1fr"],
  [style*="grid-template-columns: 1fr 1.4fr"],
  [style*="grid-template-columns:1fr 1.4fr"],
  [style*="grid-template-columns: 1fr 1.6fr"],
  [style*="grid-template-columns:1fr 1.6fr"],
  [style*="grid-template-columns: 1fr 0.7fr"],
  [style*="grid-template-columns:1fr 0.7fr"],
  [style*="grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr"],
  [style*="grid-template-columns: auto 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* The product gallery is set to position:sticky with width:90% — kill that
     so the image sits naturally at the top of the stack. */
  [style*="position:sticky"][style*="width: 90%"],
  [style*="position: sticky"][style*="width: 90%"] {
    position: static !important;
    width: 100% !important;
  }

  /* Product page bullets — single column reads better than crammed 2-col. */
  [style*="grid-template-columns: 1fr 1fr"][style*="10px 24px"] {
    grid-template-columns: 1fr !important;
  }

  /* Section padding — clamp values can still be too generous; tighten. */
  .section { padding-top: 64px; padding-bottom: 64px; }
  .section-sm { padding-top: 48px; padding-bottom: 48px; }

  /* Display type — keep impactful but not screen-eating. */
  .display { font-size: clamp(44px, 12vw, 64px); line-height: 1.0; }
  .h1 { font-size: clamp(36px, 9vw, 48px); }
  .h2 { font-size: clamp(28px, 7vw, 40px); }
  .h3 { font-size: clamp(18px, 5vw, 22px); }
  .lede { font-size: 16px; line-height: 1.5; }

  /* Buttons — wrap to fit, full-width feels too app-y, so just allow wrap. */
  .btn { padding: 12px 18px; font-size: 13px; }

  /* "Shop by" black banner — stop the 4-up split, stack as a list. */
  #shop-brand { scroll-margin-top: 60px; }
  #shop-category { scroll-margin-top: 60px; }

  /* Brand cards — reserve 2-line height for tagline so all align. */
  .brand-tagline { min-height: calc(2em * 1.55); }

  /* Trusted-by marquee — smaller logos so they don't look enormous. */
  .trusted-marquee { gap: 56px; }
  .trusted-marquee img { height: calc(var(--logo-h, 48px) * 0.8) !important; }

  /* Marquee text strip — closer spacing. */
  .marquee-track { gap: 48px; }
  .marquee-item { gap: 48px; font-size: 12.5px; }

  /* Multi-site dark section — the 2x2 list inside was a nested grid,
     handled by repeat(2) rule above. Add some breathing room. */

  /* Footer — single-column vertical stack on mobile. Each section sits
     centered with its eyebrow above and items listed below. */
  footer .container > div {
    grid-template-columns: 1fr !important;
    gap: 48px 0 !important;
    text-align: center;
  }
  /* Brand blurb sits at the top of the stack. */
  footer .container > div > div:first-child {
    grid-column: 1 / -1;
  }
  /* Center the brand blurb paragraph (override its 32ch max-width centering). */
  footer .container > div > div:first-child p {
    margin-left: auto;
    margin-right: auto;
  }
  /* Visit (last col — contains the address) at the bottom. */
  footer .container > div > div:last-child {
    grid-column: 1 / -1;
  }
  /* FooterCol — vertical stack of links, generous spacing. */
  footer ul, footer ol { padding-left: 0; list-style: none; margin: 0; }
  footer li { text-align: center; padding: 6px 0; }
  footer .eyebrow { margin-bottom: 20px !important; }
  footer .container { padding-top: 56px !important; padding-bottom: 32px !important; }
  /* Bottom legal line — stack and center. */
  footer hr + div {
    flex-direction: column;
    align-items: center !important;
    text-align: center;
  }

  /* Hero variants — flatlay's overlay positioning gets awkward on mobile. */
  /* Keep hero readable: looser internal padding overrides. */

  /* Closing CTA & "How we deliver" — heading + body stack, give them air. */
  .h1[style*="14ch"] { max-width: 100% !important; }

  /* Featured product strip + category grid — keep 2-up but tighten gap. */
  [style*="grid-template-columns: repeat(4"] { gap: 16px 12px !important; }
  [style*="grid-template-columns: repeat(3"] { gap: 24px 16px !important; }

  /* Product info column — flex it so we can reorder the colour block to
     sit immediately under the image (before description/code/bullets). */
  .product-info-col {
    display: flex !important;
    flex-direction: column !important;
    padding-top: 16px !important;
  }
  /* Default everything to a late order; only the first few children get
     promoted so the colour selector sits right under the heading. */
  .product-info-col > * { order: 10; }
  .product-info-col > .eyebrow             { order: 1; }
  .product-info-col > h1                   { order: 2; }
  .product-info-col > div:nth-child(3)     { order: 3; }  /* code · range */
  .product-info-col > .product-color-block { order: 4; margin-top: 24px !important; }
  .product-info-col > .product-description { order: 5; }
  .product-info-col > .product-bullets     { order: 6; }

  /* Bullets — single column reads better than crammed 2-col. */
  .product-bullets { grid-template-columns: 1fr !important; }

  /* Product cards in the "Pairs well with" / featured strips — make sure the
     card itself never extends past its grid cell (the swatch row wraps now,
     but a long product name on a narrow card could still push width). */
  .card-hover, .product-card { min-width: 0; max-width: 100%; }

  /* Bottom legal row — already centred globally above, but on mobile the
     copyright + links pair should stack rather than wrap awkwardly. */
  footer hr + div {
    flex-direction: column;
    gap: 12px !important;
  }
}

/* Narrower phones — drop everything to one column for tight readability. */
@media (max-width: 480px) {
  [style*="grid-template-columns: repeat(5"],
  [style*="grid-template-columns:repeat(5"] {
    grid-template-columns: 1fr 1fr !important;
  }
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 14px 10px !important;
  }
  .display { font-size: 44px; }
  .h1 { font-size: 36px; }
  .h2 { font-size: 28px; }
}

/* ─────────── Slightly rounded image corners — site-wide ─────────── */
/* A subtle 6px curve on all content imagery. Logos / wordmarks / marquee
   marks (transparent on solid background) stay sharp. */
main img,
.shell > div img,
section img,
.product-card img,
.product-card > div:first-child,
.category-card img,
.category-tile img,
.brand-card .brand-bg,
.product-thumb,
.product-thumb img,
[class*="hero"] img {
  border-radius: 8px;
}
/* Background-image carriers — product card placeholder div, category tiles,
   brand-card hero panels — these set their image via inline background. */
.product-card > div[style*="background"],
.category-card [style*="background-image"],
.brand-card [style*="background-image"],
[class*="hero"] [style*="background-image"] {
  border-radius: 8px;
}
/* Keep logos, marks, wordmark, brand-row & marquee imagery sharp. */
.wordmark img,
.trusted-marquee img,
.marquee-track img,
header img,
footer img,
img[src$=".svg"],
img[src*="/logo.png"],
img[src*="/brands/"],
img[src*="-logo"],
img.no-round,
.no-round img {
  border-radius: 0 !important;
}

/* ─────────── Mobile filter sheet ─────────── */
.filter-trigger {
  display: none; /* hidden on desktop — pills shown inline instead */
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 14px;
  margin-top: 20px;
  background: var(--cream, #faf7f2);
  border: 1px solid var(--line-strong, #d3cdbe);
  border-radius: 999px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  cursor: pointer;
}
.filter-trigger svg { display: block; }
.filter-trigger-badge {
  display: inline-flex;
  align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  margin-left: 2px;
  background: var(--accent, #d2461b);
  color: var(--white, #fff);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Sheet chrome — only renders on mobile; hidden on desktop. */
.filter-sheet-header,
.filter-sheet-apply,
.filter-sheet-group-label { display: none; }
.filter-sheet-backdrop { display: none; }

@media (max-width: 780px) {
  .filter-trigger { display: inline-flex; }

  /* Hide the inline pills block by default on mobile — the trigger replaces it. */
  .filter-pills-block {
    display: none !important;
  }

  /* When opened, it becomes a bottom sheet. */
  .filter-pills-block.is-open {
    display: flex !important;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    max-height: 88vh;
    margin-top: 0 !important;
    padding: 0;
    background: var(--paper, #faf7f2);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    box-shadow: 0 -20px 60px -10px rgba(9,31,44,0.25);
    gap: 0 !important;
    flex-direction: column !important;
    animation: filterSheetUp 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  }
  @keyframes filterSheetUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }

  .filter-sheet-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line, #e8e3d4);
  }
  .filter-sheet-clear {
    justify-self: start;
    background: transparent; border: 0; padding: 0;
    color: var(--ink);
    font-family: var(--font); font-size: 12px; font-weight: 500;
    text-decoration: underline; text-underline-offset: 3px;
    letter-spacing: 0.04em; text-transform: uppercase;
    cursor: pointer;
  }
  .filter-sheet-title {
    justify-self: center;
    font-family: var(--font); font-size: 12px; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--ink);
  }
  .filter-sheet-close {
    justify-self: end;
    background: transparent; border: 0; padding: 4px;
    color: var(--ink); cursor: pointer;
    display: inline-flex;
  }
  .filter-sheet-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 22px 20px 24px;
    display: flex; flex-direction: column; gap: 12px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  .filter-sheet-group-label {
    display: block;
    font-family: var(--font); font-weight: 600;
    font-size: 13px; color: var(--ink);
    margin: 8px 0 4px;
  }
  .filter-sheet-group-label:first-child { margin-top: 0; }
  .filter-pills-row { width: 100%; }
  .filter-sheet-apply {
    display: inline-flex !important;
    align-items: center; justify-content: space-between;
    width: 100%;
    padding: 18px 22px;
    background: var(--ink, #091f2c);
    color: var(--cream, #faf7f2);
    border: 0;
    font-family: var(--font); font-size: 13px; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase;
    cursor: pointer;
  }
  .filter-sheet-apply svg { color: currentColor; }

  .filter-sheet-backdrop {
    display: block;
    position: fixed; inset: 0; z-index: 89;
    background: rgba(9,31,44,0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    animation: filterBackdropIn 0.2s ease;
  }
  @keyframes filterBackdropIn {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}
