/* Public pages share the workspace header, curved backdrop and violet surfaces. */
.landing-app {
    --paper: #070d22;
    --dark: #111936;
    --muted: #9da5c0;
}
.landing-app .intro { padding-top: 38px; padding-bottom: 40px; }
.landing-app .viewer {
    background: #111936;
    border-color: #a2a5dc24;
    border-radius: 16px;
    box-shadow: 0 16px 48px #03071730;
}
.landing-app .preparation-preview,
.landing-app .scramble-options article {
    background: #111936;
    border-color: #a2a5dc24;
    border-radius: 16px;
}
.landing-app .preparation-preview { transform: none; }
.landing-app .product-prototype-link {
    background: #9291f312;
    border-color: #a2a5dc38;
    border-radius: 10px;
    color: #d7d8ff;
}
.landing-footer-links { display: flex; align-items: center; gap: 28px; }

/* The report is the product demonstration, using the report's own chart and tables. */
.landing-report { padding: 66px 0 0; scroll-margin-top: 110px; }
.landing-report-surface { background: #111936; border: 1px solid #a2a5dc24; border-radius: 18px; padding: 24px; overflow: hidden; }
.landing-report-topline { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 11px; color: #9da5c0; padding-bottom: 22px; }
.landing-report-status { padding: 24px 0; color: var(--muted); font-size: 13px; }
.landing-report-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-top: 26px; padding-top: 20px; border-top: 1px solid #a2a5dc20; font-size: 10px; color: #949fbd; }
.landing-report-footer a { font-size: 12px; color: #d6d0ff; }
.landing-report-footer a span { display: inline-block; margin-left: 14px; }
.landing-report .report-analysis { margin-top: 24px; }
.landing-report .report-wave { height: 160px; }
.landing-report .report-wave-labels button { transition: background .2s, box-shadow .2s; }
.landing-report .report-wave-labels button:hover { background: color-mix(in srgb,var(--phase) 15%,transparent); box-shadow: inset 0 -2px var(--phase); }
.landing-report .report-phase-table tr { transition: background .18s; }
.landing-report .report-phase-table tbody tr:hover { background: color-mix(in srgb,var(--phase) 10%,transparent); }
.landing-report .report-phase-table td button { cursor: pointer; }
.landing-report .report-phase-table td button:focus-visible { outline-offset: 1px; }

/* Lighting follows the pointer; layers inside the preparation preview move in depth. */
.landing-app :is(.preparation-preview,.scramble-options article) {
    position: relative;
    isolation: isolate;
    transform: perspective(900px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg));
    transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .3s;
    will-change: auto;
}
.landing-app :is(.preparation-preview,.scramble-options article)::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(340px circle at var(--pointer-x,50%) var(--pointer-y,50%),#b6a7ff24,transparent 75%);
    opacity: 0;
    transition: opacity .3s;
}
.landing-app .prep-frame { overflow: hidden; }
.landing-app .prep-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg,transparent 0%,#a5f3df08 44%,#b6ffe259 49.5%,#d9fff0 50%,transparent 50.5%);
    transform: translateX(-110%);
}
.landing-app .prep-mask { transform-origin: center; }
.landing-app .scramble-glyph { display: inline-block; transform-origin: 50% 100%; white-space: pre; }
.landing-app .intro h1>span { display: inline-block; transform-origin: left bottom; }
.landing-app .product-prototype-link { position: relative; overflow: hidden; isolation: isolate; }
.landing-app .product-prototype-link::before {
    content: ''; position: absolute; inset: -100% -30%; z-index: -1;
    background: linear-gradient(110deg,transparent 35%,#b9a5ff55 48%,#d5ccff99 50%,transparent 64%);
    transform: translateX(-110%) skewX(-15deg);
}
.landing-app :is(.product-prototype-link span,.landing-footer-links span) { display: inline-block; }
.landing-app .product-questions summary { transition: color .2s; }
.landing-app .product-questions details[open] summary { color: #c8c2ff; }

@media (hover:hover) and (pointer:fine) {
    .landing-app :is(.preparation-preview,.scramble-options article):hover {
        border-color: #aaa4ff80;
        box-shadow: 0 24px 70px #03071770,0 0 35px #8275e512;
    }
    .landing-app :is(.preparation-preview,.scramble-options article):hover::after { opacity: 1; }
    .landing-app .preparation-preview:hover .prep-frame::after { animation: landing-scan 1.5s cubic-bezier(.4,0,.2,1) both; }
    .landing-app .preparation-preview:hover .prep-mask { animation: landing-mask 1.2s cubic-bezier(.16,1,.3,1) both; }
    .landing-app .scramble-options article:hover .inspection-example i { animation: landing-inspection 1.2s cubic-bezier(.16,1,.3,1) both; }
    .landing-app .product-prototype-link:hover::before { animation: landing-shutter .85s ease both; }
    .landing-app .product-prototype-link:hover span,
    .landing-app .landing-report-footer a:hover span,
    .landing-app .landing-footer-links a:hover span { animation: landing-arrow .6s cubic-bezier(.2,.8,.2,1) both; }
    .landing-app .product-questions summary:hover { color: #c8c2ff; }
    .landing-app .solve-tabs button:not([aria-pressed=true]):hover { background: #9291f320; }
    .landing-app .moves button:not(.active):hover { background: #a7a0f72b; }
}
@keyframes landing-scan { to { transform: translateX(110%); } }
@keyframes landing-inspection {
    0% { clip-path: inset(0 100% 0 0); filter: brightness(1); }
    65% { clip-path: inset(0); filter: brightness(3); }
    100% { clip-path: inset(0); filter: brightness(1); }
}
@keyframes landing-mask {
    0% { transform: scale(1); }
    35% { transform: scale(1.3); box-shadow: 0 0 0 8px #fbbf2412; }
    100% { transform: scale(1); box-shadow: 0 0 20px #fbbf2440; }
}
@keyframes landing-shutter { to { transform: translateX(110%) skewX(-15deg); } }
@keyframes landing-arrow {
    0% { transform: translate(0,0); opacity: 1; }
    45% { transform: translate(18px,-14px); opacity: 0; }
    46% { transform: translate(-18px,14px); opacity: 0; }
    100% { transform: translate(0,0); opacity: 1; }
}
@media(max-width:760px) {
    .landing-app .intro { padding-top: 24px; padding-bottom: 28px; }
    .landing-report { padding-top: 42px; scroll-margin-top: 195px; }
    .landing-report-surface { padding: 16px; }
    .landing-report-topline { align-items: flex-start; font-size: 10px; }
    .landing-report-topline>span:last-child { text-align: right; }
    .landing-report .report-wave { height: 125px; }
    .landing-footer-links { gap: 20px; }
}
@media(prefers-reduced-motion:reduce) {
    .landing-app *, .landing-app *::before, .landing-app *::after { animation: none !important; transition: none !important; }
    .landing-app :is(.preparation-preview,.scramble-options article) { transform: none; }
}

/* Keep the entire canvas inside its panel, with captions in their own row. */
.landing-app .stage { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); align-items: stretch; }
.landing-app .replay-panel { min-width: 0; }
.landing-app .cube-stage { min-height: 0; max-height: none; padding: 12px 16px; gap: 4px; grid-template-rows: 1fr auto; }
.landing-app #cube { width: min(100%,280px); height: auto; aspect-ratio: 1; margin: 0; align-self: center; }
.landing-app .move-readout { position: static; width: 100%; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 0 2px 4px; }
.landing-app .move-readout strong { font-size: 22px; }

@media(max-width:1100px) {
    .landing-app .stage { grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); }
}
@media(max-width:760px) {
    .landing-app .stage { grid-template-columns: minmax(0,1fr); }
    .landing-app .cube-stage { padding: 10px 18px 14px; flex: none; }
    .landing-app #cube { width: min(100%,260px); margin: 0; }
}

.landing-report-topline h2 { margin: 0; font-size: 16px; font-weight: 550; letter-spacing: -.2px; color: #d1d4ed; }

/* Two headline lines, with the action balancing the desktop hero. */
.landing-app .intro { display: block; padding-block: clamp(32px,5vw,64px) 40px; }
.landing-app .intro #title { max-width: none; margin: 0; font-size: clamp(25px,5.1vw,66px); line-height: 1.08; letter-spacing: -.045em; }
.landing-app .intro #title .hero-line { display: block; white-space: nowrap; color: inherit; }
.landing-app .intro #title em { font-style: normal; color: var(--accent); }
.landing-app .hero-upload { display: flex; margin-top: 26px; }
.landing-app .hero-upload .reconstruction-action { width: auto; max-width: 100%; }
@media(min-width:900px) {
 .landing-app .intro { display: grid; grid-template-columns: max-content 1fr; align-items: end; gap: 32px; }
 .landing-app .hero-upload { justify-self: end; margin: 0 0 5px; }
 .landing-app .hero-upload .reconstruction-action { min-height: 58px; padding-inline: 22px; }
}
/* A quiet segmented switch, matching the replay surface. */
.perspectives, .desk-view-switch { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid #a2a5dc30; border-radius: 9px; background: #0b1022; }
.perspectives button, .desk-view-switch button { appearance: none; border: 0; border-radius: 6px; padding: 7px 10px; min-height: 32px; color: #9da5c0; background: transparent; font: 500 11px var(--sans); white-space: nowrap; cursor: pointer; transition: background .15s,color .15s; }
.perspectives button[aria-pressed=true], .desk-view-switch button[aria-pressed=true] { background: #a5a7ff22; color: #d6d3ff; box-shadow: inset 0 0 0 1px #a5a7ff25; }
.perspectives button:hover, .desk-view-switch button:hover { color: #eeecff; background: #a5a7ff15; }
.perspectives button:focus-visible, .desk-view-switch button:focus-visible { outline: 2px solid #b6afff; outline-offset: 2px; }
.landing-app .replay-panel .panel-heading { flex-wrap: wrap; gap: 8px; }
.privacy-details a, .report-privacy a { color: #c4bcff; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.privacy-details a:hover, .report-privacy a:hover { color: #eeebff; text-decoration-thickness: 2px; }
#upload-prototype .training-options label { align-items: start; padding: 14px; margin-top: 10px; border: 1px solid #344068; border-radius: 10px; cursor: pointer; }
#upload-prototype .training-options label:has(:checked) { border-color: #999bff; background: #a5a7ff12; }
#upload-prototype .training-options label>span { display: grid; gap: 6px; }
#upload-prototype .training-options label>span>span { color: var(--muted); font-size: 14px; line-height: 1.6; }
@media(max-width:760px) {
 .landing-app .intro { padding-block: 28px 32px; }
 .landing-app .hero-upload { margin-top: 22px; }
 .desk-view-switch button { font-size: 10px; padding: 6px 8px; }
}

/* Credit stays visible over every demo clip and clear of the playback controls. */
.credited-video { position: relative; width: 100%; }
.video-source-credit { position: absolute; z-index: 2; top: 14px; left: 14px; display: grid; gap: 3px; padding: 12px 16px; border: 1px solid #ffffff60; border-radius: 10px; background: #080d20ed; color: #fff; box-shadow: 0 3px 16px #0005; text-decoration: none; }
.video-credit-label { font: 500 10px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #c5c9dd; }
.video-source-credit strong { font: 650 20px var(--sans); letter-spacing: -.4px; }
.video-credit-link { font: 500 11px var(--sans); color: #d3ccff; text-decoration: underline; text-underline-offset: 3px; }
.video-source-credit:hover { border-color: #d3ccff; background: #1c2140; }
.video-source-credit:focus-visible { outline: 3px solid #d3ccff; outline-offset: 3px; }
@media(max-width:760px) {
 .video-source-credit { top: 10px; left: 10px; padding: 8px 12px; gap: 2px; }
 .video-source-credit strong { font-size: 17px; }
}

/* Keep the report switch sized to its two choices, independent of panel width. */
.desk-view-switch { left: 50%; right: auto; transform: translateX(-50%); width: max-content; max-width: calc(100% - 16px); }
.desk-view-switch button:first-child, .desk-view-switch button:last-child { border-radius: 6px; }
