/* v5 draft: the extruded dashboard's stage (model.js). Without WebGL 2 the flat picture is the whole stage. */
.model { position: relative; height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h)); min-height: 34rem; overflow: clip;
         background: radial-gradient(70% 60% at 58% 46%, #17171b 0%, var(--canvas) 72%); }
.model-flat { position: absolute; inset: 0; margin: auto; width: auto; max-width: 86%; max-height: 82%; border-radius: 10px; border: 1px solid var(--line-1); }
.model-gl { position: absolute; inset: 0; opacity: 0; transition: opacity 500ms var(--ease); touch-action: pan-y; }
.model-gl canvas { width: 100%; height: 100%; cursor: grab; outline: none; }
.model.is-live .model-gl { opacity: 1; }
.model.is-live .model-flat { visibility: hidden; }
.model.is-drag .model-gl canvas { cursor: grabbing !important; }

.model-words { isolation: isolate; position: absolute; left: max(var(--gutter), (100% - var(--wrap)) / 2); top: clamp(1.5rem, 6vh, 3.5rem); width: min(19rem, 60vw); pointer-events: none; }
.model-words .kicker { margin-bottom: 1rem; }
.model-title { font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.14; letter-spacing: -0.028em; min-height: 2.3em; }
.model-line { margin-top: 0.7rem; color: var(--text-2); font-size: 0.95rem; min-height: 3.2em; }
.model-list { margin-top: 1.5rem; display: grid; gap: 2px; pointer-events: auto; opacity: 0; transition: opacity 500ms var(--ease) 900ms; }
.model.is-live .model-list { opacity: 1; }
.model-list button { position: relative; display: flex; align-items: center; height: 2rem; padding: 0 0.7rem 0 1rem; border: 0; border-radius: var(--r-s); background: transparent;
                     color: var(--text-3); font: 500 0.875rem/1 var(--sans); text-align: left; cursor: pointer;
                     transition: color var(--t-2) var(--ease), background-color var(--t-2) var(--ease); }
.model-list button::before { content: ""; position: absolute; left: 0; top: 50%; width: 2px; height: 0.9rem; margin-top: -0.45rem; border-radius: 2px; background: var(--line-2);
                             transition: background-color var(--t-2) var(--ease), height var(--t-2) var(--ease), margin-top var(--t-2) var(--ease); }
.model-list button:hover, .model-list button.is-on { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.model-list button.is-on::before { background: var(--text); height: 1.2rem; margin-top: -0.6rem; }
.model-list button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.09); }

.model-hint { position: absolute; left: 50%; bottom: 1.1rem; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2 * var(--gutter)); display: flex; justify-content: center; align-items: center; gap: 1.5rem; flex-wrap: wrap;
              padding: 0.55rem 1rem; border-radius: 999px; border: 1px solid var(--line-1); background: rgba(10, 10, 11, 0.78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
              color: var(--text-3); font: 500 0.72rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; pointer-events: none;
              opacity: 0; transition: opacity 500ms var(--ease) 1400ms; }
.model.is-live .model-hint { opacity: 1; }
.model-reset { pointer-events: auto; height: 1.75rem; padding: 0 0.7rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
               font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; transition: border-color var(--t-2) var(--ease); }
.model-reset:hover { border-color: var(--line-3); }
@media (max-width: 62em) {
  .model-words { top: 1.25rem; width: auto; right: var(--gutter); }
  .model-title { min-height: 0; font-size: 1.3rem; }
  .model-line { min-height: 0; }
  .model-list { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 4px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .model-list button { flex: none; padding: 0 0.7rem; border: 1px solid var(--line-1); }
  .model-list button::before { display: none; }
  .model-hint span:first-child, .model-hint span:nth-child(3) { display: none; }
}

/* on the home page the stage follows the hero copy: a little shorter, and ruled off from the sections below */
.model-home { height: min(92svh, 58rem); border-top: 1px solid var(--line-1); }

/* the words stay readable over the object: the stage darkens and softens behind them, fading out to the right */
.model-words::before { content: ""; position: absolute; z-index: -1; top: -100vh; bottom: -100vh; left: -100vw; right: -9rem;
  background: linear-gradient(90deg, rgba(10, 10, 11, 0.97) calc(100% - 8rem), rgba(10, 10, 11, 0) 100%);   /* solid behind the words, fading only past them */
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 7rem), transparent 100%); mask-image: linear-gradient(90deg, #000 calc(100% - 7rem), transparent 100%); }
@media (max-width: 62em) {
  .model-words::before { top: -1.25rem; bottom: -1rem; right: -100vw;
    background: linear-gradient(180deg, rgba(10, 10, 11, 0.94) 70%, rgba(10, 10, 11, 0)); -webkit-mask-image: none; mask-image: none; }
}
