/* ==========================================================================
   Balena Tiles — corporate site
   Neutral surfaces, editorial type, photography carries the colour.
   Brand blue and red come from the logo and are used only where they mean
   something; the tile is the product, the interface is not.
   ========================================================================== */

/* ---------- tokens ------------------------------------------------------ */
:root {
  --warm-white: #fbfaf8;
  --ivory: #f5f2ed;
  --limestone: #ebe6dd;
  --travertine: #ddd4c7;
  --concrete: #8b857c;

  --stone: #5a554d;
  --charcoal: #2e2c28;
  --ink: #171613;

  --blue: #2a3b8f;
  --red: #be202e;
  --bronze: #a3874f;

  --line: #e2ddd4;
  --line-strong: #cec7bb;

  --pad: clamp(20px, 5vw, 72px);
  --max: 1360px;
  --gap: clamp(16px, 2.4vw, 32px);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman",
    serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 74px;
}

@media (max-width: 900px) {
  :root { --header-h: 62px; }
}

/* ---------- reset ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* height:auto matters — the width/height attributes every <img> carries (for
   layout stability) otherwise win over aspect-ratio and stretch the image. */
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.08; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- type -------------------------------------------------------- */
.label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--concrete);
  margin: 0 0 18px;
}
.label.on-dark { color: rgba(255, 255, 255, 0.62); }

.display {
  font-family: var(--serif);
  font-weight: 300;
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  letter-spacing: -0.01em;
  line-height: 1.02;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  color: var(--ink);
}
.display.xl { font-size: clamp(2.6rem, 7.2vw, 5.4rem); }
.display.sm { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.display.on-dark { color: #fff; }

.lede {
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  line-height: 1.7;
  color: var(--stone);
  max-width: 62ch;
}
.lede.on-dark { color: rgba(255, 255, 255, 0.76); }

.small { font-size: 0.9rem; line-height: 1.6; color: var(--stone); }

/* ---------- layout ------------------------------------------------------ */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(64px, 9vw, 132px); }
.section.tight { padding-block: clamp(48px, 6vw, 88px); }
.section.ivory { background: var(--ivory); }
.section.limestone { background: var(--limestone); }
.section.dark { background: var(--ink); color: #fff; }

.head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 56px); }
.head .display { margin-bottom: 18px; }

.head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.head-row .head { margin-bottom: 0; }

/* ---------- buttons ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 14px 30px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease);
}
.btn:hover { background: var(--blue); border-color: var(--blue); }

.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.btn.on-dark { background: #fff; color: var(--ink); border-color: #fff; }
.btn.on-dark:hover { background: var(--bronze); border-color: var(--bronze); color: #fff; }

.btn.ghost.on-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
}
.btn.ghost.on-dark:hover { background: #fff; color: var(--ink); border-color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.25s var(--ease), gap 0.25s var(--ease);
}
.link:hover { border-color: var(--ink); gap: 13px; }
.link.on-dark { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.link.on-dark:hover { border-color: #fff; }
.link .arw { transition: transform 0.25s var(--ease); }
.link:hover .arw { transform: translateX(3px); }

/* ==========================================================================
   Header
   ========================================================================== */
.hdr {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.hdr-in {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 30px; width: auto; transition: opacity 0.3s var(--ease); }
.brand .lw { display: block; }
.brand .ld { display: none; }

/* over the hero the header is transparent and the white logo is used */
.hdr.solid { background: rgba(251, 250, 248, 0.94); backdrop-filter: blur(12px); border-bottom-color: var(--line); }
.hdr.solid .brand .lw { display: none; }
.hdr.solid .brand .ld { display: block; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav > li { position: relative; }

.nav a, .nav .navbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 14px;
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #fff;
  background: none;
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s var(--ease);
}
.hdr.solid .nav a, .hdr.solid .nav .navbtn { color: var(--charcoal); }
.nav a:hover, .nav .navbtn:hover { opacity: 0.62; }

.nav .caret { width: 9px; height: 9px; transition: transform 0.3s var(--ease); }
.nav li.open .caret { transform: rotate(180deg); }

.nav-cta {
  margin-left: 12px;
  height: 44px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 500;
  transition: all 0.3s var(--ease);
}
.nav-cta:hover { background: #fff; color: var(--ink); }
.hdr.solid .nav-cta { border-color: var(--ink); color: var(--ink); }
.hdr.solid .nav-cta:hover { background: var(--ink); color: #fff; }

/* mega menu ---------------------------------------------------------- */
.mega {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translate(-50%, -8px);
  min-width: 560px;
  background: var(--warm-white);
  border: 1px solid var(--line);
  padding: 30px 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 40px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
    visibility 0.25s;
  box-shadow: 0 24px 60px rgba(23, 22, 19, 0.11);
}
.nav li.open .mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.mega a {
  color: var(--charcoal);
  height: 42px;
  padding: 0;
  font-weight: 400;
  border-bottom: 1px solid transparent;
}
.mega a:hover { opacity: 1; border-bottom-color: var(--line-strong); }
.mega .mega-label {
  grid-column: 1 / -1;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--concrete);
  margin-bottom: 8px;
}

/* mobile ------------------------------------------------------------- */
.burger {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #fff;
  position: relative;
  transition: background 0.3s var(--ease);
}
.burger span::before, .burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 1.5px;
  background: inherit;
  transition: transform 0.3s var(--ease);
}
.burger span::before { top: -7px; }
.burger span::after { top: 7px; }
.hdr.solid .burger span { background: var(--charcoal); }

.drawer {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: var(--warm-white);
  transform: translateX(100%);
  transition: transform 0.42s var(--ease);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.drawer.open { transform: translateX(0); }
.drawer-top {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--pad);
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.drawer-top img { height: 28px; width: auto; }
.drawer-close {
  width: 46px;
  height: 46px;
  background: none;
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--charcoal);
}
.drawer-body { padding: 22px var(--pad) 48px; }
.drawer-body a {
  display: flex;
  align-items: center;
  min-height: 56px;
  font-size: 1.28rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.drawer-body .sub {
  font-size: 0.98rem;
  min-height: 46px;
  padding-left: 16px;
  color: var(--stone);
  border-bottom: 1px solid var(--line);
}
.drawer-body .grp-label {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--concrete);
  margin: 26px 0 6px;
}
.drawer-body .ai {
  color: var(--blue);
  font-weight: 500;
}
.drawer-cta { margin-top: 28px; display: grid; gap: 12px; }
.drawer-cta .btn { width: 100%; }

@media (max-width: 1080px) {
  .nav, .nav-cta { display: none; }
  .burger { display: flex; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgba(12, 11, 9, 0.78) 0%,
    rgba(12, 11, 9, 0.44) 38%,
    rgba(12, 11, 9, 0.12) 68%,
    rgba(12, 11, 9, 0.3) 100%
  );
}
.hero-in { width: 100%; padding-block: clamp(40px, 7vw, 92px); }
.hero .display { max-width: 15ch; margin-bottom: 22px; }
.hero .lede { color: rgba(255, 255, 255, 0.82); max-width: 46ch; }
.hero .btn-row { align-items: center; }
.hero-tertiary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.34);
}
.hero-tertiary:hover { border-color: #fff; color: #fff; }

@media (min-width: 900px) {
  .hero { min-height: 88vh; }
}
@media (max-width: 899px) {
  .hero { min-height: 60vh; padding-top: var(--header-h); }
  .hero-media img { object-position: 58% 46%; }
}

/* ==========================================================================
   Page hero — the compact banner every page other than the homepage uses
   ========================================================================== */
.page-hero {
  position: relative;
  color: #fff;
  isolation: isolate;
  padding-top: calc(var(--header-h) + clamp(44px, 6vw, 88px));
  padding-bottom: clamp(44px, 6vw, 88px);
  background: var(--ink);
}
.page-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(12, 11, 9, 0.84), rgba(12, 11, 9, 0.44));
}
.page-hero .display { max-width: 20ch; }
.page-hero .lede { color: rgba(255, 255, 255, 0.78); margin-top: 18px; }

.crumb {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 16px;
}
.crumb a { border-bottom: 1px solid rgba(255, 255, 255, 0.3); }
.crumb a:hover { border-color: #fff; color: #fff; }

.note-demo {
  background: var(--limestone);
  border-left: 2px solid var(--bronze);
  padding: 18px 22px;
  font-size: 0.88rem;
  color: var(--stone);
  margin-bottom: clamp(32px, 4vw, 52px);
}
.note-demo strong { color: var(--ink); }

/* ==========================================================================
   Intro / stats
   ========================================================================== */
.intro-grid {
  display: grid;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
@media (min-width: 900px) {
  .intro-grid { grid-template-columns: 1.05fr 0.95fr; }
}
.intro-figure { position: relative; }
.intro-figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-top: 44px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
.stat .n {
  font-family: var(--serif);
  /* Cormorant defaults to old-style figures, which turn "10" into "IO" */
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  line-height: 1;
  color: var(--ink);
  display: block;
}
.stat .t {
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--concrete);
  margin-top: 10px;
  display: block;
}

/* ==========================================================================
   Collections
   ========================================================================== */
.coll-grid { display: grid; gap: var(--gap); }
@media (min-width: 760px) { .coll-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) {
  .coll-grid { grid-template-columns: repeat(6, 1fr); }
  .coll-grid > .card:nth-child(1) { grid-column: span 3; }
  .coll-grid > .card:nth-child(2) { grid-column: span 3; }
  .coll-grid > .card:nth-child(n + 3) { grid-column: span 2; }
}

.card { display: block; position: relative; }
.card-media { position: relative; overflow: hidden; background: var(--limestone); }
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform 0.9s var(--ease);
}
.card:nth-child(1) .card-media img,
.card:nth-child(2) .card-media img { aspect-ratio: 16 / 10; }
@media (hover: hover) {
  .card:hover .card-media img { transform: scale(1.045); }
}
.card-body { padding-top: 18px; }
.card-body h3 {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 1.9vw, 1.72rem);
  color: var(--ink);
  margin-bottom: 6px;
}
.card-body p { font-size: 0.92rem; color: var(--stone); margin-bottom: 12px; }
.card-body .meta {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--concrete);
  margin-bottom: 8px;
}
.card-go {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--ink);
}
.card:hover .card-go .arw { transform: translateX(4px); }
.card-go .arw { transition: transform 0.25s var(--ease); }

/* mobile: swipeable rail with a hint of the next card */
.rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* without this the snap point sits at the scrollport edge and the leading
     padding is scrolled away, pushing the first card off the text margin */
  scroll-padding-inline: var(--pad);
  -webkit-overflow-scrolling: touch;
  padding-inline: var(--pad);
  margin-inline: calc(var(--pad) * -1);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex: 0 0 84vw; scroll-snap-align: start; }
@media (min-width: 760px) {
  .rail {
    display: grid;
    overflow: visible;
    padding-inline: 0;
    margin-inline: 0;
    gap: var(--gap);
  }
  .rail > * { flex: initial; }
}

/* ==========================================================================
   Product spotlight
   ========================================================================== */
.spot { display: grid; gap: 0; align-items: stretch; }
@media (min-width: 960px) { .spot { grid-template-columns: 1.5fr 1fr; } }
.spot-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.spot-info {
  background: var(--ink);
  color: #fff;
  padding: clamp(32px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.spot-info .display { color: #fff; margin-bottom: 8px; }
.spot-size {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 20px;
}
.spot-info p { color: rgba(255, 255, 255, 0.74); font-size: 0.98rem; }
.spot-swatch {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 30px 0 8px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.spot-swatch img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  flex: 0 0 auto;
  /* a near-white tile needs an edge or it dissolves into the dark panel */
  outline: 1px solid rgba(255, 255, 255, 0.22);
  outline-offset: -1px;
}
.spot-swatch .sw-t { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.spot-swatch .sw-c { font-size: 0.95rem; color: #fff; margin-top: 3px; }

/* ==========================================================================
   Shop by space — asymmetric editorial grid
   ========================================================================== */
.space-grid { display: grid; gap: var(--gap); }
@media (min-width: 860px) {
  .space-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 232px;
  }
  .space-grid > *:nth-child(1) { grid-column: span 2; grid-row: span 2; }
  .space-grid > *:nth-child(2) { grid-column: span 2; grid-row: span 1; }
  .space-grid > *:nth-child(3) { grid-column: span 1; grid-row: span 1; }
  .space-grid > *:nth-child(4) { grid-column: span 1; grid-row: span 1; }
  .space-grid > *:nth-child(5) { grid-column: span 4; grid-row: span 1; }
}

.tile-link {
  position: relative;
  overflow: hidden;
  display: block;
  min-height: 210px;
  color: #fff;
  isolation: isolate;
}
.tile-link img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.9s var(--ease);
}
/* several of these rooms are bright, so the scrim has to carry the text on its
   own rather than relying on the photograph being dark */
.tile-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    to top,
    rgba(12, 11, 9, 0.86) 0%,
    rgba(12, 11, 9, 0.62) 26%,
    rgba(12, 11, 9, 0.24) 58%,
    rgba(12, 11, 9, 0.02) 88%
  );
}
@media (hover: hover) { .tile-link:hover img { transform: scale(1.05); } }
.tile-link .tl-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: clamp(20px, 2.4vw, 30px);
}
.tile-link h3 {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  margin-bottom: 4px;
}
.tile-link p { font-size: 0.88rem; color: rgba(255, 255, 255, 0.8); max-width: 40ch; }

/* ==========================================================================
   Shop by style
   ========================================================================== */
.style-grid { display: grid; gap: var(--gap); }
@media (min-width: 700px) { .style-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .style-grid { grid-template-columns: repeat(5, 1fr); } }
.style-card .card-media img { aspect-ratio: 3 / 4; }

/* ==========================================================================
   AI Tile Finder — the one section allowed a different register
   ========================================================================== */
.ai-hd { max-width: 780px; margin-bottom: clamp(36px, 4vw, 60px); }
.ai-cn {
  font-family: var(--sans);
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 14px;
}

.flow {
  display: grid;
  gap: 10px;
  margin: 0 0 clamp(40px, 5vw, 64px);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 780px) { .flow { grid-template-columns: repeat(4, 1fr); } }
.flow-step {
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 22px 20px;
  position: relative;
}
.flow-step .n {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--bronze);
  display: block;
  margin-bottom: 10px;
}
.flow-step .s {
  font-family: var(--serif);
  font-size: 1.32rem;
  color: #fff;
  line-height: 1.15;
}

.ai-demo { display: grid; gap: 0; }
@media (min-width: 940px) { .ai-demo { grid-template-columns: 1.25fr 1fr; } }
.ai-demo-media { position: relative; min-height: 300px; background: #000; }
.ai-demo-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

.panel {
  background: var(--warm-white);
  color: var(--charcoal);
  padding: clamp(26px, 3vw, 40px);
}
.panel h3 {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 14px;
}
.panel .grp + .grp { margin-top: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  background: transparent;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.22s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.chip .tick { opacity: 0; transition: opacity 0.2s var(--ease); }
.chip[aria-pressed="true"] .tick { opacity: 1; }

.matches {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.matches .mt {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--concrete);
  margin-bottom: 16px;
}
.match-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.match {
  text-align: left;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.match img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.match .c {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--stone);
  margin-top: 8px;
  display: block;
  word-break: break-word;
}
.match .s { font-size: 0.68rem; color: var(--concrete); display: block; }
.match-row.swap .match { opacity: 0; transform: translateY(6px); }

/* ==========================================================================
   Visualiser — before / after
   ========================================================================== */
.ba {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  cursor: ew-resize;
  user-select: none;
  background: var(--limestone);
}
.ba img { width: 100%; display: block; pointer-events: none; }
.ba .after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0 0 0 var(--split, 50%));
}
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split, 50%);
  width: 2px;
  background: rgba(255, 255, 255, 0.92);
  transform: translateX(-1px);
  pointer-events: none;
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.34);
}
.ba-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.ba-tag {
  position: absolute;
  top: 16px;
  padding: 7px 14px;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(12, 11, 9, 0.62);
  color: #fff;
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.ba-tag.l { left: 16px; }
.ba-tag.r { right: 16px; }
.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
}

.vis-grid { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (min-width: 1000px) { .vis-grid { grid-template-columns: 1.35fr 1fr; } }

.spec-list { display: grid; gap: 0; margin-top: 28px; border-top: 1px solid var(--line); }
.spec-list.on-dark { border-color: rgba(255, 255, 255, 0.16); }
.spec {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.spec-list.on-dark .spec { border-color: rgba(255, 255, 255, 0.16); }
.spec .k { color: var(--concrete); }
.spec-list.on-dark .spec .k { color: rgba(255, 255, 255, 0.5); }
.spec .v { color: var(--ink); font-weight: 500; text-align: right; }
.spec-list.on-dark .spec .v { color: #fff; }

.trust {
  margin-top: 26px;
  padding: 20px 22px;
  background: var(--ivory);
  border-left: 2px solid var(--blue);
  font-size: 0.92rem;
  color: var(--stone);
}
.trust strong { color: var(--ink); font-weight: 600; display: block; margin-bottom: 4px; }
.trust.on-dark {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border-left-color: var(--bronze);
}
.trust.on-dark strong { color: #fff; }

.why3 { display: grid; gap: var(--gap); margin-top: clamp(40px, 5vw, 68px); }
@media (min-width: 760px) { .why3 { grid-template-columns: repeat(3, 1fr); } }
.why3 .w {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.why3 .w h3 { font-family: var(--serif); font-size: 1.4rem; color: #fff; margin-bottom: 8px; }
.why3 .w p { font-size: 0.92rem; color: rgba(255, 255, 255, 0.66); }

/* ==========================================================================
   Material detail — horizontal editorial gallery
   ========================================================================== */
.detail-rail {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--pad);
  padding-inline: var(--pad);
  margin-inline: calc(var(--pad) * -1);
  padding-bottom: 8px;
  scrollbar-width: none;
}
.detail-rail::-webkit-scrollbar { display: none; }
.detail-rail figure { flex: 0 0 min(74vw, 380px); margin: 0; scroll-snap-align: center; }
.detail-rail img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.detail-rail figcaption {
  margin-top: 14px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--concrete);
}
.detail-rail figcaption b {
  display: block;
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: 3px;
}

/* ==========================================================================
   Projects
   ========================================================================== */
.proj-grid { display: grid; gap: var(--gap); }
@media (min-width: 700px) { .proj-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .proj-grid { grid-template-columns: repeat(3, 1fr); } }
.proj figure { margin: 0; overflow: hidden; }
.proj img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.9s var(--ease); }
@media (hover: hover) { .proj:hover img { transform: scale(1.04); } }
.proj .cat {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--concrete);
  margin: 14px 0 4px;
}
.proj .nm { font-size: 1.02rem; color: var(--ink); }

/* ==========================================================================
   Designer selection 2x2
   ========================================================================== */
.ds-grid { display: grid; gap: var(--gap); }
@media (min-width: 700px) { .ds-grid { grid-template-columns: repeat(2, 1fr); } }
.ds .card-media img { aspect-ratio: 1; }

/* ==========================================================================
   Why Balena pillars
   ========================================================================== */
.pillars { display: grid; gap: clamp(28px, 3vw, 44px); }
@media (min-width: 700px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .pillars { grid-template-columns: repeat(4, 1fr); } }
.pillar { padding-top: 24px; border-top: 1px solid var(--line-strong); }
.pillar h3 {
  font-family: var(--serif);
  font-size: 1.44rem;
  color: var(--ink);
  margin-bottom: 10px;
}
.pillar p { font-size: 0.93rem; color: var(--stone); }

/* ==========================================================================
   Showrooms
   ========================================================================== */
.sr-state {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--concrete);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-strong);
  margin: 44px 0 0;
}
.sr-state:first-of-type { margin-top: 0; }
.sr-grid { display: grid; gap: 0; }
@media (min-width: 760px) { .sr-grid { grid-template-columns: repeat(2, 1fr); column-gap: var(--gap); } }
@media (min-width: 1160px) { .sr-grid { grid-template-columns: repeat(3, 1fr); } }
.sr {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.sr .op {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--concrete);
  margin-bottom: 6px;
}
.sr h3 { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); margin-bottom: 10px; }
.sr address { font-style: normal; font-size: 0.9rem; color: var(--stone); margin-bottom: 14px; }
.sr .sr-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.sr .sr-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  font-size: 0.82rem;
  transition: all 0.25s var(--ease);
}
.sr .sr-links a:hover { border-color: var(--ink); background: var(--ink); color: #fff; }

/* ==========================================================================
   CTA bands
   ========================================================================== */
.band {
  position: relative;
  color: #fff;
  isolation: isolate;
  padding-block: clamp(72px, 10vw, 148px);
}
.band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to right, rgba(12, 11, 9, 0.8), rgba(12, 11, 9, 0.42));
}
.band .display { max-width: 18ch; }

/* ==========================================================================
   Inspiration
   ========================================================================== */
.insp-grid { display: grid; gap: var(--gap); }
@media (min-width: 700px) { .insp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .insp-grid { grid-template-columns: repeat(4, 1fr); } }

/* ==========================================================================
   Footer
   ========================================================================== */
.ftr { background: var(--ink); color: rgba(255, 255, 255, 0.66); padding-block: clamp(56px, 7vw, 88px) 0; }
.ftr-grid { display: grid; gap: clamp(30px, 4vw, 48px); }
@media (min-width: 700px) { .ftr-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .ftr-grid { grid-template-columns: 1.5fr repeat(4, 1fr); } }
.ftr h4 {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 18px;
}
.ftr li a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.25s var(--ease);
}
.ftr li a:hover { color: #fff; }
.ftr-brand img { height: 30px; width: auto; margin-bottom: 20px; }
.ftr-brand p { font-size: 0.9rem; max-width: 34ch; }
.ftr-social { display: flex; gap: 10px; margin-top: 22px; }
.ftr-social a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.25s var(--ease);
}
.ftr-social a { color: rgba(255, 255, 255, 0.72); }
.ftr-social a:hover { background: #fff; border-color: #fff; color: var(--ink); }
.ftr-social svg { width: 19px; height: 19px; display: block; }
.ftr-legal {
  margin-top: clamp(40px, 5vw, 64px);
  padding: 26px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.42);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  justify-content: space-between;
}

/* floating WhatsApp — the real sales channel for this business */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25d366;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s var(--ease);
}
.wa-float:hover { transform: scale(1.06); }
.wa-float img { width: 30px; height: 30px; }

/* ==========================================================================
   Motion — reveal on scroll, and nothing at all if the visitor asked for it
   ========================================================================== */
.rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .rv { opacity: 1; transform: none; }
}
