/* Ideal Tile of Fairfield
   Palette comes straight from the logo: tricolore red, green and black,
   set against the cool white of Calacatta marble. */

:root {
  --red: #c8102e;
  --red-deep: #9e0c24;
  --green: #0f7a3d;
  --green-deep: #0a5c2d;
  --black: #000;
  --ink: #1c1c1c;
  --muted: #595959;
  --marble: #f5f5f3;
  --grout: #d6d6d2;
  --white: #fff;

  --serif: "Gloock", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Classic typographic scale: 12 14 16 18 21 24 36 48 60 72 */
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.3125rem;
  --fs-lg: 1.5rem;
  --fs-xl: clamp(1.75rem, 1.2rem + 2vw, 2.25rem);
  --fs-2xl: clamp(2rem, 1.2rem + 3vw, 3rem);
  --fs-hero: clamp(2.25rem, 1rem + 4vw, 4.5rem);

  --gutter: clamp(1rem, 3vw, 2.5rem);
  --max: 1400px;
  --header-h: 132px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;          /* Gloock has a single weight */
  letter-spacing: -0.01em;
  line-height: 1.08;
}
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-md); font-weight: 600; line-height: 1.25; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--black); color: var(--white);
  padding: 0.75rem 1rem; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* Placeholder content the owner still needs to supply */
.tbd {
  background: #fff3c4;
  box-shadow: 0 0 0 2px #fff3c4;
}

.icon { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font: 600 var(--fs-base)/1 var(--sans);
  text-decoration: none;
  padding: 0.8rem 1.15rem;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}
.btn-call {
  background: var(--red);
  color: var(--white);
}
.btn-call:hover { background: var(--red-deep); }
.btn-lg { padding: 1rem 1.4rem; font-size: var(--fs-md); }

.text-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--red);
}
.text-link:hover { color: var(--red); }
.text-link--light { color: var(--white); text-decoration-color: currentColor; }
.text-link--light:hover { color: var(--white); text-decoration-color: var(--red); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 84px;
}

.brand img { width: 190px; }

.primary-nav {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
}
.primary-nav a {
  text-decoration: none;
  font-weight: 500;
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover { border-color: var(--green); }

.menu-toggle { display: none; }

/* Red shop bar, echoing the logo's red block */
.shop-bar {
  background: var(--red);
  color: var(--white);
  position: relative;
}
.shop-menu {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 4vw, 3.5rem);
}
.shop-trigger {
  appearance: none;
  background: none;
  border: 0;
  color: inherit;
  font: 600 var(--fs-base)/1 var(--sans);
  letter-spacing: 0.02em;
  padding: 1rem 0.25rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.shop-trigger::after {
  content: "";
  width: 0.45em; height: 0.45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-25%) rotate(45deg);
  transition: transform 0.2s;
}
.shop-trigger[aria-expanded="true"]::after { transform: translateY(15%) rotate(-135deg); }
.shop-trigger:focus-visible { outline-color: var(--white); }

.mobile-only { display: none; }

.panel {
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: var(--white);
  color: var(--ink);
  border-bottom: 1px solid var(--grout);
  box-shadow: 0 24px 40px -24px rgb(0 0 0 / 0.25);
  padding: 2rem var(--gutter) 2.25rem;
  display: none;
}
.has-panel.is-open .panel { display: block; }

.panel-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  max-width: var(--max);
  margin-inline: auto;
}
.panel-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 500;
  text-align: center;
}
.panel-grid a:hover { color: var(--red); }
.panel-grid--thumbs img { width: 150px; aspect-ratio: 1; object-fit: cover; }
.panel-grid--swatches .swatch { width: 72px; }
.panel-grid--shapes .shape-icon { width: 64px; height: 64px; }

.panel-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.25rem 2rem;
  max-width: 900px;
  margin-inline: auto;
}
.panel-list a {
  display: block;
  padding: 0.6rem 0;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--grout);
}
.panel-list a:hover { color: var(--red); border-color: var(--red); }

/* ---------- Hero: headline beside one large photo ---------- */

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  min-height: clamp(520px, calc(100svh - var(--header-h)), 820px);
}

/* Left edge lines up with the page's content column; the photo runs to the right edge */
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  padding-block: clamp(2rem, 5vw, 4rem);
  padding-inline-start: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  padding-inline-end: clamp(1.5rem, 4vw, 4rem);
}
.hero-copy h1 {
  font-size: clamp(2.25rem, 1rem + 3vw, 3.75rem);
  max-width: 16ch;
}
.hero-copy p {
  font-size: var(--fs-md);
  color: var(--muted);
  max-width: 40ch;
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 0.5rem;
}

.hero-slides {
  position: relative;
  overflow: hidden;
  background: var(--marble);
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s ease, visibility 0s linear 1.2s;
}
.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 1.2s ease;
}
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide figcaption {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  max-width: calc(100% - 12rem);
  background: var(--white);
  padding: 0.6rem 0.95rem;
  font-weight: 600;
  font-size: var(--fs-sm);
}
.hero-slide figcaption a { text-decoration: none; }
.hero-slide figcaption a:hover { color: var(--red); text-decoration: underline; }

.hero-controls {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  gap: 0.5rem;
}
.hero-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.25);
}
.hero-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero-btn .icon-play { fill: var(--ink); stroke: none; }
.hero-btn:hover svg { stroke: var(--red); }
.hero-btn:hover .icon-play { fill: var(--red); }
#hero-pause .icon-play,
#hero-pause[aria-pressed="true"] .icon-pause { display: none; }
#hero-pause[aria-pressed="true"] .icon-play { display: block; }

@media (prefers-reduced-motion: reduce) {
  .hero-slide, .hero-slide.is-active { transition: none; }
}

/* Full-screen hero: photos fill the width, words sit on top */
.hero--full .hero-inner {
  position: relative;
  display: block;
  height: clamp(560px, calc(100svh - var(--header-h)), 920px);
  min-height: 0;
}
.hero--full .hero-slides { position: absolute; inset: 0; aspect-ratio: auto; }
/* A soft shade behind the words so white text stays readable on any photo */
.hero--full .hero-slides::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgb(0 0 0 / 0.62) 0%, rgb(0 0 0 / 0.4) 38%, rgb(0 0 0 / 0) 68%);
}
.hero--full .hero-slide figcaption,
.hero--full .hero-controls { z-index: 1; }
.hero--full .hero-slide figcaption { left: auto; right: 10.5rem; max-width: 22rem; }
.hero--full .hero-copy {
  position: relative;
  z-index: 1;
  height: 100%;
  /* no width cap here: the left padding grows on wide screens, and the h1/p carry their own max widths */
  color: var(--white);
  pointer-events: none;
}
.hero--full .hero-copy > * { pointer-events: auto; }
.hero--full .hero-copy h1 { text-shadow: 0 2px 24px rgb(0 0 0 / 0.35); }
.hero--full .hero-copy p { color: rgb(255 255 255 / 0.88); }
.hero--full .hero-copy .text-link { color: var(--white); text-decoration-color: var(--white); }
.hero--full .hero-copy .text-link:hover { text-decoration-color: var(--red); }

@media (max-width: 900px) {
  .hero--full .hero-inner { height: min(86svh, 720px); }
  .hero--full .hero-slides { order: 0; }
  /* On phones the shade rises from the bottom, where the words are */
  .hero--full .hero-slides::after {
    background: linear-gradient(0deg, rgb(0 0 0 / 0.72) 0%, rgb(0 0 0 / 0.45) 45%, rgb(0 0 0 / 0) 75%);
  }
  .hero--full .hero-copy { justify-content: flex-end; padding-bottom: 5rem; max-width: none; }
  .hero--full .hero-slide figcaption { display: none; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section--marble { background: var(--marble); }
.section--dark { background: var(--black); color: var(--white); }
.section--green { background: var(--green); color: var(--white); }

.section-head {
  display: grid;
  gap: 0.9rem;
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-head p { color: var(--muted); font-size: var(--fs-md); }
.section-head--row {
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Materials: marble leads across two columns, the rest wrap around it */
.materials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 1.5rem;
}
.material--lead { grid-column: span 2; grid-row: span 2; }
.material a {
  display: grid;
  gap: 0.6rem;
  text-decoration: none;
}
.material img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-bottom: 0.4rem;
}
/* height 0 + min-height 100% lets the photo fill the space without making the row taller */
.material--lead img { aspect-ratio: auto; height: 0; min-height: 100%; }
.material--lead a { grid-template-rows: minmax(0, 1fr) auto auto; height: 100%; }
.material--lead h3 { font-family: var(--serif); font-size: var(--fs-xl); font-weight: 400; }
.material p { color: var(--muted); max-width: 38ch; }
.material a:hover h3 { color: var(--red); }

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--grout);
  margin-bottom: 2.5rem;
}
.tabs [role="tab"] {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  padding: 0.85rem 1.25rem;
  font: 600 var(--fs-md)/1 var(--sans);
  color: var(--muted);
  cursor: pointer;
}
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-color: var(--red); }
.tabs [role="tab"]:hover { color: var(--ink); }

/* Swatches are cut from real tile photos */
.swatch {
  display: block;
  width: 112px;
  aspect-ratio: 1;
  border-radius: 50%;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
}
.swatch--white { background-image: url(../assets/tiles/marble/luca-grey.jpg); background-size: 260%; background-position: 40% 55%; }
.swatch--cream { background-image: url(../assets/tiles/marble/onice-alabastrino.jpg); background-size: 500%; background-position: 75% 25%; }
.swatch--gray  { background-image: url(../assets/tiles/marble/ocean.jpg); background-size: 380%; background-position: 45% 88%; }
.swatch--black { background-image: url(../assets/tiles/marble/black-lincoln.jpg); background-size: 700%; background-position: 62% 87%; }
.swatch--blue  { background-image: url(../assets/tiles/marble/azul-macauba.jpg); background-size: 500%; background-position: 94% 25%; }
.swatch--gold  { background-image: url(../assets/tiles/marble/calacatta-gold.jpg); background-size: 360%; background-position: 62% 22%; }

.swatch--brown { background-image: url(../assets/products/natural-stone/emperador-marron-basketweave-polished.jpg); background-size: 260%; background-position: 50% 50%; }
.swatch--green { background-image: url(../assets/products/glass/sage-3x12-polished.jpg); background-size: 200%; background-position: 50% 50%; }

.swatches, .shapes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2rem 1rem;
}
.swatches { grid-template-columns: repeat(8, 1fr); }
.swatches a, .shapes a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  font-weight: 500;
  text-align: center;
}
.swatches a:hover, .shapes a:hover { color: var(--red); }
.swatches a:hover .swatch { box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--red); }

.shape-icon {
  width: 96px; height: 96px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
  color: var(--ink);
}
.shapes a:hover .shape-icon { color: var(--red); }

.styles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0 2.5rem;
}
.styles a {
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--grout);
  text-decoration: none;
}
.styles h3 { font-family: var(--serif); font-size: var(--fs-lg); font-weight: 400; }
.styles p { color: var(--muted); }
.styles a:hover h3 { color: var(--red); }

/* Collections: horizontal strip */
.collections {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1rem;
}
.collections li { scroll-snap-align: start; }
.collections a { display: grid; gap: 0.35rem; text-decoration: none; }
.collections img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; margin-bottom: 0.6rem; }
.collections h3 { font-family: var(--serif); font-size: var(--fs-lg); font-weight: 400; }
.collections p { color: var(--muted); font-size: var(--fs-sm); }
.collections a:hover h3 { color: var(--red); }

/* Installation + before/after */
.install {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.install-copy { display: grid; gap: 1.25rem; justify-items: start; }
.install-copy p { color: #cfcfcf; font-size: var(--fs-md); max-width: 40ch; }
.install-copy h2 { max-width: 12ch; }

.compare {
  position: relative;
  aspect-ratio: 1179 / 870;
  overflow: hidden;
  user-select: none;
}
.compare img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.compare-before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.compare-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 3px;
  margin-left: -1.5px;
  background: var(--white);
  pointer-events: none;
}
.compare-handle svg {
  position: absolute;
  top: 50%; left: 50%;
  width: 48px; height: 48px;
  padding: 12px;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.35);
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.compare-label {
  position: absolute;
  top: 1rem;
  background: rgb(0 0 0 / 0.65);
  color: var(--white);
  font-weight: 600;
  font-size: var(--fs-sm);
  padding: 0.35rem 0.7rem;
  pointer-events: none;
}
.compare-label--before { left: 1rem; }
.compare-label--after { right: 1rem; }
.compare-range {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.compare:has(.compare-range:focus-visible) { outline: 3px solid var(--red); outline-offset: 4px; }

/* About */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
}
.about h2 { font-size: var(--fs-hero); max-width: 12ch; }
.about-copy { display: grid; gap: 2rem; align-content: start; }
.about-copy > p { font-size: var(--fs-md); max-width: 44ch; line-height: 1.6; }
.facts { display: grid; gap: 1rem; }
.facts li {
  padding-top: 1rem;
  border-top: 1px solid rgb(255 255 255 / 0.3);
  max-width: 44ch;
}
.facts strong { display: block; font-size: var(--fs-md); }

/* Reviews (Yelp embeds) */
.reviews-arrows { display: flex; gap: 0.5rem; }
.reviews-arrows .hero-btn:disabled { opacity: 0.35; cursor: default; }
/* Three reviews show at a time; the arrows slide the row along */
.reviews {
  --gap: 1.5rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * var(--gap)) / 3);
  gap: var(--gap);
  align-items: start;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.reviews::-webkit-scrollbar { display: none; }
.reviews li { min-width: 0; scroll-snap-align: start; }
@media (max-width: 1100px) { .reviews { grid-auto-columns: calc((100% - var(--gap)) / 2); } }
@media (max-width: 700px) { .reviews { grid-auto-columns: 100%; } }
.reviews { align-items: stretch; padding-block: 0.25rem; }
.review-card {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  background: var(--white);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.review-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.review-stars { display: flex; gap: 0.2rem; }
/* Yelp logo, top right of each card. The source image has wide margins
   (logo sits at x 46–1958, y 194–932 of 2000×1125), so the box crops to the logo itself. */
.review-source {
  display: block;
  flex: none;
  width: 64px;
  aspect-ratio: 1912 / 738;
  overflow: hidden;
}
.review-source img {
  display: block;
  max-width: none;
  width: calc(100% * 2000 / 1912);
  height: auto;
  margin-left: calc(-100% * 46 / 1912);
  margin-top: calc(-100% * 194 / 1912);
}
.review-stars svg { width: 18px; height: 18px; fill: var(--red); }
.review-text { margin: 0; flex: 1; }
.review-text p {
  font-size: var(--fs-md);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
  overflow: hidden;
}
.review-card.is-open .review-text p { -webkit-line-clamp: unset; display: block; }
.review-more {
  align-self: flex-start;
  background: none;
  border: 0;
  padding: 0;
  font: 600 var(--fs-sm)/1 var(--sans);
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 0.3em;
  cursor: pointer;
}
.review-by {
  padding-top: 1rem;
  border-top: 1px solid var(--grout);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.review-name { font-weight: 600; color: var(--ink); }
.review-place::before { content: "·"; margin: 0 0.45rem; color: var(--grout); }

/* Visit */
.visit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.visit-copy { display: grid; gap: 1.5rem; justify-items: start; }
.visit-copy > p { color: var(--muted); font-size: var(--fs-md); max-width: 42ch; }
address { font-style: normal; font-size: var(--fs-md); line-height: 1.5; }
.hours { border-collapse: collapse; min-width: min(100%, 22rem); }
.hours th, .hours td {
  text-align: left;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--grout);
}
.hours th { font-weight: 500; padding-right: 2rem; }
.visit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
.visit-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; }

/* Footer */
.site-footer {
  border-top: 6px solid var(--red);
  padding-block: 3rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem 3rem;
  align-items: center;
}
.footer-logo { width: 170px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; justify-content: flex-end; }
.site-footer nav a { text-decoration: none; font-weight: 500; }
.site-footer nav a:hover { color: var(--red); }
.footer-legal { grid-column: 1 / -1; color: var(--muted); font-size: var(--fs-sm); }

/* ---------- Material pages ---------- */

.page-head {
  padding-block: clamp(2.5rem, 5vw, 4.5rem) 0;
}
.page-head .wrap { display: grid; gap: 1.1rem; }
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: var(--fs-sm);
}
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--red); text-decoration: underline; }
.page-head h1 { font-size: var(--fs-hero); }
.page-intro { font-size: var(--fs-md); color: var(--muted); max-width: 48ch; }

.material-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  margin-top: 1rem;
  border-bottom: 1px solid var(--grout);
}
.material-switch a {
  display: block;
  padding: 0.75rem 0;
  margin-bottom: -1px;
  border-bottom: 3px solid transparent;
  text-decoration: none;
  font-weight: 600;
  color: var(--muted);
}
.material-switch a:hover { color: var(--ink); }
.material-switch a[aria-current="page"] { color: var(--ink); border-color: var(--red); }

.section--tight { padding-block: 2rem clamp(4rem, 8vw, 6rem); }

.gallery-count { color: var(--muted); margin-bottom: 1.25rem; }

.group-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}
.group-jump a {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--grout);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--fs-sm);
}
.group-jump a:hover { border-color: var(--red); color: var(--red); }

.gallery-group + .gallery-group { margin-top: clamp(3rem, 6vw, 5rem); }
.gallery-group > h2 {
  font-size: var(--fs-xl);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--grout);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem 1.25rem;
}
.tile-card {
  appearance: none;
  display: grid;
  gap: 0.75rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
}
.tile-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.tile-name { font-family: var(--serif); font-size: var(--fs-lg); line-height: 1.2; }
.tile-card:hover .tile-name { color: var(--red); }
a.tile-card { text-decoration: none; cursor: pointer; }
.tile-detail,
.tile-origin {
  justify-self: start;
  margin-top: -0.4rem;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.tile-origin--italy { font-weight: 600; color: var(--green); }

/* One collection: room photo beside a short summary */
.collection-hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end;
  margin-top: 1rem;
}
.collection-hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.collection-summary { display: grid; gap: 1.1rem; justify-items: start; padding-bottom: 0.5rem; }
.collection-summary p { color: var(--muted); font-size: var(--fs-md); max-width: 34ch; }
.collection-summary .collection-origin { color: var(--green); font-weight: 600; }
.collection-summary .collection-origin--unknown { color: var(--muted); font-weight: 500; }

.lightbox-origin { color: var(--muted); margin-top: 0.25rem; }
.lightbox-collection { display: inline-block; margin-top: 0.5rem; }
.lightbox-collection[hidden] { display: none; }

.gallery-empty {
  display: grid;
  gap: 1rem;
  justify-items: start;
  padding: 3rem 0;
  max-width: 40rem;
}
.gallery-empty[hidden] { display: none; }
.gallery-empty p { color: var(--muted); font-size: var(--fs-md); }

.cta-inner { display: grid; gap: 1.25rem; justify-items: start; }
.cta-inner h2 { max-width: 18ch; }
.cta-inner p { font-size: var(--fs-md); max-width: 46ch; }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 0.5rem; }
.btn-light { background: var(--white); color: var(--green-deep); }
.btn-light:hover { background: var(--marble); }

.lightbox {
  width: min(92vw, 900px);
  max-height: 92dvh;
  padding: 0;
  border: 0;
  background: var(--white);
  overflow: auto;
}
.lightbox::backdrop { background: rgb(0 0 0 / 0.8); }
.lightbox img { width: 100%; max-height: 72dvh; object-fit: contain; background: var(--marble); }
.lightbox-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
}
.lightbox-caption h2 { font-size: var(--fs-xl); }
.lightbox-close {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.3);
}
.lightbox-close svg { width: 20px; height: 20px; stroke: var(--ink); stroke-width: 2; fill: none; stroke-linecap: round; }

/* Mobile call bar */
.call-bar { display: none; }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .primary-nav { gap: 1.1rem; }
  .brand img { width: 160px; }

  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 900px) {
  :root { --header-h: 72px; }

  /* Photo on top, full width; headline below */
  .hero-inner { grid-template-columns: 1fr; min-height: 0; }
  .hero-slides { order: -1; aspect-ratio: 4 / 3; }
  .hero-copy { padding-inline: var(--gutter); padding-block: 2rem 2.5rem; }

  .header-top { min-height: 72px; gap: 1rem; }
  .primary-nav { display: none; }
  .header-top .btn-call { margin-left: auto; padding: 0.7rem; }
  .header-top .btn-call span { display: none; }
  .header-top .btn-call .icon { width: 1.3rem; height: 1.3rem; }
  .brand img { width: 140px; }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 48px; height: 48px;
    background: none;
    border: 1px solid var(--grout);
    cursor: pointer;
  }
  .menu-toggle-bars,
  .menu-toggle-bars::before,
  .menu-toggle-bars::after {
    display: block;
    width: 22px; height: 2px;
    background: var(--ink);
    position: relative;
    transition: transform 0.2s, background 0.2s;
  }
  .menu-toggle-bars::before, .menu-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .menu-toggle-bars::before { top: -7px; }
  .menu-toggle-bars::after { top: 7px; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

  /* The shop bar becomes a drawer */
  .shop-bar {
    display: none;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .shop-bar.is-open { display: block; }
  .shop-menu { flex-direction: column; gap: 0; padding-block: 0.5rem 1.5rem; }
  .shop-menu > li { border-bottom: 1px solid rgb(255 255 255 / 0.25); }
  .shop-trigger { width: 100%; justify-content: space-between; padding: 1.1rem 0; font-size: var(--fs-md); }
  .mobile-only { display: block; }
  .mobile-only a { display: block; padding: 1.1rem 0; text-decoration: none; font-weight: 600; font-size: var(--fs-md); }

  .panel {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 1.25rem 1rem;
    margin-bottom: 1rem;
  }
  .panel-grid { justify-content: flex-start; gap: 1.25rem; }
  .panel-grid--thumbs img { width: 88px; }
  .panel-grid--swatches .swatch { width: 56px; }
  .panel-grid--shapes .shape-icon { width: 52px; height: 52px; }
  .panel-grid a { width: 88px; font-size: var(--fs-sm); }

  .materials { grid-template-columns: 1fr 1fr; }
  .material--lead { grid-column: 1 / -1; grid-row: auto; }
  .material--lead img { height: auto; min-height: 0; aspect-ratio: 4 / 3; }

  .shapes { grid-template-columns: repeat(3, 1fr); }
  .swatches { grid-template-columns: repeat(4, 1fr); }

  .install, .about, .visit, .collection-hero { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; }
  .site-footer nav { justify-content: flex-start; }

  .call-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    background: var(--red);
    color: var(--white);
    font-weight: 700;
    font-size: var(--fs-md);
    text-decoration: none;
  }
  body { padding-bottom: 64px; }
}

@media (max-width: 640px) {
  .hero-actions .btn-lg { width: 100%; justify-content: center; }
  .hero-slide figcaption { left: 0.75rem; bottom: 0.75rem; max-width: calc(100% - 10.5rem); padding: 0.45rem 0.7rem; }
  .hero-controls { right: 0.75rem; bottom: 0.75rem; gap: 0.35rem; }
  .hero-btn { width: 40px; height: 40px; }

  .materials { grid-template-columns: 1fr; }
  .material img { aspect-ratio: 16 / 10; }

  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 0.75rem; }
  .tile-name { font-size: var(--fs-base); }

  .swatch { width: 88px; }
  .shape-icon { width: 72px; height: 72px; }

  .tabs [role="tab"] { padding-inline: 0.9rem; }

  .visit-actions .btn-lg { width: 100%; justify-content: center; }
}
