@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-var.woff2") format("woff2");
  font-weight: 300 400;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-var.woff2") format("woff2");
  font-weight: 400 500;
  font-display: swap;
}

:root {
  --paper: #faf8f5;
  --ink: #1a1a18;
  --oak: #8a7a63;
  --oak-deep: #6b5d49;
  --stone: #e8e4dd;
  --graphite: #2e2d2a;
  --hairline: #d8d2c8;
  --gap: clamp(64px, 10vw, 120px);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-slow: 1.1s;
  --dur-med: 0.6s;
  --dur-fast: 0.3s;

  --display: "Cormorant Garamond", Georgia, serif;
  --sans: "Instrument Sans", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, .display {
  font-family: var(--display);
  letter-spacing: -0.02em;
  font-weight: 300;
}

.label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--oak);
  font-family: var(--sans);
}

/* ---- Hero film ---- */
.film-driver {
  position: relative;
}

.hero.film-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  color: var(--paper);
  background: var(--graphite);
}

#filmCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.film-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero.film-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.08) 30%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
}

.film-progress {
  position: absolute;
  z-index: 2;
  left: clamp(20px, 5vw, 64px);
  right: clamp(20px, 5vw, 64px);
  bottom: 16px;
  height: 1px;
  background: rgba(250,248,245,0.2);
}

.film-progress-bar {
  height: 100%;
  width: 100%;
  background: var(--paper);
  transform-origin: left;
  transform: scaleX(0);
}

.hero-bottom.beat {
  transition: opacity 0.2s linear;
}

.hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(20px, 4vw, 40px) clamp(20px, 5vw, 64px);
}

.logo-slot { height: 48px; display: flex; align-items: center; }

.logo-lockup {
  display: flex;
  align-items: center;
  gap: 0.6em;
  color: var(--paper);
  transform-origin: left center;
}

.logo-mark {
  width: 48px;
  height: 48px;
  flex: none;
}
.logo-mark path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-wordmark {
  font-family: var(--display);
  font-size: 1.4rem;
  white-space: nowrap;
}
.logo-square { letter-spacing: 0.18em; text-transform: uppercase; }
.logo-wordmark em { font-style: italic; opacity: 0.85; }

.logo-tagline {
  font-family: var(--sans);
  font-size: 0.5rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0.7;
  display: none;
}

.logo-mobile {
  display: none;
  height: clamp(34px, 13vw, 56px);
  width: auto;
  flex: none;
}

/* ---- Grand entrance: large centered logo → morphs into nav slot ---- */
.logo-lockup.entrance-large {
  position: fixed;
  z-index: 20;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(2.6);
  opacity: 0;
}
.logo-lockup.entrance-large.entrance-in {
  opacity: 1;
  transition: opacity var(--dur-med) var(--ease-out-expo), transform var(--dur-med) var(--ease-out-expo);
  transform: translate(-50%, -50%) scale(2.6) translateY(0);
}
.logo-lockup.entrance-large .logo-tagline { display: block; }
.logo-lockup.entrance-morph {
  transition: transform 1.2s var(--ease-inout), left 1.2s var(--ease-inout), top 1.2s var(--ease-inout);
}
.logo-lockup.entrance-morph .logo-tagline { opacity: 0; transition: opacity 0.3s ease-out; }

.hero.entering .hero-top { opacity: 0; }
.hero-top { transition: opacity var(--dur-med) ease-out; }
.hero.entering .hero-bottom { opacity: 0 !important; }

.hero-top a {
  position: relative;
  display: inline-block;
  color: var(--paper);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(250,248,245,0.5);
  padding-bottom: 4px;
  transition: transform var(--dur-fast) var(--ease-spring);
}

.hero-bottom {
  position: relative;
  z-index: 2;
  padding: clamp(24px, 6vw, 64px);
}

.hero-bottom h1 {
  font-size: clamp(2rem, 6vw, 4.6rem);
  margin: 0 0 12px;
  max-width: 20ch;
}

.hero-bottom h1 .line {
  display: block;
  overflow: hidden;
}

.hero-bottom h1 .line span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform var(--dur-slow) var(--ease-out-expo);
}

.hero.loaded h1 .line:nth-child(1) span { transition-delay: 0.15s; }
.hero.loaded h1 .line:nth-child(2) span { transition-delay: 0.24s; }
.hero.loaded h1 .line span { transform: translateY(0); }

.hero-scroll {
  position: absolute;
  z-index: 2;
  bottom: 28px;
  right: clamp(20px, 5vw, 64px);
  writing-mode: vertical-rl;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250,248,245,0.75);
}

/* ---- Statement ---- */
.statement {
  padding: var(--gap) clamp(20px, 6vw, 64px);
  text-align: center;
}

.statement p {
  font-family: var(--display);
  font-weight: 300;
  max-width: 30ch;
  margin: 0 auto;
  font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* ---- Brand stack (D2: sticky chapters) ---- */
.brand-stack {
  position: relative;
}

.brand-chapter {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 560px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  background: var(--paper);
}

.brand-chapter.dark { background: var(--graphite); color: var(--paper); }
.brand-chapter.reverse { direction: rtl; }
.brand-chapter.reverse > * { direction: ltr; }

.brand-chapter figure {
  margin: 0;
  overflow: hidden;
  height: 100%;
}

.brand-chapter .chapter-media {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.brand-chapter img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  transition: transform var(--dur-slow) var(--ease-inout), opacity var(--dur-slow) var(--ease-inout);
}

.brand-chapter.covered img { transform: scale(0.94); opacity: 0.55; }

.brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 6vw, 96px);
}

.brand-copy .label { margin-bottom: 18px; }

.brand-copy h2 {
  font-size: clamp(1.9rem, 3.4vw, 3.1rem);
  margin: 0 0 22px;
}

.brand-copy p {
  font-family: var(--sans);
  max-width: 40ch;
  margin: 0;
  opacity: 0.82;
}

/* spacer so each chapter gets scroll runway to peel */
.chapter-spacer { height: 40vh; }

/* ---- Detail strip ---- */
.detail-strip {
  padding: var(--gap) clamp(20px, 5vw, 64px);
  position: relative;
  z-index: 3;
  background: var(--paper);
}

.detail-strip .label { display: block; text-align: center; margin-bottom: 40px; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 16px;
}

.detail-grid .reveal-mask {
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--dur-slow) var(--ease-inout);
}

.detail-grid .reveal-mask.in { clip-path: inset(0 0 0 0); }
.detail-grid .reveal-mask:nth-child(2) { transition-delay: 0.1s; }
.detail-grid .reveal-mask:nth-child(3) { transition-delay: 0.2s; }

.detail-grid img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.materials {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.materials .label { display: block; margin-bottom: 10px; }
.materials p { margin: 0; font-size: 0.9rem; opacity: 0.75; }

/* ---- Process ---- */
.process {
  padding: var(--gap) clamp(20px, 6vw, 64px);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  position: relative;
  z-index: 3;
  background: var(--paper);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.process-step .num {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--oak);
  margin-bottom: 10px;
}

.process-step h3 {
  font-size: 1.5rem;
  margin: 0 0 12px;
}

.process-step p { margin: 0; opacity: 0.75; font-size: 0.95rem; }

/* ---- Footer / Visit ---- */
.visit {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  color: var(--paper);
  overflow: hidden;
  z-index: 3;
}

.visit img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.visit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.18) 55%, transparent 80%);
  z-index: 1;
}

.visit-copy {
  position: relative;
  z-index: 2;
  padding: clamp(28px, 6vw, 90px);
  max-width: 460px;
}

.visit-copy .label { color: rgba(250,248,245,0.7); }

.visit-copy h2 {
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  margin: 16px 0 24px;
}

.visit-copy address, .visit-copy .hours {
  font-style: normal;
  font-size: 0.9rem;
  color: rgba(250,248,245,0.85);
  margin: 0 0 6px;
  font-family: var(--sans);
}

.visit-copy a.cta {
  position: relative;
  display: inline-block;
  margin-top: 28px;
  color: var(--paper);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(250,248,245,0.6);
  padding-bottom: 4px;
  transition: transform var(--dur-fast) var(--ease-spring);
}

/* ---- Magnetic CTA ---- */
.magnetic { will-change: transform; }

/* ---- Reveal (rest-beat sections only) ---- */
.reveal {
  opacity: 0;
  transition: opacity var(--dur-med) ease-out;
}
.reveal.in { opacity: 1; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .film-poster, .hero-bottom h1 .line span, .brand-chapter img, .detail-grid .reveal-mask,
  .hero-top a, .visit-copy a.cta, .reveal, .hero-bottom.beat, .hero-top,
  .logo-lockup.entrance-large, .logo-lockup.entrance-morph {
    transition: none !important;
    transform: none !important;
    clip-path: inset(0 0 0 0) !important;
    opacity: 1 !important;
    position: static !important;
  }
  .brand-chapter { position: relative; }
  .film-progress { display: none; }
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .brand-chapter, .brand-chapter.reverse { grid-template-columns: 1fr; direction: ltr; position: relative; height: auto; min-height: 480px; }
  .brand-chapter figure { height: 46vh; }
  .brand-chapter.covered img { transform: none; opacity: 1; transition: none; }
  .chapter-spacer { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid img { height: 240px; }
  .process-grid { grid-template-columns: 1fr; gap: 32px; }
  .materials { grid-template-columns: 1fr; }
  .visit-copy { max-width: 100%; }
  .magnetic { transform: none !important; }
  .hero-top a, .visit-copy a.cta { padding: 12px 4px; margin: -12px -4px; }
}

/* ---- Mobile/tablet hero: compact single-image logo replaces the SVG+text lockup AND
   the fixed-position "grand entrance" animated logo, both of which were wide/huge enough
   (nowrap wordmark; entrance scales to 2.6x centered) to crowd/overlap the "Visit the
   showroom" link below desktop widths. Matches the existing 860px tablet breakpoint so
   there's no gap width where the old wide/animated logo can still clash. Nav row also
   tightened so it can never wrap onto the headline below. ---- */
@media (max-width: 860px) {
  .hero-top { padding: 16px 20px; gap: 12px; }
  .logo-slot { height: 22px; flex: 1 1 auto; min-width: 0; }
  .logo-lockup, .logo-lockup.entrance-large, .logo-lockup.entrance-morph { display: none; }
  .logo-mobile { display: block; max-width: 100%; }
  .hero-top a {
    flex: none;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    white-space: nowrap;
    padding-bottom: 3px;
  }
  .hero-bottom h1 { font-size: clamp(1.6rem, 8vw, 2.4rem); max-width: 16ch; }
  .hero-scroll { display: none; }
}
