/* /threejs/ — Paris, live in three.js. The stage is dark in both themes (a 3D viewport); the sections below
   follow the site's light / dark theme through Bootstrap's own variables. */
.tj-hero {
    --tj-stage: #111614;
    --tj-ink: #eef1ef;
    --tj-muted: rgba(238, 241, 239, 0.66);
    --tj-ochre: #e3b04b;
    position: relative;
    height: min(84vh, 800px);
    min-height: 560px;
    background: radial-gradient(120% 90% at 68% 42%, #1f2a26 0%, #151b19 46%, var(--tj-stage) 100%);
    color: var(--tj-ink);
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.tj-stage { position: absolute; inset: 0; }
.tj-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; cursor: grab; }
.tj-stage canvas:active { cursor: grabbing; }
.tj-labels { position: absolute; inset: 0; pointer-events: none; z-index: 1; }   /* one layer for every name tag (three.js gives each its own z-index): under the panel and the words */

/* words on the left, over a fade, on wide screens */
.tj-copy {
    position: absolute; z-index: 2; left: 0; top: 0; bottom: 0;
    width: min(520px, 40%);
    padding: clamp(28px, 6vh, 72px) 28px 28px clamp(20px, 4vw, 64px);
    display: flex; flex-direction: column; justify-content: center;
    background: linear-gradient(90deg, rgba(17, 22, 20, 0.92) 0%, rgba(17, 22, 20, 0.78) 62%, rgba(17, 22, 20, 0) 100%);
    pointer-events: none;
}
.tj-copy > * { pointer-events: auto; }
.tj-kicker { font: 600 0.78rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tj-ochre); margin: 0 0 14px; display: flex; gap: 8px; align-items: center; }
.tj-copy h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.04; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 16px; color: #fff; }
.tj-lead { font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.55; color: var(--tj-muted); margin: 0 0 22px; max-width: 34em; }
.tj-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.tj-ctas-center { justify-content: center; }
/* your own GLB: open it or drop it on the map */
.tj-own { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tj-own p { flex-basis: 100%; margin: 0; font-size: 0.8rem; color: var(--tj-muted); }
.tj-own .btn-link { color: var(--tj-ochre); text-decoration: none; padding-left: 4px; padding-right: 4px; }
.tj-stage.tj-drop::after { content: 'Drop your GLB to preview it'; position: absolute; inset: 12px; z-index: 4; display: grid; place-items: center;
    border: 2px dashed var(--tj-ochre); border-radius: 16px; background: rgba(17, 22, 20, 0.72); color: #fff; font-weight: 600; font-size: 1.1rem; pointer-events: none; }

.tj-load { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-10%, -50%); display: grid; gap: 8px; justify-items: center; color: var(--tj-muted); font-size: 0.9rem; pointer-events: none; }
.tj-load[hidden] { display: none; }
.tj-bar { width: 220px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.tj-bar i { display: block; height: 100%; width: 0; background: var(--tpa-accent, #2fa596); transition: width 0.2s; }

.tj-panel {
    position: absolute; z-index: 3; right: 16px; top: 16px; width: 336px;
    background: rgba(14, 18, 17, 0.92);   /* no backdrop blur: it re-blurred the 3D view under it on every frame */
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 14px; padding: 10px 12px; font-size: 0.86rem;
}
.tj-panel summary { cursor: pointer; font-weight: 600; color: #fff; list-style: none; display: flex; align-items: baseline; gap: 6px; }
.tj-panel summary::-webkit-details-marker { display: none; }
.tj-panel summary small { color: var(--tj-muted); font-weight: 400; }
.tj-panel summary::after { content: '▾'; margin-left: auto; color: var(--tj-muted); }
.tj-panel:not([open]) summary::after { content: '▸'; }
/* every layer in view at once (2026-12-04: in one scrolling column, Trees and the rest below the fold looked missing) */
.tj-layers { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.tj-all { display: flex; gap: 6px; margin: 8px 0 0; }
.tj-all button { font: inherit; font-size: 0.75rem; color: var(--tj-ink); background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; padding: 2px 10px; cursor: pointer; }
.tj-all button:hover { background: rgba(47, 165, 150, 0.35); }
.tj-switches label { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; color: var(--tj-ink); }
/* a layer: [on/off] [colour] name */
.tj-layers li { display: flex; align-items: flex-start; gap: 6px; padding: 2px 0; }
.tj-layers li.tj-wide { grid-column: 1 / -1; }   /* a long name: its own row, at the end */
.tj-layers li label { cursor: pointer; color: var(--tj-ink); font-size: 0.78rem; line-height: 1.25; padding-top: 1px; }
.tj-col { flex: none; width: 16px; height: 16px; padding: 0; border: 0; border-radius: 4px; background: none; cursor: pointer; }
.tj-col::-webkit-color-swatch-wrapper { padding: 0; }
.tj-col::-webkit-color-swatch { border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 4px; }
.tj-col::-moz-color-swatch { border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 4px; }
.tj-layers input[type=checkbox], .tj-switches input { accent-color: var(--tpa-accent, #2fa596); margin: 2px 0 0; flex: none; }
.tj-switches { border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 8px; padding-top: 6px; }

.tj-readout {
    position: absolute; z-index: 3; right: 16px; bottom: 16px; margin: 0; max-width: calc(100% - 32px);
    background: rgba(14, 18, 17, 0.82); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px;
    padding: 8px 12px; font: 0.82rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--tj-ink);
}
.tj-readout b { color: var(--tj-ochre); font-weight: 600; }
.tj-hint { position: absolute; z-index: 3; left: 50%; bottom: 18px; transform: translateX(-10%); margin: 0; font-size: 0.78rem; color: var(--tj-muted); pointer-events: none; }

/* pins: an HTML name over each GPS pin (CSS2DRenderer) */
.tj-pin { transform: translateY(-14px); font: 600 0.72rem/1 ui-sans-serif, system-ui, sans-serif; color: #151917; background: var(--tj-ochre, #e3b04b); padding: 4px 7px; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }

/* the sections below */
.tj { padding-top: 8px; }
.tj-sec { margin: 56px 0; }
.tj-sec h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; letter-spacing: -0.01em; margin-bottom: 8px; }
.tj-sub { color: var(--bs-secondary-color); max-width: 46em; margin-bottom: 22px; }
.tj-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .tj-cards { grid-template-columns: 1fr; } }
.tj-card { background: var(--bs-tertiary-bg, var(--tpa-card)); border: 1px solid var(--bs-border-color-translucent, var(--tpa-line)); border-radius: 16px; padding: 18px 18px 6px; min-width: 0; }
.tj-card h3 { font-size: 1.05rem; font-weight: 700; display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.tj-card h3 .bx { color: var(--tpa-accent, #2fa596); font-size: 1.2rem; }
.tj-card p { font-size: 0.93rem; color: var(--bs-secondary-color); }
.tpq-code { background: var(--bs-tertiary-bg, var(--tpa-card)); border: 1px solid var(--bs-border-color-translucent, var(--tpa-line)); border-radius: 10px; padding: 12px 14px; overflow-x: auto; font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; margin: 0 0 1rem; }
.tpq-code code { color: inherit; background: none; padding: 0; font: inherit; white-space: pre; }
.tj-card .tpq-code { background: rgba(0, 0, 0, 0.22); }
.tj-info { max-height: 300px; }
.tj-copywrap { position: relative; }
.tj-copybtn { position: absolute; right: 10px; top: 10px; z-index: 1; }
.tj-copywrap .tpq-code { max-height: 520px; padding-top: 14px; }
.tj-sizes { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 8px 0 22px; }
.tj-sizes > div { background: var(--bs-tertiary-bg, var(--tpa-card)); border: 1px solid var(--bs-border-color-translucent, var(--tpa-line)); border-radius: 14px; padding: 14px 18px; min-width: 170px; }
.tj-sizes b { display: block; font-size: 1.7rem; line-height: 1.1; font-weight: 700; }
.tj-sizes > div:last-of-type b { color: var(--tpa-accent, #2fa596); }
.tj-sizes span { font-size: 0.85rem; color: var(--bs-secondary-color); }
.tj-sizes > .bx { font-size: 1.5rem; color: var(--bs-secondary-color); }
.tj-final { text-align: center; }
.tj-small { font-size: 0.85rem; color: var(--bs-secondary-color); margin: 14px 0 0; }
.tj-credit { font-size: 0.78rem; color: var(--bs-secondary-color); margin: 18px 0 40px; }

/* phones and narrow windows: the words above the stage, the panel folded */
@media (max-width: 900px) {
    .tj-hero { height: auto; min-height: 0; display: flex; flex-direction: column; }
    .tj-copy { position: relative; width: auto; background: none; padding: 26px 16px 8px; }
    .tj-stage { position: relative; inset: auto; height: 56vh; min-height: 360px; }
    .tj-load, .tj-hint { transform: translate(-50%, -50%); }
    .tj-hint { display: none; }   /* the readout says what to do */
    .tj-panel { top: 10px; right: 10px; width: 196px; font-size: 0.82rem; }
    .tj-panel[open] { width: calc(100% - 20px); }
    .tj-layers { max-height: 32vh; overflow: auto; }
    .tj-readout { left: 10px; right: 10px; bottom: 10px; }
}
