/* Landing-only sections (v29): hero, gallery stack, bridge, Living Art, featured.
   Hero and Living Art share one background treatment: a near-black-and-white,
   low-contrast, dimmed photo on a dedicated movable layer (filter + opacity on
   the LAYER only, never the section) under a dark neutral overlay, with subtle
   scroll parallax. No grid/grain/white-wash. */

/* ---------- Hero ---------- */
 
.hero {
  position: relative;
  min-height: 100vh;
  padding: 98px clamp(18px, 4vw, 54px) 64px;
  overflow: hidden;
  display: flex;
  align-items: center;
  isolation: isolate;
  background: #211e1a; /* dark base under the dimmed photo layer */
}
.hero::before { content: none; }
/* Movable background: muted-color, low-contrast, dimmed photo. Filter
   + opacity live ONLY on this layer, never the section, so foreground text is
   untouched. Fixed small slack (inset -4% + scale 1.03) covers the bounded
   parallax drift; JS drives --parallax-y (see landing.js), never the layer size. */
.hero-bg {
  --bg-overhang: 90%;
  position: absolute;
  inset: calc(-1 * var(--bg-overhang)) 0;
  z-index: -3;
  background: url("/assets/img/backgrounds/rug-floor.jpg") center 30% / 100% auto no-repeat;
  filter: grayscale(.2) saturate(.85) contrast(.62) brightness(.6);
  opacity: .7;
  transform: translate3d(0, var(--parallax-y, 0px), 0);
  will-change: transform;
}
/* Dark, neutral wash (not white) — unifies the image and guarantees text
   contrast without hiding the photo. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(rgba(33,29,25,.42), rgba(33,29,25,.5));
  pointer-events: none;
}

.hero-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(360px, .82fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
}
.hero-copy { color: var(--bone); position: relative; z-index: 2; }
.eyebrow {
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: rgba(251,248,242,.72);
}
.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--fs-hero);
  font-weight: 300;
  line-height: .84;
  letter-spacing: -.014em;
  text-shadow: 0 14px 48px rgba(0,0,0,.22);
}
.hero-title span { display: block; }
.hero-title .smaller { font-size: .80em; }
.hero-lede {
  max-width: 560px;
  margin: 24px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.22rem, 1.72vw, 1.5rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .01em;
  color: rgba(251,248,242,.80);
}
.hero-mini {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  font-family: var(--serif);
  color: rgba(251,248,242,.66);
  font-size: calc(var(--fs-tag) + 1px);
  font-style: italic;
  line-height: 1.1;
}
.hero-mini .dot { color: rgba(251,248,242,.42); font-size: .78em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }

.hero-btn, .hero-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform .28s var(--ease), background .28s var(--ease), color .28s var(--ease), border-color .28s var(--ease);
}
.hero-btn { border: 1px solid var(--bone); background: var(--bone); color: var(--ink); }
.hero-btn:hover { transform: translateY(-2px); background: #fff; }
.hero-btn-ghost { border: 1px solid rgba(251,248,242,.58); background: transparent; color: var(--bone); }
.hero-btn-ghost:hover { transform: translateY(-2px); background: rgba(251,248,242,.12); }
.hero-btn:focus-visible, .hero-btn-ghost:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }

/* ---------- Feature gallery stack ---------- */

.feature-area {
  position: relative;
  min-height: 650px;
  padding: 44px 0 62px;
  display: grid;
  place-items: center;
}
.feature-label {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  width: max-content;
  max-width: 280px;
  color: rgba(251,248,242,.72);
  font-family: var(--serif);
  font-size: 1rem;
  text-align: center;
  text-shadow: 0 12px 30px rgba(0,0,0,.18);
  z-index: 7;
}
.feature-label .script-word { color: var(--bone); } /* "See for yourself" — white */
.feature-meta {
  position: absolute;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  z-index: 7;
  color: rgba(251,248,242,.60);
  font-family: var(--sans);
  font-size: calc(var(--fs-meta) - 1px);
  line-height: 1.55;
  letter-spacing: .18em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}
.work-stack {
  position: relative;
  width: min(400px, 70vw);
  height: 500px;
  z-index: 4;
  perspective: 900px;
}
.work-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 18px;
  background: rgba(251,248,242,.96);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 28px 60px rgba(0,0,0,.22);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 58px, -170px) scale(.70);
  filter: grayscale(.25) saturate(.55);
  transition: transform .82s var(--ease), opacity .82s var(--ease), filter .82s var(--ease);
  will-change: transform, opacity;
}
.work-card.prev { transform: translate3d(-92px, 38px, -105px) rotateY(8deg) scale(.78); opacity: .34; filter: grayscale(.18) saturate(.70); z-index: 2; }
.work-card.next { transform: translate3d(92px, 38px, -105px) rotateY(-8deg) scale(.78); opacity: .34; filter: grayscale(.18) saturate(.70); z-index: 2; }
.work-card.active { transform: translate3d(0,0,0) scale(1); opacity: 1; filter: none; z-index: 5; pointer-events: auto; }
.work-card.hidden-card { z-index: 0; }

.rug-img {
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--surface-sink);
  overflow: hidden;
  border: 1px solid rgba(49,45,40,.12);
  box-shadow: inset 0 0 0 10px rgba(251,248,242,.28), inset 0 0 0 28px rgba(49,45,40,.10);
}
.rug-img.has-photo { box-shadow: none; border-color: rgba(49,45,40,.16); }
.rug-img.has-photo::before, .rug-img.has-photo::after { display: none; }
.rug-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform .35s var(--ease);
  will-change: transform;
}
.work-card.active .rug-img:hover img {
  transform: scale(1.1);
}
.work-card.prev {
  transform: translate3d(-92px, 38px, -105px) rotateY(8deg) scale(.78);
  opacity: 0;
  filter: grayscale(.18) saturate(.70);
  z-index: 2;
}

.work-card.next {
  transform: translate3d(92px, 38px, -105px) rotateY(-8deg) scale(.78);
  opacity: 0;
  filter: grayscale(.18) saturate(.70);
  z-index: 2;
}
.work-card.active {
  transform: translate3d(0,0,0) scale(1);
  opacity: 1;
  filter: none;
  z-index: 5;
  pointer-events: auto;
}
.rug-img::before, .rug-img::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(251,248,242,.58);
  background:
    radial-gradient(ellipse at center, rgba(251,248,242,.32) 0 13%, transparent 14%),
    radial-gradient(ellipse at center, transparent 0 36%, rgba(49,45,40,.14) 37% 39%, transparent 40%),
    repeating-linear-gradient(45deg, rgba(251,248,242,.16) 0 5px, transparent 5px 15px);
}
.rug-img::after { inset: 8%; background: none; border: 1px solid rgba(49,45,40,.20); box-shadow: inset 0 0 0 10px rgba(251,248,242,.10); }
.rug-pattern {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 47%, rgba(251,248,242,.12) 48% 52%, transparent 53% 100%),
    linear-gradient(0deg, transparent 0 47%, rgba(251,248,242,.10) 48% 52%, transparent 53% 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.10) 0 2px, transparent 2px 38px),
    repeating-linear-gradient(0deg, rgba(0,0,0,.08) 0 1px, transparent 1px 34px);
  mix-blend-mode: soft-light;
}
.work-caption { min-height: 76px; padding: 14px 4px 0; text-align: center; }
.work-caption strong { display: block; font-family: var(--serif); font-size: var(--fs-accent); font-weight: 500; line-height: 1; color: var(--ink); }
.work-caption span { display: block; margin-top: 8px; font-family: var(--sans); font-size: var(--fs-meta); font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); }

.work-stage {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 24px);
  z-index: 4;
}

.stack-arrow {
  flex: 0 0 44px;
  width: 44px;
  height: 54px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(251,248,242,.72);
  font-family: var(--serif);
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 6px 18px rgba(0,0,0,.32);
  transition:
    color .2s var(--ease),
    transform .2s var(--ease);
}

.stack-arrow:hover {
  color: var(--bone);
  transform: scale(1.12);
}

.stack-arrow:focus-visible {
  outline: 2px solid var(--bone);
  outline-offset: 3px;
}

.stack-arrow:disabled {
  opacity: .25;
  cursor: default;
  transform: none;
}

.work-index {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 8;
  transform: translateX(-50%);
  min-width: 70px;
  text-align: center;
  font-family: var(--sans);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(251,248,242,.66);
}

/* ---------- Bridge ---------- */

.bridge {
  position: relative;
  margin-top: -1px;
  padding: 72px clamp(18px,4vw,54px) 74px;
  background: linear-gradient(180deg, #f8f4ec 0%, #eee8dd 100%);
  border-bottom: 1px solid rgba(49,45,40,.10);
}
.bridge-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(24px, 6vw, 86px);
  align-items: center;
}
.bridge-kicker {
  margin: 0 0 16px;
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: .30em;
  text-transform: uppercase;
  color: var(--clay-deep);
}
.bridge h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--fs-section);
  font-weight: 400;
  line-height: .94;
  letter-spacing: -.012em;
  color: var(--ink);
}
.bridge p {
  max-width: 520px;
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: var(--fs-lede);
  line-height: 1.4;
  color: var(--ink-soft);
}
.preview-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mini-work {
  position: relative;
  min-height: 240px;
  padding: 10px;
  background: var(--bone);
  border: 1px solid rgba(49,45,40,.10);
  box-shadow: 0 18px 38px rgba(49,45,40,.10);
  transform: translateY(var(--rise, 0)) scale(1);
  transition:
    transform .28s var(--ease),
    box-shadow .28s var(--ease);
  will-change: transform;
}
.mini-work:nth-child(2) { --rise: -16px; }
.mini-work:nth-child(3) { --rise: 5px; }
.mini-work:hover {
  z-index: 2;
  transform: translateY(var(--rise, 0)) scale(1.05);
  box-shadow: 0 24px 48px rgba(49,45,40,.16);
}
.mini-img { position: relative; height: 190px; background: var(--surface-sink); overflow: hidden; }
.mini-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mini-img::before {
  content: ""; position: absolute; inset: 18px; border: 1px solid rgba(251,248,242,.5);
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.16) 0 5px, transparent 5px 14px);
}
.mini-img:has(img)::before { display: none; }
.mini-work span {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 300;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #5c554d;
}

/* ---------- Living Art (hand-weaving background) ---------- */

.legacy {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 92px clamp(18px,4vw,54px);
  background: #211e1a; /* dark base, same treatment as the hero */
}
/* Movable muted-color weaving photo — identical filter/opacity to the hero
   so both sections read as the same subdued background atmosphere. Same fixed
   slack + --parallax-y model as .hero-bg. */
.living-bg {
  --bg-overhang: 90%;
  position: absolute;
  inset: calc(-1 * var(--bg-overhang)) 0;
  z-index: -3;
  background: url("/assets/img/backgrounds/hand-weaving.jpg") center / 100% auto no-repeat;
  filter: grayscale(.2) saturate(.85) contrast(.62) brightness(.6);
  opacity: .7;
  transform: translate3d(0, var(--parallax-y, 0px), 0);
  will-change: transform;
}
/* Dark neutral wash (slightly stronger than the hero — more/finer text here). */
.legacy::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(rgba(33,29,25,.52), rgba(33,29,25,.58));
  pointer-events: none;
}
.legacy-inner {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(28px, 6vw, 90px);
  align-items: start;
}
.legacy .copy p {
  margin: 24px 0 0;
  font-family: var(--mulish);
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.58;
  color: rgba(251,248,242,.82);
}
.legacy .copy p.bridge-kicker { font-family: var(--sans); font-weight: 600; font-size: var(--fs-label); color: #c9a06f; }
.legacy h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--fs-section);
  font-weight: 400;
  line-height: .94;
  letter-spacing: -.012em;
  color: var(--bone);
}
.quote {
  margin-top: 10px;
  padding: 24px 0 0 28px;
  border-left: 1px solid var(--clay);
  font-family: var(--serif);
  font-size: var(--fs-quote);
  font-style: italic;
  line-height: 1.25;
  color: rgba(251,248,242,.9);
}
.script-word {
  font-family: "Mr De Haviland", cursive;
  font-size: 1.85em;
  font-weight: 400;
  line-height: 0;
  color: #c9a06f;
  display: inline-block;
  transform: translateY(.08em);
}
.timeline { display: grid; gap: 0; margin-top: 82px; }
.time-card {
  background: transparent;
  padding: 22px 0;
}
.time-card:first-child { padding-top: 0; }
.time-card:last-child { padding-bottom: 0; }
.time-card + .time-card { border-top: 1px solid rgba(251,248,242,.18); } /* divider between items only */
.time-card b { display: block; font-family: var(--serif); font-size: var(--fs-stat); font-weight: 500; line-height: 1; margin-bottom: 10px; color: var(--bone); }
.time-card span { color: rgba(251,248,242,.72); font-size: 1.1rem; line-height: 1.6; }

/* ---------- Featured section (real API cards) ---------- */

.landing-catalog {
  padding: 92px clamp(18px,4vw,54px) 150px;
  background: linear-gradient(180deg, rgba(49,45,40,.03), transparent 130px), #f9f5ee;
}
.view-full {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--clay-deep);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, color .2s;
}
.view-full:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- Footer ---------- */

.footer {
  padding: 44px 24px 52px;
  background: #2f2b26;
  color: rgba(251,248,242,.62);
  text-align: center;
  font-family: var(--sans);
  font-size: var(--fs-ui);
  letter-spacing: .08em;
  line-height: 1.7;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero-inner, .bridge-inner, .legacy-inner { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-lede, .hero-actions, .hero-mini { margin-left: auto; margin-right: auto; justify-content: center; }
  .feature-area { min-height: 540px; }
  .feature-label, .feature-meta { display: none; }
}
@media (max-width: 640px) {
  .hero { padding-top: 88px; }
  .hero-title { font-size: clamp(3.6rem, 19vw, 5.5rem); }
  .hero-mini { justify-content: center; gap: 8px 10px; }
  .work-stack {
      height: 450px;
      width: min(320px, calc(100vw - 88px));
    }

    .work-stage {
      gap: 4px;
    }

    .stack-arrow {
      flex-basis: 36px;
      width: 36px;
      font-size: 2rem;
    }
  .preview-strip { grid-template-columns: 1fr; }
  .mini-work { transform: none !important; min-height: 180px; }
  .mini-img { height: 150px; }
  .timeline { margin-top: 40px; }
}
