/* Vail Cowboy — Component styles */

/* Utility */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 2px 0;
  background: rgba(250, 247, 239, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), backdrop-filter var(--transition), border-color var(--transition), padding var(--transition);
}

.nav.scrolled,
.nav.is-scrolled {
  border-bottom-color: var(--line-soft);
  padding: 2px 0;
}

/* Homepage (or any page with a full-bleed image hero at the top): nav is
   transparent while at the top of the page so the hero image fills the
   viewport with no ivory strip above it. The logo gets inverted to white
   so it stays legible on the dark hero. Once the user scrolls past the
   hero (≥ 40px), the ivory backdrop returns and the logo flips back to black. */
body.has-hero-nav .nav:not(.scrolled):not(.is-scrolled) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}

body.has-hero-nav .nav:not(.scrolled):not(.is-scrolled) .nav-logo-img {
  filter: brightness(0) invert(1);
}

body.has-hero-nav .nav:not(.scrolled):not(.is-scrolled) .nav-links a {
  color: rgba(255, 253, 247, 0.92);
}

body.has-hero-nav .nav:not(.scrolled):not(.is-scrolled) .nav-links a:hover {
  color: #ffffff;
}

body.has-hero-nav .nav:not(.scrolled):not(.is-scrolled) .nav-cta {
  color: #ffffff;
  border-color: rgba(255, 253, 247, 0.85);
}

body.has-hero-nav .nav:not(.scrolled):not(.is-scrolled) .nav-cta:hover {
  background: #ffffff;
  color: var(--ink);
}

/* Hamburger icon flips with the nav: white lines while over the hero,
   black once the ivory header appears on scroll. Wrapped in the same mobile
   media query as the base .nav-toggle rules so it beats their specificity,
   and we force stroke on the SVG paths directly (defeats inline currentColor
   attribute + any button color inheritance). */
@media (max-width: 1400px) {
  body.has-hero-nav .nav:not(.scrolled):not(.is-scrolled) .nav-toggle,
  body.has-hero-nav .nav:not(.scrolled):not(.is-scrolled) .nav-toggle .nav-toggle-icon {
    color: #ffffff !important;
    stroke: #ffffff !important;
  }
  body.has-hero-nav .nav:not(.scrolled):not(.is-scrolled) .nav-toggle .nav-toggle-icon path {
    stroke: #ffffff !important;
  }
}

.nav-inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: nowrap;
}

@media (min-width: 1600px) {
  .nav-inner { max-width: 1560px; }
}

.nav-logo {
  display: flex;
  align-items: center;
  line-height: 0;
  flex: 0 0 auto;
}

@media (min-width: 1401px) {
  .nav-links {
    flex: 0 1 auto;
    min-width: 0;
  }
}

.nav-logo-img {
  height: 80px;
  width: auto;
  display: block;
  transition: opacity var(--transition), height var(--transition);
  max-width: 100%;
}

.nav.scrolled .nav-logo-img,
.nav.is-scrolled .nav-logo-img {
  height: 71px;
}

.nav-logo:hover .nav-logo-img {
  opacity: 0.75;
}

@media (min-width: 1200px) {
  .nav-logo-img { height: 82px; }
  .nav.scrolled .nav-logo-img,
  .nav.is-scrolled .nav-logo-img { height: 72px; }
}

@media (min-width: 1600px) {
  .nav-logo-img { height: 88px; }
  .nav.scrolled .nav-logo-img,
  .nav.is-scrolled .nav-logo-img { height: 76px; }
}

@media (max-width: 1400px) {
  .nav-logo-img { height: 82px; }
  .nav.scrolled .nav-logo-img,
  .nav.is-scrolled .nav-logo-img { height: 71px; }
}

@media (max-width: 600px) {
  .nav-logo-img { height: 68px; }
  .nav.scrolled .nav-logo-img,
  .nav.is-scrolled .nav-logo-img { height: 59px; }
}

/* Drawer (hamburger menu) logo — stacked white version at top-left of drawer */
.nav-drawer-logo {
  display: none; /* only shown when drawer is open (mobile) */
  width: 100%;
  margin: 0 0 var(--space-5) 0;
  padding: 0 0 var(--space-4) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  list-style: none;
}
.nav-drawer-logo a {
  display: inline-block;
  padding: 0 !important;
  border: none !important;
}
.nav-drawer-logo-img {
  height: 189px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  list-style: none;
}

@media (min-width: 1300px) {
  .nav-links { gap: var(--space-6); }
}
@media (min-width: 1500px) {
  .nav-links { gap: var(--space-8); }
}

.nav-links a {
  font-size: 0.82rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  font-weight: 400;
  position: relative;
  white-space: nowrap;
}

@media (min-width: 1400px) {
  .nav-links a { font-size: var(--text-sm); }
}

.nav-links a:hover {
  color: var(--rust);
}

.nav-cta {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  transition: background var(--transition), color var(--transition);
  text-transform: uppercase;
  font-family: var(--font-sans);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (min-width: 1500px) {
  .nav-cta { padding: 0.65rem 1.2rem; font-size: var(--text-sm); }
}
@media (min-width: 1700px) {
  .nav-cta { padding: 0.65rem 1.4rem; }
}

.nav-cta:hover {
  background: var(--ink);
  color: var(--ivory);
}

.nav-toggle {
  display: none;
  padding: 0.5rem;
}

/* When the drawer is open, force full-viewport panel regardless of media-query
   evaluation state. This defends against iOS Chrome/Safari edge cases where
   the address-bar transition, orientation change, or a fast tap can leave
   the drawer partially styled (narrow strip / clipped panel). */
.nav-links.open {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  width: min(360px, 88vw) !important;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #1a1b18 !important;
  background-image: linear-gradient(180deg, #1a1b18 0%, #24261f 100%) !important;
  color: var(--ivory) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  padding: 1.75rem 2rem 2rem !important;
  gap: var(--space-4) !important;
  transform: translateX(0) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: -20px 0 60px -10px rgba(0, 0, 0, 0.4);
  z-index: 210 !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-links.open .nav-drawer-logo { display: block; }

@media (max-width: 1400px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 88vw);
    height: 100vh;
    height: 100dvh;
    background: #1a1b18;
    background-image: linear-gradient(180deg, #1a1b18 0%, #24261f 100%);
    color: var(--ivory);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.75rem 2rem 2rem;
    gap: var(--space-4);
    transform: translateX(100%);
    transition: transform 360ms cubic-bezier(.4, 0, .2, 1);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: -20px 0 60px -10px rgba(0, 0, 0, 0.4);
    z-index: 210;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-drawer-logo { display: block; }
  .nav-drawer-logo-img { height: 172px; }
  .nav-links .nav-drawer-logo a {
    color: inherit !important;
    border-bottom: none !important;
    padding: 0 !important;
    width: auto !important;
  }
  .nav-links a,
  .nav-links .nav-link {
    color: #F5F1E8 !important;
    opacity: 1 !important;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    padding: 0.75rem 0;
    text-decoration: none;
    width: 100%;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 400;
  }
  .nav-links a:hover,
  .nav-links a.active,
  .nav-links .nav-link.active { color: #F5F1E8 !important; opacity: 1 !important; }
  .nav-links .nav-link.active { border-bottom-color: rgba(212, 145, 91, 0.6); }
  .nav-links li { width: 100%; }
  .nav-links .nav-cta,
  .nav:not(.is-scrolled) .nav-links .nav-cta {
    background: #F5F1E8 !important;
    color: #1A1A17 !important;
    padding: 1rem 1.4rem !important;
    text-align: center;
    margin-top: var(--space-3);
    border: none !important;
    border-radius: 0 !important;
    letter-spacing: 0.14em !important;
    font-size: 0.75rem !important;
    text-transform: uppercase;
    font-weight: 600 !important;
    width: 100%;
    text-decoration: none;
    display: block;
    opacity: 1 !important;
  }
  .nav-links .nav-cta:hover { background: #FFFDF7 !important; color: #1A1A17 !important; }

  .nav-links.open {
    transform: translateX(0);
  }

  /* Backdrop overlay behind drawer */
  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 22, 18, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
    z-index: 205;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .nav-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Backdrop — also class-driven so it always shows behind an open drawer */
.nav-backdrop.open {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(20, 22, 18, 0.5) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 205 !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

@media (max-width: 1400px) {

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 220;
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--ink);
    min-width: 48px;
    min-height: 48px;
    padding: 12px;
    margin: -8px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(212, 145, 91, 0.15);
  }
  .nav-toggle .nav-toggle-icon {
    display: block;
    transition: opacity 200ms ease;
  }
  .nav-toggle .icon-close { display: none; }
  .nav-toggle.open {
    color: var(--ivory) !important;
    filter: none !important;
  }
  .nav-toggle.open .icon-menu { display: none; }
  .nav-toggle.open .icon-close { display: block; }

  /* Prevent body scroll when drawer is open */
  body.nav-open { overflow: hidden; }

  /* When the drawer is open, the drawer + backdrop are portaled to <body>.
     That places them in the root stacking context, which normally paints
     above .nav (which has its own stacking context via backdrop-filter).
     Raise the nav so the close (X) button stays tappable above the drawer. */
  body.nav-open .nav {
    z-index: 300 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom-color: transparent !important;
    box-shadow: none !important;
  }
  body.nav-open .nav .nav-logo-img { opacity: 0; pointer-events: none; }

}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 4rem;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(30, 26, 22, 0.70) 0%,
    rgba(30, 26, 22, 0.55) 40%,
    rgba(30, 26, 22, 0.62) 70%,
    rgba(30, 26, 22, 0.85) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--ivory);
  max-width: 780px;
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ivory);
  opacity: 1;
  margin-bottom: var(--space-6);
  display: inline-block;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(245, 241, 232, 0.55);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.hero-title {
  font-size: var(--text-3xl);
  font-weight: 400;
  line-height: 0.95;
  color: var(--ivory);
  margin-bottom: var(--space-6);
  letter-spacing: -0.015em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.35);
}

.hero-title em {
  font-style: italic;
  color: var(--paper);
  font-weight: 300;
}

.hero-sub {
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--ivory);
  opacity: 1;
  max-width: 560px;
  margin-bottom: var(--space-8);
  font-weight: 400;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.4);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-sans);
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--ivory);
  color: var(--ink);
}
.btn-primary:hover {
  background: var(--rust);
  color: var(--ivory);
}

.btn-outline {
  background: transparent;
  color: var(--ivory);
  border-color: var(--ivory);
}
.btn-outline:hover {
  background: var(--ivory);
  color: var(--ink);
}

.btn-dark {
  background: var(--ink);
  color: var(--ivory);
}
.btn-dark:hover {
  background: var(--rust);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: clamp(4rem, 10vw, 8rem) 0;
}

.section-tight {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.section-ivory { background: var(--ivory); }
.section-cream { background: var(--cream); }
.section-dark {
  background: var(--ink);
  color: var(--ivory);
}
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--ivory); }
.section-forest { background: var(--forest); color: var(--ivory); }
.section-forest h1, .section-forest h2, .section-forest h3 { color: var(--ivory); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: var(--space-4);
  display: inline-block;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: var(--space-4);
  letter-spacing: -0.015em;
}

.section-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--taupe);
}

.section-sub {
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: var(--space-12);
  font-weight: 300;
}

.section-header {
  margin-bottom: var(--space-16);
  max-width: 780px;
}

.section-header--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ============================================
   PILLARS (3-up)
   ============================================ */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-12);
}

.pillar {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--line);
}

.pillar-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--taupe);
  margin-bottom: var(--space-4);
  letter-spacing: 0.02em;
}

.pillar-title {
  font-size: var(--text-xl);
  font-weight: 400;
  margin-bottom: var(--space-4);
}

.pillar-body {
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: var(--text-base);
}

@media (max-width: 768px) {
  .pillars {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

/* ============================================
   BENEFIT GRID (Designer program page)
   ============================================ */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8) var(--space-6);
}

.benefit {
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.benefit-title {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-3);
  letter-spacing: 0.01em;
}

.benefit-body {
  color: var(--ink-soft);
  line-height: 1.55;
  font-size: var(--text-sm);
}

@media (max-width: 1100px) {
  .benefit-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .benefit-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
}
@media (max-width: 560px) {
  .benefit-grid { grid-template-columns: 1fr; gap: var(--space-5); }
}

/* ============================================
   CATALOG CARDS
   ============================================ */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8) var(--space-6);
}

.catalog-grid--2 { grid-template-columns: repeat(2, 1fr); gap: var(--space-12); }
.catalog-grid--4 { grid-template-columns: repeat(4, 1fr); gap: var(--space-6) var(--space-5); }

@media (max-width: 1100px) {
  .catalog-grid--4 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}
@media (max-width: 900px) {
  .catalog-grid,
  .catalog-grid--2 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}
@media (max-width: 560px) {
  .catalog-grid,
  .catalog-grid--2,
  .catalog-grid--4 {
    grid-template-columns: 1fr;
  }
}

/* Card badge — e.g. Bar-Height overlay */
.card-media { position: relative; }
.card-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 3;
  padding: 0.4rem 0.75rem;
  background: var(--charcoal, #23201d);
  color: var(--ivory, #f4efe8);
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 2px;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.card-badge--bar {
  background: #7a5a2f;
  color: #f4efe8;
}
.card-badge--gallery {
  background: rgba(30,26,22,0.75);
  color: #f4efe8;
  backdrop-filter: blur(6px);
  top: auto;
  bottom: var(--space-3);
  left: var(--space-3);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
}

/* Beds section: hide slider labels, keep the reveal itself */
/* Beds section: slightly taller than 16:9 to fit tall headboards without wasting vertical space */
.beds-section .room-slider {
  aspect-ratio: 5 / 4;
}
.beds-section .room-card {
  grid-template-columns: 1fr 1.25fr;
  align-items: center;
  gap: clamp(32px, 4vw, 56px);
}
.beds-section .room-card + .room-card {
  margin-top: clamp(48px, 6vw, 72px);
}
@media (max-width: 900px) {
  .beds-section .room-slider { aspect-ratio: 4 / 5; }
  .beds-section .room-card { grid-template-columns: 1fr; }
}

.beds-section .room-slider-label,
.room-card--no-labels .room-slider-label {
  display: none;
}

.piece-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform var(--transition);
}

.piece-card:hover {
  transform: translateY(-4px);
}

.piece-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--cream);
  margin-bottom: var(--space-4);
  overflow: hidden;
}

.piece-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 800ms var(--ease);
}

.piece-card:hover .piece-media img {
  transform: scale(1.03);
}

.piece-category {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  color: var(--taupe);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.piece-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: var(--space-2);
  line-height: 1.15;
}

.piece-price {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.piece-price em {
  font-style: normal;
  color: var(--taupe);
}

.piece-desc {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--ink-soft);
  margin-top: var(--space-2);
  line-height: 1.5;
}

/* ============================================
   FEATURED / SPLIT
   ============================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.split-image {
  aspect-ratio: 4/5;
  overflow: hidden;
}

.split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split-content {
  padding: clamp(3rem, 8vw, 6rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split-image { aspect-ratio: 3/2; }
  .split-content { padding: var(--space-8) var(--space-5); }
}

/* ============================================
   MARQUEE / STRIP
   ============================================ */
.strip {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.strip-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
  flex-wrap: wrap;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.strip-item {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--taupe);
  letter-spacing: 0.02em;
}

.strip-item::before {
  content: "◆";
  margin-right: 0.8rem;
  color: var(--rust);
  font-style: normal;
  font-size: 0.7em;
  vertical-align: 2px;
}

/* ============================================
   CUSTOMER CARDS
   ============================================ */
.customer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .customer-grid { grid-template-columns: 1fr; }
}

.customer-card {
  padding: var(--space-8);
  background: var(--paper);
  border: 1px solid var(--line-soft);
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
}

.customer-portrait {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--taupe-soft), var(--taupe));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.customer-body {
  flex: 1;
}

.customer-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.customer-meta {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--taupe);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.customer-quote {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

.customer-project {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-4);
  line-height: 1.5;
}

.customer-action {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rust);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  cursor: pointer;
  font-weight: 500;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.customer-action:hover {
  color: var(--ink);
}

/* ============================================
   SERVICE AREA
   ============================================ */
.town-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

@media (max-width: 900px) { .town-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .town-grid { grid-template-columns: repeat(2, 1fr); } }

.town {
  display: block;
  padding: var(--space-6) var(--space-4);
  border: 1px solid var(--line-soft);
  text-align: center;
  transition: background 220ms ease, border-color 220ms ease, color 220ms ease, transform 220ms ease;
  background: var(--paper);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.town:hover {
  background: var(--ink);
  color: var(--ivory);
  border-color: var(--ink);
  transform: translateY(-2px);
}
.town:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.town-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 0.15rem;
}

.town-region {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--taupe);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.town:hover .town-region { color: var(--ivory); opacity: 0.7; }

/* ============================================
   MILLS
   ============================================ */
.mill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8) var(--space-12);
}

@media (max-width: 768px) { .mill-grid { grid-template-columns: 1fr; } }

.mill {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--line);
}

.mill-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.mill-country {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--rust);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.mill-body {
  font-size: var(--text-base);
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: var(--space-3);
}

.mill-tags {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--taupe);
  letter-spacing: 0.05em;
}

/* ============================================
   PROCESS STEPS
   ============================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-6);
}

@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.step {
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
}

.step-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--rust);
  margin-bottom: var(--space-3);
  letter-spacing: 0.05em;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: var(--space-3);
  line-height: 1.15;
}

.step-body {
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: 1.55;
}

/* ============================================
   CTA BAND
   ============================================ */
.cta-band {
  padding: clamp(4rem, 8vw, 6rem) var(--space-6);
  text-align: center;
}

.cta-title {
  font-size: var(--text-2xl);
  font-weight: 400;
  margin-bottom: var(--space-4);
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.15;
}

.cta-sub {
  font-size: var(--text-lg);
  color: var(--ink-soft);
  margin-bottom: var(--space-8);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 300;
}

.section-dark .cta-sub, .section-forest .cta-sub {
  color: var(--ivory);
  opacity: 0.85;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--ink);
  color: var(--ivory);
  padding: var(--space-20) 0 var(--space-8);
}

.footer h4 {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--taupe-soft);
  margin-bottom: var(--space-4);
  font-weight: 500;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-16);
}

@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12) var(--space-6);
  }
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--ivory);
  margin-bottom: var(--space-3);
  letter-spacing: 0.03em;
}

.footer-brand-img {
  height: 198px;
  width: auto;
  display: block;
  margin-bottom: var(--space-5);
}
@media (max-width: 900px) {
  .footer-brand-img { height: 164px; }
}
@media (max-width: 600px) {
  .footer-brand-img { height: 144px; }
}

.footer-tagline {
  color: var(--taupe-soft);
  font-size: var(--text-sm);
  line-height: 1.55;
  max-width: 320px;
}

.footer a {
  color: var(--ivory);
  opacity: 0.75;
  font-size: var(--text-sm);
  display: block;
  padding: 0.35rem 0;
}

.footer a:hover {
  opacity: 1;
  color: var(--rust);
}

.footer-bottom {
  padding-top: var(--space-6);
  border-top: 1px solid rgba(245, 241, 232, 0.12);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--taupe-soft);
  letter-spacing: 0.05em;
}

/* ============================================
   PAGE HEADER (interior pages)
   ============================================ */
.page-header {
  padding: 10rem 0 4rem;
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}

/* Kill dead space between .page-header and following section (both live on ivory) */
.page-header + section,
.page-header + .section,
.page-header + section > .section-ivory:first-child,
.page-header + .section-ivory {
  padding-top: var(--space-8);
}

.page-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.page-crumbs {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: var(--space-6);
}

.page-crumbs a { color: var(--taupe); }
.page-crumbs a:hover { color: var(--rust); }
.page-crumbs span { color: var(--ink); }

.page-title {
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: var(--space-4);
  letter-spacing: -0.015em;
  max-width: 800px;
}

.page-title em { font-style: italic; color: var(--taupe); font-weight: 300; }

.page-sub {
  font-size: var(--text-lg);
  color: var(--ink-soft);
  max-width: 680px;
  line-height: 1.5;
  font-weight: 300;
}

/* ============================================
   FABRIC SWATCHES
   ============================================ */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

@media (max-width: 700px) { .swatch-grid { grid-template-columns: repeat(2, 1fr); } }

.swatch {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  padding: var(--space-3);
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================
   CONTACT
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-16);
  align-items: start;
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-12); }
}

.contact-block {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--line);
}
.contact-block:last-child { border-bottom: 1px solid var(--line); }

.contact-label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: var(--space-2);
}

.contact-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
}

.contact-value a { color: var(--ink); border-bottom: 1px solid var(--rust); padding-bottom: 2px; }
.contact-value a:hover { color: var(--rust); }

/* Form */
.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-5);
}

.form-field label {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--taupe);
  margin-bottom: var(--space-2);
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  padding: 0.85rem 0;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition);
  border-radius: 0;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-bottom-color: var(--rust); }

.form-field textarea { min-height: 120px; resize: vertical; }

.booking-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-4);
}

@media (max-width: 500px) { .booking-slots { grid-template-columns: repeat(2, 1fr); } }

.slot {
  padding: 0.85rem 0.5rem;
  border: 1px solid var(--line);
  text-align: center;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--paper);
}

.slot:hover:not(.slot-disabled),
.slot.slot-active {
  background: var(--ink);
  color: var(--ivory);
  border-color: var(--ink);
}

.slot-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* ============================================
   MISC
   ============================================ */
.divider {
  width: 60px;
  height: 1px;
  background: var(--rust);
  margin: var(--space-4) 0;
}

.mono-num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--taupe);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
}

.badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rust);
  padding: 0.35rem 0.7rem;
  border: 1px solid currentColor;
  background: transparent;
}

/* Fade-in on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Category filter chips */
.filter-bar {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--line);
}

.filter-chip {
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--line);
  background: transparent;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-chip:hover { border-color: var(--ink); color: var(--ink); }
.filter-chip.active { background: var(--ink); color: var(--ivory); border-color: var(--ink); }

/* ============================================
   CITY PAGES (Service Area / /areas/*)
   ============================================ */
.city-hero {
  position: relative;
  min-height: 62vh;
  padding: calc(var(--space-24) + 60px) 0 var(--space-16);
  color: var(--ivory);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.city-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-img);
  background-size: cover;
  background-position: center;
  filter: brightness(0.68);
  z-index: 0;
}
.city-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,18,15,0.35) 0%, rgba(20,18,15,0.15) 40%, rgba(20,18,15,0.75) 100%);
  z-index: 1;
}
.city-hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
  width: 100%;
}
.city-hero .page-crumbs {
  color: rgba(245,241,232,0.72);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
}
.city-hero .page-crumbs a {
  color: rgba(245,241,232,0.72);
  border-bottom: 1px solid rgba(245,241,232,0.3);
}
.city-hero .page-crumbs a:hover { color: var(--ivory); border-bottom-color: var(--ivory); }
.city-kicker {
  display: block;
  font-size: 12px;
  letter-spacing: 0.24em;
  color: rgba(245,241,232,0.78);
  margin-bottom: var(--space-5);
  text-transform: uppercase;
}
.city-h1 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  line-height: 1.05;
  color: var(--ivory);
  max-width: 22ch;
  margin-bottom: var(--space-6);
}
.city-h1 em { font-style: italic; color: var(--taupe-soft); font-weight: 300; }
.city-hero-meta {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
  color: rgba(245,241,232,0.85);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
}
.city-hero-meta strong { color: var(--ivory); font-weight: 500; }
@media (max-width: 700px) {
  .city-hero { min-height: 60vh; padding-top: calc(var(--space-16) + 60px); }
  .city-h1 { max-width: 100%; }
}

/* Intro band */
.city-intro {
  padding: var(--space-16) 0 var(--space-12);
  background: var(--ivory);
}
.city-intro-lead {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: 40ch;
  margin-bottom: var(--space-8);
}
.city-intro-body {
  columns: 2;
  column-gap: var(--space-12);
  max-width: 900px;
  color: var(--ink-soft);
  font-size: var(--text-base);
  line-height: 1.75;
}
.city-intro-body p { break-inside: avoid; margin-bottom: var(--space-4); }
@media (max-width: 800px) { .city-intro-body { columns: 1; } }

/* Why-custom band */
.city-why {
  padding: var(--space-16) 0;
  background: var(--cream);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.city-why-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-16);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.city-why-heading {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.7rem, 2.4vw, 2.4rem);
  line-height: 1.15;
  color: var(--ink);
}
.city-why-body {
  color: var(--ink-soft);
  font-size: var(--text-base);
  line-height: 1.8;
}
.city-why-body p { margin-bottom: var(--space-4); }
@media (max-width: 800px) {
  .city-why-inner { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* Directory (competitors / designers) */
.city-directory {
  padding: var(--space-16) 0;
  background: var(--ivory);
}
.directory-header {
  max-width: 720px;
  margin: 0 auto var(--space-10);
  text-align: center;
}
.directory-header h2 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: var(--space-4);
}
.directory-header p { color: var(--ink-soft); font-size: var(--text-base); line-height: 1.7; }
.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.directory-card {
  background: var(--cream);
  border: 1px solid var(--line-soft);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.directory-card:hover {
  transform: translateY(-2px);
  border-color: var(--taupe);
  box-shadow: 0 8px 24px rgba(20,18,15,0.06);
}
.directory-card-name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.18rem;
  line-height: 1.25;
  color: var(--ink);
}
.directory-card-cat {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--taupe);
}
.directory-card-desc {
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.6;
  flex: 1;
}
.directory-card-link {
  font-size: var(--text-sm);
  color: var(--rust);
  border-bottom: 1px solid var(--rust);
  align-self: flex-start;
  padding-bottom: 2px;
}
.directory-card-link:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* Events */
.city-events {
  padding: var(--space-16) 0;
  background: var(--cream);
  border-top: 1px solid var(--line-soft);
}
.events-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-6);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.event-card {
  background: var(--ivory);
  border-left: 2px solid var(--rust);
  padding: var(--space-5) var(--space-6);
  transition: border-color var(--transition);
}
.event-card:hover { border-left-color: var(--ink); }
.event-when {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: var(--space-2);
}
.event-name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.24rem;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: var(--space-2);
}
.event-desc { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.6; margin-bottom: var(--space-3); }
.event-link {
  font-size: var(--text-sm);
  color: var(--taupe);
  border-bottom: 1px solid var(--taupe);
  padding-bottom: 2px;
}
.event-link:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* Real estate + neighborhoods strip */
.city-context {
  padding: var(--space-16) 0;
  background: var(--ivory);
}
.context-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.context-block h3 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 1.6rem;
  color: var(--ink);
  margin-bottom: var(--space-4);
}
.context-figure {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--line-soft);
}
.context-figure-label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--taupe); }
.context-figure-value { font-family: var(--font-serif); font-size: 1.4rem; color: var(--ink); line-height: 1.3; }
.context-neighborhoods {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.context-neighborhoods span {
  padding: 6px 14px;
  background: var(--cream);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
@media (max-width: 800px) { .context-grid { grid-template-columns: 1fr; gap: var(--space-8); } }

/* Closing / CTA */
.city-close {
  padding: var(--space-16) 0;
  background: var(--forest);
  color: var(--ivory);
}
.city-close-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  text-align: center;
}
.city-close p {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1.55;
  color: var(--ivory);
  margin-bottom: var(--space-8);
}

/* Service area index — tile version */
.area-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5);
}
.area-tile {
  display: block;
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  color: var(--ivory);
  border: 1px solid var(--line-soft);
}
.area-tile picture,
.area-tile > picture {
  position: absolute; inset: 0;
  display: block;
}
.area-tile img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}
.area-tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,18,15,0.0) 40%, rgba(20,18,15,0.75) 100%);
}
.area-tile:hover img { transform: scale(1.04); }
.area-tile-caption {
  position: absolute;
  left: var(--space-5);
  bottom: var(--space-5);
  right: var(--space-5);
  z-index: 2;
}
.area-tile-name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--ivory);
  line-height: 1.2;
}
.area-tile-region {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245,241,232,0.75);
  margin-top: 4px;
}

/* ============================================
   FABRIC LIBRARY (editorial gallery)
   ============================================ */
.fabric-library .section-header {
  margin-bottom: var(--space-16);
}

.fab-family {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-16);
  align-items: stretch;
}
.fab-family:last-of-type { margin-bottom: 0; }
.fab-family--right {
  grid-template-columns: 1fr 1.35fr;
}
.fab-family--right .fab-family-hero { order: 2; }
.fab-family--right .fab-family-swatches { order: 1; }

.fab-family-hero {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--ink);
}
.fab-family-hero picture,
.fab-family-hero > picture {
  position: absolute; inset: 0;
  display: block;
}
.fab-family-hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 900ms cubic-bezier(.2,.7,.2,1);
}
.fab-family:hover .fab-family-hero img {
  transform: scale(1.03);
}
.fab-family-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,18,15,0.05) 0%, rgba(20,18,15,0.0) 30%, rgba(20,18,15,0.65) 100%);
  pointer-events: none;
}
.fab-family-caption {
  position: absolute;
  left: var(--space-8);
  right: var(--space-8);
  bottom: var(--space-8);
  color: var(--ivory);
  z-index: 2;
}
.fab-family-num {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: rgba(245,241,232,0.7);
  margin-bottom: var(--space-4);
}
.fab-family-name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.2rem, 3.6vw, 3.4rem);
  line-height: 1.02;
  margin: 0 0 var(--space-3);
  color: var(--ivory);
}
.fab-family-name em {
  font-style: italic;
  color: rgba(245,241,232,0.85);
}
.fab-family-note {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.55;
  color: rgba(245,241,232,0.85);
  max-width: 34ch;
  margin: 0;
}

.fab-family-swatches {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: var(--space-4);
}
.fab-swatch {
  position: relative;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--space-5);
  align-items: center;
  padding: 0;
}
.fab-swatch picture,
.fab-swatch > picture {
  display: block;
  aspect-ratio: 1/1;
  overflow: hidden;
}
.fab-swatch img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 700ms cubic-bezier(.2,.7,.2,1);
}
.fab-swatch:hover img { transform: scale(1.06); }
.fab-swatch figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fab-swatch-name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--ink);
}
.fab-swatch-note {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--taupe);
  line-height: 1.4;
}

.fab-library-note {
  text-align: center;
  margin-top: var(--space-12);
  color: var(--taupe);
  font-size: var(--text-sm);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Tablet: stack hero above swatches; swatches become a horizontal row */
@media (max-width: 960px) {
  .fab-family,
  .fab-family--right {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-12);
  }
  .fab-family--right .fab-family-hero { order: 1; }
  .fab-family--right .fab-family-swatches { order: 2; }
  .fab-family-hero { aspect-ratio: 3/2; }
  .fab-family-swatches {
    grid-template-rows: none;
    grid-template-columns: repeat(3, 1fr);
  }
  .fab-swatch {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .fab-family-caption {
    left: var(--space-6);
    right: var(--space-6);
    bottom: var(--space-6);
  }
}

/* Mobile: swatches stack fully */
@media (max-width: 560px) {
  .fab-family-hero { aspect-ratio: 4/5; }
  .fab-family-swatches {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .fab-swatch {
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-4);
    align-items: center;
  }
  .fab-family-name {
    font-size: 2rem;
  }
}

/* ==========================================================================
   HOMEPAGE FABRIC PREVIEW GRID
   ========================================================================== */
.fabrics-preview {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}
.fabric-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px;
  gap: var(--space-4);
  margin-top: var(--space-10);
}
.fab-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  background: #2a2620;
  text-decoration: none;
  color: #fff;
  isolation: isolate;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.fab-tile picture,
.fab-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}
.fab-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,0) 40%,
    rgba(0,0,0,0.55) 85%,
    rgba(0,0,0,0.75) 100%);
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.fab-tile-caption {
  position: absolute;
  left: var(--space-5);
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateY(6px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.fab-tile-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
  font-weight: 500;
}
.fab-tile-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.01em;
}
.fab-tile:hover img,
.fab-tile:focus-visible img {
  transform: scale(1.06);
}
.fab-tile:hover,
.fab-tile:focus-visible {
  box-shadow: 0 24px 48px -20px rgba(0,0,0,0.35);
  outline: none;
}
.fab-tile:hover .fab-tile-caption,
.fab-tile:focus-visible .fab-tile-caption {
  transform: translateY(0);
}

/* First tile spans 2 columns and 2 rows (large linen hero) */
.fab-tile--tall {
  grid-column: span 2;
  grid-row: span 2;
}
.fab-tile--tall .fab-tile-name {
  font-size: 1.75rem;
}
/* Wide bottom tile spans 2 columns (pairs with boucle on left) */
.fab-tile--wide {
  grid-column: span 2;
}
.fab-tile--wide .fab-tile-name {
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

/* Tablet */
@media (max-width: 960px) {
  .fabric-preview-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
    gap: var(--space-3);
  }
  .fab-tile--tall {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: unset;
  }
  .fab-tile--wide {
    grid-column: span 2;
  }
  .fab-tile-name {
    font-size: 1.15rem;
  }
  .fab-tile--tall .fab-tile-name {
    font-size: 1.5rem;
  }
}

/* Mobile */
@media (max-width: 560px) {
  .fabric-preview-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
    gap: var(--space-3);
  }
  .fab-tile--tall,
  .fab-tile--wide {
    grid-column: span 1;
  }
  .fab-tile-caption {
    left: var(--space-4);
    right: var(--space-4);
    bottom: var(--space-4);
  }
}

/* ============================================================
   FAVORITE ROOMS — factory-to-home before/after slider
   ============================================================ */
.favorite-rooms .rooms-list {
  display: grid;
  gap: var(--space-16);
  margin-top: var(--space-12);
}

.room-card {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: var(--space-10);
  align-items: center;
}

.room-card:nth-child(even) {
  grid-template-columns: 1fr 1.35fr;
}
.room-card:nth-child(even) .room-slider { order: 2; }
.room-card:nth-child(even) .room-copy { order: 1; }

.room-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #0e0d0a;
  user-select: none;
  -webkit-user-select: none;
  cursor: ew-resize;
  box-shadow: 0 20px 60px -30px rgba(0,0,0,0.35), 0 2px 6px -3px rgba(0,0,0,0.15);
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.room-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.room-slider-home {
  z-index: 1;
}

/* Factory image sits at full slider size on top of the home image.
   The reveal is driven by clip-path (JS updates --reveal-pct on the slider).
   This keeps both images at native resolution — no image scaling ever. */
.room-slider-factory-wrap {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  clip-path: inset(0 calc(100% - var(--reveal-pct, 50%)) 0 0);
  will-change: clip-path;
}
.room-slider-factory-wrap .room-slider-factory {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.room-slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 44px;
  transform: translateX(-50%);
  z-index: 4;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  will-change: left;
}

.room-slider-handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 12px rgba(0,0,0,0.4);
}

.room-slider-handle-knob {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 14px rgba(0,0,0,0.32), 0 1px 3px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink, #1a1a1a);
  transition: transform 200ms ease-out;
}

.room-slider-handle:focus-visible .room-slider-handle-knob {
  outline: 2px solid var(--taupe, #c9b891);
  outline-offset: 3px;
}

.room-slider:hover .room-slider-handle-knob {
  transform: scale(1.06);
}

.room-slider.is-dragging {
  cursor: grabbing;
}
.room-slider.is-dragging .room-slider-handle-knob {
  transform: scale(1.12);
}

.room-slider-handle-knob svg {
  width: 20px;
  height: 20px;
}

.room-slider-label {
  position: absolute;
  z-index: 3;
  top: 16px;
  padding: 6px 12px;
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.94);
  background: rgba(15, 12, 8, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 2px;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.room-slider-label--factory { left: 16px; }
.room-slider-label--home { right: 16px; }

.room-slider.is-dragging .room-slider-label {
  opacity: 0.35;
}

/* Copy column */
.room-copy .room-title {
  font-family: var(--font-serif, "Cormorant Garamond", serif);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 400;
  line-height: 1.05;
  color: var(--ink, #1a1a1a);
  letter-spacing: -0.01em;
  margin: 0 0 12px 0;
}

.room-copy .room-subtitle {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--taupe-deep, #8a7a5c);
  margin: 0 0 var(--space-6, 20px) 0;
}

.room-copy .room-story {
  font-family: var(--font-sans, "Inter", sans-serif);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft, #444);
  margin: 0;
  max-width: 44ch;
}

/* Tablet */
@media (max-width: 960px) {
  .room-card,
  .room-card:nth-child(even) {
    grid-template-columns: 1fr;
    gap: var(--space-6, 20px);
  }
  .room-card .room-slider,
  .room-card:nth-child(even) .room-slider { order: 1; }
  .room-card .room-copy,
  .room-card:nth-child(even) .room-copy { order: 2; }
  .room-copy .room-story { max-width: none; }
  .favorite-rooms .rooms-list { gap: var(--space-12, 48px); }
}

/* Mobile */
@media (max-width: 600px) {
  .room-slider-label {
    font-size: 9px;
    padding: 4px 9px;
    top: 12px;
  }
  .room-slider-label--factory { left: 12px; }
  .room-slider-label--home { right: 12px; }
  .room-slider-handle { width: 40px; }
  .room-slider-handle-knob { width: 40px; height: 40px; }
  .room-slider-handle-knob svg { width: 18px; height: 18px; }
}
