/* ===================================================================
   OUKID — Design System
   Fonts self-hosted in /fonts. Tokens per PLAN.md §2.
   =================================================================== */

/* --- Fonts --- */
@font-face {
  font-family: 'Switzer';
  src: url('/fonts/switzer-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Switzer';
  src: url('/fonts/switzer-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'General Sans';
  src: url('/fonts/generalsans-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'General Sans';
  src: url('/fonts/generalsans-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'General Sans';
  src: url('/fonts/generalsans-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrainsmono-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrainsmono-medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrainsmono-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* --- Tokens --- */
:root {
  --ink: #1B1D16;
  --olive: #606C38;
  --olive-deep: #454E29;
  --sand: #EDEDED;
  --paper: #FCFCFA;
  --line: #D8DBC9;
  --wood: #DCC7A1;
  --wood-side: #C9AE83;
  --wood-edge: #B0915F;

  --font-display: 'Switzer', 'General Sans', system-ui, sans-serif;
  --font-body: 'General Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.25rem;
  --space-6: 3.5rem;
  --space-7: 5.5rem;
  --space-8: 8rem;

  --container: 1180px;
  --radius: 3px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --corner-size: 18px;
  --corner-size-active: 12px;
  --corner-thickness: 2px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, picture, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink);
}

h1 { font-size: clamp(2.1rem, 5.4vw + 0.5rem, 4.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw + 0.5rem, 2.6rem); }
/* h1 look for headings that must be h2 in the outline */
h2.h1 { font-size: clamp(2.1rem, 5.4vw + 0.5rem, 4.25rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.15rem, 1.2vw + 0.7rem, 1.4rem); }

p { max-width: 60ch; }
p.lede { font-size: clamp(1.05rem, 0.4vw + 1rem, 1.25rem); color: var(--ink); opacity: 0.85; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
}

::selection { background: var(--olive); color: var(--sand); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

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

/* --- Mono / technical utility text --- */
.mono {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--olive-deep);
}
.eyebrow::before,
.eyebrow::after {
  content: '';
  width: 8px;
  height: 8px;
  flex: none;
}
.eyebrow::before { border-left: 2px solid var(--olive); border-bottom: 2px solid var(--olive); }
.eyebrow::after { border-right: 2px solid var(--olive); border-top: 2px solid var(--olive); }

/* --- Dimension-line divider ---
   Section breaks styled as a drawing's dimension line. Label carries real
   content (section name / short descriptor), never used purely as decoration. */
.dim-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-block: var(--space-6);
  color: var(--olive-deep);
}
.dim-divider__line {
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}
.dim-divider__label {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* --- Registration-mark frame ---
   CSS-only corner brackets, no extra markup. Used on cards/photos only. */
.frame {
  position: relative;
}
.frame::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-repeat: no-repeat;
  background-image:
    linear-gradient(var(--olive), var(--olive)), linear-gradient(var(--olive), var(--olive)),
    linear-gradient(var(--olive), var(--olive)), linear-gradient(var(--olive), var(--olive)),
    linear-gradient(var(--olive), var(--olive)), linear-gradient(var(--olive), var(--olive)),
    linear-gradient(var(--olive), var(--olive)), linear-gradient(var(--olive), var(--olive));
  background-size:
    var(--corner-size) var(--corner-thickness), var(--corner-thickness) var(--corner-size),
    var(--corner-size) var(--corner-thickness), var(--corner-thickness) var(--corner-size),
    var(--corner-size) var(--corner-thickness), var(--corner-thickness) var(--corner-size),
    var(--corner-size) var(--corner-thickness), var(--corner-thickness) var(--corner-size);
  background-position:
    top left, top left,
    top right, top right,
    bottom left, bottom left,
    bottom right, bottom right;
  transition: background-size 0.25s var(--ease);
}
.frame:hover::before,
.frame:focus-within::before {
  --corner-size: var(--corner-size-active);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.9em 1.6em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  min-height: 44px;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--olive);
  color: var(--sand);
}
.btn--primary:hover { background: var(--olive-deep); }

.btn--ghost {
  padding-inline: 0.2em;
  min-height: auto;
  color: var(--olive-deep);
  position: relative;
}
.btn--ghost .btn__underline {
  position: relative;
  padding-bottom: 2px;
  background-image: linear-gradient(var(--olive), var(--olive));
  background-repeat: no-repeat;
  background-size: 0% 1.5px;
  background-position: left bottom;
  transition: background-size 0.3s var(--ease);
}
.btn--ghost:hover .btn__underline,
.btn--ghost:focus-visible .btn__underline { background-size: 100% 1.5px; }
.btn--ghost svg { width: 1em; height: 1em; transition: transform 0.2s var(--ease); }
.btn--ghost:hover svg { transform: translateX(3px); }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  height: 76px;
  transition: height 0.25s var(--ease);
}
.site-header.is-compact .container { height: 58px; }

.brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}
.brand img { height: 34px; width: 34px; transition: height 0.25s var(--ease), width 0.25s var(--ease); }
.site-header.is-compact .brand img { height: 26px; width: 26px; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: fixed;
  inset: 0;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  padding: 96px var(--space-4) var(--space-5);
  gap: var(--space-4);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
  z-index: 1;
}
.site-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.site-nav__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.site-nav__links a {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}
.site-nav__links a[aria-current="page"] { color: var(--olive); }

.header-actions { position: relative; z-index: 2; display: flex; align-items: center; gap: var(--space-3); margin-left: auto; }
.header-actions .btn--primary { padding: 0.7em 1.2em; font-size: 0.85rem; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    inset: auto;
    flex-direction: row;
    align-items: center;
    padding: 0;
    background: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    gap: var(--space-6);
  }
  .site-nav__links { flex-direction: row; gap: var(--space-5); }
  .site-nav__links a { font-size: 0.95rem; font-weight: 500; font-family: var(--font-body); }
  .header-actions .btn--primary { padding: 0.9em 1.6em; font-size: 0.95rem; }
}

/* --- Sections & layout --- */
.section { padding-block: var(--space-7); }
.section--tight { padding-block: var(--space-6); }
.section--olive { background: var(--olive); color: var(--sand); }
.section--olive h2, .section--olive h1 { color: var(--sand); }
.section--olive .eyebrow { color: var(--sand); opacity: 0.85; }
.section--olive .eyebrow::before { border-color: var(--sand); }
.section--olive .eyebrow::after { border-color: var(--sand); }
.section--olive .spec { border-color: rgba(237, 237, 237, 0.3); }
.section--olive .spec__row { border-bottom-color: rgba(237, 237, 237, 0.3); }
.section--olive .spec dt { color: var(--sand); opacity: 0.75; }
.section--olive .spec dd { color: var(--sand); }
.section--olive .btn--ghost { color: var(--sand); }
.section--olive .btn--ghost .btn__underline { background-image: linear-gradient(var(--sand), var(--sand)); }
.section--olive .dim-divider { color: var(--sand); opacity: 0.85; }
.section--olive .dim-divider__line { background: rgba(237, 237, 237, 0.3); }
.section--olive p.lede { color: var(--sand); }
.section--sand { background: var(--sand); }
.section--tint { background: #F5F5EF; }

.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 720px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: center;
}
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: 1.05fr 0.95fr; gap: var(--space-6); }
}

/* --- Cards --- */
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 96px;
  padding: var(--space-4);
  background: var(--paper);
}
.card h3 { margin-bottom: var(--space-2); }
.card p { margin: 0; opacity: 0.85; font-size: 0.95rem; }

/* --- Trait list ---
   Unboxed alternative to .card: hairline rules instead of frames, so a
   short set of statements reads distinct from the boxed capability grid. */
.trait-list { display: flex; flex-direction: column; gap: var(--space-4); }
.trait-list__item { padding-top: var(--space-3); border-top: 1px solid var(--line); }
.trait-list__item h3 { margin-bottom: var(--space-1); }
.trait-list__item p { margin: 0; opacity: 0.85; font-size: 0.95rem; }

/* --- Hero --- */
.hero {
  padding-block: var(--space-6) var(--space-7);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; margin-top: var(--space-4); }
.hero__eyebrow { margin-bottom: var(--space-3); }
.hero h1 { margin-bottom: var(--space-3); }
.hero .lede { margin-bottom: var(--space-4); }

/* Fit-out switcher — isometric room that cycles between a retail, office
   and hospitality fit-out. The retail scene ships pre-rendered in the HTML,
   so without JS it still shows a complete, readable graphic; main.js takes
   over and adds the cycling. */
.fitout {
  background: var(--sand);
  padding: var(--space-4);
}
.fitout svg { width: 100%; height: auto; }

.fitout__tabs { display: flex; gap: 2px; margin-bottom: var(--space-3); }
.fitout__tabs button {
  flex: 1;
  position: relative;
  padding: 0.7em 0.5em;
  background: var(--paper);
  border: 0;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--olive-deep);
  transition: background 0.2s ease, color 0.2s ease;
}
.fitout__tabs button:hover { background: var(--line); }
.fitout__tabs button[aria-pressed="true"] { background: var(--olive); color: var(--paper); }
.fitout__bar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--sand);
  transform: scaleX(0);
  transform-origin: left;
}
.fitout__tabs button[aria-pressed="true"] .fitout__bar { animation: fitout-progress var(--cycle, 4s) linear forwards; }
.fitout.is-paused .fitout__bar { animation-play-state: paused !important; }
.fitout:not(.is-cycling) .fitout__bar { display: none; }
@keyframes fitout-progress { to { transform: scaleX(1); } }

.fitout .wall-l { fill: #E4E5DC; }
.fitout .wall-r { fill: #D9DBCD; }
.fitout .floor { fill: var(--paper); }
.fitout .floor-grid { stroke: var(--line); stroke-width: 0.6; }
.fitout .room-edge { stroke: var(--olive); stroke-width: 1.4; fill: none; stroke-linejoin: round; }
.fitout .box polygon { stroke: var(--olive-deep); stroke-width: 1; stroke-linejoin: round; }
.fitout .box line { stroke: var(--olive-deep); stroke-width: 0.8; }
.fitout .f-top { fill: var(--paper); }
.fitout .f-l { fill: #E6E7DE; }
.fitout .f-r { fill: #CFD2BE; }
.fitout .wood .f-top { fill: var(--wood); }
.fitout .wood .f-l { fill: var(--wood-side); }
.fitout .wood .f-r { fill: var(--wood-edge); }
.fitout .dark .f-top { fill: #4A4F3E; }
.fitout .dark .f-l { fill: #2F3327; }
.fitout .dark .f-r { fill: #3A3E30; }
.fitout .olive .f-top { fill: #7C8A4A; }
.fitout .olive .f-l { fill: var(--olive); }
.fitout .olive .f-r { fill: var(--olive-deep); }
.fitout .cord { stroke: var(--olive-deep); stroke-width: 1; }
.fitout .halo { fill: #F7DE8E; opacity: 0.22; }
.fitout .shadow { fill: var(--ink); opacity: 0.07; }

.fitout .is-entering .piece { animation: fitout-drop 0.75s cubic-bezier(0.25, 1.35, 0.5, 1) both; animation-delay: calc(var(--i) * 70ms); }
.fitout .is-entering .shadow { animation: fitout-fade 0.6s ease both; animation-delay: calc(var(--i) * 70ms + 200ms); }
.fitout .is-leaving .piece,
.fitout .is-leaving .shadow { animation: fitout-leave 0.35s ease both; animation-delay: calc(var(--i) * 25ms); }
@keyframes fitout-drop { from { opacity: 0; transform: translateY(-46px); } 40% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes fitout-fade { from { opacity: 0; } }
@keyframes fitout-leave { to { opacity: 0; transform: translateY(10px); } }

/* --- Process (How We Work) ---
   The one legitimate numbered list on the site: a real ordered process. */
.process {
  counter-reset: step;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
@media (min-width: 720px) {
  .process { grid-template-columns: repeat(4, 1fr); }
}
.process__step { counter-increment: step; }
.process__step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--olive);
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}
.process__step h3 { margin-bottom: var(--space-1); }
.process__step p { opacity: 0.85; font-size: 0.95rem; margin: 0; }

/* --- Spec block --- */
.spec {
  border: 1px solid var(--line);
  padding: var(--space-4);
}
.spec dl { display: grid; gap: var(--space-2); }
.spec .spec__row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  padding-block: var(--space-1);
  border-bottom: 1px solid var(--line);
}
.spec .spec__row:last-child { border-bottom: none; }
.spec dt { text-transform: uppercase; color: var(--olive-deep); }
.spec dd { margin: 0; text-transform: uppercase; }

/* --- Gallery --- */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery__item {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--sand);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.gallery__item:hover img,
.gallery__item:focus-visible img { transform: scale(1.04); }
.gallery__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: var(--space-4) var(--space-3) var(--space-2);
  background: linear-gradient(to top, rgba(27, 29, 22, 0.7), transparent);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease);
}
.gallery__item:hover .gallery__caption,
.gallery__item:focus-visible .gallery__caption { opacity: 1; transform: none; }
@media (hover: none) {
  .gallery__caption { opacity: 1; transform: none; }
}
.gallery__item:focus-visible { outline-offset: 3px; }
.gallery__count {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.35em 0.6em;
  background: rgba(27, 29, 22, 0.6);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.gallery__count svg { width: 12px; height: 12px; }

/* --- Lightbox --- */
.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #14160F;
  color: var(--paper);
  overflow: hidden;
  overscroll-behavior: contain;
  /* The slider handles every touch itself. Letting the browser pan
     vertically made it cancel any swipe that started slightly diagonal. */
  touch-action: none;
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { animation: lightbox-in 0.25s ease; }
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }

.lightbox__track {
  display: flex;
  height: 100%;
  will-change: transform;
}
.lightbox__track.is-animating { transition: transform 0.4s var(--ease); }
.lightbox__slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-7) var(--space-3);
}
@media (min-width: 768px) { .lightbox__slide { padding: var(--space-6) var(--space-8); } }
.lightbox__slide img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.lightbox__bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  pointer-events: none;
}
.lightbox__bar > * { pointer-events: auto; }
.lightbox__counter { opacity: 0.7; font-variant-numeric: tabular-nums; }
.lightbox__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--space-3);
  max-width: none;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.8;
}

.lightbox__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(252, 252, 250, 0.25);
  border-radius: 50%;
  background: rgba(20, 22, 16, 0.4);
  color: var(--paper);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.lightbox__btn[hidden] { display: none; }
.lightbox__btn:hover { background: var(--olive); border-color: var(--olive); }
.lightbox__btn svg { width: 18px; height: 18px; }
.lightbox__btn--prev,
.lightbox__btn--next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox__btn--prev { left: var(--space-3); }
.lightbox__btn--next { right: var(--space-3); }
@media (max-width: 767px) {
  .lightbox__btn--prev,
  .lightbox__btn--next { display: none; }
}

/* --- Shop grid --- */
.shop-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 640px) { .shop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .shop-grid { grid-template-columns: repeat(3, 1fr); } }

.product-card { background: var(--paper); }
.product-card > a { display: block; }
.product-card__media {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--sand);
}
.product-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.product-card:hover .product-card__media img { transform: scale(1.03); }
.product-card__body { padding: var(--space-3) var(--space-1) var(--space-2); }
.product-card__title { font-family: var(--font-display); font-weight: 600; font-size: 1rem; margin-bottom: 0.25em; }
.product-card__price { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.03em; color: var(--olive-deep); }
.product-card__link { display: inline-block; margin-top: var(--space-2); font-size: 0.85rem; text-decoration: underline; text-underline-offset: 3px; }
.product-card > a:hover .product-card__link { color: var(--olive); }

.teaser-tile { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--sand); }
.teaser-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.teaser-tile:hover img { transform: scale(1.03); }

/* Loading skeletons — only shown while JS fetches the Etsy listings */
html:not(.js) .is-skeleton { display: none; }
.is-skeleton .product-card__media,
.teaser-tile.is-skeleton,
.skeleton-line {
  background: linear-gradient(90deg, var(--sand) 0%, #F6F6F2 50%, var(--sand) 100%) 0 0 / 200% 100%;
  animation: skeleton 1.4s ease-in-out infinite;
}
.skeleton-line { display: block; height: 0.9em; width: 70%; margin-bottom: 0.6em; }
.skeleton-line--short { width: 30%; }
@keyframes skeleton { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.shop-fallback { display: grid; justify-items: start; gap: var(--space-3); padding-block: var(--space-4); }

/* --- Forms --- */
.form { display: grid; gap: var(--space-4); max-width: 640px; }
.field { display: grid; gap: 0.5em; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive-deep);
}
.field input,
.field select,
.field textarea {
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 0.7em 0.1em;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--ink);
  transition: border-color 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 8em; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--olive);
  outline: none;
}
.field-row { display: grid; gap: var(--space-4); }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }

.form-note { font-size: 0.85rem; opacity: 0.75; }
.form-status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
.form-status[data-state="success"] { color: var(--olive); }
.form-status[data-state="error"] { color: #8a3324; }

/* --- Contact details --- */
.details-list { display: grid; gap: var(--space-3); }
.details-list dt { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--olive-deep); }
.details-list dd { margin: 0; font-size: 1.05rem; }

/* --- CTA band --- */
.cta-band { text-align: left; }
.cta-band .cluster { margin-top: var(--space-4); }

/* --- Pull line (About) --- */
.pull-line {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 1.4vw + 0.9rem, 1.6rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  border-left: 3px solid var(--olive);
  padding-left: var(--space-4);
  max-width: 56ch;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-5);
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
@media (min-width: 720px) {
  .site-footer .container { flex-direction: row; justify-content: space-between; align-items: center; }
}
.site-footer__links { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.site-footer__links a { font-size: 0.9rem; opacity: 0.8; }
.site-footer small { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em; opacity: 0.6; }

/* --- Scroll reveal ---
   Hidden-until-scrolled only applies once `.js` confirms the script that
   drives it is actually running (set synchronously in <head>). Without
   that class — JS blocked, failed, or disabled — content is visible by
   default, so a script failure can never leave sections permanently blank. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
