/* 3D / Animation Showcase — Studio Volume. Namespaced under .td */
.td {
    --bg: #0c0c0f;
    --panel: #16161b;
    --panel-2: #1f1f27;
    --ink: #f2f0ee;
    --muted: #9a97a3;
    --line: #2c2c36;
    --brand: #e0b64b;
    --brand-ink: #c99f36;
    --accent: #6ee7d6;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: var(--bg);
    min-height: 100vh;
}
.td * { box-sizing: border-box; }
.td h1, .td h2, .td h3, .td h4 { margin: 0; }

.td-topbar {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    padding: .7rem 1.25rem; background: rgba(12,12,15,.85); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
}
.td-brand { display: flex; align-items: center; gap: .6rem; }
.td-logo { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand), #7a5236); font-size: 1rem; color: #0c0c0f; }
.td-brand b { display: block; font-size: .95rem; line-height: 1.1; letter-spacing: .04em; }
.td-brand small { color: var(--muted); font-size: .72rem; }
.td-nav { display: flex; gap: .2rem; flex-wrap: wrap; }
.td-navbtn { border: 0; background: transparent; color: var(--muted); font: inherit;
    padding: .45rem .7rem; border-radius: 7px; cursor: pointer; font-size: .85rem; }
.td-navbtn:hover { background: var(--panel-2); color: var(--ink); }
.td-navbtn.active { background: var(--brand); color: #0c0c0f; font-weight: 600; }
.td-top-actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.td-tag { font-size: .7rem; color: var(--muted); letter-spacing: .04em; }

.td-btn { border: 0; background: var(--brand); color: #0c0c0f; font: inherit; font-size: .82rem;
    padding: .55rem .95rem; border-radius: 7px; cursor: pointer; font-weight: 600; }
.td-btn:hover { background: var(--brand-ink); }
.td-btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.td-btn.ghost:hover { color: var(--ink); background: var(--panel-2); }
.td-btn.sm { padding: .32rem .62rem; font-size: .76rem; }

.td-view { padding: 1.25rem; max-width: 1120px; margin: 0 auto; }
.td-view[hidden] { display: none !important; }
.td-h2 { font-size: 1.15rem; margin-bottom: .1rem; letter-spacing: .01em; }
.td-sub { color: var(--muted); font-size: .82rem; margin: 0 0 1rem; }
.td-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.td-card h3 { font-size: .9rem; margin-bottom: .7rem; }

/* ---- 3D stage ---- */
.td-hero { display: grid; grid-template-columns: 1fr 320px; gap: 1.2rem; align-items: center; }
.td-stage {
    position: relative; height: 380px; border-radius: 14px; overflow: hidden;
    background: radial-gradient(circle at 50% 30%, #26262f, #0c0c0f 70%);
    perspective: 900px; cursor: grab; border: 1px solid var(--line);
}
.td-stage:active { cursor: grabbing; }
.td-room {
    position: absolute; width: 200px; height: 200px; left: 50%; top: 50%;
    transform-style: preserve-3d; transition: transform .06s linear;
    margin-left: -100px; margin-top: -100px;
}
.td-face { position: absolute; width: 200px; height: 200px; opacity: .96; }
.td-face.floor { transform: rotateX(90deg) translateZ(-100px); }
.td-face.ceil { transform: rotateX(-90deg) translateZ(-100px); }
.td-face.back { transform: translateZ(-100px); }
.td-face.left { transform: rotateY(-90deg) translateZ(-100px); }
.td-face.right { transform: rotateY(90deg) translateZ(-100px); }
.td-face .accent { position: absolute; inset: 62% 18% 12% 18%; border-radius: 3px; opacity: .85; }
.td-stage-hud { position: absolute; left: 12px; bottom: 12px; font-size: .72rem; color: var(--muted); letter-spacing: .04em; }
.td-scene-chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .8rem; }
.td-scene-chip { border: 1px solid var(--line); background: var(--panel); color: var(--muted);
    padding: .32rem .7rem; border-radius: 999px; cursor: pointer; font-size: .78rem; }
.td-scene-chip.active { background: var(--ink); color: #0c0c0f; border-color: var(--ink); }

.td-hero-side h1 { font-size: 1.7rem; line-height: 1.15; margin-bottom: .6rem; }
.td-hero-side p { color: var(--muted); font-size: .88rem; line-height: 1.6; }
.td-stats { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-top: 1rem; }
.td-stats .st b { font-size: 1.2rem; display: block; color: var(--brand); }
.td-stats .st small { color: var(--muted); font-size: .7rem; }

/* ---- projects ---- */
.td-filters { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .9rem; }
.td-chip { border: 1px solid var(--line); background: var(--panel); color: var(--muted);
    padding: .32rem .75rem; border-radius: 999px; cursor: pointer; font-size: .78rem; }
.td-chip.active { background: var(--brand); color: #0c0c0f; border-color: var(--brand); }
.td-proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.td-proj { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; transition: transform .12s, border-color .12s; }
.td-proj:hover { transform: translateY(-3px); border-color: var(--brand); }
.td-proj .thumb { height: 140px; position: relative; }
.td-proj .thumb .grd { position: absolute; inset: 0; }
.td-proj .thumb .ac { position: absolute; left: 14px; bottom: 14px; width: 40%; height: 8px; border-radius: 4px; }
.td-proj .b { padding: .8rem .9rem; }
.td-proj .b b { font-size: .9rem; }
.td-proj .b small { color: var(--muted); font-size: .74rem; display: block; margin-top: .15rem; }

.td-proj-detail .pd-hero { height: 220px; border-radius: 12px; position: relative; overflow: hidden; margin-bottom: 1rem; }
.td-ba-before, .td-ba-after { position: absolute; inset: 0; display: grid; place-items: center; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.td-ba-after { overflow: hidden; }
.td-ba-label { position: absolute; top: 10px; font-size: .64rem; letter-spacing: .12em; background: rgba(0,0,0,.4); padding: .15rem .5rem; border-radius: 4px; }
.td-ba-slider { width: 100%; margin-top: .6rem; }
.td-shot-list { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0; }
.td-shot-tag { font-size: .74rem; background: var(--panel-2); border: 1px solid var(--line); padding: .2rem .55rem; border-radius: 6px; color: var(--muted); }

/* ---- configurator ---- */
.td-cfg-grid { display: grid; grid-template-columns: 260px 1fr; gap: 1.2rem; }
.td-cfg-controls label { display: block; font-size: .74rem; color: var(--muted); margin: .9rem 0 .35rem; letter-spacing: .04em; text-transform: uppercase; }
.td-swatches { display: flex; gap: .4rem; flex-wrap: wrap; }
.td-sw { width: 30px; height: 30px; border-radius: 7px; cursor: pointer; border: 2px solid transparent; }
.td-sw.active { border-color: var(--brand); box-shadow: 0 0 0 2px var(--bg) inset; }
.td-cfg-controls select { width: 100%; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink);
    border-radius: 8px; padding: .5rem .6rem; font: inherit; font-size: .82rem; }
.td-room-preview { position: relative; height: 340px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.td-rp-wall { position: absolute; inset: 0; }
.td-rp-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 42%; transform: perspective(500px) rotateX(52deg); transform-origin: bottom; }
.td-rp-sofa { position: absolute; left: 18%; right: 18%; bottom: 24%; height: 60px; border-radius: 10px; box-shadow: 0 16px 30px rgba(0,0,0,.4); }
.td-rp-art { position: absolute; left: 40%; right: 40%; top: 18%; height: 70px; border: 3px solid rgba(255,255,255,.5); }
.td-rp-light { position: absolute; inset: 0; pointer-events: none; }
.td-spec { margin-top: 1rem; }
.td-spec .sr { display: flex; justify-content: space-between; font-size: .82rem; padding: .3rem 0; border-bottom: 1px solid var(--line); }
.td-spec .sr span:first-child { color: var(--muted); }
.td-cost { font-size: 1.4rem; color: var(--brand); font-weight: 700; margin-top: .6rem; }

/* ---- walkthrough ---- */
.td-playbar { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.td-progress { flex: 1; height: 8px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.td-progress i { display: block; height: 100%; background: var(--accent); width: 0; }
.td-shot { display: flex; align-items: center; gap: .8rem; padding: .6rem .2rem; border-bottom: 1px solid var(--line); font-size: .84rem; }
.td-shot:last-child { border: 0; }
.td-shot.current { background: var(--panel-2); border-radius: 8px; padding-left: .6rem; }
.td-shot .idx { width: 22px; color: var(--muted); }
.td-shot .si { flex: 1; }
.td-shot .si small { color: var(--muted); display: block; font-size: .72rem; }
.td-rs { font-size: .64rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; text-transform: uppercase; }
.td-rs.Queued { background: rgba(154,151,163,.2); color: var(--muted); }
.td-rs.Rendering { background: rgba(110,231,214,.16); color: var(--accent); }
.td-rs.Done { background: rgba(224,182,75,.18); color: var(--brand); }

/* ---- inquire ---- */
.td-inq-grid { display: grid; grid-template-columns: 1fr 300px; gap: 1.2rem; }
.td-inq-form label { display: block; font-size: .74rem; color: var(--muted); margin: .8rem 0 .3rem; text-transform: uppercase; letter-spacing: .04em; }
.td-inq-form input, .td-inq-form select {
    width: 100%; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink);
    border-radius: 8px; padding: .55rem .65rem; font: inherit; font-size: .85rem;
}
.td-quote { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; position: sticky; top: 80px; }
.td-quote .q-big { font-size: 1.6rem; color: var(--brand); font-weight: 700; }
.td-quote .q-row { display: flex; justify-content: space-between; font-size: .8rem; padding: .3rem 0; color: var(--muted); }
.td-req { display: flex; justify-content: space-between; font-size: .82rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.td-req:last-child { border: 0; }

.td-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
    background: #16161b; border: 1px solid var(--line); color: var(--ink); padding: .65rem 1.1rem;
    border-radius: 10px; font-size: .84rem; z-index: 60; box-shadow: 0 12px 34px rgba(0,0,0,.55); }
.td-toast[hidden] { display: none; }

@media (max-width: 900px) {
    .td-hero, .td-cfg-grid, .td-inq-grid { grid-template-columns: 1fr; }
    .td-top-actions { width: 100%; margin-left: 0; }
    .td-quote { position: static; }
}

/* ==========================================================================
   Wave — light theme + dark re-assert (beats shared .ds-app fallback)
   ========================================================================== */
:root[data-demo-theme="dark"] .td { --bg:#0c0c0f;--panel:#16161b;--panel-2:#1f1f27;--line:#2c2c36;--ink:#f2f0ee;--muted:#9a97a3; }
@media (prefers-color-scheme: dark) { :root:not([data-demo-theme="light"]) .td { --bg:#0c0c0f;--panel:#16161b;--panel-2:#1f1f27;--line:#2c2c36;--ink:#f2f0ee;--muted:#9a97a3; } }
:root[data-demo-theme="light"] .td { --bg:#f7f6f3;--panel:#ffffff;--panel-2:#efece6;--line:#e5e2db;--ink:#1a1a1f;--muted:#66636e;--brand:#b8901f; }
@media (prefers-color-scheme: light) { :root:not([data-demo-theme="dark"]) .td { --bg:#f7f6f3;--panel:#ffffff;--panel-2:#efece6;--line:#e5e2db;--ink:#1a1a1f;--muted:#66636e;--brand:#b8901f; } }
