/* William Irven — bespoke handbags, London */

:root {
  --bg: #ffffff;
  --surface: #f5f3ef;
  --ink: #111111;
  --ink-soft: #5c5853;
  --line: #d9d5cf;
  --focus: #111111;
  --error: #9b1c1c;

  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: clamp(1.5rem, 2.4vw, 2rem);

  --gutter: clamp(16px, 2vw, 32px);
  --nav-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-weight: 400; margin: 0; letter-spacing: 0.01em; line-height: 1.2; }

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

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 14px; font-size: var(--fs-sm);
}
.skip-link:focus { top: 12px; }

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

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--gutter);
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-solid { background: var(--bg); border-color: var(--line); }

.nav-list { display: flex; gap: clamp(20px, 2.6vw, 48px); list-style: none; margin: 0; padding: 0; }
.nav-list--right { justify-content: flex-end; }
.nav-list a {
  font-size: var(--fs-base); padding: 12px 0; display: inline-block;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 8px) / 0 1px no-repeat;
  transition: background-size 250ms var(--ease);
}
.nav-list a:hover, .nav-list a[aria-current="page"] { background-size: 100% 1px; }

.logo { display: inline-flex; padding: 8px; color: var(--ink); justify-self: center; }
.logo svg { width: clamp(92px, 8vw, 118px); height: auto; aspect-ratio: 85.314 / 34.162; }

.menu-toggle {
  display: none; justify-self: start;
  width: 44px; height: 44px; margin-left: -10px;
  background: none; border: 0; padding: 10px; cursor: pointer; color: inherit;
}
.menu-toggle span { display: block; height: 1.5px; background: currentColor; margin: 6px 0; transition: transform 250ms var(--ease), opacity 200ms; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.header-enquire { display: none; justify-self: end; font-size: var(--fs-sm); padding: 12px 0; }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 40;
  background: var(--bg); padding: 32px var(--gutter);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 250ms var(--ease), transform 250ms var(--ease), visibility 0s 250ms;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu a { display: block; font-size: 1.75rem; padding: 10px 0; }
.mobile-menu .mobile-meta { margin-top: 48px; font-size: var(--fs-sm); color: var(--ink-soft); }

@media (max-width: 860px) {
  .site-header > nav { display: none; }
  .menu-toggle, .header-enquire { display: block; }
}

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: var(--surface); }
.hero-media { height: 100%; }
.hero-media picture { display: block; height: 100%; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 160px; pointer-events: none;
  background: linear-gradient(to top, rgba(255,255,255,0.82), rgba(255,255,255,0));
}
.hero-caption {
  z-index: 1;
  position: absolute; left: var(--gutter); bottom: var(--gutter); right: var(--gutter);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  font-size: var(--fs-sm);
}
.hero-caption a { padding: 12px 0; border-bottom: 1px solid currentColor; }


/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 160px) var(--gutter); }
.section--tight { padding-top: clamp(40px, 5vw, 72px); }

.statement { max-width: 46rem; margin: 0 auto; text-align: center; }
.statement h1, .statement h2 { font-size: var(--fs-xl); margin-bottom: 24px; }
.statement p { color: var(--ink-soft); }

.eyebrow { font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 16px; }

.text-link { display: inline-block; font-size: var(--fs-sm); padding: 12px 0; border-bottom: 1px solid currentColor; transition: opacity 200ms; }
.text-link:hover { opacity: 0.6; }

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gutter); }
.product-card { display: block; }
.product-card figure { margin: 0; overflow: hidden; background: var(--surface); aspect-ratio: 2 / 3; }
.product-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.product-card:hover img { transform: scale(1.03); }
.product-card .meta { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0 0; font-size: var(--fs-sm); }
.product-card .price { color: var(--ink-soft); font-variant-numeric: tabular-nums; }

@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Editorial pair */
.editorial { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.editorial img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.editorial--offset { grid-template-columns: 5fr 7fr; align-items: end; gap: var(--gutter); padding: 0 var(--gutter); }
@media (max-width: 560px) {
  .editorial, .editorial--offset { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .editorial--offset { gap: var(--gutter); }
}

/* Process */
.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); border-top: 1px solid var(--line); padding-top: 32px; max-width: 1200px; margin: 0 auto; }
.process h3 { font-size: var(--fs-base); margin-bottom: 8px; }
.process p { color: var(--ink-soft); font-size: var(--fs-sm); max-width: 32ch; }
.process .num { font-size: var(--fs-xs); color: var(--ink-soft); display: block; margin-bottom: 24px; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .process { grid-template-columns: 1fr; gap: 32px; } }

/* Page header (inner pages) */
.page-head { padding: calc(var(--nav-h) + 56px) var(--gutter) 40px; }
.page-head h1 { font-size: var(--fs-xl); }

/* ---------- Product page ---------- */
.product { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0; padding-top: var(--nav-h); }
.product-media { background: var(--surface); }
.product-media .sticky { position: sticky; top: var(--nav-h); }
.product-media video { width: 100%; height: calc(100svh - var(--nav-h)); object-fit: cover; background: var(--surface); }
.product-media .stack img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.video-wrap { position: relative; }
.video-toggle {
  position: absolute; left: var(--gutter); bottom: var(--gutter);
  min-height: 44px; padding: 0 14px; background: rgba(255,255,255,0.85); border: 0;
  font: inherit; font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; color: var(--ink);
}

.product-info { padding: clamp(32px, 5vw, 80px) clamp(16px, 5vw, 88px) 80px; }
.product-info .inner { max-width: 30rem; }
.product-info h1 { font-size: var(--fs-xl); margin-bottom: 8px; }
.product-info .price { color: var(--ink-soft); margin-bottom: 32px; font-variant-numeric: tabular-nums; }
.product-info .desc { color: var(--ink-soft); }
.product-details { border-top: 1px solid var(--line); margin: 32px 0 48px; }
.product-details details { border-bottom: 1px solid var(--line); }
.product-details summary {
  list-style: none; cursor: pointer; padding: 16px 0; min-height: 44px;
  display: flex; justify-content: space-between; font-size: var(--fs-sm);
}
.product-details summary::-webkit-details-marker { display: none; }
.product-details summary::after { content: "+"; }
.product-details details[open] summary::after { content: "–"; }
.product-details .body { padding: 0 0 20px; font-size: var(--fs-sm); color: var(--ink-soft); }
.product-details ul { margin: 0; padding-left: 1.1em; }

.product-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.product-gallery img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }

@media (max-width: 900px) {
  .product { grid-template-columns: 1fr; }
  .product-media .sticky { position: relative; top: auto; }
  .product-media video { height: auto; aspect-ratio: 9 / 16; max-height: 82svh; }
  .product-gallery { grid-template-columns: 1fr 1fr; }
  .product-gallery img:nth-child(3) { display: none; }
}

/* ---------- Form ---------- */
.enquiry h2 { font-size: var(--fs-lg); margin-bottom: 8px; }
.enquiry .lede { color: var(--ink-soft); font-size: var(--fs-sm); margin-bottom: 28px; }
.field { margin-bottom: 20px; }
.field label, .field legend { display: block; font-size: var(--fs-sm); margin-bottom: 6px; padding: 0; }
.field .req { color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: var(--fs-base); color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 0;
  padding: 12px 14px; min-height: 48px;
  transition: border-color 200ms;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-soft); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.field .hint { font-size: var(--fs-xs); color: var(--ink-soft); margin-top: 6px; }
.field .hint a { text-decoration: underline; text-underline-offset: 2px; }
.field .error { font-size: var(--fs-xs); color: var(--error); margin-top: 6px; }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; gap: 0; } }
.hp { position: absolute; left: -9999px; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 52px; padding: 0 24px;
  background: var(--ink); color: var(--bg); border: 1px solid var(--ink);
  font: inherit; font-size: var(--fs-sm); letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; transition: background-color 200ms, color 200ms;
}
.button:hover { background: var(--bg); color: var(--ink); }
.button[disabled] { opacity: 0.5; cursor: progress; }
.form-status { margin-top: 16px; font-size: var(--fs-sm); }
.form-status.is-error { color: var(--error); }
.form-success { padding: 32px 0; }
.form-success h2 { font-size: var(--fs-lg); margin-bottom: 12px; }

/* ---------- Atelier ---------- */
.atelier { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding-top: var(--nav-h); }
.atelier .media img { width: 100%; height: 100%; min-height: 70svh; object-fit: cover; }
.atelier .copy { padding: clamp(40px, 6vw, 96px) clamp(16px, 5vw, 88px); }
.atelier .copy .inner { max-width: 32rem; }
.atelier h1 { font-size: var(--fs-xl); margin-bottom: 28px; }
.atelier p { color: var(--ink-soft); }
.contact-list { margin: 40px 0 0; display: grid; gap: 24px; }
.contact-list dt { font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.contact-list dd { margin: 0; }
.contact-list a { border-bottom: 1px solid currentColor; }
@media (max-width: 860px) { .atelier { grid-template-columns: 1fr; } .atelier .media img { min-height: 0; aspect-ratio: 4 / 5; } }

/* ---------- Footer ---------- */
.site-footer { padding: 64px var(--gutter) 32px; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { font-size: var(--fs-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li a { display: inline-block; padding: 4px 0; }
.footer-grid a:hover { opacity: 0.6; }
.footer-grid address { font-style: normal; color: var(--ink-soft); }
.footer-logo { color: var(--ink); display: inline-block; margin-bottom: 16px; }
.footer-logo svg { width: 110px; height: auto; aspect-ratio: 85.314 / 34.162; }
.footer-base { margin-top: 64px; color: var(--ink-soft); font-size: var(--fs-xs); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Chocolate Box: centred video with space around it ---------- */
.product-media--video { background: var(--bg); }
.product-media--video .sticky {
  height: calc(100svh - var(--nav-h));
  display: flex; align-items: center; justify-content: center;
  padding: clamp(24px, 5vw, 80px);
}
.product-media--video .video-wrap { position: relative; height: 100%; max-height: 760px; aspect-ratio: 9 / 16; max-width: 100%; }
.product-media--video video { width: 100%; height: 100%; object-fit: cover; background: var(--surface); }
.product-media--video .video-toggle { left: 12px; bottom: 12px; }
@media (max-width: 900px) {
  .product-media--video .sticky { height: auto; padding: 32px var(--gutter) 0; }
  .product-media--video .video-wrap { height: auto; width: min(68vw, 360px); }
  .product-media--video video { height: auto; aspect-ratio: 9 / 16; max-height: none; }
}

/* ---------- Leather palette ---------- */
.palette { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
.palette legend { margin-bottom: 12px; }
.palette-tabs { display: flex; flex-wrap: wrap; gap: 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.palette-tabs button {
  background: none; border: 0; border-bottom: 1px solid transparent; margin-bottom: -1px;
  font: inherit; font-size: var(--fs-sm); color: var(--ink-soft); padding: 10px 0; min-height: 44px; cursor: pointer;
}
.palette-tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--ink); }
.palette-tabs button:hover { color: var(--ink); }
.palette-meta { font-size: var(--fs-xs); color: var(--ink-soft); margin-bottom: 16px; }
.palette-meta a { text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 16px 10px; }
.palette .swatch { position: relative; display: flex; margin: 0; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; text-align: center; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch .chip {
  display: block; width: 44px; height: 44px; border-radius: 50%; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); outline: 1px solid transparent; outline-offset: 3px;
  transition: outline-color 150ms, transform 150ms;
}
.swatch:hover .chip { transform: scale(1.06); }
.swatch input:checked + .chip { outline-color: var(--ink); }
.swatch input:focus-visible + .chip { outline: 2px solid var(--focus); }
.swatch-name { font-size: var(--fs-xs); line-height: 1.3; color: var(--ink-soft); }
.swatch input:checked ~ .swatch-name { color: var(--ink); }
.palette-choice { font-size: var(--fs-sm); margin: 20px 0 4px; }
.palette-choice span { color: var(--ink-soft); }

/* ---------- Scrap Bag ---------- */
.story p { margin-bottom: 1em; }
.story-coda { color: var(--ink-soft); font-style: italic; font-weight: 300; }
.pieces { margin: 0 0 48px; }
.pieces h2 { font-size: var(--fs-lg); margin-bottom: 16px; }
.piece-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.piece { display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; }
.piece img { width: 96px; aspect-ratio: 2 / 3; object-fit: cover; background: var(--surface); }
.piece p { margin: 0; }
.piece-name { font-size: var(--fs-base); }
.piece-meta { font-size: var(--fs-sm); color: var(--ink-soft); }

/* ---------- Home hero: image pans upward as the page scrolls ---------- */
.hero-media { overflow: hidden; }
.hero-media img { will-change: transform; }
.hero.is-panning .hero-media img { height: var(--pan-h, 100%); object-fit: cover; transform: translate3d(0, var(--pan-y, 0px), 0); }

/* Desktop hero photo has a dark jumper behind the logo: fade the top so the header stays legible */
@media (min-width: 861px) {
  .hero::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 180px; z-index: 1; pointer-events: none;
    background: linear-gradient(to bottom, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.55) 45%, rgba(255,255,255,0) 100%);
  }
}
