/* =====================================================================
   Nina Burch — site styles. Every page uses this one stylesheet.
   ===================================================================== */

:root {
  --bg: #fbfaf8;
  --surface: #f1eee9;      /* backdrop behind product images */
  --surface-2: #e9e5de;
  --ink: #1b1a19;
  --ink-2: #4a4642;
  --muted: #7d7872;
  --line: #e5e0d9;
  --line-strong: #cfc8be;
  --error: #9a3324;

  --font: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-logo: "EB Garamond", "Times New Roman", serif;

  --wrap: 1360px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }
.skip-link { position: absolute; left: -9999px; top: 12px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; font-size: 14px; }
.skip-link:focus { left: 16px; }
main:has(> .band:last-child) + .site-footer { margin-top: 0; }

/* ---------- Type ---------- */
.h1 { font-size: clamp(38px, 5.2vw, 68px); line-height: 1.04; font-weight: 400; letter-spacing: -0.025em; text-wrap: balance; }
.h2 { font-size: clamp(28px, 3.1vw, 42px); line-height: 1.1; font-weight: 400; letter-spacing: -0.02em; text-wrap: balance; }
.h3 { font-size: 19px; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; }
.lede { font-size: 17px; line-height: 1.65; color: var(--ink-2); max-width: 34em; text-wrap: pretty; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 30px;
  background: var(--ink); color: var(--bg);
  font-size: 13px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  transition: background-color 200ms ease, transform 120ms ease;
}
.btn:hover { background: #3a3633; }
.btn:active { transform: scale(0.985); }
.btn[disabled], .btn.is-disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; transform: none; }
.btn--light { background: var(--bg); color: var(--ink); }
.btn--light:hover { background: var(--surface); }
.btn--outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--bg); }
.btn--block { width: 100%; }

.text-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  padding-bottom: 3px; border-bottom: 1px solid currentColor;
  transition: opacity 200ms ease;
}
.text-link:hover { opacity: 0.65; }

/* ---------- Announcement + header ---------- */
.announce {
  background: var(--ink); color: #e9e5de;
  font-size: 12px; letter-spacing: 0.06em; text-align: center; padding: 9px 16px;
}

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 250, 248, 0.94);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-in {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: var(--header-h);
}
.logo {
  font-family: var(--font-logo); font-size: 23px; font-weight: 400;
  letter-spacing: 0.24em; text-transform: uppercase; white-space: nowrap;
  padding-left: 0.24em; /* balances the trailing letter-spacing */
}
.nav { display: flex; gap: 30px; }
.nav--right { justify-content: flex-end; }
.nav a, .nav button {
  font-size: 13px; letter-spacing: 0.04em; color: var(--ink-2);
  padding: 8px 0; position: relative; transition: color 150ms ease;
}
.nav a:hover, .nav button:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--ink);
}
.menu-toggle, .icon-btn {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center; margin-left: -12px;
}
.icon-btn { margin: 0 -12px 0 0; }

.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--bg); }
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: flex; align-items: center; min-height: 52px; font-size: 17px; border-bottom: 1px solid var(--line); }
.mobile-nav a:last-child { border-bottom: 0; }

@media (max-width: 900px) {
  :root { --header-h: 60px; }
  .header-in { grid-template-columns: 44px 1fr auto; }
  .nav--left { display: none; }
  .hide-mobile { display: none; }
  .menu-toggle { display: inline-flex; }
  .logo { font-size: 19px; text-align: center; }
  .nav--right { gap: 18px; }
}

/* ---------- Product image frames ---------- */
.frame { position: relative; aspect-ratio: 4 / 5; background: var(--surface); overflow: hidden; }
.frame--square { aspect-ratio: 1 / 1; }
.frame > img, .frame > svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame .badge {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  background: var(--bg); color: var(--ink);
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 9px;
}
@media (hover: hover) and (pointer: fine) {
  .frame > img, .frame > svg { transition: transform 700ms var(--ease); }
  a:hover > .frame > img, a:hover > .frame > svg { transform: scale(1.035); }
}

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 48px 24px; }
.product-grid--3 { grid-template-columns: repeat(3, 1fr); gap: 56px 28px; }
.card { display: block; }
.card-info { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 16px; }
.card-name { font-size: 15px; font-weight: 500; }
.card-price { font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.card-mat { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card.is-sold .frame { opacity: 0.72; }
@media (max-width: 1100px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) {
  .product-grid, .product-grid--3 { grid-template-columns: repeat(2, 1fr); gap: 36px 14px; }
  .card-info { flex-direction: column; gap: 2px; margin-top: 12px; }
  .card-name, .card-price { font-size: 14px; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 9vw, 128px); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
.section-head p { margin-top: 12px; }
.rule { border: 0; border-top: 1px solid var(--line); }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; min-height: min(86vh, 860px); border-bottom: 1px solid var(--line); }
.hero-media { position: relative; background: var(--surface); }
.hero-media > a { position: absolute; inset: 0; }
.hero-media .frame { position: absolute; inset: 0; aspect-ratio: auto; }
.hero-caption { position: absolute; left: 24px; bottom: 22px; z-index: 1; font-size: 13px; color: var(--ink-2); }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 64px clamp(24px, 6vw, 96px); }
.hero-copy .lede { margin: 24px 0 36px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-media { aspect-ratio: 4 / 4.2; }
  .hero-copy { padding: 44px var(--gutter) 56px; }
}

.categories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.category .frame { aspect-ratio: 4 / 4.6; }
.category-name { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 16px; font-weight: 500; }
.category-name span { font-size: 13px; color: var(--muted); font-weight: 400; }
@media (max-width: 760px) { .categories { grid-template-columns: 1fr; gap: 28px; } .category .frame { aspect-ratio: 4 / 3; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 120px); align-items: center; }
.split .frame { aspect-ratio: 4 / 4.6; }
.prose p { color: var(--ink-2); font-size: 16px; line-height: 1.75; max-width: 34em; }
.prose p + p { margin-top: 18px; }
.prose .h2 + p { margin-top: 24px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split--reverse .frame-col { order: -1; } }

.values { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.value { padding: 32px 28px 34px 0; }
.value + .value { padding-left: 28px; border-left: 1px solid var(--line); }
.value h3 { font-size: 15px; font-weight: 500; }
.value p { font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.55; }
@media (max-width: 900px) {
  .values { grid-template-columns: 1fr 1fr; }
  .value, .value + .value { padding: 24px 16px 26px 0; border-left: 0; }
  .value:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
  .value:nth-child(n+3) { border-top: 1px solid var(--line); }
}

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 48px; }
.step { border-top: 1px solid var(--ink); padding-top: 20px; }
.step-num { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.step h3 { margin-top: 18px; }
.step p { margin-top: 10px; color: var(--ink-2); font-size: 15px; line-height: 1.7; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 32px; } }

.band { background: var(--ink); color: #f1eee9; }
.band .lede { color: #c9c3bb; }
.band-in { display: flex; justify-content: space-between; align-items: center; gap: 40px; padding-block: clamp(56px, 7vw, 96px); }
@media (max-width: 760px) { .band-in { flex-direction: column; align-items: flex-start; } }

/* ---------- Page heads ---------- */
.page-head { padding: clamp(48px, 6vw, 88px) 0 32px; }
.page-head .lede { margin-top: 16px; }

/* ---------- Shop ---------- */
.toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 14px 0; margin-bottom: 44px;
}
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  height: 38px; padding: 0 16px; font-size: 14px; color: var(--ink-2);
  border: 1px solid transparent; transition: border-color 150ms ease, color 150ms ease;
}
.tab:hover { color: var(--ink); }
.tab[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }
.toolbar-right { display: flex; align-items: center; gap: 20px; font-size: 14px; color: var(--muted); }
.select {
  appearance: none; -webkit-appearance: none;
  height: 38px; padding: 0 34px 0 12px; border: 1px solid var(--line-strong); background: var(--bg)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%231b1a19' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat right 12px center;
  font-size: 14px; color: var(--ink); border-radius: 0;
}
@media (max-width: 760px) {
  .toolbar { gap: 12px; }
  .tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .tab { flex: none; }
  .toolbar-right { width: 100%; justify-content: space-between; }
  .select { font-size: 16px; }
}
.empty-state { padding: 80px 0 120px; text-align: center; color: var(--muted); }
.empty-state .btn { margin-top: 24px; }

/* ---------- Product page ---------- */
.breadcrumbs { display: flex; gap: 10px; flex-wrap: wrap; padding: 24px 0; font-size: 13px; color: var(--muted); }
.breadcrumbs a:hover { color: var(--ink); }
.pdp { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; padding-bottom: 96px; }
.gallery { display: grid; gap: 12px; }
.gallery .frame { aspect-ratio: 4 / 5; }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.thumbs button { position: relative; aspect-ratio: 1; background: var(--surface); overflow: hidden; outline-offset: 2px; }
.thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button[aria-current="true"] { box-shadow: 0 0 0 1px var(--ink); }
.pdp-info { position: sticky; top: calc(var(--header-h) + 32px); }
.pdp-info .eyebrow { margin-bottom: 14px; }
.pdp-title { font-size: clamp(30px, 3.2vw, 42px); line-height: 1.1; font-weight: 400; letter-spacing: -0.02em; }
.pdp-price { font-size: 19px; margin-top: 12px; font-variant-numeric: tabular-nums; }
.pdp-desc { margin-top: 28px; color: var(--ink-2); font-size: 16px; line-height: 1.75; }
.pdp-desc p + p { margin-top: 14px; }
.option { margin-top: 32px; }
.option-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; letter-spacing: 0.04em; margin-bottom: 12px; }
.option-values { display: flex; flex-wrap: wrap; gap: 8px; }
.option-values button {
  min-width: 52px; height: 44px; padding: 0 14px; border: 1px solid var(--line-strong);
  font-size: 14px; font-variant-numeric: tabular-nums; transition: border-color 150ms ease;
}
.option-values button:hover { border-color: var(--ink); }
.option-values button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pdp-actions { margin-top: 32px; }
.form-error { color: var(--error); font-size: 14px; margin-top: 10px; min-height: 1.4em; }
.pdp-facts { margin-top: 28px; display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.pdp-facts li { list-style: none; display: flex; gap: 12px; }
.pdp-facts li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--ink-2); margin-top: 9px; flex: none; }
.accordion { margin-top: 36px; border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  min-height: 56px; font-size: 14px; font-weight: 500; letter-spacing: 0.02em;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 20px; font-weight: 300; color: var(--muted); transition: transform 200ms ease; }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion .acc-body { padding: 0 0 22px; color: var(--ink-2); font-size: 14px; line-height: 1.75; }
.accordion .acc-body p + p { margin-top: 10px; }
@media (max-width: 900px) {
  .pdp { grid-template-columns: 1fr; padding-bottom: 72px; }
  .pdp-info { position: static; }
}
.state { padding: 120px 0; text-align: center; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: clamp(72px, 9vw, 128px); }
.footer-in { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-block: 64px 56px; }
.footer-brand .logo { font-size: 20px; padding-left: 0; }
.footer-brand p { margin-top: 16px; font-size: 14px; color: var(--muted); max-width: 26em; line-height: 1.65; }
.footer-col h2 { font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.footer-col a { display: block; font-size: 14px; color: var(--ink-2); padding: 5px 0; transition: color 150ms ease; }
.footer-col a:hover { color: var(--ink); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 22px 28px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .footer-in { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Simple centred pages (thank you, 404) ---------- */
.center-page { min-height: 62vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 96px var(--gutter); }
.center-page .lede { margin: 20px auto 36px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
