/* ============================================================
   FORMA STUDIO — design system
   Editorial contrast: warm ivory base, obsidian statements.
   ============================================================ */

:root {
  --obsidian: #121212;
  --ivory: #F5F2EC;
  --stone: #B8B2A7;
  --bronze: #8A7E72;
  --white: #FFFFFF;
  --paper: #FAF8F3;
  --line: #E2DDD2;
  --line-dark: #2E2C28;
  --ink-soft: #5F5A50;
  --ink-mute: #8C8678;

  --font: "Montserrat", "Avenir Next", "Noto Sans", Arial, sans-serif;

  --track-wide: 0.32em;
  --track-label: 0.18em;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-swift: cubic-bezier(0.65, 0, 0.35, 1);

  --gutter: clamp(20px, 6vw, 96px);
  --maxw: 1480px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--ivory);
  color: var(--obsidian);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

img { display: block; max-width: 100%; }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

::selection { background: var(--obsidian); color: var(--ivory); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- typography ---------- */

.kicker {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--bronze);
}

.display {
  font-size: clamp(44px, 7.4vw, 116px);
  line-height: 1.02;
  font-weight: 300;
  letter-spacing: -0.025em;
}

.h2 {
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.08;
  font-weight: 300;
  letter-spacing: -0.02em;
}

.lede { font-size: clamp(15px, 1.2vw, 18px); line-height: 1.75; color: var(--ink-soft); max-width: 540px; }

/* ---------- buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 34px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--obsidian);
  color: var(--obsidian);
  background: transparent;
  overflow: hidden;
  transition: color 0.45s var(--ease-out);
  z-index: 0;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--obsidian);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--ease-out);
  z-index: -1;
}

.btn:hover { color: var(--ivory); }
.btn:hover::before { transform: scaleY(1); }

.btn.solid { background: var(--obsidian); color: var(--ivory); }
.btn.solid::before { background: var(--bronze); }
.btn.solid:hover { border-color: var(--bronze); }

.btn.ghost-light { border-color: var(--ivory); color: var(--ivory); }
.btn.ghost-light::before { background: var(--ivory); }
.btn.ghost-light:hover { color: var(--obsidian); }

.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.45; pointer-events: none; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--obsidian);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--stone);
  transition: border-color 0.3s;
}
.text-link:hover { border-color: var(--obsidian); }

/* ---------- loader ---------- */

#loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--obsidian);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.8s var(--ease-swift);
}
#loader.done { transform: translateY(-100%); }
#loader .loader-mark {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 400;
  letter-spacing: 0.5em;
  margin-left: 0.5em;
  color: var(--ivory);
}
#loader .loader-mark span {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px);
  animation: loaderUp 0.7s var(--ease-out) forwards;
}
@keyframes loaderUp { to { opacity: 1; transform: none; } }

/* ---------- header ---------- */

#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s, box-shadow 0.4s, transform 0.4s;
}
#header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
  transition: padding 0.4s var(--ease-out);
}
#header.scrolled {
  background: rgba(245, 242, 236, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
#header.scrolled .bar { padding-top: 13px; padding-bottom: 13px; }

.logo-link { display: flex; align-items: center; }
.logo-link img { height: 58px; width: auto; transition: height 0.4s var(--ease-out); }
#header.scrolled .logo-link img { height: 44px; }

.nav-desktop { display: flex; align-items: center; gap: 36px; }
.nav-desktop a {
  position: relative;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--obsidian);
  text-decoration: none;
  padding: 6px 0;
}
.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--obsidian);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.nav-desktop a:hover::after { transform: scaleX(1); transform-origin: left; }

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  padding: 6px 2px;
}
.cart-btn svg { width: 18px; height: 18px; }
.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  box-sizing: border-box;
  padding: 1px 5px 0;
  border-radius: 10px;
  background: var(--obsidian);
  color: var(--ivory);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  transition: transform 0.3s var(--ease-out), background 0.3s;
}
.cart-count.pulse { animation: pulse 0.5s var(--ease-out); }
@keyframes pulse {
  0% { transform: scale(1); background: var(--bronze); }
  50% { transform: scale(1.45); background: var(--bronze); }
  100% { transform: scale(1); }
}

.bar-actions { display: flex; align-items: center; gap: 20px; }
.cart-mobile { position: relative; display: none; align-items: center; justify-content: center; padding: 6px; color: var(--obsidian); }
.cart-mobile svg { width: 24px; height: 24px; }
.cart-mobile .cart-count { position: absolute; top: -2px; right: -6px; }

.menu-btn { display: none; }

/* mobile menu */
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--obsidian);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--gutter);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
#mobile-menu.open { opacity: 1; pointer-events: auto; }
#mobile-menu a {
  color: var(--ivory);
  text-decoration: none;
  font-size: clamp(34px, 9vw, 52px);
  font-weight: 300;
  letter-spacing: -0.01em;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-dark);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
#mobile-menu.open a { opacity: 1; transform: none; }
#mobile-menu.open a:nth-child(2) { transition-delay: 0.06s; }
#mobile-menu.open a:nth-child(3) { transition-delay: 0.12s; }
#mobile-menu.open a:nth-child(4) { transition-delay: 0.18s; }

/* ---------- hero ---------- */

#hero {
  position: relative;
  padding-top: clamp(140px, 18vh, 200px);
  padding-bottom: clamp(48px, 7vh, 90px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.hero-copy .kicker { margin-bottom: 26px; }
.hero-copy .display .line { display: block; overflow: hidden; }
.hero-copy .display .line span {
  display: block;
  transform: translateY(110%);
  animation: lineUp 1s var(--ease-out) forwards;
}
.hero-copy .display .line:nth-child(2) span { animation-delay: 0.12s; }
@keyframes lineUp { to { transform: none; } }
.hero-copy .lede { margin-top: 30px; }
.hero-actions { display: flex; align-items: center; gap: 32px; margin-top: 42px; flex-wrap: wrap; }

/* full-width hero banner with the copy overlaid on the left.
   The banner is locked to the hero photo's aspect ratio so the whole image
   shows with no crop — clean ivory on the left for the copy, products on the
   right. (Keep this ratio in sync with assets/products/hero-composition.png.) */
.hero-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 2492 / 941;
  min-height: 440px;
  max-height: 88vh;
  overflow: hidden;
  background: var(--paper);
}
.hero-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  transition: transform 1.6s var(--ease-out);
}
#hero.in .hero-banner img { transform: scale(1); }
/* soft legibility scrim — light, since the copy now sits over the photo's
   genuinely empty ivory left third */
.hero-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg,
    rgba(245,242,236,0.85) 0%,
    rgba(245,242,236,0.45) 22%,
    rgba(245,242,236,0) 42%);
  pointer-events: none;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
}
.hero-overlay .hero-copy { max-width: 460px; }
/* hero headline sized so the whole copy block fits inside the banner height */
.hero-copy .display { font-size: clamp(40px, 5vw, 74px); }

.hero-badge {
  position: absolute;
  bottom: -40px;
  right: -34px;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: var(--obsidian);
  color: var(--ivory);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-badge svg { width: 100%; height: 100%; animation: spin 18s linear infinite; }
.hero-badge svg text { font-size: 8.6px; letter-spacing: 1.7px; fill: var(--ivory); text-transform: uppercase; }
.hero-badge::after {
  content: "";
  position: absolute;
  width: 34px; height: 34px;
  border: 1px solid var(--bronze);
  transform: rotate(45deg);
}
@keyframes spin { to { transform: rotate(360deg); } }

.fade-up { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.fade-up.in { opacity: 1; transform: none; }

/* ---------- marquee ---------- */

#marquee {
  background: var(--obsidian);
  color: var(--ivory);
  overflow: hidden;
  padding: 16px 0;
  margin-top: clamp(40px, 7vh, 80px);
}
.marquee-track { display: flex; width: max-content; animation: marquee 36s linear infinite; }
#marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  white-space: nowrap;
  padding-right: 18px;
}
.marquee-track .dot { color: var(--bronze); padding-right: 18px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- collection ---------- */

#collection { padding-top: clamp(70px, 11vh, 140px); }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.section-head .kicker { margin-bottom: 16px; }
.count-tag { font-size: 12px; color: var(--ink-mute); letter-spacing: 0.08em; }

.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}
.pill {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  transition: all 0.3s var(--ease-out);
}
.pill:hover { border-color: var(--obsidian); color: var(--obsidian); }
.pill.active { background: var(--obsidian); border-color: var(--obsidian); color: var(--ivory); }

.sort-box { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sort-box label { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); }
.sort-box select {
  border: 1px solid var(--line);
  background: transparent;
  padding: 9px 12px;
  font-size: 12px;
  border-radius: 999px;
  outline: none;
}

#grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 44px) clamp(16px, 2.4vw, 36px);
}

/* one or two pieces: centre them with a sensible max width instead of
   leaving a large empty column on the right */
#grid.few {
  grid-template-columns: repeat(auto-fit, minmax(260px, 360px));
  justify-content: center;
}

.card { cursor: pointer; }
.card .frame {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  transition: border-color 0.4s;
}
.card:hover .frame { border-color: var(--stone); }
.card .frame img, .card .frame .ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.card:hover .frame img { transform: scale(1.05); }
.card .view-tag {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 12px);
  background: var(--obsidian);
  color: var(--ivory);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  padding: 10px 20px;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.card:hover .view-tag { opacity: 1; transform: translate(-50%, 0); }

.card .meta { padding: 16px 2px 0; }
.card .meta .coll { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 6px; }
.card .meta .row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card .meta h3 { font-size: 15px; font-weight: 500; letter-spacing: 0.04em; }
.card .meta .price { font-size: 13px; color: var(--bronze); font-weight: 500; white-space: nowrap; }
.card .dots { display: flex; gap: 5px; margin-top: 10px; }
.dot-finish {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(18, 18, 18, 0.18);
}

.grid-empty { grid-column: 1 / -1; text-align: center; padding: 80px 0; color: var(--ink-mute); }

/* placeholder artwork (used until product photography drops in) */
.ph { display: flex; align-items: center; justify-content: center; background: var(--paper); }
.ph svg { width: 52%; height: 62%; }

/* ---------- philosophy band ---------- */

#philosophy {
  margin-top: clamp(80px, 13vh, 160px);
  background: var(--obsidian);
  color: var(--ivory);
  padding: clamp(80px, 12vh, 150px) 0;
}
.philo-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(40px, 6vw, 100px); align-items: center; }
#philosophy .kicker { color: var(--stone); margin-bottom: 26px; }
#philosophy .h2 { color: var(--ivory); }
#philosophy .h2 em { font-style: normal; color: var(--bronze); }

.finish-board { display: grid; gap: 18px; }
.finish-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-dark);
}
.finish-row .swatch { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; border: 1px solid var(--line-dark); }
.finish-row .fname { font-size: 12px; letter-spacing: var(--track-label); text-transform: uppercase; }
.finish-row .fhex { margin-left: auto; font-size: 11px; color: var(--ink-mute); letter-spacing: 0.08em; }

.philo-stats { display: flex; gap: clamp(30px, 5vw, 80px); margin-top: 54px; flex-wrap: wrap; }
.stat .num { font-size: clamp(34px, 3.6vw, 52px); font-weight: 300; line-height: 1; }
.stat .lbl { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--stone); margin-top: 10px; }

/* ---------- studio / about ---------- */

#studio { padding: clamp(80px, 13vh, 170px) 0 0; }
.studio-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(36px, 6vw, 110px); align-items: center; }
.studio-visual { position: relative; }
.studio-visual .frame {
  background: var(--paper);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}
.studio-visual .frame img, .studio-visual .frame .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.studio-visual .caption {
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.studio-copy .kicker { margin-bottom: 24px; }
.studio-copy .h2 { margin-bottom: 28px; }
.studio-copy p { color: var(--ink-soft); line-height: 1.85; font-size: 15.5px; max-width: 560px; }
.studio-copy p + p { margin-top: 18px; }
.studio-points { margin-top: 38px; display: grid; gap: 0; }
.studio-points .point {
  display: flex;
  gap: 20px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.studio-points .point:last-child { border-bottom: 1px solid var(--line); }
.studio-points .n { font-size: 11px; color: var(--bronze); letter-spacing: 0.15em; }
.studio-points .t { font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.studio-points .d { font-size: 13.5px; color: var(--ink-soft); margin-left: auto; max-width: 46%; }

/* ---------- contact ---------- */

#contact { padding: clamp(80px, 13vh, 170px) 0; }
.contact-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.contact-head .kicker { margin-bottom: 18px; }
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 1060px; margin: 0 auto; }
.contact-card {
  display: block;
  text-decoration: none;
  color: var(--obsidian);
  background: var(--white);
  border: 1px solid var(--line);
  padding: 40px 32px;
  text-align: center;
  transition: transform 0.45s var(--ease-out), border-color 0.45s, box-shadow 0.45s;
}
.contact-card:hover { transform: translateY(-6px); border-color: var(--stone); box-shadow: 0 18px 40px -28px rgba(18, 18, 18, 0.35); }
.contact-card svg { width: 26px; height: 26px; margin: 0 auto 18px; }
.contact-card .lbl { font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 8px; }
.contact-card .val { font-size: 13.5px; font-weight: 500; letter-spacing: 0.04em; overflow-wrap: anywhere; }

/* ---------- footer ---------- */

#footer { background: var(--obsidian); color: var(--ivory); padding: clamp(60px, 9vh, 110px) 0 36px; }
.footer-grid { display: grid; grid-template-columns: auto 1fr auto; gap: clamp(30px, 6vw, 90px); align-items: center; }
.footer-logo img { height: 110px; width: auto; }
.footer-tag { font-size: clamp(20px, 2.2vw, 30px); font-weight: 300; letter-spacing: -0.01em; color: var(--stone); }
.footer-nav { display: flex; flex-direction: column; gap: 12px; }
.footer-nav a {
  color: var(--ivory);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  opacity: 0.75;
  transition: opacity 0.3s;
}
.footer-nav a:hover { opacity: 1; }
.footer-base {
  margin-top: clamp(40px, 7vh, 70px);
  padding-top: 26px;
  border-top: 1px solid var(--line-dark);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
}

/* ---------- scrim ---------- */

#scrim {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(18, 18, 18, 0.45);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s;
}
#scrim.show { opacity: 1; pointer-events: auto; }

/* ---------- product modal ---------- */

#product-modal {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 48px);
  pointer-events: none;
}
#product-modal .sheet {
  position: relative;
  background: var(--ivory);
  width: min(1060px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  pointer-events: none;
  border: 1px solid var(--line);
}
#product-modal.open .sheet { opacity: 1; transform: none; pointer-events: auto; }

.modal-media { display: flex; flex-direction: column; background: #DED4CB; min-height: 420px; border-right: 1px solid var(--line); }
.mm-main { position: relative; flex: 1; min-height: 320px; }
.mm-main img, .mm-main .ph, .mm-thumb img, .mm-thumb .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mm-thumbs { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.mm-thumb { position: relative; width: 58px; height: 58px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); padding: 0; transition: border-color 0.3s; }
.mm-thumb:hover { border-color: var(--stone); }
.mm-thumb.active { border-color: var(--obsidian); }

/* zoom: cursor-follow magnify on hover, tap/click for a full lightbox */
.mm-main.zoomable { overflow: hidden; cursor: zoom-in; }
.mm-main.zoomable img { transition: transform 0.4s var(--ease-out); will-change: transform; }
@media (hover: hover) {
  .mm-main.zoomable.zoom img { transform: scale(2); }
}

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(18, 18, 18, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 5vw, 64px);
  opacity: 0;
  pointer-events: none;
  cursor: zoom-out;
  transition: opacity 0.35s var(--ease-out);
}
#lightbox.open { opacity: 1; pointer-events: auto; }
#lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform: scale(0.96);
  transition: transform 0.4s var(--ease-out);
}
#lightbox.open img { transform: scale(1); }
.lb-close {
  position: absolute;
  top: clamp(16px, 3vw, 30px);
  right: clamp(16px, 3vw, 30px);
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(245, 242, 236, 0.1);
  color: var(--ivory);
  transition: background 0.3s, transform 0.3s;
}
.lb-close:hover { background: rgba(245, 242, 236, 0.22); transform: rotate(90deg); }

.modal-body { padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; }
.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background 0.3s, color 0.3s, transform 0.3s;
  z-index: 2;
}
.modal-close:hover { background: var(--obsidian); color: var(--ivory); transform: rotate(90deg); }

.modal-body .coll { font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--bronze); margin-bottom: 14px; }
.modal-body h2 { font-size: clamp(26px, 2.6vw, 38px); font-weight: 400; letter-spacing: -0.01em; }
.modal-body .price { font-size: 19px; font-weight: 500; color: var(--obsidian); margin-top: 10px; }
.modal-body .story { color: var(--ink-soft); font-size: 14.5px; line-height: 1.8; margin-top: 22px; }

.spec-rows { margin-top: 26px; border-top: 1px solid var(--line); }
.spec-rows .row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.spec-rows .k { letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); font-size: 10.5px; padding-top: 2px; }

.finish-pick { margin-top: 28px; }
.finish-pick .lbl { font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-mute); }
.finish-pick .lbl strong { color: var(--obsidian); font-weight: 500; }
/* labelled colour-combo boxes */
.color-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.color-box {
  display: flex; align-items: center; gap: 12px;
  min-height: 50px;
  padding: 10px 13px;
  background: transparent;
  border: 1px solid rgba(18, 18, 18, 0.16);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease-out);
}
.color-box:hover { border-color: var(--stone); transform: translateY(-1px); }
.color-box.active { border-color: var(--obsidian); background: rgba(18, 18, 18, 0.035); }
.cb-swatch {
  width: 26px; height: 26px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(18, 18, 18, 0.22);
}
.cb-name {
  font-size: 11px; line-height: 1.3; letter-spacing: 0.03em;
  color: var(--obsidian);
}
@media (max-width: 520px) { .color-boxes { grid-template-columns: 1fr; } }

/* size selector (per-size pricing) */
.size-pick:empty { display: none; }
.size-pick { margin-top: 26px; }
.size-pick .lbl { font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-mute); }
.size-boxes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.size-box {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  min-width: 92px; padding: 10px 14px;
  background: transparent; border: 1px solid rgba(18, 18, 18, 0.16);
  text-align: left; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease-out);
}
.size-box:hover { border-color: var(--stone); transform: translateY(-1px); }
.size-box.active { border-color: var(--obsidian); background: rgba(18, 18, 18, 0.035); }
.size-box .sz-name { font-size: 12px; letter-spacing: 0.02em; color: var(--obsidian); }
.size-box .sz-price { font-size: 11px; color: var(--ink-mute); }

/* legacy single-colour swatches (kept for fallback finishes) */
.swatches { display: flex; gap: 12px; margin-top: 14px; }
.swatch-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(18, 18, 18, 0.2);
  position: relative;
  transition: transform 0.25s var(--ease-out);
}
.swatch-btn:hover { transform: scale(1.12); }
.swatch-btn.active::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid var(--obsidian);
  border-radius: 50%;
}

.buy-row { display: flex; gap: 14px; margin-top: 34px; }
.qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--obsidian);
}
.qty button { width: 46px; height: 100%; min-height: 52px; font-size: 17px; transition: background 0.25s, color 0.25s; }
.qty button:hover { background: var(--obsidian); color: var(--ivory); }
.qty .qv { min-width: 38px; text-align: center; font-size: 14px; font-weight: 500; }
.buy-row .btn { flex: 1; }
.btn.added { background: var(--bronze); border-color: var(--bronze); color: var(--ivory); }

.lead-note { margin-top: 18px; font-size: 12px; color: var(--ink-mute); letter-spacing: 0.04em; display: flex; gap: 8px; align-items: center; }
.lead-note svg { width: 14px; height: 14px; flex-shrink: 0; }

.field-note { margin: -8px 0 20px; font-size: 11.5px; color: var(--ink-mute); letter-spacing: 0.03em; line-height: 1.4; display: flex; gap: 7px; align-items: flex-start; }
.field-note svg { width: 13px; height: 13px; flex-shrink: 0; margin-top: 1px; color: var(--bronze); }

/* ---------- cart drawer ---------- */

#cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 120;
  width: min(440px, 100vw);
  background: var(--ivory);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform 0.55s var(--ease-swift);
}
#cart-drawer.open { transform: none; }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-size: 12px; font-weight: 500; letter-spacing: var(--track-wide); text-transform: uppercase; }
.drawer-close { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background 0.3s, color 0.3s; }
.drawer-close:hover { background: var(--obsidian); color: var(--ivory); }

.drawer-items { flex: 1; overflow-y: auto; padding: 10px 28px; }
.cart-item {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.cart-item .thumb {
  width: 76px; height: 90px;
  background: var(--paper);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.cart-item .thumb img, .cart-item .thumb .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cart-item .info h4 { font-size: 13.5px; font-weight: 500; letter-spacing: 0.03em; }
.cart-item .finish-line { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-mute); margin-top: 5px; }
.cart-item .finish-line .dot-finish { width: 9px; height: 9px; }
.cart-item .qty { margin-top: 12px; height: 34px; display: inline-flex; border-color: var(--line); }
.cart-item .qty button { width: 32px; min-height: 32px; font-size: 14px; }
.cart-item .right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.cart-item .line-price { font-size: 13px; font-weight: 500; }
.cart-item .rm { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); border-bottom: 1px solid transparent; transition: color 0.3s, border-color 0.3s; }
.cart-item .rm:hover { color: var(--obsidian); border-color: var(--obsidian); }

.cart-empty { text-align: center; padding: 90px 20px; }
.cart-empty svg { width: 44px; height: 44px; margin: 0 auto 22px; color: var(--stone); }
.cart-empty p { color: var(--ink-mute); font-size: 14px; margin-bottom: 26px; }

.drawer-foot { border-top: 1px solid var(--line); padding: 22px 28px 28px; background: var(--ivory); }
.free-ship { font-size: 11.5px; color: var(--ink-soft); letter-spacing: 0.04em; margin-bottom: 14px; }
.free-ship .bar { height: 2px; background: var(--line); margin-top: 9px; position: relative; overflow: hidden; }
.free-ship .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--bronze); transition: width 0.6s var(--ease-out); }
.totals-row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; font-size: 13px; color: var(--ink-soft); }
.totals-row.grand { font-size: 15px; color: var(--obsidian); font-weight: 500; padding-top: 10px; }
.drawer-foot .btn { margin-top: 16px; }

/* ---------- checkout ---------- */

#checkout {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: var(--ivory);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s;
}
#checkout.open { opacity: 1; pointer-events: auto; }

.checkout-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--ivory);
  z-index: 5;
}
.checkout-bar img { height: 30px; }
.checkout-bar button { font-size: 11px; letter-spacing: var(--track-label); text-transform: uppercase; display: flex; gap: 8px; align-items: center; }
.checkout-bar button:hover { color: var(--bronze); }

.checkout-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(36px, 6vw, 110px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(36px, 6vh, 70px) var(--gutter) 110px;
  align-items: start;
}

.steps-rail { display: flex; gap: 8px; margin-bottom: 42px; }
.step-tab {
  flex: 1;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
  transition: color 0.3s, border-color 0.3s;
}
.step-tab.active { color: var(--obsidian); border-color: var(--obsidian); }
.step-tab.done { color: var(--bronze); border-color: var(--bronze); }

.step-pane h2 { font-size: clamp(24px, 2.4vw, 34px); font-weight: 300; margin-bottom: 30px; }

.field { margin-bottom: 20px; }
.field label { display: block; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 9px; }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 15px 16px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
  border-radius: 0;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--obsidian); }
.field.error input, .field.error select { border-color: #B0463C; }
.field .err { display: none; font-size: 11px; color: #B0463C; margin-top: 6px; letter-spacing: 0.04em; }
.field.error .err { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.pane-actions { display: flex; gap: 14px; margin-top: 36px; }
.pane-actions .btn { flex: 1; }

.summary-card { background: var(--white); border: 1px solid var(--line); padding: 30px; position: sticky; top: 110px; }
.summary-card h3 { font-size: 11px; letter-spacing: var(--track-wide); text-transform: uppercase; margin-bottom: 22px; }
.sum-item { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sum-item .thumb { width: 52px; height: 62px; background: var(--paper); border: 1px solid var(--line); flex-shrink: 0; position: relative; overflow: hidden; }
.sum-item .thumb img, .sum-item .thumb .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sum-item .nm { font-size: 12.5px; font-weight: 500; }
.sum-item .fn { font-size: 11px; color: var(--ink-mute); margin-top: 3px; }
.sum-item .pr { margin-left: auto; font-size: 12.5px; white-space: nowrap; }
.sum-totals { margin-top: 18px; }

/* processing + confirmation */
.process-pane { text-align: center; padding: 60px 0; }
.spinner {
  width: 54px; height: 54px;
  border: 2px solid var(--line);
  border-top-color: var(--obsidian);
  border-radius: 50%;
  margin: 0 auto 28px;
  animation: spin 0.9s linear infinite;
}
.process-pane p { color: var(--ink-soft); font-size: 14px; letter-spacing: 0.06em; }

.confirm-pane { text-align: center; padding: 30px 0 60px; }
.check-ring {
  width: 92px; height: 92px;
  border-radius: 50%;
  border: 1px solid var(--bronze);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 34px;
  animation: ringIn 0.7s var(--ease-out);
}
.check-ring svg { width: 38px; height: 38px; color: var(--bronze); }
.check-ring svg path { stroke-dasharray: 50; stroke-dashoffset: 50; animation: draw 0.7s 0.3s var(--ease-out) forwards; }
@keyframes ringIn { from { transform: scale(0.6); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.confirm-pane h2 { font-size: clamp(28px, 3vw, 42px); font-weight: 300; }
.order-no { font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--bronze); margin-top: 16px; }
.confirm-pane .note { color: var(--ink-soft); font-size: 14px; max-width: 440px; margin: 22px auto 0; line-height: 1.8; }
.demo-tag {
  display: inline-block;
  margin-top: 26px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border: 1px dashed var(--stone);
  padding: 9px 16px;
}

/* ---------- toast ---------- */

#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 80px);
  z-index: 150;
  background: var(--obsidian);
  color: var(--ivory);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 15px 26px;
  display: flex;
  gap: 12px;
  align-items: center;
  opacity: 0;
  transition: transform 0.5s var(--ease-out), opacity 0.5s;
  pointer-events: none;
  white-space: nowrap;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }
#toast .tdot { width: 7px; height: 7px; border-radius: 50%; background: var(--bronze); }

/* ---------- responsive ---------- */

@media (max-width: 1020px) {
  #grid { grid-template-columns: repeat(2, 1fr); }
  .philo-grid, .studio-grid { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .summary-card { position: static; order: -1; }
  .footer-grid { grid-template-columns: 1fr; text-align: left; }
  .studio-points .d { max-width: 100%; margin-left: 0; }
  .studio-points .point { flex-wrap: wrap; }
}

@media (max-width: 760px) {
  .hero-banner { aspect-ratio: auto; min-height: clamp(440px, 76vh, 580px); max-height: none; }
  .hero-overlay { align-items: flex-start; padding-top: clamp(70px, 16vh, 130px); }
  .hero-overlay .hero-copy { max-width: 100%; }
  .hero-banner img { object-position: 44% center; }
  .hero-banner::after {
    background: linear-gradient(180deg,
      rgba(245,242,236,0.92) 0%,
      rgba(245,242,236,0.82) 34%,
      rgba(245,242,236,0.45) 60%,
      rgba(245,242,236,0.12) 100%);
  }
  .hero-badge { width: 96px; height: 96px; bottom: -30px; left: auto; right: -14px; }
  #hero { padding-top: 120px; }
  .nav-desktop { display: none; }
  .cart-mobile { display: inline-flex; }
  .logo-link img { height: 46px; }
  #header.scrolled .logo-link img { height: 38px; }
  .menu-btn { display: flex; flex-direction: column; gap: 5px; padding: 8px 2px; }
  .menu-btn i { display: block; width: 22px; height: 1.5px; background: var(--obsidian); transition: transform 0.35s, opacity 0.35s, background 0.35s; }
  .menu-btn.open i { background: var(--ivory); }
  .menu-btn.open i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .menu-btn.open i:nth-child(2) { opacity: 0; }
  .menu-btn.open i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  #grid { grid-template-columns: 1fr 1fr; gap: 22px 14px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .sort-box { margin-left: 0; }
  #product-modal .sheet { grid-template-columns: 1fr; max-height: 94vh; }
  .modal-media { min-height: 300px; border-right: none; border-bottom: 1px solid var(--line); }
  .contact-cards { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .card .meta h3 { font-size: 13px; }
  .card .meta .price { font-size: 12px; }
  .field input, .field select, .field textarea { font-size: 16px; }
  #cart-drawer { width: 100vw; }

  /* smooth, contained scrolling inside overlays */
  .drawer-items, #checkout, #product-modal .sheet {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  /* respect notches / home indicators */
  #mobile-menu { padding-bottom: env(safe-area-inset-bottom); }
  #toast { bottom: calc(22px + env(safe-area-inset-bottom)); }
}

/* fine-tuning for phones */
@media (max-width: 480px) {
  #hero { padding-top: 104px; }
  .hero-actions { gap: 20px; margin-top: 34px; }
  .hero-actions .btn { width: 100%; }
  .btn { padding: 16px 26px; }
  #collection { padding-top: 64px; }
  .modal-body { padding: 26px 22px 32px; }
  .modal-media { min-height: 280px; }
  .mm-thumb { width: 50px; height: 50px; }
  .philo-stats { gap: 26px 40px; margin-top: 40px; }
  .contact-card { padding: 32px 24px; }
  .checkout-bar img { height: 26px; }
  .summary-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .hero-copy .display .line span { transform: none; }
  .fade-up { opacity: 1; transform: none; }
}
