/* Rollr — Oak & Felt.
   Change the eight tokens below to change the whole site's tone. */
:root {
  --bg: #F4EFE7;
  --surface: #EAE2D6;
  --line: #DED4C4;
  --card: #FBF8F3;
  --muted: #8A7B63;
  --accent: #4A5D4E;
  --ink: #3A342C;
  --ink-soft: #6B6153;

  --radius: 8px;
  --gap: 24px;
  --maxw: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0 0 12px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: clamp(22px, 3vw, 28px); }
h3 { font-size: 18px; }
p { margin: 0 0 16px; color: var(--ink-soft); }
a { color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
#nav { display: flex; gap: 20px; }
#nav a { color: var(--ink-soft); text-decoration: none; font-size: 14px; }
#nav a:hover { color: var(--ink); }

/* Sections */
.intro { padding: 72px 0 56px; }
.intro p { max-width: 46ch; }
.section { padding: 56px 0; }
.section-alt { background: var(--surface); }

/* Buttons */
.btn {
  display: inline-block; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--accent); color: var(--bg);
  font: inherit; font-size: 15px; font-weight: 500; padding: 10px 20px;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.btn-ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }

/* The product range stays compact; detail belongs in the photo viewer. */
.section-intro { max-width: 58ch; margin-bottom: 1.5rem; }
.product-index, .gallery-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.75rem; }
.product-index a, .gallery-filters button {
  min-height: 44px; display: inline-flex; align-items: center; padding: .5rem .9rem;
  border: 1px solid var(--line); border-radius: 2rem; font: inherit; font-size: .875rem;
  color: var(--ink-soft); background: var(--card); text-decoration: none; cursor: pointer;
}
.gallery-filters button[aria-pressed="true"] { background: var(--accent); color: var(--card); border-color: var(--accent); }
.product-grid { display: flex; flex-direction: column; gap: 1.25rem; }
.product-row {
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 2.25rem; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1rem;
  scroll-margin-top: 1.5rem;
}
.product-body { padding: 1rem 1.25rem 1rem 0; min-width: 0; }
.product-body h3 { font-size: clamp(1.35rem, 2.4vw, 1.65rem); letter-spacing: -.025em; }
.product-body p { font-size: .9375rem; max-width: 50ch; line-height: 1.7; }
.product-actions { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; margin-top: 1.25rem; }
.text-link { font-size: .875rem; text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; gap: .4rem; }
.photo-empty { display: grid; place-items: center; min-height: 220px; padding: 1.5rem; background: var(--surface); color: var(--ink-soft); font-size: .875rem; text-align: center; border-radius: 9px; }
img.is-missing { visibility: hidden; }

/* Full photographs: no hard crop of tall cups or their rims. */
.product-media { min-width: 0; border-radius: 9px; overflow: hidden; background: #E5E5E2; }
.carousel-window { height: 220px; overflow: hidden; }
.carousel-track { display: flex; height: 100%; transition: transform 700ms cubic-bezier(.22,.61,.36,1); }
.photo-slide { flex: 0 0 100%; width: 100%; min-width: 0; height: 100%; border: 0; padding: 0; background: transparent; cursor: zoom-in; }
.carousel-track img { width: 100%; height: 100%; object-fit: contain; }
.carousel-caption { font-size: .75rem; line-height: 1.4; padding: .5rem .75rem 0; margin: 0; min-height: 2.6rem; color: var(--ink); text-align: center; }
.carousel-controls { display: flex; justify-content: center; align-items: center; gap: .35rem; padding: 0 .5rem .25rem; }
.carousel-arrow, .carousel-pause {
  position: static; transform: none; width: 44px; height: 44px; flex-shrink: 0; border: 0;
  border-radius: 50%; background: transparent; color: var(--ink); font: inherit; font-size: 1.5rem; cursor: pointer;
}
.carousel-pause { font-size: 1rem; }
.carousel-count { font-size: .75rem; font-variant-numeric: tabular-nums; min-width: 3rem; text-align: center; }
.carousel-arrow:hover, .carousel-pause:hover { background: var(--card); }

/* A curated first page, with product filters for the wider range. */
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem 1rem; }
.gallery-item { margin: 0; min-width: 0; }
.gallery-item > button { display: block; width: 100%; position: relative; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #E5E5E2; cursor: zoom-in; }
.gallery-item img { width: 100%; height: 230px; object-fit: contain; }
.gallery-item figcaption { font-size: .8125rem; line-height: 1.5; color: var(--ink-soft); padding: .625rem .15rem 0; }
.photo-zoom { position: absolute; bottom: .5rem; right: .5rem; background: var(--card); color: var(--ink); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.gallery-note { max-width: 78ch; font-size: .8125rem; margin-bottom: 1.5rem; }
.gallery-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.75rem; }
.gallery-footer p { font-size: .8125rem; margin: 0; }
[hidden] { display: none !important; }
button, a { -webkit-tap-highlight-color: transparent; }
button:active, .btn:active { filter: brightness(.93); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.photo-slide:focus-visible { outline-offset: -4px; }
.btn { text-decoration: none; min-height: 44px; }
@media (max-width: 900px) {
  .product-row { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 1.5rem; }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .product-row { grid-template-columns: 1fr; gap: .5rem; padding: .75rem; }
  .product-body { padding: .75rem .5rem; }
  .carousel-window { height: 230px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem .75rem; }
  .gallery-item img { height: 190px; }
  .gallery-footer { align-items: flex-start; flex-direction: column; }
  .container { padding: 0 1rem; }
  .section { padding: 2.5rem 0; }
  .product-index a, .gallery-filters button { font-size: .8125rem; }
}

/* Contact */
.contact-methods { display: flex; flex-wrap: wrap; gap: 32px; margin-bottom: 16px; }
.contact-methods a { color: var(--accent); }
.contact-note { font-size: 14px; color: var(--muted); }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 24px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }

/* Overlay */
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; }
.overlay[hidden] { display: none; }
.overlay-backdrop { position: absolute; inset: 0; background: rgba(58, 52, 44, 0.45); }
.overlay-panel {
  position: relative; background: var(--bg); border-radius: 12px;
  width: min(980px, 100%); max-height: 90vh; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(58, 52, 44, 0.25);
}
.overlay-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.overlay-head h2 { margin: 0; font-size: 17px; }
.overlay-close { background: transparent; border: 0; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-soft); padding: 4px 8px; }
.overlay-body { display: grid; grid-template-columns: 46% 1fr; gap: 24px; padding: 20px; overflow-y: auto; }
.overlay-visual { position: sticky; top: 0; align-self: start; }
/* Portrait, because every piece in the range is taller than it is wide.
   A square pane spent its height on empty air.
   `height: auto` is load-bearing: model-viewer's own stylesheet gives the
   element a fixed 150px height, and aspect-ratio is ignored unless the
   height is auto — without it the pane collapses to a letterbox strip. */
.overlay-visual img, .overlay-visual model-viewer { width: 100%; height: auto; aspect-ratio: 3 / 4; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); object-fit: cover; }

/* Fields */
.field { margin-bottom: 16px; }
.field-label { display: block; font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field.is-missing .field-label { color: #9A3B2F; }
.field.is-missing .select, .field.is-missing .input { border-color: #9A3B2F; }
.select, .input {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 5px; padding: 9px 11px;
}
.input-other { margin-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: inherit; font-size: 14px; cursor: pointer;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 20px; padding: 6px 13px;
}
.chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.tag { font-size: 11px; opacity: 0.75; }
.colours { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 6px; margin-top: 8px; }
.colour {
  display: flex; align-items: center; gap: 8px; text-align: left; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 5px; padding: 6px 8px;
}
.colour.is-on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.swatch { flex: 0 0 20px; height: 20px; border-radius: 4px; border: 1px solid var(--line); }
.swatch-none { background: var(--surface); }

/* Enquiry */
.enquiry-summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 20px 0 12px; }
.enquiry-summary pre { margin: 0; font-size: 13px; white-space: pre-wrap; word-break: break-word; color: var(--ink-soft); }
.enquiry-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.enquiry-status { font-size: 14px; color: var(--muted); margin-top: 10px; min-height: 1.4em; }

/* Native dialog keeps keyboard focus and the background out of the way. */
.lightbox { width: min(1000px, 96vw); max-width: 96vw; max-height: 94dvh; padding: 3.5rem 1rem 1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: 0 24px 80px #0005; }
.lightbox::backdrop { background: rgba(25, 27, 24, .78); }
.lightbox figure { margin: 0; }
.lightbox img { width: 100%; height: min(65dvh, 720px); object-fit: contain; }
.lightbox figcaption { text-align: center; padding: .75rem 1rem 0; font-size: .875rem; }
.lightbox-close { position: absolute; right: .75rem; top: .5rem; }
.lightbox button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 1.5rem; cursor: pointer; }
.lightbox-controls { display: flex; justify-content: center; gap: 1rem; align-items: center; margin-top: .75rem; }
.lightbox-controls span { font-size: .8125rem; font-variant-numeric: tabular-nums; }
.photo-example-note { font-size: .75rem; line-height: 1.5; margin: .75rem 0 0; }
.overlay-visual .carousel-window { height: min(42vh, 370px); }
.overlay-visual .carousel-track img { height: 100%; max-height: none; width: 100%; aspect-ratio: auto; object-fit: contain; border: 0; border-radius: 0; background: transparent; }

@media (max-width: 720px) {
  .overlay { padding: 0; }
  .overlay-panel { width: 100%; max-height: 100vh; border-radius: 0; }
  .overlay-body { grid-template-columns: 1fr; }
  .overlay-visual { position: static; }
  /* Full width on one column, the portrait pane would fill most of a phone
     screen before the customer reaches the first field. */
  .overlay-visual img, .overlay-visual model-viewer { max-height: 50vh; }
  .intro { padding: 48px 0 36px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
/* Photographed colour references accompany the approximate 3D material. */
#cfg-visual model-viewer { max-height: min(50dvh, 520px); }
.colour-photo { flex: 0 0 32px; width: 32px; height: 44px; object-fit: cover; border-radius: 4px; }
.colour-name { min-width: 0; overflow-wrap: anywhere; }
.colour-reference { display: flex; align-items: center; gap: .875rem; padding: .75rem; margin-top: 1rem; background: var(--card); border: 1px solid var(--line); border-radius: 9px; }
.colour-reference > button { flex: 0 0 72px; width: 72px; padding: 0; border: 0; border-radius: 5px; background: var(--surface); cursor: zoom-in; }
.overlay-visual .colour-reference img { width: 72px; height: 92px; max-height: none; aspect-ratio: auto; object-fit: contain; border: 0; border-radius: 5px; }
.colour-reference strong { font-size: .8125rem; font-weight: 600; }
.colour-reference p { font-size: .8125rem; line-height: 1.5; margin: .25rem 0 0; }
.colour-reference-note { font-size: .75rem; line-height: 1.5; margin: .625rem 0 0; }
