/* ==========================================================================
   enhance.css — V2 richer visuals, graphics & content components.
   Loaded after public.css. Builds on tokens.css variables.
   ========================================================================== */

/* Grain overlay for premium texture on dark sections */
.grain { position: relative; }
.grain::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

/* Section eyebrow with a gold rule */
.eyebrow--line { display: inline-flex; align-items: center; gap: .6rem; }
.eyebrow--line::before { content: ''; width: 34px; height: 2px; background: var(--color-accent); display: inline-block; }

/* ---- HERO v2 ------------------------------------------------------------ */
.hero { min-height: 100vh; }
.hero__inner { max-width: 920px; }
.hero h1 { letter-spacing: -.01em; }
.hero .word { display: inline-block; will-change: transform, opacity; }
.hero__bg[data-parallax] { will-change: transform; }
.hero__scroll { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: .5rem; color: rgba(255,255,255,.6); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; }
.hero__scroll .mouse { width: 22px; height: 36px; border: 2px solid rgba(255,255,255,.4); border-radius: 12px; position: relative; }
.hero__scroll .mouse::after { content: ''; position: absolute; top: 6px; left: 50%; width: 3px; height: 7px; background: var(--color-accent-soft); border-radius: 2px; transform: translateX(-50%); animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { opacity: 1; top: 6px; } 60% { opacity: 0; top: 16px; } 100% { opacity: 0; } }
.hero__badges { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: var(--space-6); }
.hero__badge { display: flex; align-items: center; gap: .55rem; color: rgba(255,255,255,.85); font-size: .92rem; }
.hero__badge svg, .hero__badge i { width: 20px; height: 20px; color: var(--color-accent-soft); }

/* Trust marquee */
.marquee { overflow: hidden; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); background: var(--color-surface); padding: var(--space-4) 0; }
.marquee__track { display: flex; gap: var(--space-8); white-space: nowrap; width: max-content; animation: marquee 28s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { font-family: var(--font-display); font-size: 1.35rem; color: var(--color-muted-fg); opacity: .8; display: flex; align-items: center; gap: .7rem; }
.marquee__item::before { content: '✦'; color: var(--color-accent); font-size: .8rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---- Materials / finishes showcase ------------------------------------- */
.finishes { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-4); }
@media (max-width: 900px) { .finishes { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .finishes { grid-template-columns: 1fr 1fr; } }
.finish { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--color-border); background: var(--color-surface); transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.finish:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.finish__swatch { aspect-ratio: 4/3; overflow: hidden; }
.finish__swatch img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.finish:hover .finish__swatch img { transform: scale(1.08); }
.finish__body { padding: var(--space-4); }
.finish__body h4 { font-family: var(--font-display); margin: 0 0 .2rem; font-size: 1.1rem; }
.finish__body p { margin: 0; font-size: .84rem; color: var(--color-muted-fg); }

/* ---- Feature rows (alternating) ---------------------------------------- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: center; }
@media (max-width: 820px) { .feature-row { grid-template-columns: 1fr; gap: var(--space-5); } }
.feature-media { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4/3; }
.feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-media__tag { position: absolute; top: 16px; left: 16px; background: rgba(28,25,23,.82); color: #fff; padding: .4rem .9rem; border-radius: 999px; font-size: .78rem; letter-spacing: .04em; }

/* Wood-framed image treatment */
.wood-frame { position: relative; padding: 10px; background: var(--wood-gradient); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.wood-frame img { border-radius: calc(var(--radius-lg) - 6px); display: block; width: 100%; }

/* Numbered process v2 */
.step { overflow: hidden; }
.step::after { content: ''; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(161,98,7,.12), transparent 70%); }
.step .step__num { position: relative; z-index: 1; }

/* ---- FAQ accordion ----------------------------------------------------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq__item { border-bottom: 1px solid var(--color-border); }
.faq__q { width: 100%; text-align: left; background: none; border: 0; padding: var(--space-5) 0; font-family: var(--font-display); font-size: 1.2rem; color: var(--color-primary); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq__q::after { content: '+'; color: var(--color-accent); font-size: 1.6rem; line-height: 1; transition: transform var(--dur) var(--ease-out); }
.faq__item.open .faq__q::after { transform: rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height var(--dur-slow) var(--ease-out); color: var(--color-secondary); }
.faq__a p { padding-bottom: var(--space-5); margin: 0; }
.faq__item.open .faq__a { max-height: 340px; }

/* Pills / meta */
.pill { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 999px; background: var(--color-surface-2); border: 1px solid var(--color-border); font-size: .8rem; color: var(--color-secondary); }

/* Card v2 — accent top border + number */
.card { position: relative; overflow: hidden; }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--color-accent), transparent); transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease-out); }
.card:hover::before { transform: scaleX(1); }
.card__num { position: absolute; top: var(--space-4); right: var(--space-5); font-family: var(--font-display); font-size: 1.4rem; color: var(--color-muted); }

/* Section headline block */
.headline { max-width: 680px; }
.headline--center { margin: 0 auto var(--space-7); text-align: center; }

/* CTA band with texture */
.cta-band { position: relative; overflow: hidden; background: var(--wood-gradient); color: #fff; }
.cta-band::after { content: ''; position: absolute; inset: 0; background: radial-gradient(90% 120% at 80% 0%, rgba(161,98,7,.35), transparent 55%); }
.cta-band > * { position: relative; z-index: 1; }

/* Big pull statement */
.statement { font-family: var(--font-display); font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1.3; color: var(--color-primary); max-width: 26ch; }
.statement em { font-style: italic; color: var(--color-accent); }

/* Split stat inline row */
.inline-stats { display: flex; flex-wrap: wrap; gap: var(--space-7); }
.inline-stats .is { }
.inline-stats .is .n { font-family: var(--font-display); font-size: 2.4rem; color: var(--color-primary); line-height: 1; }
.inline-stats .is .l { color: var(--color-muted-fg); font-size: .85rem; margin-top: .25rem; }

/* Decorative corner accents on dark sections */
.stats { position: relative; overflow: hidden; }
.stats .stat { position: relative; z-index: 1; }

/* ---- Hero entrance (pure CSS, fail-open, persistent) ------------------- */
@keyframes heroUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.hero .word { display: inline-block; opacity: 1; animation: heroUp .8s var(--ease-out) both; }
.hero .hero-up { opacity: 1; animation: heroUp .9s var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) {
  .hero .word, .hero .hero-up { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* Exhibition Prints logo lockup in the navbar */
.nav__logo--img { display: flex; align-items: center; }
.nav__logo--img img { height: 50px; width: auto; display: block; transition: height var(--dur) var(--ease-out), filter var(--dur) var(--ease-out); }
.nav.is-solid .nav__logo--img img { height: 42px; }
/* The logo's "EXHIBITION" half is dark navy — knock it to white wherever the
   navbar sits on a dark backdrop, and keep full colour on the light one. */
.nav:not(.is-solid) .nav__logo--img img { filter: brightness(0) invert(1); }

/* Footer logo — the footer is always dark, so the logo is always knocked out. */
.footer__logo { display: inline-flex; align-items: center; }
.footer__logo img { height: 42px; width: auto; display: block; filter: brightness(0) invert(1); }

/* Logo must be legible on the transparent (over-hero) navbar */
.nav:not(.is-solid) .nav__logo { color: #fff; }
.nav:not(.is-solid) .nav__links a { color: rgba(255,255,255,.9); }
.nav:not(.is-solid) .nav__links a:hover { color: #fff; }

/* Tighter vertical rhythm — the 6rem sections felt sparse */
.section { padding: var(--space-8) 0; }
.hero__badges { margin-top: var(--space-5); }

/* ---- Inner-page premium banner ---------------------------------------- */
.pageheader { position: relative; min-height: 54vh; display: flex; align-items: center; color: #fff; overflow: hidden; padding-top: var(--nav-h); }
.pageheader__bg { position: absolute; inset: 0; z-index: 0; will-change: transform; }
.pageheader__bg img { width: 100%; height: 100%; object-fit: cover; }
.pageheader::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(20,15,11,.68) 0%, rgba(20,15,11,.86) 100%); }
.pageheader.grain::before { z-index: 2; }
.pageheader__inner { position: relative; z-index: 3; padding-top: var(--space-6); padding-bottom: var(--space-6); }
.pageheader__title { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 4rem); color: #fff; margin: .4rem 0 var(--space-3); line-height: 1.06; letter-spacing: -.01em; }
.pageheader .lead { color: rgba(255,255,255,.86); max-width: 56ch; }
.pageheader .eyebrow { color: var(--color-accent-soft); }
.pageheader__crumbs { display: flex; gap: .6rem; align-items: center; margin-top: var(--space-4); font-size: .85rem; color: rgba(255,255,255,.6); }
.pageheader__crumbs a { color: rgba(255,255,255,.82); }
.pageheader__crumbs a:hover { color: #fff; }
.pageheader .word { display: inline-block; opacity: 1; animation: heroUp .8s var(--ease-out) both; }
.pageheader .hero-up { opacity: 1; animation: heroUp .9s var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) { .pageheader .word, .pageheader .hero-up { animation: none !important; opacity: 1 !important; transform: none !important; } }

/* "Sign In" ghost button legible on the transparent (dark) navbar */
.nav:not(.is-solid) .nav__cta .btn-ghost { color: #fff; border-color: rgba(255,255,255,.45); }
.nav:not(.is-solid) .nav__cta .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* ==========================================================================
   3D — interactive stall viewer + site-wide depth polish
   ========================================================================== */
.stall3d-section { background: var(--color-surface-2); }
.stall3d { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  background: radial-gradient(120% 130% at 50% 0%, #2c2219 0%, #14100c 70%); aspect-ratio: 16/9; cursor: grab; }
.stall3d:active { cursor: grabbing; }
.stall3d__canvas { position: absolute; inset: 0; }
.stall3d__canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.stall3d__hint { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1rem; border-radius: 999px;
  background: rgba(20,16,12,.55); backdrop-filter: blur(6px); color: rgba(255,255,255,.85);
  font-size: .82rem; letter-spacing: .03em; opacity: 0; transition: opacity .6s ease; }
.stall3d.is-ready .stall3d__hint { opacity: 1; }
.stall3d__hint i, .stall3d__hint svg { width: 16px; height: 16px; }
.stall3d__fallback { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; color: rgba(255,255,255,.8); text-align: center; }
.stall3d__fallback img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.stall3d__fallback span { position: relative; z-index: 1; }
.stall3d.is-fallback .stall3d__canvas, .stall3d.is-fallback .stall3d__hint { display: none; }
.stall3d.is-fallback .stall3d__fallback { display: flex; }
@media (max-width: 640px) { .stall3d { aspect-ratio: 4/3; } }

/* ---- Site-wide 3D depth polish ---------------------------------------- */
/* Stronger, smoother tilt with real perspective + lift */
[data-tilt] { transform-style: preserve-3d; transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
[data-tilt]:hover { box-shadow: var(--shadow-lg); }

/* Portfolio 3D hover depth */
.portfolio-grid { perspective: 1400px; }
.pf-item { transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur) var(--ease-out); transform-style: preserve-3d; }
.pf-item:hover { transform: translateY(-6px) rotateX(3deg) rotateY(-3deg); box-shadow: var(--shadow-lg); }

/* Finishes swatches subtle 3D pop */
.finishes { perspective: 1200px; }
.finish { transform-style: preserve-3d; }

/* Wood-frame floating depth */
.wood-frame { transition: transform var(--dur-slow) var(--ease-out), box-shadow var(--dur-slow) var(--ease-out); }
.wood-frame:hover { transform: translateY(-8px) rotateX(2deg); box-shadow: 0 40px 80px -30px rgba(28,20,12,.55); }

/* ---- Portfolio per-item 3D model ------------------------------------- */
.pf-item { position: relative; }
.pf-item__3d { position: absolute; top: 12px; right: 12px; z-index: 2; display: inline-flex; align-items: center; gap: .3rem;
  padding: .3rem .6rem; border-radius: 999px; background: rgba(20,15,11,.72); color: var(--color-accent-soft);
  font-size: .72rem; font-weight: 600; letter-spacing: .04em; backdrop-filter: blur(4px); }
.pf-item__3d i, .pf-item__3d svg { width: 14px; height: 14px; }

.lightbox__3d { position: absolute; top: 20px; left: 20px; z-index: 5; display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: rgba(20,15,11,.6);
  color: #fff; cursor: pointer; font-size: .9rem; backdrop-filter: blur(6px); transition: background var(--dur) var(--ease-out); }
.lightbox__3d:hover { background: var(--color-accent); color: #1a1109; border-color: var(--color-accent); }
.lightbox__3d i, .lightbox__3d svg { width: 18px; height: 18px; }

#lightboxModel { display: none; }
.lightbox.showing-3d #lightboxImg, .lightbox.showing-3d .lightbox__nav { display: none !important; }
.lightbox.showing-3d #lightboxModel { display: block; }
