/* ==========================================================================
   LAMINATES — the surface library
   The material carries the page. Type is small, set against it, and never
   competes. No cards, no borders, no shadows: a laminate face is flat by
   nature and is shown flat.
   ========================================================================== */


/* --- THE MATERIAL WALL ----------------------------------------------------
   A plane standing in a room: a lit face, a dark returning edge, a floor and
   a cast shadow. The geometry never changes. Only the skin does. */

.wall { position: relative; padding-block: 0; }

.wall__pin {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* the room */
.wall__room {
  position: absolute;
  inset: 0;
  perspective: 2200px;
  perspective-origin: 68% 46%;
}

.wall__plane {
  position: absolute;
  top: calc(var(--nav-h) + 3vh);
  right: -4%;
  width: 60%;
  height: 66%;
  transform: rotateY(-13deg);
  transform-origin: right center;
  transform-style: preserve-3d;
  overflow: hidden;
  box-shadow: -60px 0 120px rgba(0, 0, 0, 0.55);
}

/* two skins, so a material can dissolve into the next rather than cut */
.wall__skin {
  position: absolute;
  inset: -6%;
  background-size: cover;
  background-position: center;
  will-change: transform, opacity;
}
.wall__skin--next { opacity: 0; }

/* the plane's own thickness, catching the light at its leading edge */
.wall__edge {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 3px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.44), rgba(255,255,255,0.05));
}

/* the light falling across the face */
.wall__light {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.03) 34%, rgba(0,0,0,0.34) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0) 55%, rgba(0,0,0,0.5) 100%);
  mix-blend-mode: multiply;
  opacity: 0.92;
}

/* the floor the plane stands on */
/* the floor meets the plane exactly where it stands */
.wall__floor {
  position: absolute;
  left: 0; right: 0;
  top: calc(var(--nav-h) + 3vh + 66%);
  bottom: 0;
  background: linear-gradient(to bottom, #171718 0%, #0A0A0B 62%);
  border-top: 1px solid rgba(255,255,255,0.10);
}
.wall__cast {
  position: absolute;
  right: -4%;
  top: 0;
  width: 60%;
  height: 46%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.62), rgba(0,0,0,0));
  filter: blur(14px);
  transform: skewX(-13deg);
  transform-origin: top right;
}

/* the type sits in the room, never on the plane */
.wall__type {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--nav-h) + clamp(50px, 10vh, 130px));
  color: #F4F3F1;
  max-width: 100%;
}
.wall__type .label { color: #C6C2BC; }
.wall__headline {
  margin-top: clamp(18px, 2.6vw, 30px);
  color: #F7F6F4;
  max-width: min(9ch, 38vw);
  font-size: clamp(30px, 4.2vw, 64px);
}
.wall__sub {
  margin-top: clamp(20px, 2.6vw, 34px);
  max-width: min(30ch, 38vw);
  color: #DCD8D3;
}

/* the specification line — what the plane is currently made of */
.wall__spec {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(40px, 7vh, 84px);
  padding-top: clamp(34px, 6vh, 70px);
  color: #F4F3F1;
}
.wall__families {
  list-style: none;
  margin: 0 0 clamp(20px, 2.6vw, 32px);
  padding: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(16px, 2.2vw, 34px);
  border-bottom: 1px solid rgba(255,255,255,0.16);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244,243,241,0.34);
}
.wall__families li { transition: color var(--t-med) var(--ease); }
.wall__families li.is-on { color: #F4F3F1; }

.wall__code {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4.6vw, 68px);
  letter-spacing: -0.035em;
  line-height: 1;
}
.wall__name {
  margin: 10px 0 0;
  font-size: var(--fs-small);
  color: #D6D2CD;
}

@media (max-width: 860px) {
  .wall__room { perspective-origin: 50% 40%; }
  .wall__plane { right: -14%; width: 100%; height: 58%; transform: rotateY(-9deg); }
  .wall__cast { right: -14%; width: 100%; }
  .wall__floor { height: 26%; }
  .wall__type { padding-top: calc(var(--nav-h) + clamp(30px, 6vh, 70px)); }
  .wall__spec { padding-top: clamp(180px, 34vh, 300px); }
}

@media (prefers-reduced-motion: reduce) {
  .wall__skin { transform: none !important; }
}


/* --- THE IDEA ------------------------------------------------------------- */

.story__grid { row-gap: 40px; }
.story__grid .index { margin-bottom: 8px; }
.story__title { margin-bottom: clamp(40px, 5vw, 68px); }
.story__body { row-gap: 34px; }


/* --- THE LIBRARY ---------------------------------------------------------- */

.library__head { margin-bottom: clamp(44px, 6vw, 76px); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(22px, 3vw, 44px);
  margin-top: clamp(36px, 4.4vw, 60px);
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.filters__btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 12px 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color var(--t-fast) var(--ease);
}
.filters__btn span {
  margin-left: 8px;
  font-size: 10px;
  letter-spacing: 0.08em;
  opacity: 0.6;
}
.filters__btn:hover { color: var(--ink); }
.filters__btn.is-on { color: var(--accent); }
.filters__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.faces {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(168px, 44vw), 1fr));
  gap: clamp(16px, 2vw, 34px) clamp(12px, 1.6vw, 26px);
}
.face { margin: 0; }
.face__img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: filter var(--t-med) var(--ease);
}
.face__meta { margin-top: 12px; }
.face__code {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.face__name {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--dim);
}
@media (hover: hover) { .face:hover .face__img { filter: brightness(1.08); } }

.face.is-out { display: none; }

.faces__note {
  margin-top: clamp(38px, 5vw, 64px);
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  max-width: min(56ch, 100%);
}


/* --- THE BUILD — four layers, seen edge-on -------------------------------- */

.build__head { margin-bottom: clamp(44px, 6vw, 80px); }

.layers {
  list-style: none;
  margin: 0 0 clamp(38px, 5vw, 60px);
  padding: 0;
  max-width: 780px;
}
.layer {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 2.4vw, 34px);
  padding-block: clamp(15px, 1.8vw, 24px);
  border-bottom: 1px solid var(--rule);
  will-change: transform, opacity;
}
.layer:first-child { border-top: 1px solid var(--rule-strong); }
.layer__n {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  flex: 0 0 auto;
}
.layer__t {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(17px, 1.7vw, 26px);
  letter-spacing: -0.018em;
  color: var(--ink);
}
.build__note { max-width: min(50ch, 100%); }


/* --- TESTED --------------------------------------------------------------- */

.lspec__head, .tests__head { margin-bottom: clamp(44px, 6vw, 80px); }

.testlist {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: clamp(30px, 5vw, 90px);
  border-top: 1px solid var(--rule-strong);
}
.testlist li {
  break-inside: avoid;
  padding-block: clamp(13px, 1.5vw, 19px);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(16px, 1.5vw, 22px);
  letter-spacing: -0.015em;
  color: var(--ink);
}
@media (max-width: 620px) { .testlist { columns: 1; } }

.tests__note {
  margin-top: clamp(32px, 4vw, 50px);
  font-size: 13px;
  max-width: min(62ch, 100%);
}


/* --- CLOSE ---------------------------------------------------------------- */

.lclose__inner { padding-block: var(--sp-band); text-align: center; }
.lclose__headline { max-width: min(12ch, 100%); margin-inline: auto; }
.lclose__ctas {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center;
  margin-top: clamp(34px, 4vw, 56px);
}


/* ==========================================================================
   PERSONALITY — THE SURFACE LABORATORY
   Section heads run as a single line with the index inline, so the page reads
   like a specification document rather than a brochure.
   ========================================================================== */

[data-page="laminates"] .sec-head { display: block; margin-bottom: clamp(40px, 5vw, 70px); }
[data-page="laminates"] .sec-head > .col-3,
[data-page="laminates"] .sec-head > .col-8 { grid-column: auto; }
[data-page="laminates"] .sec-head > .col-3 {
  display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px;
}
[data-page="laminates"] .sec-head .index { margin-bottom: 0; }
[data-page="laminates"] .sec-head h2 {
  font-size: clamp(28px, 3.8vw, 58px);
  letter-spacing: -0.033em;
  max-width: min(16ch, 100%);
}

/* the abstract fields are retired here — this page has real material */
[data-page="laminates"] .plate { background-image: none; background: var(--plate); }


@media (prefers-reduced-motion: reduce) {
  .surface__img { transition: none; }
  .layer { transform: none !important; opacity: 1 !important; }
}


/* --- the library, on hover ------------------------------------------------ */

.face { position: relative; }
.face__btn {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: pointer; text-align: left; color: inherit; font: inherit;
}
.face__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* the collection name only appears when the surface is under the pointer */
.face__fam {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 12px;
  font-family: var(--font-body); font-weight: 700; font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #F2F0ED;
  background: linear-gradient(to top, rgba(6,6,7,0.82), rgba(6,6,7,0));
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
  pointer-events: none;
}
.face__wrap { position: relative; display: block; }
@media (hover: hover) {
  .face__btn:hover .face__fam,
  .face__btn:focus-visible .face__fam { opacity: 1; }
}


/* --- the viewer — one surface, full screen -------------------------------- */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: rgba(8, 8, 9, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 70px);
  opacity: 0;
  transition: opacity 240ms var(--ease);
}
.viewer[hidden] { display: none; }
.viewer.is-open { opacity: 1; }

.viewer__img { transform: scale(1.03); transition: transform 520ms var(--ease); }
.viewer.is-open .viewer__img { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  .viewer, .viewer__img { transition: none; }
}

.viewer__sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(1180px, 100%);
  width: 100%;
}
.viewer__img {
  display: block;
  width: 100%;
  max-height: 72svh;
  object-fit: cover;
  will-change: transform, opacity;
}
.viewer__meta {
  width: 100%;
  margin-top: clamp(18px, 2.4vw, 30px);
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.18);
  color: #F4F3F1;
}
.viewer__code {
  margin: 0;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(24px, 3.2vw, 44px); letter-spacing: -0.032em; line-height: 1;
}
.viewer__name { margin: 8px 0 0; font-size: var(--fs-small); color: #D6D2CD; }
.viewer__fam { margin-top: 10px; color: #A9A49D; }

.viewer__close {
  position: absolute;
  top: calc(-1 * clamp(34px, 4vw, 48px));
  right: 0;
  appearance: none; background: none; border: 0; cursor: pointer;
  padding: 8px 0;
  font-family: var(--font-body); font-weight: 700; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase; color: #C9C5BE;
}
.viewer__close:hover { color: #FFF; }
.viewer__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (max-width: 620px) {
  .viewer__img { max-height: 56svh; }
  .viewer__close { top: auto; bottom: calc(-1 * clamp(38px, 8vw, 52px)); }
}

/* the batch sentinel — reserves a little room so growth is not abrupt */
.faces__more { height: 1px; margin-top: 40px; }
.faces__more[hidden] { display: none; }


/* The highlight that travels with the incoming sheet. Its width is set from
   the material's own sheen, so brushed brass reads as a tight specular band
   and linen reads as a broad, soft one. */
.wall__sheen {
  position: absolute;
  top: -12%; bottom: -12%;
  left: 0;
  width: var(--sheen-w, 60%);
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(100deg,
    rgba(255,255,255,0) 0%, rgba(255,255,255,0.10) 34%,
    rgba(255,255,255,0.48) 50%, rgba(255,255,255,0.10) 66%, rgba(255,255,255,0) 100%);
  mix-blend-mode: overlay;
  will-change: transform, opacity;
}
.wall__skin { transition: filter 420ms var(--ease); }


/* ==========================================================================
   THE LIBRARY, AS SURFACES RATHER THAN SWATCHES
   Same fault as the veneer grid: a height attribute the CSS never released,
   so every decor was cropped to a narrow 199x573 strip and stone, woodgrain
   and textile all read the same. Each face is now shown at its own
   proportion, and the grid carries a rhythm rather than 72 identical chips.
   ========================================================================== */

.faces {
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 80vw), 1fr));
  gap: clamp(24px, 2.6vw, 44px) clamp(16px, 1.8vw, 30px);
}

.face__img {
  height: auto;
  aspect-ratio: 430 / 620;      /* the decor's own proportion */
  object-fit: cover;
  object-position: 50% 50%;
}

/* a full-surface view every seventh decor, so the pattern scale can be read
   at something closer to its real size rather than always as a sample */
.face:nth-child(7n + 1) { grid-column: span 2; }
.face:nth-child(7n + 1) .face__img { aspect-ratio: 860 / 560; }

@media (hover: hover) {
  .face__img { transition: filter var(--t-med) var(--ease), transform 700ms var(--ease); }
  .face:hover .face__img { transform: scale(1.02); }
}

@media (max-width: 900px) {
  .faces { grid-template-columns: repeat(2, 1fr); }
  .face:nth-child(7n + 1) { grid-column: span 2; }
  .face:nth-child(7n + 1) .face__img { aspect-ratio: 430 / 300; }
}
@media (max-width: 560px) {
  .faces { grid-template-columns: repeat(2, 1fr); gap: 16px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .face:hover .face__img { transform: none; }
}
