.mac-intro { display: none; background: #eee; color: #161617; }
/* mac-intro-paint (set by the head script on a cold homepage load): the same geometry as the ready state, so the stage,
   header, caption and words paint at once and the 3D canvas fades in over them when its first frame is drawn. */
html.mac-intro-ready .mac-intro, html.mac-intro-paint .mac-intro { display: block; height: 375svh; margin-bottom: -100svh; position: relative; z-index: 1; }
/* Only the first screen shows before the scene is ready: nothing else is painted, measured or focusable. */
html.mac-intro-paint .hero-shell > :not(.nav), html.mac-intro-paint body > :not(.mac-intro):not(.hero-shell) { visibility: hidden; }
/* Phones: the intro is a fixed, opaque overlay above the real hero (mac-phone-fixed), so the hero can paint beneath it before the reveal
   with no visible change. Its content then counts for Largest Contentful Paint when it loads instead of at the reveal (throttled phone:
   ~23 s -> ~9.5 s; V2_HANDOFF, December 2 "shorter intro"). It waits for its own face (mac-hero-font, head script) so the font swap
   happens while it is still hidden and adds no layout shift. */
@media (max-width: 767px) { html.mac-phone-fixed.mac-intro-paint.mac-hero-font .hero-shell > main.hero { visibility: visible; } }
html.mac-intro-paint .mac-intro__studio { --word-inset: 50%; --word-shift: 50%; --word-stack: .6em; }
/* The header matches the light stage before the first frame sets body.mac-scene-light. */
html.mac-intro-paint body .nav:not(.is-open):not(.is-mega-open) .nav__row { color: #101719 !important; }
html.mac-intro-paint body .nav:not(.is-open):not(.is-mega-open) .nav__links a { color: #101719 !important; }
html.mac-intro-paint body .nav:not(.is-open):not(.is-mega-open) .brand img:not(.brand__icon) { filter: invert(1) !important; }
/* ---- Boot and reveal (Odama-style preloader). The head script in index.html sets html.mac-boot on a cold load, runs the counter
   and, once the Macintosh has drawn its first frame, swaps mac-boot for mac-reveal. Everything here is homepage-only and keyed on
   those two classes, so the header looks exactly as before on other pages and after the reveal. ---- */
/* The pixel faces the first screen uses; the chip face is declared here as well (same file as compact-menu) so it exists at first paint. */
@font-face { font-family: 'LER Navigation Pixel'; src: url('/assets/fonts/geist-pixel/GeistPixel-Square.woff2') format('woff2'); font-display: swap; }
/* Text of the first screen stays hidden until the preloaded pixel faces have arrived, so nothing paints in a fallback face first. */
html.mac-boot:not(.mac-fonts-ready) :is(.mac-intro__studio, .mac-intro__caption) { visibility: hidden; }
html.mac-boot:not(.mac-nav-fonts) .nav { visibility: hidden !important; }
/* One chip set that becomes the real header: the brand, the call to action (it shows the counter) and the menu button start
   16px (12px on phones) above the bottom edge. --mac-boot-y is the remaining travel; the head script sets it from the counter. */
html.mac-boot { --mac-boot-row: 76px; --mac-boot-y: calc(100svh - var(--mac-boot-row)); }
@media (max-width: 767px) { html.mac-boot { --mac-boot-row: 68px; } }
html.mac-boot body .nav :is(.brand, .compact-header-cta, .nav__menu-toggle) { transform: translate3d(0, var(--mac-boot-y), 0); transition: transform .4s cubic-bezier(.215, .61, .355, 1); pointer-events: none !important; animation: mac-boot-fade .3s ease-out .8s both; /* the chips appear once the caption has slid out */ will-change: transform; }
/* The real experience selector (full / quick) is the boot's escape: visible and usable from the first moment, in its header place
   (Ed, 2026-12-02: no separate "Use Quick mode" button when the header already has one). */
html.mac-boot body .nav .ler-experience-selector { opacity: 1; pointer-events: auto !important; }
/* The call to action wears the counter; its real label shows again once the counter has scrambled into it. */
.mac-boot-cta { position: relative; }
.mac-boot-cta > :not(.mac-boot__label) { opacity: 0; }
.mac-boot__label { position: absolute; inset: 0; display: grid; place-items: center; white-space: nowrap; font: inherit; letter-spacing: inherit; font-variant-numeric: tabular-nums; pointer-events: none; }
/* The first screen: grey stage, scrambling words and the caption, painted at once (the caption is the page's early largest paint).
   After 0.3 s the caption slides out through its mask so the chips rising on the left never travel through it, and its lines slide
   back in at the reveal. The 3D canvas arrives with the reveal. */
html.mac-boot .mac-intro__scene { opacity: 0; }
html.mac-boot .mac-intro__caption > span { animation: mac-caption-out .45s cubic-bezier(.76, 0, .24, 1) .3s forwards; }
/* The older loading escape button is not shown during the homepage boot; the header's selector does that job. */
html.mac-boot > .ler-loading-quick, html > .ler-loading-quick.mac-boot__quick-out { display: none !important; }
/* Reveal: the counter chip scrambles into its label (script); the experience selector, the caption and the canvas follow odama's
   delays and eases; the words and the Macintosh's rise run in the intro script. */
@media (prefers-reduced-motion: no-preference) {
  html.mac-reveal .mac-intro__scene { animation: mac-boot-scene .7s cubic-bezier(.76, 0, .24, 1) .6s backwards; }
  html.mac-reveal .mac-intro__caption .mac-line > span { animation: mac-line-in 1.05s cubic-bezier(.16, 1, .3, 1) calc(.25s + var(--i, 0) * .06s) backwards; }
}
/* Proposed shorter desktop opening, for comparison only (?intro=short sets html.mac-intro-short; Ed, 2026-12-02). Same eases, shorter
   lengths; the head script and the intro script shorten their parts the same way. Phones keep their own intro. */
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  html.mac-intro-short.mac-reveal .mac-intro__scene { animation-duration: .45s; animation-delay: .2s; }
  html.mac-intro-short.mac-reveal .mac-intro__caption .mac-line > span { animation-duration: .8s; animation-delay: calc(.1s + var(--i, 0) * .05s); }
}
/* Phones: the intro is a fixed overlay from the first paint (html.mac-phone-fixed, set by the head script), with the real page at the top
   beneath it. From the reveal until the zoom has handed over the page does not scroll; the hand-off fades the overlay out and hides it. */
html.mac-phone-intro, html.mac-phone-intro body { overflow: hidden; overscroll-behavior: none; }
@media (max-width: 767px) {
  html.mac-phone-fixed .mac-intro { position: fixed !important; inset: 0; height: 100svh !important; margin: 0 !important; z-index: 10; } /* above the page content (the hero is 1), below the header (30) */
  html.mac-phone-fixed.mac-phone-fade .mac-intro { opacity: 0; pointer-events: none; transition: opacity .45s cubic-bezier(.76, 0, .24, 1); }
  /* Hidden, not removed: the intro keeps its box so the shared page bridge still leaves Start a project to the in-place scene. */
  html.mac-phone-fixed.mac-phone-done .mac-intro { visibility: hidden; pointer-events: none; opacity: 0; }
}
@keyframes mac-boot-fade { from { opacity: 0; } }
@keyframes mac-boot-out { to { opacity: 0; } }
@keyframes mac-boot-scene { from { opacity: 0; } }
@keyframes mac-line-in { from { transform: translateX(-104%); } }
@keyframes mac-caption-out { to { transform: translateX(-104%); } }
/* The module splits the caption into its wrapped lines for the reveal: each line is a mask its text slides through. */
.mac-intro__caption .mac-line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.mac-intro__caption .mac-line > span { display: block; }
body.mac-portal-active .hero-shell { background: transparent !important; }
body.mac-portal-active .hero-shell::before { background: transparent !important; }
/* Keep the closed homepage navigation clear over the opening and page content. */
body.home-ambient[data-dark-home-hero] .nav:not(.is-open):not(.is-mega-open) .nav__row { background: transparent !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
body.mac-scene-light .nav:not(.is-open):not(.is-mega-open) .nav__row { color: #101719 !important; }
body.mac-scene-light .nav:not(.is-open):not(.is-mega-open) .nav__links a { color: #101719 !important; }
body.mac-scene-light .nav:not(.is-open):not(.is-mega-open) .brand img:not(.brand__icon) { filter: invert(1) !important; }
.mac-intro__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; background: #eee; }
.mac-intro__stage::before { content: ''; position: absolute; inset: 0; background: #080d10; opacity: var(--mac-scene-dark, 0); pointer-events: none; }
.mac-intro__scene, .mac-intro__scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mac-intro__scene { z-index: 1; }
.mac-intro__sticker-keyboard { position:absolute; z-index:2; left:12px; top:100px; padding:10px 14px; border:2px solid #dd3d06; border-radius:6px; background:#fff; color:#101719; font:600 14px/1.2 Matter,system-ui,sans-serif; clip-path:inset(50%); width:1px; height:1px; overflow:hidden; }
.mac-intro__sticker-keyboard:focus-visible { width:auto; height:auto; clip-path:none; outline:2px solid #101719; outline-offset:2px; }
.mac-intro__live-screen { position: absolute; left: 0; top: 0; width: 1425px; height: 1070px; overflow: hidden; border-radius: 5%; background: #080d10; transform-origin: 0 0; opacity: 0; pointer-events: none; }
.mac-intro__live-screen iframe { position: absolute; top: 0; height: 1070px; border: 0; pointer-events: none; }
/* The live page is built after the first frame; it fades in over the screen picture instead of replacing it at once. The animation
   has no end keyframe, so it finishes on whatever opacity the scene is setting. */
.mac-intro__live-screen.is-fading-in { animation: mac-live-in .5s ease-out; }
@keyframes mac-live-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mac-intro__live-screen.is-fading-in { animation: none; } }
/* The inquiry uses this same scene, but must not expose the homepage underneath it. */
html.mac-inquiry-active { overflow: hidden !important; }
body.mac-inquiry-active { overflow: hidden; }
html.mac-intro-ready body.mac-inquiry-active .mac-intro { height: 100svh; margin-bottom: 0; }
body.mac-inquiry-active > section:not(.mac-intro),
body.mac-inquiry-active > footer,
body.mac-inquiry-active > .hero-shell > main { display: none !important; }
body.mac-inquiry-active .nav .compact-header-cta { display: none !important; }
body.mac-inquiry-active.has-compact-menu .nav:not(.is-open) .nav__row { grid-template-columns: minmax(0,1fr) auto !important; }
body.mac-inquiry-active .mac-intro__live-screen, body.mac-inquiry-active .mac-intro__live-screen iframe { pointer-events: auto; }
body.mac-inquiry-active :is(.mac-intro__caption,.mac-intro__studio) { display: none; }
/* The casing is off screen in the full-screen phone form. */
@media (max-width:600px) and (orientation:portrait), (max-width:900px) and (max-height:600px) and (orientation:landscape) and (pointer:coarse) {
  body.mac-inquiry-active .mac-intro__sticker-keyboard { display:none; }
}
/* Animate light above the live page: the page itself never compresses. */
body.mac-inquiry-active .mac-intro__live-screen:is(.is-powering-off,.is-powering-on)::before, html.mac-home-arrival .mac-intro__live-screen::before, html.mac-home-arrival .mac-intro__real-screen::before { content: ''; position: absolute; z-index: 8; inset: 0; pointer-events: none; background: #fff; box-shadow: 0 0 35px 12px rgba(255,255,255,.9); transform-origin: center; opacity: 0; }
body.mac-inquiry-active .mac-intro__live-screen.is-powering-off::before { animation: mac-light-off .7s ease-in both; }
body.mac-inquiry-active .mac-intro__live-screen.is-powering-on::before, html.mac-home-arrival .mac-intro__live-screen::before, html.mac-home-arrival .mac-intro__real-screen::before { animation: mac-light-on .9s ease-out both; }
body.mac-inquiry-active .mac-intro__live-screen.is-powering-off::after { z-index: 7; background: #1b1d1f; animation: mac-screen-off .7s linear forwards; }
body.mac-inquiry-active .mac-intro__live-screen.is-powering-on::after, html.mac-home-arrival .mac-intro__live-screen::after, html.mac-home-arrival .mac-intro__real-screen::after { z-index: 7; background: #1b1d1f; animation: mac-screen-on .9s linear forwards; }
@keyframes mac-screen-off { 0% { opacity: 0; } 10%,100% { opacity: 1; } }
@keyframes mac-screen-on { 0%,62% { opacity: 1; } 100% { opacity: 0; } }
@keyframes mac-light-off { 0% { opacity: 0; transform: scale(1,1); } 9% { opacity: 1; transform: scale(1,1); } 25% { opacity: 1; transform: scale(.88,.25); } 44% { opacity: 1; transform: scale(.62,.008); } 70% { opacity: .95; transform: scale(.025,.008); } 85%,100% { opacity: 0; transform: scale(.005,.005); } }
@keyframes mac-light-on { 0% { opacity: 0; transform: scale(.005,.005); } 10% { opacity: 1; transform: scale(.025,.008); } 22% { opacity: 1; transform: scale(.62,.008); } 32% { opacity: 1; transform: scale(.88,.25); } 42% { opacity: 1; transform: scale(1,1); } 68% { opacity: 1; transform: scale(1,1); } 100% { opacity: 0; transform: scale(1,1); } }
.mac-intro__real-screen { position: absolute; left: 0; top: 0; overflow: hidden; border-radius: 5%; background: #080d10; transform-origin: 0 0; pointer-events: none; }
.mac-intro__real-screen .hero { color: #f7f8f8; }
/* Once the projected hero has filled the screen it is the page's hero until the Macintosh section ends: it takes clicks and
   the header's colour sampling sees it (body.mac-hero-live, set by the intro script). The faded caption and words above it
   must not catch those clicks. */
body.mac-hero-live .mac-intro__real-screen { pointer-events: auto; }
.mac-intro__hero-placeholder { pointer-events: none; }
/* The hero-shell box (z-index 2, transparent while the hero is projected) lies over the Macintosh layer; only its header
   takes pointer input then (the menu backdrop sets its own pointer-events in both states). */
body.mac-hero-live .hero-shell { pointer-events: none; }
body.mac-hero-live .hero-shell > .nav { pointer-events: auto; }
body.mac-hero-live :is(.mac-intro__caption, .mac-intro__studio) { pointer-events: none; }
/* The CRT texture travels with the projected screen, not the page itself. */
.mac-intro__live-screen::after, .mac-intro__real-screen::after { content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: var(--mac-crt-opacity, 1); background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .19) 0, rgba(0, 0, 0, .19) 1px, transparent 1px, transparent 4px), linear-gradient(115deg, rgba(255, 255, 255, .09), transparent 42%, rgba(0, 0, 0, .09)); }
body.mac-inquiry-light .mac-intro__live-screen:not(.is-powering-off):not(.is-powering-on)::after { background: repeating-linear-gradient(to bottom, rgba(0,0,0,.045) 0 1px, transparent 1px 4px); }
@media (max-width: 600px) and (orientation: portrait), (max-width: 900px) and (max-height: 600px) and (orientation: landscape) and (pointer: coarse) {
  body.mac-inquiry-light .mac-intro__live-screen { background: #f5f4f0; }
  body.mac-inquiry-active:not(.mac-inquiry-light) .nav:not(.is-open):not(.is-mega-open) .brand img:not(.brand__icon) { filter: none !important; }
}
.mac-intro__caption { position: absolute; z-index: 2; left: 16px; bottom: clamp(24px,4.5vh,44px); max-width: min(24em, calc(100% - 32px)); color: #161617; font: 500 clamp(24px,2.5vw,40px)/1.02 Matter,system-ui,sans-serif; letter-spacing: -.035em; text-wrap: balance; overflow:hidden; pointer-events: none; }
.mac-intro__caption > span { display:block; }
.mac-intro__studio { --word-inset:0%; --word-shift:0%; --word-stack:0em; position:absolute; z-index:2; inset:50% 16px auto; height:1em; color:#161617; font:400 16px/1 var(--ler-action-font,monospace); letter-spacing:-.02em; pointer-events:none; }
.mac-intro__studio { color:#eaeaea; mix-blend-mode:difference; }
.mac-intro__studio span { position:absolute; white-space:nowrap; }
.mac-intro__studio span:first-child { left:var(--word-inset); transform:translate(calc(-1 * var(--word-shift)),calc(-50% - var(--word-stack))); }
.mac-intro__studio span:last-child { right:var(--word-inset); transform:translate(var(--word-shift),calc(-50% + var(--word-stack))); }
/* A single entrance follows the loader; scrolling or interacting finishes it. */
@media (prefers-reduced-motion: no-preference) {
  /* The bridge page replays this entrance (mac-page-bridge); the homepage's own opening is the boot and reveal above. */
  html.mac-intro-enter .nav .brand,
  html.mac-intro-enter .nav .nav__menu-toggle { animation: mac-enter-header .6s cubic-bezier(.22, 1, .36, 1) both; }
  html.mac-intro-enter .mac-intro__scene { animation: mac-enter-scene .7s ease-out .6s both; }
  /* The caption no longer slides in: it is on screen from the first paint (text that starts clipped off-screen is never
     reported as the page's largest paint, and replaying a slide-in when the scene arrives would hide it again). */
}
@keyframes mac-enter-header { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes mac-enter-scene { from { opacity: 0; } to { opacity: 1; } }
@keyframes mac-enter-caption { from { transform:translateX(-104%); } to { transform:translateX(0); } }
@media (max-width: 767px) {
  .mac-intro__caption { left:12px; max-width:min(11em,calc(100% - 24px)); }
  .mac-intro__studio { inset-inline:12px; }
  html.mac-intro-ready .mac-intro, html.mac-intro-paint .mac-intro { height: 100svh; margin-bottom: 0; }
  .mac-intro__stage { position: relative; }
}
@media (prefers-reduced-motion: reduce) { html.mac-intro-ready .mac-intro { display: none; } }

/* Fade the header only during a Macintosh screen switch. */
@media (prefers-reduced-motion: no-preference) {
  html.mac-intro-ready body.mac-inquiry-active .nav { transition: opacity .2s ease; }
  html.mac-header-switching:not(.mac-header-switch-keyboard) body.mac-inquiry-active .nav:not(:has(:focus-visible)) { opacity: 0; pointer-events: none; }
  html.mac-header-switching:not(.mac-header-switch-keyboard) body.mac-inquiry-active .nav:not(:has(:focus-visible)) * { pointer-events: none !important; }
}
