/* Layout concept: a tannery's swatch book. Stone-grey pages, deep drum-green bands,
   one cognac leather accent; wide grotesque headings, style codes set like hide tags. */
:root {
  --paper: #f1f2ee;
  --surface: #ffffff;
  --tint: #e6e8e1;
  --ink: #1a1d1b;
  --muted: #565d58;
  --line: #d4d7cf;
  --hide: #8b4a1f;
  --hide-strong: #6f3a16;
  --on-hide: #ffffff;
  --band: #1f2420;
  --band-ink: #ecece6;
  --band-muted: #a9b0a8;
  --band-line: #3a413b;
  --danger: #a3261b;
  --wa: #1f7a4d;

  --f-display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.2rem + 2vw, 2.4rem);
  --step-4: clamp(2.2rem, 1.3rem + 3.6vw, 3.6rem);

  --radius: 6px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141715; --surface: #1c201d; --tint: #191d1a; --ink: #ebebe5; --muted: #a2a9a2;
    --line: #313732; --hide: #cf8a57; --hide-strong: #e09b68; --on-hide: #1a1208;
    --band: #0d0f0e; --band-ink: #ebebe5; --band-muted: #9aa19a; --band-line: #2c322d;
    --danger: #f08070; --wa: #1d8251; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #141715; --surface: #1c201d; --tint: #191d1a; --ink: #ebebe5; --muted: #a2a9a2;
  --line: #313732; --hide: #cf8a57; --hide-strong: #e09b68; --on-hide: #1a1208;
  --band: #0d0f0e; --band-ink: #ebebe5; --band-muted: #9aa19a; --band-line: #2c322d;
  --danger: #f08070; --wa: #1d8251; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--f-body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--hide); text-underline-offset: 3px; }
a:hover { color: var(--hide-strong); }
:focus-visible { outline: 3px solid var(--hide); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--f-display); font-stretch: 112%; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); font-weight: 750; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 650; font-stretch: 105%; }
p { margin: 0; }
address { font-style: normal; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

.eyebrow, .label {
  font: 500 0.75rem/1.3 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.eyebrow { color: var(--hide); }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 60ch; }
.mono, .code { font-family: var(--f-mono); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border: 2px solid var(--hide); border-radius: var(--radius);
  background: var(--hide); color: var(--on-hide); font: 650 var(--step-0)/1 var(--f-body);
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--hide-strong); border-color: var(--hide-strong); color: var(--on-hide); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: transparent; color: var(--hide); border-color: var(--hide); }
.section-dark .btn-ghost { color: var(--band-ink); border-color: var(--band-line); }
.section-dark .btn-ghost:hover { color: var(--band-ink); border-color: var(--band-ink); }
.btn-small { min-height: 40px; padding: 8px 14px; font-size: var(--step--1); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; }

/* ----------------------------------------------------------------- header */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand-name { font: 750 1.1rem/1 var(--f-display); font-stretch: 118%; letter-spacing: 0.01em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; padding: 10px 12px; font-weight: 500; font-size: 0.95rem; border-radius: var(--radius); }
.nav a:not(.btn):hover { background: var(--tint); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--hide); }
.nav .btn { margin-left: 8px; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--surface); color: var(--ink); font: 600 0.95rem var(--f-body); cursor: pointer;
  }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter-r) 16px var(--gutter);
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav .btn { margin: 12px 0 0; }
  .js-off .nav { display: flex; position: static; }
}

/* ------------------------------------------------------------------- hero */
.hero { padding-block: clamp(32px, 6vw, 72px) 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero-copy { display: grid; gap: 20px; min-width: 0; }
.hero-copy h1 { font-stretch: 118%; }
.hero-media { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--tint); aspect-ratio: 4 / 3; max-width: 100%; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; color: transparent; font-size: 0; }
.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: clamp(32px, 5vw, 56px) 0 0;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line);
}
.facts > div { padding: 18px 16px 20px 0; display: grid; gap: 6px; min-width: 0; }
.facts > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.facts dt { font: 500 0.72rem/1.3 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font: 700 var(--step-2)/1.1 var(--f-display); font-stretch: 110%; font-variant-numeric: tabular-nums; }
.facts .unit { font: 500 0.85rem var(--f-mono); color: var(--muted); }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* --------------------------------------------------------------- sections */
.section { padding-block: clamp(48px, 7vw, 96px); }
.section-tint { background: var(--tint); }
.section-dark { background: var(--band); color: var(--band-ink); }
.section-dark .eyebrow { color: var(--hide-strong); }
.section-dark .label, .section-dark .section-intro { color: var(--band-muted); }
.section-dark a:not(.btn) { color: var(--band-ink); }
.section-head { display: grid; gap: 12px; margin-bottom: clamp(28px, 4vw, 48px); max-width: 760px; }
.section-intro { font-size: var(--step-1); color: var(--muted); }

/* range */
.split { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; }
.range-card {
  display: grid; gap: 16px; align-content: start; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px);
}
.range-leather { background: var(--hide); color: var(--on-hide); border-color: var(--hide); }
.range-leather .label, .range-leather p { color: var(--on-hide); }
.range-leather .label { opacity: .8; }
.range-leather a { color: var(--on-hide); }
.tannage { list-style: none; margin: 4px 0; padding: 0; display: grid; }
.tannage a { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid currentColor; text-decoration: none; }
.tannage li:last-child a { border-bottom: 1px solid currentColor; }
.tannage strong { font: 700 var(--step-1) var(--f-display); font-stretch: 110%; }
.tannage span { font: 0.85rem var(--f-mono); opacity: .85; }
.tannage a:hover strong { text-decoration: underline; }
.goods-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.goods-grid a { display: grid; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.goods-grid small { display: block; font: 400 0.78rem var(--f-mono); color: var(--muted); }
.goods-grid a:hover span:last-child { color: var(--hide); }
.thumb { display: block; aspect-ratio: 1; max-width: 100%; background: var(--tint); border-radius: 4px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; color: transparent; font-size: 0; transition: transform .3s; }
a:hover .thumb img { transform: scale(1.04); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .goods-grid { grid-template-columns: 1fr 1fr; } }

/* OEM steps — a real sequence, so numbered */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--band-line); }
.steps li { counter-increment: step; display: grid; gap: 10px; align-content: start; padding: 24px 20px 24px 0; min-width: 0; }
.steps li + li { padding-left: 20px; border-left: 1px solid var(--band-line); }
.steps li::before { content: "Step " counter(step); font: 500 0.75rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--hide-strong); }
.steps p { color: var(--band-muted); }
.custom { margin-top: 40px; display: grid; gap: 14px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1px solid var(--band-line); border-radius: 999px; padding: 6px 14px; font-size: 0.92rem; }
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li:nth-child(n+3) { border-top: 1px solid var(--band-line); }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding-left: 0; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--band-line); }
}

/* why */
.why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.why > div { display: grid; gap: 10px; align-content: start; border-top: 2px solid var(--ink); padding-top: 18px; min-width: 0; }
.why p { color: var(--muted); }
@media (max-width: 900px) { .why { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .why { grid-template-columns: 1fr; } }

/* quality */
.quality { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.quality > div { display: grid; gap: 16px; min-width: 0; }
.quality > div p { color: var(--muted); max-width: 52ch; }
.qc { list-style: none; counter-reset: qc; margin: 0; padding: 0; display: grid; }
.qc li { counter-increment: qc; display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 500; }
.qc li:first-child { border-top: 1px solid var(--line); }
.qc li::before { content: "QC" counter(qc); font: 500 0.8rem var(--f-mono); color: var(--hide); }
.compliance { margin-top: 48px; display: grid; gap: 10px; }
.compliance p { color: var(--muted); max-width: 70ch; }
.certs { margin: 0; padding-left: 18px; }
@media (max-width: 820px) { .quality { grid-template-columns: 1fr; } }

/* downloads */
.downloads { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.downloads a { display: grid; gap: 10px; color: var(--ink); text-decoration: none; }
.downloads .thumb { aspect-ratio: 4 / 3; }
.dl-text strong { display: block; font-weight: 600; }
.dl-text small { font: 0.78rem var(--f-mono); color: var(--muted); }
.downloads a:hover strong { color: var(--hide); }
@media (max-width: 900px) { .downloads { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .downloads { grid-template-columns: 1fr 1fr; } }

/* offices */
.offices { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 0; border-top: 1px solid var(--band-line); margin-bottom: 32px; }
.office { display: grid; gap: 10px; align-content: start; padding: 24px 20px 24px 0; min-width: 0; overflow-wrap: anywhere; }
.office + .office { padding-left: 20px; border-left: 1px solid var(--band-line); }
.office address, .office p { color: var(--band-muted); }
@media (max-width: 900px) {
  .offices { grid-template-columns: 1fr 1fr; }
  .office:nth-child(3) { padding-left: 0; border-left: 0; }
  .office:nth-child(n+3) { border-top: 1px solid var(--band-line); }
}
@media (max-width: 520px) {
  .offices { grid-template-columns: 1fr; }
  .office, .office + .office { padding-left: 0; border-left: 0; }
  .office + .office { border-top: 1px solid var(--band-line); }
}

/* -------------------------------------------------------------- products */
.page-head { padding-block: clamp(28px, 5vw, 56px) 8px; }
.page-head .wrap { display: grid; gap: 16px; }
.crumbs { font: 0.85rem var(--f-mono); color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.filter { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.filter a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 0.92rem; background: var(--surface); }
.filter a:hover { border-color: var(--hide); color: var(--hide); }
.filter a[aria-current="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.cat { padding-block: clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); }
.cat-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.cat-head > div:first-child { display: grid; gap: 8px; max-width: 70ch; min-width: 0; }
.cat-head h2 a { color: var(--ink); text-decoration: none; }
.cat-head h2 a:hover { color: var(--hide); }
.cat-head p:not(.label) { color: var(--muted); }
.cat-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.product { display: grid; grid-template-rows: auto 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.product-img { display: block; width: 100%; padding: 0; border: 0; background: var(--tint); cursor: zoom-in; aspect-ratio: 1; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; color: transparent; font-size: 0; transition: transform .3s; }
.product-img:hover img { transform: scale(1.04); }
.product-body { display: grid; gap: 6px; align-content: start; padding: 14px 16px 16px; }
/* the style code, set like a stamped hide tag */
.code {
  justify-self: start; font: 500 0.8rem/1 var(--f-mono); letter-spacing: 0.06em;
  padding: 5px 8px 5px 14px; border: 1px solid var(--line); border-radius: 3px; position: relative; color: var(--ink);
}
.code::before { content: ""; position: absolute; left: 5px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: var(--hide); }
.product-name { font-weight: 600; }
.product-note { font-size: var(--step--1); color: var(--muted); }
.product .link-arrow { font-size: var(--step--1); margin-top: 4px; }
.empty { padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); max-width: 70ch; }
@media (max-width: 480px) { .products { grid-template-columns: 1fr 1fr; gap: 12px; } .product-body { padding: 12px; } }

.cta-band { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band > div { display: grid; gap: 10px; min-width: 0; }
.cta-band p { color: var(--band-muted); }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 900px); max-height: 92vh; }
.lightbox::backdrop { background: rgb(10 12 11 / .85); }
.lightbox figure { margin: 0; display: grid; gap: 10px; }
.lightbox img { max-height: 80vh; width: auto; margin-inline: auto; border-radius: var(--radius); background: var(--tint); }
.lightbox figcaption { color: #f1f1ec; font: 0.9rem var(--f-mono); text-align: center; }
.lightbox-close { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); min-height: 44px; padding: 8px 16px; border: 1px solid #f1f1ec; border-radius: var(--radius); background: transparent; color: #f1f1ec; font: 600 0.95rem var(--f-body); cursor: pointer; }

/* --------------------------------------------------------------- enquiry */
.enquiry { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.form { display: grid; gap: 28px; min-width: 0; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 16px; min-width: 0; }
legend { font: 700 var(--step-1) var(--f-display); font-stretch: 110%; margin-bottom: 4px; padding: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 0.95rem; }
.opt { font: 400 0.75rem var(--f-mono); color: var(--muted); margin-left: 4px; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
textarea { resize: vertical; min-height: 140px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--hide); outline-offset: 0; border-color: var(--hide); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 0.9rem; }
.form-alert { padding: 14px 16px; border: 1px solid var(--danger); border-radius: var(--radius); color: var(--danger); background: var(--surface); }
.check { grid-template-columns: 24px 1fr; align-items: start; column-gap: 10px; }
.check input { width: 22px; min-height: 22px; height: 22px; margin-top: 2px; accent-color: var(--hide); }
.check label { font-weight: 400; }
.check .field-error { grid-column: 2; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.picked { display: flex; gap: 14px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.picked img { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; background: var(--tint); color: transparent; font-size: 0; }
.picked .code { display: inline-block; margin-bottom: 4px; }
.enquiry-side { display: grid; gap: 16px; padding: 24px; background: var(--tint); border-radius: var(--radius); overflow-wrap: anywhere; min-width: 0; }
.enquiry-side h3 { margin-top: 8px; }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (max-width: 820px) { .enquiry { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

.prose { display: grid; gap: 14px; max-width: 68ch; }
.prose h2 { font-size: var(--step-2); margin-top: 16px; }

/* ----------------------------------------------------------------- footer */
.footer { background: var(--band); color: var(--band-muted); padding-block: 56px 24px; font-size: 0.95rem; }
.footer a { color: var(--band-ink); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid > div { display: grid; gap: 10px; align-content: start; min-width: 0; overflow-wrap: anywhere; }
.footer-brand { font: 750 1.1rem var(--f-display); font-stretch: 118%; text-transform: uppercase; color: var(--band-ink); }
.footer .label { color: var(--band-muted); }
.footer-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--band-line); font: 0.8rem var(--f-mono); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.wa-float {
  position: fixed; z-index: 30;
  right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px 0 14px;
  background: var(--wa); color: #fff; border-radius: 999px; text-decoration: none; font-weight: 650;
  box-shadow: 0 6px 20px rgb(0 0 0 / .25);
}
.wa-float:hover { color: #fff; filter: brightness(1.08); }
@media (max-width: 480px) { .wa-float span { display: none; } .wa-float { padding: 0 13px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
