/* Isolated Home illustration. JavaScript enhances the finished example with
   a finite build sequence. */
.hero-build {
    --build-open: 1;
    --build-power: 1;
    --build-progress: 1;
    min-width: 0;
    width: 100%;
}
.hero-build-scene {
    position: relative;
    display: grid;
    padding: 30px 0 8px;
    place-items: center;
    isolation: isolate;
}
.hero-build-device {
    position: relative;
    width: 100%;
    max-width: 650px;
    aspect-ratio: 1.36;
    perspective: 5200px;
    perspective-origin: 50% 100%;
}
.hero-build-lid {
    position: absolute;
    z-index: 1;
    inset: 0 5% 8%;
    padding: 13px 9px 11px;
    background: linear-gradient(140deg, #243a5a, #0c1d38 65%);
    border: 1px solid #8295ab;
    border-radius: 16px 16px 7px 7px;
    box-shadow: 0 28px 42px #10233a26, inset 0 1px 1px #ffffff35;
    transform-origin: 50% 100%;
    transform-style: preserve-3d;
    /* The rear hinge stays on the chassis. At rest the exterior's front rim
       meets the base lip, leaving only the thin closed clamshell seam. */
    transform: rotateX(calc(-92.5deg * (1 - var(--build-open))));
}
.hero-build-lid::before {
    position: absolute;
    top: 5px;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #71809a;
    border-radius: 50%;
    backface-visibility: hidden;
    content: "";
    transform: translateX(-50%);
}
.hero-build-lid::after {
    position: absolute;
    inset: -1px;
    border: 1px solid #b5c3d2;
    border-radius: inherit;
    background: linear-gradient(155deg, #9aaec0, #637c96 45%, #3c526c);
    box-shadow: inset 0 1px 2px #e9f0f5b3, inset 0 -3px 2px #142a43, inset 0 0 0 5px #c1cfdd12;
    backface-visibility: hidden;
    transform: translateZ(-3px) rotateY(180deg);
    content: "";
}
.hero-build-lid-solid {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    fill: #8295ab;
    stroke: none;
    pointer-events: none;
}
.hero-build-deck {
    position: absolute;
    z-index: 0;
    right: 1%;
    bottom: 5%;
    left: 1%;
    height: 3%;
    background: linear-gradient(#8896a8, #d3dae3);
    clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%);
}
.hero-build-deck::before {
    position: absolute;
    top: 0;
    right: 18%;
    left: 18%;
    height: 3px;
    background: linear-gradient(90deg, #152a41 0 21%, transparent 21% 79%, #152a41 79%);
    border-radius: 3px;
    content: "";
}
.hero-build-base {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 1%;
    left: 0;
    height: 4%;
    background: linear-gradient(#243957 0 20%, #dfe5ec 23%, #a6b1bf 80%, #5a6b82);
    border-radius: 2px 2px 45% 45%;
    box-shadow: 0 12px 16px #10233a26;
    clip-path: polygon(0 0, 100% 0, 97% 100%, 3% 100%);
}
.hero-build-base::after {
    position: absolute;
    top: 0;
    left: 43%;
    width: 14%;
    height: 33%;
    background: #7a8ba1;
    border-radius: 0 0 7px 7px;
    content: "";
}
.hero-build-screen {
    --screen-radius: 6px;
    --screen-border: 1px;
    position: relative;
    height: 100%;
    color: #25354b;
    background: #f7f8fb;
    border: 0;
    border-radius: var(--screen-radius);
    container-type: inline-size;
    backface-visibility: hidden;
}
.hero-build-aperture {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: var(--screen-radius);
    clip-path: inset(0 round var(--screen-radius));
    isolation: isolate;
    transform: translateZ(0);
}
.hero-build-aperture::after {
    position: absolute;
    z-index: 5;
    inset: 0;
    border: var(--screen-border) solid #081729;
    border-radius: inherit;
    pointer-events: none;
    content: "";
}
.hero-build-browser {
    --browser-chrome-surface: #f5f7fa;
    position: absolute;
    inset: var(--screen-border);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 24px 28px minmax(0, 1fr);
    background: var(--browser-chrome-surface);
}
.hero-build-tabs { display: flex; min-width: 0; padding: 4px 0 0 12px; align-items: center; gap: 16px; color: #5c6b80; background: #dce4ed; }
.hero-build-tab { position: relative; z-index: 1; display: flex; width: 42%; min-width: 0; padding: 0 9px; align-self: stretch; align-items: center; gap: 7px; color: #3d4d63; font: 8px/1.2 ui-sans-serif, system-ui, sans-serif; }
.hero-build-tab > .hero-build-tab-surface { position: absolute; z-index: -1; top: 0; left: -8px; width: calc(100% + 16px); height: calc(100% + 1px); fill: var(--browser-chrome-surface); stroke: none; pointer-events: none; }
.hero-build-tab [data-build-tab-title] { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-build-tab-icon { display: block; width: 14px; height: 14px; flex: 0 0 14px; color: #172f43; }
.hero-build-tab-icon svg { width: 100%; height: 100%; stroke-width: 2.4; }
.hero-build-tab-circle { fill: #fff9ed; stroke: #8095a1; stroke-width: 1.5; }
.hero-build-tab-accent { stroke: #9b722e; }
.hero-build-tab-icon[data-tab-empty] { visibility: hidden; }
.hero-build-tab-close { width: 9px; height: 9px; flex: 0 0 9px; margin-left: auto; }
.hero-build-new-tab { width: 12px; height: 12px; flex: 0 0 12px; }
.hero-build-window-controls { display: flex; height: 100%; margin-left: auto; align-items: center; }
.hero-build-window-controls > svg { width: 30px; height: 12px; }
.hero-build-toolbar {
    display: flex;
    min-width: 0;
    padding: 4px 8px;
    align-items: center;
    gap: 8px;
    background: var(--browser-chrome-surface);
    border-bottom: 1px solid #d4dce7;
}
.hero-build-browser-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.hero-build-browser-actions > svg { width: 11px; height: 11px; }
.hero-build-browser-actions > svg:nth-child(2) { opacity: .45; }
.hero-build-address {
    display: flex;
    min-width: 0;
    height: 20px;
    padding: 0 8px;
    flex: 1;
    align-items: center;
    gap: 6px;
    color: #52627a;
    background: #e7edf4;
    border: 1px solid #dce4ed;
    border-radius: 11px;
    font: 8px/1 ui-sans-serif, system-ui, sans-serif;
}
.hero-build-address svg { width: 9px; height: 9px; flex: 0 0 auto; }
.hero-build-address .hero-build-site-controls { width: 10px; height: 10px; }
.hero-build-site-controls circle, .hero-build-profile svg, .hero-build-browser-menu { fill: currentColor; stroke: none; }
.hero-build-address-text { display: flex; height: 100%; align-items: center; line-height: normal; white-space: nowrap; }
.hero-build-address .hero-build-bookmark { width: 10px; height: 10px; margin-left: auto; }
.hero-build-profile { display: block; width: 16px; height: 16px; flex: 0 0 16px; color: #fff; }
.hero-build-profile svg { width: 100%; height: 100%; }
.hero-build-profile circle { fill: #3c637c; }
.hero-build-browser-menu { width: 8px; height: 13px; flex: 0 0 8px; }
.hero-build-viewport { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #f8f5ed; }
.hero-build-preview {
    position: absolute;
    inset: 0;
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    border: 0;
    background: inherit;
}
.hero-build[data-build-active]:not([data-complete]) .hero-build-preview { pointer-events: none; }
.hero-build-editor {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    color: #cbd5e3;
    background: #102139;
    border-top: 1px solid #31445e;
    box-shadow: 8px 0 24px #07152722;
}
.hero-build-code-pane { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; }
.hero-build-code-pane + .hero-build-code-pane { border-left: 1px solid #40516a; }
.hero-build-editor-bar { display: flex; min-width: 0; padding: 9px 10px; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid #31445e; font: 9px/1.4 ui-monospace, Consolas, monospace; }
.hero-build-editor-bar strong { color: #efcf91; font-size: 10px; font-weight: 750; }
.hero-build-editor-bar > span:last-child { color: #91a5bf; white-space: nowrap; }
.hero-build-code { min-width: 0; min-height: 0; margin: 0; padding: 11px 10px; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; color: #d4ddec; font: 9px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 2; }
.hero-build-token-tag { color: #8fc9ea; }
.hero-build-token-property { color: #eac381; }
.hero-build-token-string { color: #b0d5a4; }
.hero-build-token-punctuation { color: #a2b3ca; }
.hero-build-token-comment { color: #728ba5; }
.hero-build-boot {
    position: absolute;
    z-index: 3;
    inset: var(--screen-border);
    display: none;
    place-items: center;
    color: #edc373;
    background: #0b192d;
}
.hero-build-power-symbol { display: grid; width: 66px; height: 66px; place-items: center; border: 1px solid #e1bc705c; border-radius: 50%; box-shadow: 0 0 28px #e0b46315; }
.hero-build-power-symbol svg { width: 29px; height: 29px; stroke-width: 1.5; }
.hero-build-homebar { display: none; }
.hero-build-phone-status { display: none; }
.hero-build[data-build-active] .hero-build-browser { opacity: var(--build-power); }
.hero-build[data-build-presentation="held"] .hero-build-browser { opacity: 0; }
.hero-build[data-build-presentation="held"] .hero-build-screen { background: #243a5a; }
.hero-build[data-phase="boot"] .hero-build-boot,
.hero-build[data-phase="address"] .hero-build-boot { display: grid; opacity: calc(1 - var(--build-power)); pointer-events: none; }
.hero-build[data-phase="boot"] .hero-build-preview,
.hero-build[data-phase="code"] .hero-build-preview { visibility: hidden; }
.hero-build[data-phase="code"] .hero-build-editor,
.hero-build[data-phase="reveal"]:not([data-build-preview-ready]) .hero-build-editor,
.hero-build[data-build-active][data-phase="ready"]:not([data-build-preview-ready]) .hero-build-editor { display: grid; }
.hero-build-caption { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 8px 16px; margin: 5px 10px 0; padding: 12px 0 0; border-top: 1px solid #64738a; }
.hero-build-caption::before { position: absolute; top: -1px; left: 0; width: calc(100% * var(--build-progress)); height: 2px; background: #e7bf6c; content: ""; }
.hero-build-caption-copy { grid-column: 1; display: flex; width: fit-content; max-width: calc(100% / 1.08); align-items: baseline; flex-wrap: wrap; gap: 3px 8px; min-height: 44px; padding: 4px 6px; color: inherit; font: inherit; text-align: left; background: transparent; border: 0; cursor: pointer; border-radius: 4px; outline: 2px solid transparent; transform-origin: 0 50%; }
.hero-build-caption-copy:focus-visible { outline-color: #edc679; }
.hero-build-caption-copy strong { color: var(--build-ink, #25415d); font-size: .7rem; font-weight: 750; }
.hero-build-caption-copy > span { color: var(--build-muted, #657589); font-size: .61rem; }
.hero-build-timeline { grid-column: 1; display: flex; align-items: center; gap: 0; margin: 0; padding: 0; list-style: none; }
.hero-build-timeline li { display: flex; align-items: center; color: var(--build-muted, #68798c); font: .65rem/1.2 ui-monospace, Consolas, monospace; }
.hero-build-timeline li + li::before { width: 15px; height: 1px; margin-inline: 8px; background: #64738a; content: ""; }
.hero-build-timeline li[data-step-current] { color: #e7bf6c; font-weight: 800; }
.hero-build-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 1121px) {
    .hero-build-caption-copy { padding-inline: 0; color: var(--build-ink, #25415d); border-radius: 0; outline: none; }
    .hero-build-caption-copy strong, .hero-build-caption-copy > span { color: inherit; }
    .hero-build-caption-copy > span { opacity: .76; }
    .hero-build-caption-copy:hover { color: #edc679; }
    .hero-build-caption-copy:focus-visible { outline: none; text-decoration: underline; text-decoration-color: #edc679; text-decoration-thickness: 2px; text-underline-offset: 4px; }
}
@media (max-width: 1120px) {
    .hero-build-scene { padding: 8px 6px 12px; }
    .hero-build[data-build-presentation="held"] .hero-build-scene { visibility: hidden; }
    .hero-build-device { max-width: 620px; aspect-ratio: 4 / 3; transform-origin: 50% 0%; transform: perspective(2200px) rotateX(calc(54deg * (1 - var(--phone-pickup, 1)))) scale(calc(.9 + .1 * var(--phone-pickup, 1))); }
    .hero-build-device::after { position: absolute; top: 24%; right: -3px; width: 3px; height: 28px; background: #293e5d; border-radius: 0 2px 2px 0; content: ""; }
    .hero-build-lid { inset: 0; padding: 12px 10px; border-radius: 23px; transform: none; }
    .hero-build-lid::before { top: 5px; }
    .hero-build-screen { --screen-radius: 12px; }
    .hero-build-base,
    .hero-build-deck,
    .hero-build-lid::after,
    .hero-build-lid-solid { display: none; }
    .hero-build-toolbar { padding-inline: 8px; }
    .hero-build-window-controls { display: none; }
    .hero-build-browser { grid-template-rows: 22px 26px minmax(0, 1fr); }
    .hero-build-code { padding: 9px; font-size: 8px; }
}
@media (min-width: 761px) and (max-width: 1120px) {
    .hero-build-scene { padding: 16px 6px; }
    .hero-build-device { width: min(100%, 650px, 80svh); max-width: none; transform-origin: 50% 50%; transform: perspective(2200px) translateZ(calc(-140px * (1 - var(--phone-pickup, 1)))) rotateX(calc(56deg * (1 - var(--phone-pickup, 1)))) rotateZ(calc(90deg * (1 - var(--phone-pickup, 1)))) scale(var(--tablet-scale, calc(.4 + .6 * var(--phone-pickup, 1)))); }
    .hero-build-caption { gap: 6px 14px; margin-inline: 6px; padding-top: 8px; }
    .hero-build-caption-copy { padding-inline: 0; color: var(--build-ink, #25415d); border-radius: 0; outline: none; }
    .hero-build-caption-copy strong, .hero-build-caption-copy > span { color: inherit; }
    .hero-build-caption-copy > span { opacity: .76; }
    .hero-build-caption-copy:focus-visible { outline: none; text-decoration: underline; text-decoration-color: #edc679; text-decoration-thickness: 2px; text-underline-offset: 4px; }
    .hero-build-timeline { grid-column: 1 / -1; grid-row: 2; justify-content: center; }
    .hero-build-timeline li { font-size: .63rem; }
}
@media (max-width: 600px) {
    .hero-build-scene { padding: 0 0 10px; }
    .hero-build-caption { margin-inline: 0; gap: 8px; }
    .hero-build-caption-copy strong { font-size: .66rem; }
    .hero-build-caption-copy > span { font-size: .59rem; }
    .hero-build-timeline li { font-size: .61rem; }
    .hero-build-timeline li + li::before { width: 9px; margin-inline: 6px; }
    .hero-build-toolbar { gap: 5px; padding-inline: 6px; }
    .hero-build-browser-actions { gap: 6px; }
    .hero-build-browser-actions > svg { width: 9px; height: 9px; }
    .hero-build-profile { width: 13px; height: 13px; flex-basis: 13px; }
    .hero-build-tab { width: 65%; }
    .hero-build-editor-bar { padding: 8px 6px; font-size: 6px; gap: 5px; }
    .hero-build-editor-bar strong { font-size: 8px; }
    .hero-build-code { padding: 8px 6px; font-size: 7px; }
}
@media (max-width: 760px) {
    /* The whole upright phone approaches and turns into its landscape view. */
    .hero-build-scene { width: min(100%, 580px); aspect-ratio: 1.8; margin-inline: auto; padding: 8px 3px 6px; }
    .hero-build-device {
        width: min(calc(100% - 12px), 560px); max-width: none; aspect-ratio: 2 / 1;
        transform-origin: 50% 50%;
        transform: perspective(1800px) translateY(calc(12px * (1 - var(--phone-lift, var(--phone-pickup, 1))))) translateZ(calc(-80px * (1 - var(--phone-approach, var(--phone-pickup, 1))))) rotateX(calc(68deg * (1 - var(--phone-lift, var(--phone-pickup, 1))))) rotateZ(calc(90deg * (1 - var(--phone-turn, var(--phone-pickup, 1))))) scale(var(--phone-scale, calc(.6 + .4 * var(--phone-pickup, 1))));
    }
    .hero-build-device::before { position: absolute; top: -3px; left: 22%; width: 44px; height: 3px; background: #7890a8; border-radius: 3px 3px 0 0; content: ""; }
    .hero-build-device::after { top: auto; right: 24%; bottom: -3px; width: 36px; height: 3px; background: #7890a8; border-radius: 0 0 3px 3px; }
    .hero-build-lid { padding: 4px 18px; border: 2px solid #8296af; border-radius: 24px; background: #101d30; box-shadow: inset 0 0 0 3px #273d58, 0 12px 20px #0003; }
    .hero-build-lid::before { z-index: 4; top: 50%; left: 6px; width: 6px; height: 38px; border: 1px solid #263e56; border-radius: 12px; background: radial-gradient(circle at 50% 82%, #335b78 0 2px, #080f1a 3px); box-shadow: none; transform: translateY(-50%); }
    .hero-build-screen { --screen-radius: 8px; --screen-border: 0px; border: 0; background: #0b192d; }
    .hero-build-screen::after { position: absolute; z-index: 4; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(135deg, #94d6df35, transparent 48%, #edc77520); opacity: 0; content: ""; }
    .hero-build-homebar { display: block; position: absolute; z-index: 5; top: 35%; right: 6px; bottom: auto; width: 3px; height: 30%; background: #c0ccda; border-radius: 5px; }
    .hero-build-browser { grid-template-rows: 20px minmax(0, 1fr); }
    .hero-build-tabs, .hero-build-browser-actions, .hero-build-profile, .hero-build-browser-menu { display: none; }
    .hero-build-toolbar { justify-content: center; padding: 2px 8px; }
    .hero-build-address { height: 16px; justify-content: center; flex: 1; font-size: 8px; }
    .hero-build-power-symbol { width: 48px; height: 48px; opacity: var(--build-power); }
    .hero-build-address .hero-build-bookmark { display: none; }
    @supports (width: 1cqh) {
        .hero-build-screen { container-type: size; }
        .hero-build-browser {
            inset: auto;
            top: 50%;
            left: 50%;
            width: calc(100cqw * var(--phone-turn, 1) + 100cqh * (1 - var(--phone-turn, 1)));
            height: calc(100cqh * var(--phone-turn, 1) + 100cqw * (1 - var(--phone-turn, 1)));
            transform: translate(-50%, -50%) rotate(calc(-90deg * (1 - var(--phone-turn, 1))));
            transform-origin: center;
        }
    }
    .hero-build-caption { grid-template-columns: minmax(0, 1fr); align-items: center; gap: 8px; margin-inline: 0; padding-top: 8px; }
    .hero-build-caption-copy { min-width: 0; padding: 4px 0; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; color: var(--build-ink, #25415d); border-radius: 0; outline: none; }
    .hero-build-caption-copy strong, .hero-build-caption-copy > span { color: inherit; }
    .hero-build-caption-copy > span { opacity: .76; }
    .hero-build-caption-copy:focus-visible { outline: none; text-decoration: underline; text-decoration-color: #edc679; text-decoration-thickness: 2px; text-underline-offset: 4px; }
    .hero-build-timeline { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-build-lid { transform: none; }
    .hero-build-browser { opacity: 1; }
    .hero-build-preview { transition: none; }
    .hero-build-device { transform: none; will-change: auto; }
}
