@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root { --cream: #f3efe8; --ink: #22211f; --muted: #858078; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { overflow: hidden; background: var(--cream); color: var(--ink); font-family: 'DM Sans', sans-serif; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }

.showroom {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 55%, #fffefa 0%, #f5f0e8 55%, #eee8df 100%);
}

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  padding: 34px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand, .intro-logo { display: flex; flex-direction: column; align-items: center; color: #171717; line-height: 1; text-decoration: none; }
.brand-main { font-family: 'Arial Black', Arial, sans-serif; font-size: 26px; font-weight: 900; letter-spacing: -1.7px; transform: scaleX(1.08); }
.brand-sub { margin-top: 7px; font-family: Arial, sans-serif; font-size: 8px; font-weight: 500; letter-spacing: 4.5px; padding-left: 4.5px; }
.header-actions { position: relative; display: flex; align-items: center; gap: 24px; }
.project-button { display: inline-flex; gap: 12px; align-items: center; padding: 14px 20px; border: 1px solid #171717; border-radius: 99px; background: #171717; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: 1.6px; text-decoration: none; white-space: nowrap; }
.menu-toggle { width: 40px; height: 40px; border: 0; background: transparent; display: grid; place-content: center; gap: 6px; }
.menu-toggle span { display: block; width: 23px; height: 2px; background: var(--ink); }
.dropdown { position: absolute; top: 58px; right: 0; width: 190px; padding: 12px; display: grid; gap: 4px; border-radius: 15px; background: #222220; box-shadow: 0 20px 50px #0002; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .25s; }
.dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { padding: 12px; border-radius: 7px; color: #f5f2ec; font-size: 13px; text-decoration: none; }
.dropdown a:hover { background: #393936; }

.carousel-stage { height: 100dvh; min-height: 600px; display: grid; place-items: center; perspective: 1400px; touch-action: pan-y; }
.carousel { position: relative; width: min(38vw, 520px); height: min(52vh, 430px); transform: translateY(-35px); transform-style: preserve-3d; }
.project-card { position: absolute; inset: 0; overflow: visible; padding: 3px; border: 2px solid rgba(255,255,255,.85); border-radius: 13px; background-image: linear-gradient(135deg, rgba(255,255,255,.25), transparent 45%, rgba(0,0,0,.08)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.45), 2px 3px 0 rgba(105,90,75,.2), 0 12px 24px rgba(65,48,35,.1); cursor: pointer; transition: transform .85s cubic-bezier(.22,1,.36,1), opacity .65s; backface-visibility: hidden; }
.project-card img { display: block; width: 100%; height: 100%; border-radius: 10px; object-fit: contain; background: #f8f7f3; }
.project-card--live-preview { overflow: hidden; padding: 0; background: #f5f0e8 !important; }
.project-card-preview { position: absolute; top: 0; left: 0; display: block; width: 200%; height: 200%; border: 0; border-radius: 10px; background: #f5f0e8; pointer-events: none; transform: scale(.5); transform-origin: top left; }
.floor-shadow { position: absolute; top: calc(100% + 30px); left: 50%; width: 90%; height: 55px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(55,43,34,.35) 0%, rgba(75,58,44,.13) 45%, transparent 75%); filter: blur(18px); pointer-events: none; transition: transform .85s cubic-bezier(.22,1,.36,1), opacity .65s; }
.carousel-controls { position: absolute; z-index: 15; bottom: 6%; left: 50%; display: flex; align-items: center; gap: 35px; transform: translateX(-50%); }
.carousel-controls button { width: 42px; height: 42px; border: 1px solid #c9c3ba; border-radius: 50%; background: transparent; font-size: 18px; }
#slide-count { color: var(--muted); font-size: 12px; letter-spacing: .16em; }

.intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(243,239,232,.2); backdrop-filter: blur(22px); transition: opacity 1s, backdrop-filter 1.5s; }
.intro-logo .brand-main { font-size: clamp(42px, 7vw, 90px); letter-spacing: -4px; }
.intro-logo .brand-sub { margin-top: 14px; font-size: clamp(10px, 1.4vw, 16px); letter-spacing: 8px; }
.intro.finished { opacity: 0; pointer-events: none; backdrop-filter: blur(0); }
.project-preview { position: fixed; z-index: 1200; inset: 0; background: var(--cream); }
.project-preview[hidden] { display: none; }
.project-preview iframe { display: block; width: 100%; height: 100%; border: 0; }
.close-preview { position: absolute; z-index: 1; top: 20px; left: 20px; padding: 11px 18px; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; background: #171717; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
body.is-project-preview-open .site-header,
body.is-project-preview-open .carousel-controls,
body.is-project-preview-open #nexcode-theme-controls,
body.is-project-preview-open #nexcode-admin-login,
body.is-project-preview-open #nexcode-admin-panel { display: none !important; }

@media (max-width: 600px) {
  .site-header { justify-content: center; padding: 24px 0; }
  .header-actions { display: none; }
  .carousel-stage { min-height: 440px; height: 78dvh; perspective: 1000px; }
  .carousel { width: 76vw; height: 230px; transform: none; }
  .carousel-controls { top: calc(50% + 90px); bottom: auto; gap: 28px; }
  .floor-shadow { width: 76vw; height: 28px; top: calc(100% + 12px); filter: blur(10px); }
}
