/* ============================================================
   LEVEL JOINERY — premium features layer
   Custom cursor · page transition curtain · material selector
   sticky quote · horizontal drag gallery · spec pricing
   animated timeline · marquee headline
   ============================================================ */

/* ── CUSTOM CURSOR (desktop, fine pointer only) ── */
@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor { cursor: none; }
  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor input,
  body.has-custom-cursor textarea { cursor: none; }
}
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9998;
  border-radius: 50%;
  will-change: transform;
}
.cursor-dot { width: 6px; height: 6px; background: var(--oak); transform: translate(-50%, -50%); }
.cursor-ring { width: 34px; height: 34px; border: 1px solid rgba(185,131,90,0.55); transform: translate(-50%, -50%); transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, opacity 0.25s ease; }
.cursor-ring.is-active { width: 52px; height: 52px; border-color: var(--oak); }
.cursor-ring.is-hidden, .cursor-dot.is-hidden { opacity: 0; }
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ── PAGE TRANSITION CURTAIN ── */
.page-curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--charcoal);
  transform: translateY(0);
  pointer-events: none;
}
.page-curtain.curtain-out { animation: curtainOut 0.7s cubic-bezier(.65,0,.35,1) forwards; }
.page-curtain.curtain-in { animation: curtainIn 0.6s cubic-bezier(.65,0,.35,1) forwards; }
@keyframes curtainOut { from { transform: translateY(0); } to { transform: translateY(-100%); } }
@keyframes curtainIn { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .page-curtain { display: none; }
}

/* ── MATERIAL SELECTOR ── */
.material-selector { display: flex; align-items: center; gap: 14px; }
.material-selector .ms-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(244,239,230,0.5); }
.material-swatches { display: flex; gap: 8px; }
.material-swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.material-swatch .swatch-fill { width: 22px; height: 22px; border-radius: 50%; display: block; transition: transform 0.3s cubic-bezier(.22,1,.36,1); }
.material-swatch[data-material="oak"] .swatch-fill { background: #b9835a; }
.material-swatch[data-material="ash"] .swatch-fill { background: #c9c0ae; }
.material-swatch[data-material="walnut"] .swatch-fill { background: #5c4632; }
.material-swatch.active { border-color: rgba(244,239,230,0.5); }
.material-swatch.active .swatch-fill { transform: scale(1.15); }
.material-swatch:hover .swatch-fill { transform: scale(1.1); }

/* Root accent variables get overwritten by JS when a material is chosen;
   grain flicker communicates "you're choosing a real material" per the brief */
.material-flash { animation: materialFlash 0.4s ease; }
@keyframes materialFlash { 0% { opacity: 1; } 40% { opacity: 0.85; } 100% { opacity: 1; } }

/* ── STICKY QUOTE PANEL ── */
.sticky-quote {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  background: var(--bg-0);
  color: var(--paper);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  transition: bottom 0.5s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 -4px 40px rgba(28,26,23,0.3);
}
.sticky-quote.visible { bottom: 0; }
.sticky-quote .sq-text { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(244,239,230,0.6); }
.sticky-quote .sq-cta { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; color: var(--paper); border: 1px solid rgba(244,239,230,0.3); padding: 10px 22px; white-space: nowrap; transition: background 0.2s ease, color 0.2s ease; }
.sticky-quote .sq-cta:hover { background: var(--paper); color: var(--charcoal); }
.sticky-quote .sq-close { background: none; border: none; color: rgba(244,239,230,0.4); font-size: 18px; cursor: pointer; padding: 0; line-height: 1; transition: color 0.2s; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sticky-quote .sq-close:hover { color: var(--paper); }

/* ── HERO SCROLL HINT ── */
.hero-scroll-hint { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hero-scroll-hint .sh-line { width: 1px; height: 48px; background: linear-gradient(transparent, rgba(244,239,230,0.5)); animation: scrollPulse 2.2s ease-in-out infinite; }
.hero-scroll-hint .sh-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(244,239,230,0.4); }
@keyframes scrollPulse { 0%, 100% { opacity: 0.4; transform: scaleY(1); } 50% { opacity: 1; transform: scaleY(1.1); } }

/* ── HORIZONTAL DRAG-TO-SCROLL PROJECT GALLERY ── */
.h-scroll-section { padding: 110px 0 0; overflow: hidden; }
.h-scroll-track-wrap { overflow-x: auto; overflow-y: visible; scrollbar-width: none; -ms-overflow-style: none; cursor: grab; padding-bottom: 60px; touch-action: pan-x; }
.h-scroll-track-wrap.grabbing { user-select: none; }
.h-scroll-track-wrap::-webkit-scrollbar { display: none; }
.h-scroll-track-wrap.grabbing { cursor: grabbing; }
.h-scroll-track { display: flex; gap: 20px; padding: 0 32px; width: max-content; }
.project-card { width: 420px; flex-shrink: 0; position: relative; overflow: hidden; background: var(--bg-0); }
.project-card-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; transition: transform 0.7s cubic-bezier(.22,1,.36,1), filter 0.5s ease; filter: brightness(0.88); }
.project-card:hover .project-card-img { transform: scale(1.06); filter: brightness(0.7); }
.project-card-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 28px; background: linear-gradient(transparent, rgba(28,26,23,0.9)); transform: translateY(18px); transition: transform 0.4s cubic-bezier(.22,1,.36,1); }
.project-card:hover .project-card-info, .project-card:focus-within .project-card-info { transform: translateY(0); }
.project-card-info .pci-tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--oak); margin-bottom: 6px; }
.project-card-info .pci-title { font-family: var(--font-display); font-size: 20px; font-weight: 500; color: var(--paper); margin-bottom: 6px; }
.project-card-info .pci-meta { font-size: 13px; color: rgba(244,239,230,0.6); opacity: 0; transform: translateY(8px); transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s; }
.project-card:hover .pci-meta, .project-card:focus-within .pci-meta { opacity: 1; transform: translateY(0); }
.h-scroll-nav { display: flex; align-items: center; gap: 14px; padding: 24px 32px; }
.h-scroll-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--ink); transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.h-scroll-btn:hover { background: var(--charcoal); color: var(--paper); border-color: var(--charcoal); }
.h-scroll-progress { flex: 1; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.h-scroll-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--oak-deep); width: 30%; transition: transform 0.1s linear; }
.h-drag-hint { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }

/* ── SPEC-SHEET PRICING (cutting list, not card grid) ── */
.spec-section { padding: 110px 0; }
.spec-header { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: end; margin-bottom: 48px; }
.spec-group { margin-bottom: 32px; }
.spec-group:last-child { margin-bottom: 0; }
.spec-group-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--oak-deep); margin-bottom: 12px; }
.spec-table { border: 1px solid var(--line-strong); }
.spec-row { display: grid; grid-template-columns: 2fr 1fr 1fr; border-bottom: 1px solid var(--line); transition: background 0.2s ease; }
.spec-row:last-child { border-bottom: none; }
.spec-row:hover { background: var(--paper-warm); }
.spec-row.spec-head { background: var(--charcoal); color: var(--paper); }
.spec-row.spec-head:hover { background: var(--charcoal); }
.spec-cell { padding: 18px 24px; font-size: 14px; }
.spec-row.spec-head .spec-cell { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(244,239,230,0.6); }
.spec-cell .sc-name { font-family: var(--font-display); font-size: 16px; font-weight: 500; margin-bottom: 4px; color: var(--ink); }
.spec-cell .sc-desc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.spec-cell .sc-time { font-family: var(--font-mono); font-size: 13px; color: var(--ink-soft); }
.spec-cell .sc-price { font-family: var(--font-display); font-size: 20px; font-weight: 500; color: var(--oak-deep); }
.spec-note { margin-top: 16px; display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.spec-note-item { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--ink-soft); }
.spec-note-item::before { content: ''; width: 16px; height: 1px; background: var(--oak-deep); flex-shrink: 0; }

/* ── ANIMATED PROCESS TIMELINE (SVG line draws via GSAP scrub) ── */
.timeline-v2 { padding: 0; }
.tl-item { display: grid; grid-template-columns: 80px 48px 1fr; gap: 0 24px; align-items: start; }
.tl-num { font-family: var(--font-display); font-size: 48px; font-weight: 300; color: var(--oak); line-height: 1; padding-top: 4px; text-align: right; opacity: 0; transform: translateX(-20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.tl-spine { display: flex; flex-direction: column; align-items: center; }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--oak-deep); background: var(--paper); flex-shrink: 0; margin-top: 8px; transition: background 0.5s ease; }
.tl-item.is-visible .tl-dot { background: var(--oak-deep); }
.tl-line { width: 2px; flex: 1; background: var(--line); min-height: 60px; position: relative; overflow: hidden; }
.tl-line::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 0%; background: var(--oak-deep); transition: height 0.9s cubic-bezier(.22,1,.36,1) 0.2s; }
.tl-item.is-visible .tl-line::after { height: 100%; }
.tl-item.is-visible .tl-num { opacity: 1; transform: translateX(0); }
.tl-content { padding: 0 0 56px; }
.tl-content h3 { font-family: var(--font-display); font-size: 26px; font-weight: 500; margin-bottom: 14px; line-height: 1.2; }
.tl-content p { font-size: 15px; color: var(--ink-soft); line-height: 1.75; max-width: 560px; }
.section-dark .tl-content p, .section-raised .tl-content p { color: rgba(244,239,230,0.65); }
.tl-content .tl-tag { display: inline-block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--oak-deep); border: 1px solid var(--oak-deep); padding: 4px 12px; margin-top: 14px; }
.section-dark .tl-content .tl-tag, .section-raised .tl-content .tl-tag { color: var(--oak); border-color: var(--oak); }

/* ── MARQUEE HEADLINE (services, max one per page) ── */
.marquee-head { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; background: var(--bg-0); }
.marquee-track { display: flex; gap: 48px; animation: marqueeScroll 20s linear infinite; width: max-content; }
.marquee-track span { font-family: var(--font-display); font-size: 36px; font-weight: 500; color: rgba(244,239,230,0.12); white-space: nowrap; letter-spacing: -0.01em; }
.marquee-track em { font-style: italic; font-weight: 300; color: var(--oak); opacity: 0.6; }
@keyframes marqueeScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .marquee-track, .h-scroll-bar { animation: none !important; }
}

/* ── RESPONSIVE ADDITIONS ── */
@media (max-width: 980px) {
  .site-header > .container.nav > .material-selector,
  .site-header > .container.nav > div > .material-selector { display: none; }
  .sticky-quote { width: 100%; left: 0; transform: none; }
  .spec-row { grid-template-columns: 1fr; }
  .spec-header { grid-template-columns: 1fr; gap: 24px; }
  .tl-item { grid-template-columns: 48px 32px 1fr; }
  .tl-num { font-size: 32px; }
  .project-card { width: 300px; }
  .h-scroll-track { padding: 0 20px; }
  .cursor-dot, .cursor-ring { display: none; }
}
