/* Cortana landing page. The story section pins one stage; landing.js moves the camera and the screen from scroll position.
   Everything that moves does so with transform and opacity. Scene units are the TV's own pixels: the screen is 1920x1080. */

.story { position: relative; height: 760vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #06080c; contain: layout paint; }

/* A soft vignette keeps the eye on the screen. */
.stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2; background: radial-gradient(ellipse 120% 100% at 50% 45%, transparent 55%, rgba(2, 3, 6, .55)); }

/* ---- the room ---------------------------------------------------------------------------------------- */
.room { position: absolute; inset: 0; perspective: 2600px; perspective-origin: 50% 42%; pointer-events: none; }
.cam { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; transform: translate3d(0, 34vh, 0) scale(.4) rotateX(5deg) rotateY(-18deg); }
.cam > * { position: absolute; }
.cam i { position: absolute; display: block; }

/* Soft things are drawn small and scaled up: the gradients cost almost nothing to composite. */
.wall { left: -600px; top: -350px; width: 1200px; height: 700px; transform: translateZ(-380px) scale(9);
  background: linear-gradient(#0b0e15, #080a10 62%, #06070b); }
.lampglow { left: -600px; top: -350px; width: 1200px; height: 700px; transform: translateZ(-378px) scale(9); will-change: opacity;
  background: radial-gradient(ellipse 30% 46% at 27% 47%, rgba(255, 170, 84, .34), rgba(255, 170, 84, .11) 45%, transparent 72%); }
.glow { left: -300px; top: -200px; width: 600px; height: 400px; transform: translateZ(-370px) scale(7.2); opacity: 0; will-change: opacity; }
.glow-cool { background: radial-gradient(closest-side, rgba(96, 160, 255, .50), rgba(96, 160, 255, .16) 55%, transparent); opacity: 1; }
.glow-warm { background: radial-gradient(closest-side, rgba(255, 200, 87, .55), rgba(255, 200, 87, .16) 55%, transparent); }
.glow-go { background: radial-gradient(closest-side, rgba(75, 227, 168, .55), rgba(75, 227, 168, .16) 55%, transparent); }
.floor { left: -600px; top: 1172px; width: 1200px; height: 420px; transform-origin: 50% 0; transform: translateZ(-380px) rotateX(90deg) scale(6);
  background: radial-gradient(ellipse 34% 60% at 50% 22%, rgba(90, 140, 220, .16), transparent 70%), radial-gradient(ellipse 22% 50% at 24% 30%, rgba(255, 170, 84, .16), transparent 70%), linear-gradient(#0d0e12, #050608 70%); }

.lamp { left: -1900px; top: -470px; width: 340px; height: 1642px; transform: translateZ(-170px); will-change: opacity; }
.lamp-shade { left: 0; top: 0; width: 340px; height: 300px; clip-path: polygon(17% 0, 83% 0, 100% 100%, 0 100%); background: linear-gradient(#ffe2b8, #ffbd72 38%, #e08a35 82%, #a85e1f); }
.lamp-pole { left: 163px; top: 298px; width: 14px; height: 1330px; background: linear-gradient(90deg, #15130f, #4a3c2a 45%, #1a1712); }
.lamp-foot { left: 60px; top: 1622px; width: 220px; height: 20px; border-radius: 50% 50% 4px 4px; background: #17140f; }

.console { left: -1500px; top: 652px; width: 3000px; height: 520px; transform-style: preserve-3d; }
.console-top { left: 0; top: 0; width: 3000px; height: 560px; transform-origin: 50% 0; transform: translateZ(-330px) rotateX(90deg);
  background: radial-gradient(ellipse 15% 30% at 50% 30%, rgba(0, 0, 0, .55), transparent 75%), radial-gradient(ellipse 34% 80% at 50% 40%, rgba(130, 175, 255, .26), transparent 72%),
    linear-gradient(90deg, rgba(0, 0, 0, .10), transparent 12% 30%, rgba(255, 255, 255, .03) 44%, transparent 60% 82%, rgba(0, 0, 0, .12)), linear-gradient(#22170f, #3a281b); }
.console-front { left: 0; top: 0; width: 3000px; height: 520px; transform: translateZ(230px);
  background: linear-gradient(transparent 86%, #070504 86%), linear-gradient(90deg, transparent 33.25%, #0d0805 33.25% 33.42%, transparent 33.42% 66.58%, #0d0805 66.58% 66.75%, transparent 66.75%),
    linear-gradient(rgba(255, 226, 190, .22), rgba(255, 226, 190, .04) 1.2%, transparent 3.5%), linear-gradient(90deg, rgba(0, 0, 0, .18), transparent 16% 40%, rgba(255, 255, 255, .025) 52%, transparent 66%, rgba(0, 0, 0, .2)), linear-gradient(#2f2016, #1c130c 70%); }
.plant { left: 1120px; top: 152px; width: 322px; height: 500px; max-width: none; transform: translateZ(20px); }

.tv { left: 0; top: 0; transform-style: preserve-3d; }
.tv-frame { position: absolute; left: -974px; top: -554px; width: 1948px; height: 1108px; padding: 14px; border-radius: 12px; background: #030405; box-shadow: inset 0 0 0 2px #1b1f26, inset 0 2px 0 2px #2a2f38; }
.tv-side { background: #0c0e12; }
.tv-side-l { left: -974px; top: -550px; width: 54px; height: 1100px; transform-origin: 0 50%; transform: rotateY(90deg); background: linear-gradient(90deg, #1c2028, #090a0d); }
.tv-side-r { left: 974px; top: -550px; width: 54px; height: 1100px; transform-origin: 0 50%; transform: rotateY(90deg); background: linear-gradient(90deg, #1c2028, #090a0d); }
.tv-side-t { left: -970px; top: -554px; width: 1940px; height: 54px; transform-origin: 50% 0; transform: rotateX(-90deg); background: linear-gradient(#262b34, #0b0c10); }
.tv-neck { left: -170px; top: 552px; width: 340px; height: 104px; transform: translateZ(-30px); background: linear-gradient(90deg, #0a0b0e, #23272e 50%, #0a0b0e); clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%); }
.tv-base { left: -420px; top: 652px; width: 840px; height: 300px; transform-origin: 50% 0; transform: translateZ(-170px) rotateX(90deg); border-radius: 14px; background: linear-gradient(#0b0c0f, #1d2026); }
.tv-glare { inset: 14px; border-radius: 2px; pointer-events: none; will-change: transform, opacity; background: linear-gradient(112deg, transparent 30%, rgba(255, 255, 255, .055) 44%, rgba(255, 255, 255, .012) 52%, transparent 60%); }

/* ---- the screen: Cortana on a TV, 1920 x 1080 ------------------------------------------------------------ */
.ui { position: relative; width: 1920px; height: 1080px; overflow: hidden; border-radius: 2px; background: var(--c-bg); }
/* What plays on it is the product itself: the real client (tv/app.js, the same one /demo runs) in a frame, on a read-only
   sample household. Until it has loaded, a still of the same screen (tools/site/poster.py) holds the place. */
.ui-poster, .ui-live { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; max-width: none; border: 0; display: block; }
.ui-live { opacity: 0; transition: opacity .6s ease; background: var(--c-bg); }
.ui.is-live .ui-live { opacity: 1; }

/* The one load moment: the set powers on. Everything after this is driven by scroll. */
@keyframes power-on { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.room { animation: power-on 1.4s var(--ease-out) .1s backwards; }
.hero .lede { animation: rise .9s var(--ease-out) .25s backwards; }
.hero-cta { animation: rise .9s var(--ease-out) .4s backwards; }

/* ---- hero copy ----------------------------------------------------------------------------------------- */
.hero { position: absolute; inset: 0 0 auto 0; padding: calc(4rem + 5.5vh) var(--gutter) 0; text-align: center; display: flex; flex-direction: column; align-items: center; will-change: transform, opacity; z-index: 3; }
.hero h1 { max-width: 13.5em; }
.hero .lede { margin-top: clamp(1rem, 2.4vh, 1.75rem); max-width: 37em; }
/* R3-L12: on desktop widths the lede ran to three lines and pushed the buttons onto the TV; two lines leaves air above the set. */
@media (min-width: 1200px) { .hero .lede { max-width: 44em; } }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: clamp(1.1rem, 3vh, 2rem); }

/* ---- chapter captions ------------------------------------------------------------------------------------ */
.chapters { margin: 0; z-index: 3; }
.chapter { position: absolute; left: var(--gutter); top: 50%; width: min(27vw, 31rem); opacity: 0; transform: translateY(-50%); will-change: transform, opacity; pointer-events: none; }
.chapter h2 { font-size: clamp(2rem, .6rem + 2.9vw, 4.1rem); }
.chapter p { margin-top: 1.1rem; font-size: clamp(1.0625rem, .8rem + .55vw, 1.5rem); line-height: 1.5; color: var(--mist); text-wrap: pretty; }

/* ---- remote ---------------------------------------------------------------------------------------------- */
.remote { position: absolute; right: 4vw; bottom: -215px; width: 150px; z-index: 4; opacity: 0; transform: translateY(120%) rotate(-9deg); will-change: transform, opacity; pointer-events: none; }
.remote-body { position: relative; height: 470px; border-radius: 40px 40px 26px 26px; background: linear-gradient(100deg, #23262d, #14161b 60%, #0e1014); box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .14), inset -2px 0 6px rgba(0, 0, 0, .5), 0 40px 80px rgba(0, 0, 0, .7); }
.remote i, .remote b { position: absolute; display: block; }
.r-mic { left: 50%; top: 16px; width: 5px; height: 5px; margin-left: -2px; border-radius: 50%; background: #05060a; }
.r-power { left: 50%; top: 36px; width: 24px; height: 24px; margin-left: -12px; border-radius: 50%; background: #2c1513; box-shadow: inset 0 0 0 2px #5c2a4a; }
.r-pad { position: absolute; left: 50%; top: 86px; width: 116px; height: 116px; margin-left: -58px; border-radius: 50%; background: #2d3038; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 2px 6px rgba(0, 0, 0, .6); }
.r-pad i { width: 8px; height: 8px; border-top: 2px solid #8b93a1; border-right: 2px solid #8b93a1; opacity: .9; }
.r-up { left: 54px; top: 12px; transform: rotate(-45deg); } .r-right { right: 12px; top: 54px; transform: rotate(45deg); } .r-down { left: 54px; bottom: 12px; transform: rotate(135deg); } .r-left { left: 12px; top: 54px; transform: rotate(-135deg); }
.r-ok { left: 30px; top: 30px; width: 56px; height: 56px; border-radius: 50%; background: #16181d; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); color: #8b93a1; font-size: 13px; font-weight: 650; display: flex !important; align-items: center; justify-content: center; }
.r-pad::before, .r-pad::after { content: ""; position: absolute; border-radius: 50%; opacity: 0; will-change: opacity; }
.r-pad::before { left: 38px; bottom: 3px; width: 40px; height: 40px; background: radial-gradient(closest-side, rgba(143, 165, 255, .95), transparent); }   /* down arrow lit */
.r-pad::after { left: 26px; top: 26px; width: 64px; height: 64px; background: radial-gradient(closest-side, rgba(143, 165, 255, .0) 55%, rgba(143, 165, 255, .95) 70%, transparent); } /* OK ring lit */
.r-pad.is-down::before, .r-pad.is-ok::after { opacity: 1; }
.r-row { position: absolute; left: 0; right: 0; top: 228px; display: flex; justify-content: center; gap: 14px; }
.r-row i { position: static; width: 26px; height: 26px; border-radius: 50%; background: #2a2d35; }
.r-rock { position: absolute; left: 0; right: 0; top: 280px; display: flex; justify-content: center; gap: 26px; }
.r-rock i { position: static; width: 30px; height: 84px; border-radius: 15px; background: #2a2d35; }

/* ---- phone ----------------------------------------------------------------------------------------------- */
.phone { position: absolute; left: 36vw; bottom: -6vh; width: 290px; z-index: 4; opacity: 0; transform: translateY(110%) rotate(5deg); will-change: transform, opacity; pointer-events: none; }
.phone-body { position: relative; height: 590px; border-radius: 48px; padding: 10px; background: linear-gradient(140deg, #3a3d45, #15171c 30%, #0b0c10); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .18), 0 50px 100px rgba(0, 0, 0, .75), 0 0 80px rgba(96, 160, 255, .12); }
.phone-island { position: absolute; left: 50%; top: 22px; width: 84px; height: 24px; margin-left: -42px; border-radius: 14px; background: #000; z-index: 2; }
.phone-screen { position: relative; height: 100%; border-radius: 39px; overflow: hidden; text-align: center; color: #fff; background: radial-gradient(120% 60% at 30% 0%, #2a3a66, transparent 70%), radial-gradient(100% 60% at 90% 100%, #5a3214, transparent 70%), #080b14; }
.phone-time { margin-top: 68px; font-size: 76px; font-weight: 620; font-stretch: 108%; letter-spacing: -.04em; line-height: 1; }
.phone-day { margin-top: 6px; font-size: 15px; font-weight: 500; color: rgba(255, 255, 255, .85); }
.push { position: absolute; left: 10px; right: 10px; top: 190px; padding: 13px 14px 14px; border-radius: 22px; background: #262b38; text-align: left; opacity: 0; transform: translateY(-40px) scale(.96); will-change: transform, opacity; box-shadow: 0 12px 30px rgba(0, 0, 0, .4); }
.push-top { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #aeb7dc; }
.push-top b { font-weight: 600; color: #d6dbe3; } .push-top time { margin-left: auto; }
.push-app { width: 22px; height: 22px; border-radius: 6px; background: #070a18; display: grid; place-items: center; color: #f4f1ea; } .push-app svg { width: 16px; height: 16px; }
.push-title { margin-top: 8px; font-size: 15.5px; font-weight: 650; }
.push-body { margin-top: 2px; font-size: 14px; line-height: 1.35; color: #c6ccd6; }
.push-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; will-change: opacity; }
.push-acts span { position: relative; display: flex; align-items: center; justify-content: center; height: 40px; border-radius: 12px; background: #363c4c; font-size: 14px; font-weight: 620; }
.push-acts .yes { background: #f4f1ea; color: #070a18; }
.push-acts .tap { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: rgba(143, 165, 255, .55); opacity: 0; transform: scale(.4); will-change: transform, opacity; }
.push-done { position: absolute; left: 14px; right: 14px; bottom: 14px; height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; background: #10291f; color: #bff5da; font-size: 14px; font-weight: 620; opacity: 0; will-change: opacity; }
.push-done svg { width: 18px; height: 18px; }

/* ---- chapter dots ---------------------------------------------------------------------------------------- */
.dots { position: absolute; right: clamp(.5rem, 1.6vw, 1.5rem); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; z-index: 5; opacity: 0; transition: opacity var(--d-3) ease; }
.dots.is-on { opacity: 1; }
.dots button { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; border-radius: 50%; }
.dots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #465066; transition: transform var(--d-2) var(--ease-out), background var(--d-2) ease; }
.dots button:hover::before { background: var(--mist); }
.dots button[aria-current="true"]::before { background: var(--paper); transform: scale(1.5); }

/* ---- sections after the story ------------------------------------------------------------------------------ */
.sec { position: relative; padding-block: clamp(5rem, 13vh, 10rem); }
.sec .lede { margin-top: var(--s-5); }
.sec h2 { max-width: 13em; }

.works { padding-bottom: clamp(4rem, 10vh, 8rem); overflow: hidden; background: linear-gradient(#06080c, var(--night)); }
.marks { margin-block: clamp(2.5rem, 7vh, 5rem); display: grid; gap: clamp(.25rem, 1vw, .75rem); }
.marks-row { display: flex; gap: clamp(1.5rem, 4vw, 4rem); white-space: nowrap; font-size: clamp(2.6rem, 8.2vw, 8.2rem); font-weight: 760; font-stretch: 118%; letter-spacing: -.04em; line-height: 1.02; color: #1a2130; will-change: transform; width: max-content; }
.marks-row span:nth-child(4n + 1) { color: var(--paper); }
.marks-row:nth-child(2) span:nth-child(4n + 1) { color: #1a2130; }
.marks-row:nth-child(2) span:nth-child(4n + 3) { color: var(--screen); }
.hook { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.hook-tabs { display: grid; gap: .5rem; }
.hook-tabs button { text-align: left; padding: 1.15rem 1.35rem; border-radius: var(--r-3); border: 1px solid transparent; background: none; cursor: pointer; color: var(--dim); display: grid; gap: .3rem; transition: background var(--d-2) ease, color var(--d-2) ease, border-color var(--d-2) ease; }
.hook-tabs button b { font-size: var(--t-xl); font-weight: 680; font-stretch: 110%; letter-spacing: -.02em; color: var(--mist); }
.hook-tabs button span { font-size: var(--t-sm); line-height: 1.45; }
.hook-tabs button:hover { background: var(--night-2); }
.hook-tabs button[aria-selected="true"] { background: var(--night-3); border-color: var(--line); color: var(--mist); }
.hook-tabs button[aria-selected="true"] b { color: var(--paper); }
.hook-panels .codeblock { min-height: 19rem; font-size: clamp(.75rem, .68rem + .25vw, .875rem); border-radius: var(--r-3); padding: clamp(1.1rem, 2.4vw, 2rem); box-shadow: var(--e-2); }
.hook-more { grid-column: 1 / -1; margin-top: var(--s-4); }

.home { background: var(--night); }
.home-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.home-lead { position: sticky; top: 7rem; }
.facts > div { padding: 1.6rem 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 12rem 1fr; gap: 1.5rem; }
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 650; font-stretch: 106%; letter-spacing: -.01em; }
.facts dd { color: var(--mist); max-width: 34em; }
.home-links { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: var(--s-7); }
.home-links a { font-weight: 600; padding: .5rem 0; }

.price h2 { max-width: 14em; }
.plans { display: grid; grid-template-columns: 5fr 7fr; gap: 1rem; margin-top: var(--s-8); }
.plan { padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: var(--r-4); border: 1px solid var(--line-soft); background: var(--night-2); }
.plan h3 { font-size: var(--t-lg); font-weight: 650; color: var(--mist); }
.plan-price { display: flex; align-items: baseline; gap: .9rem; margin-top: .6rem; }
.plan-price b { font-size: clamp(3.5rem, 7vw, 6rem); font-weight: 720; font-stretch: 110%; letter-spacing: -.045em; line-height: 1; }
.plan-price span { color: var(--mist); }
.plan p:last-child { margin-top: 1.2rem; color: var(--mist); max-width: 30em; }
.plan-pro { background: var(--paper); border-color: var(--paper); color: var(--night); }
.plan-pro h3 { color: #5a4a36; } .plan-pro .plan-price span, .plan-pro p:last-child { color: #3c3a36; }
.price-more { margin-top: var(--s-6); }

.join { text-align: center; padding-block: clamp(6rem, 18vh, 13rem); overflow: hidden; }
.join-glow { position: absolute; left: 50%; bottom: -55%; width: 120vmax; height: 90vmax; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255, 200, 87, .22), rgba(255, 200, 87, .06) 50%, transparent 70%); pointer-events: none; }
.join .wrap { position: relative; }
.join h2 { max-width: none; white-space: nowrap; font-size: clamp(3.25rem, 13.5vw, 10.5rem); margin-inline: calc(50% - 50vw + var(--gutter)); }
.join .lede { margin-inline: auto; }
.join-form { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; max-width: 38rem; margin: var(--s-7) auto 0; }
.join-form .btn { grid-column: 1 / -1; justify-self: center; min-width: 16rem; }
.join-form .input { min-height: 3.375rem; border-radius: var(--r-pill); padding-inline: 1.4rem; background: var(--night-2); }
.join .msg { margin-top: .9rem; }
.join-alt { margin-top: var(--s-5); color: var(--mist); font-size: var(--t-sm); display: grid; gap: .1rem; }
.join-alt a { font-weight: 600; display: inline-block; padding: .45rem 0; }

/* ---- small screens --------------------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .story { height: 700vh; }
  .hero { padding-top: calc(4rem + 3vh); }
  .hero .lede { font-size: 1.0625rem; }
  .chapter { left: var(--gutter); right: var(--gutter); top: 60%; width: auto; transform: none; }
  .chapter h2 { font-size: clamp(1.75rem, 8.4vw, 2.6rem); }
  .chapter p { margin-top: .7rem; font-size: 1.0625rem; }
  .chapter[data-ch="2"] { right: calc(var(--gutter) + 92px); }
  .remote { right: 3vw; bottom: -150px; transform-origin: 100% 100%; }
  .phone { left: auto; right: 6vw; bottom: 43%; transform-origin: 100% 100%; }
  .dots { display: none; }
  .hook, .home-grid, .plans { grid-template-columns: minmax(0, 1fr); }
  .home-lead { position: static; }
  .facts > div { grid-template-columns: 1fr; gap: .35rem; padding: 1.25rem 0; }
  .join-form { grid-template-columns: 1fr; } .join-form .btn { justify-self: stretch; }
  .hook-tabs button { padding: .9rem 1rem; }
}

/* ---- reduced motion: the stage still pins and the screen still changes with scroll, but in steps, not sweeps -------- */
@media (prefers-reduced-motion: reduce) {
  .marks-row { transform: none !important; }
}
