/* Forward flight: self-contained CSS, home pages only */
.flight {position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:0;background:#626780}
.flight-sky {position:absolute;inset:0;background:radial-gradient(ellipse at 50% 43%,#d49b8066 0%,#68618d55 17%,transparent 48%),linear-gradient(#7e91ad,#b09cb8 45%,#8186a3 75%)}
.flight-sun {position:absolute;width:15vmin;height:15vmin;left:calc(50% - 7.5vmin);top:32%;border-radius:50%;background:linear-gradient(#f4cba5aa,#f4cba511);box-shadow:0 0 100px 30px #e4ad8322;filter:blur(2px)}
.flight-world {position:absolute;inset:0;perspective:520px;perspective-origin:50% 43%;overflow:hidden}
.flight-ridge {position:absolute;left:-30%;top:42%;width:160%;height:85%;transform-origin:50% 0;clip-path:polygon(0 3%,8% 12%,16% 4%,24% 25%,32% 18%,40% 40%,47% 46%,50% 50%,54% 45%,62% 33%,69% 22%,77% 26%,85% 9%,92% 16%,100% 0,100% 100%,0 100%);background:linear-gradient(145deg,#67939c77,#75618c 40%,#342a50 65%,#c48a7c88);border-top:1px solid #e8c6ac44;animation:flight-terrain 56s linear infinite;animation-delay:var(--delay);will-change:transform,opacity}
.flight-ridge:nth-child(3n) {background:linear-gradient(155deg,#83c7ba88,#40466c 40%,#2c2949 65%,#b9809688)}
@keyframes flight-terrain {0% {transform:translateY(-8%) translateZ(-1300px) scale(.2);opacity:0} 12%{opacity:.6} 75%{opacity:.85} 100% {transform:translateY(35%) translateZ(300px) scale(3.8);opacity:0}}
.flight-screen {position:absolute;left:50%;top:43%;width:clamp(210px,30vw,480px);padding:6px;border:1px solid #b8e2e377;border-radius:14px;background:#9389b62b;box-shadow:0 0 35px #83c7ba33;animation:flight-screen-left 44s linear infinite;animation-delay:var(--screen-delay,0s);will-change:transform,opacity;opacity:0}
.flight-screen img {width:100%;height:auto;border-radius:9px}
.flight-screen-right {animation-name:flight-screen-right;animation-delay:var(--screen-delay,-13s)}
@keyframes flight-screen-left {0%,12%{transform:translate(-50%,-50%) translateZ(-2200px) rotateY(32deg) rotateZ(-5deg);opacity:0} 22%{opacity:.65} 45%{opacity:.85} 60%,100%{transform:translate(-180vw,-65%) translateZ(350px) rotateY(32deg) rotateZ(-5deg);opacity:0}}
@keyframes flight-screen-right {0%,12%{transform:translate(-50%,-50%) translateZ(-2200px) rotateY(-32deg) rotateZ(5deg);opacity:0} 22%{opacity:.65} 45%{opacity:.85} 60%,100%{transform:translate(140vw,-85%) translateZ(350px) rotateY(-32deg) rotateZ(5deg);opacity:0}}
.flight-veil {position:absolute;inset:0;background:radial-gradient(ellipse at 50% 35%,#211b3718 10%,transparent 65%),linear-gradient(#ffffff08,#ffffff08 50%,#29223818)}
body:has(.flight) .app-card,body:has(.flight) .craft-grid {background:rgba(43,36,68,.83);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
body:has(.flight) .contact-row {background:linear-gradient(100deg,#493347ee,#303e53ee)}
body:has(.flight) .hero .lead {color:#e0d9ee;text-shadow:0 2px 12px #151024}
.flight-toggle {position:fixed;right:20px;bottom:18px;width:40px;height:34px;z-index:42;opacity:0;cursor:pointer}
.flight-control {position:fixed;right:20px;bottom:18px;width:40px;height:34px;display:grid;place-items:center;z-index:41;border:1px solid #ffffff44;border-radius:20px;background:#29233ee8;color:#eee;font:12px system-ui;cursor:pointer}
.flight-toggle:focus-visible + .flight-control {outline:2px solid #f4c363;outline-offset:4px}
.flight-toggle:checked ~ .flight * {animation-play-state:paused}
.flight-toggle:checked + .flight-control {color:#f4c363;border-color:#f4c363}
@media(max-width:600px) {.flight-ridge{animation-duration:72s}.flight-screen{width:220px}.flight-control,.flight-toggle{right:12px;bottom:12px}.flight-sun{top:36%}}
@media(prefers-reduced-motion:reduce) {.flight *{animation:none!important}.flight-ridge{transform:scale(1.1);opacity:.22}.flight-ridge:nth-child(n+2),.flight-screen,.flight-control,.flight-toggle{display:none}}

/* Light opening, followed by the original palette — once per page load */
.flight-sky::after{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at 50% 43%,#fff2d7 0%,#e7eaf3 26%,transparent 62%),linear-gradient(#92c9e8,#cddfed 50%,#adbcd6);opacity:0}
@media(prefers-reduced-motion:no-preference){
  .flight-sky::after{animation:flight-light-to-dark 3s cubic-bezier(.4,0,.2,1) both}
  .flight-world{animation:flight-landscape-tone 3s cubic-bezier(.4,0,.2,1) both}
  .flight-veil{animation:flight-veil-tone 3s cubic-bezier(.4,0,.2,1) both}
  body:has(.flight) .hero h1{animation:flight-heading-tone 3s cubic-bezier(.4,0,.2,1) both}
  body:has(.flight) .hero p.lead{animation:rise 800ms var(--ease) 480ms both,flight-lead-tone 3s cubic-bezier(.4,0,.2,1) both}
  body:has(.flight) .hero .eyebrow{animation:rise 800ms var(--ease) 40ms both,flight-lead-tone 3s cubic-bezier(.4,0,.2,1) both}
}
@keyframes flight-light-to-dark{0%,12%{opacity:1}100%{opacity:0}}
@keyframes flight-landscape-tone{0%,12%{filter:brightness(1.65) saturate(.65)}100%{filter:brightness(1) saturate(1)}}
@keyframes flight-veil-tone{0%,12%{opacity:.08}100%{opacity:1}}
@keyframes flight-heading-tone{0%,12%{color:#2b3852}100%{color:var(--text)}}
@keyframes flight-lead-tone{0%,12%{color:#3e4c63;text-shadow:none}100%{color:#e0d9ee;text-shadow:0 2px 12px #151024}}
.flight-toggle:checked ~ .flight .flight-sky::after{animation-play-state:paused}

/* Smooth mountain silhouettes, retaining the original depth and palette */
.flight-ridge{clip-path:none;border-top:0;-webkit-mask-image:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201600%20850%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20fill%3D%22white%22%20d%3D%22M0%2055%20C70%2020%20100%2095%20170%20105%20S260%2045%20330%20100%20S430%20240%20510%20225%20S595%20230%20665%20325%20S755%20402%20800%20425%20C860%20425%20900%20350%20975%20320%20S1070%20215%201140%20220%20S1240%20245%201310%20140%20S1430%20115%201490%2080%20S1560%205%201600%2025%20V850%20H0Z%22%2F%3E%3C%2Fsvg%3E');mask-image:url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201600%20850%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20fill%3D%22white%22%20d%3D%22M0%2055%20C70%2020%20100%2095%20170%20105%20S260%2045%20330%20100%20S430%20240%20510%20225%20S595%20230%20665%20325%20S755%20402%20800%20425%20C860%20425%20900%20350%20975%20320%20S1070%20215%201140%20220%20S1240%20245%201310%20140%20S1430%20115%201490%2080%20S1560%205%201600%2025%20V850%20H0Z%22%2F%3E%3C%2Fsvg%3E');-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
@media(prefers-reduced-motion:no-preference){
  /* Let the landscape lead, then reveal the complete page in one soft dissolve */
  body:has(.flight) main,body:has(.flight) .site-footer{animation:flight-page-dissolve 3s cubic-bezier(.25,.1,.25,1) both}
  body:has(.flight) .app-card,body:has(.flight) .craft-grid,body:has(.flight) .contact-row,body:has(.flight) .hero h1 .w{animation:none}
  body:has(.flight) .hero h1 .grad{animation:sheen 9s linear infinite}
  body:has(.flight) .hero p.lead,body:has(.flight) .hero .eyebrow{animation:flight-lead-tone 3s cubic-bezier(.4,0,.2,1) both}
}
@keyframes flight-page-dissolve{0%,15%{opacity:0;visibility:hidden}16%{opacity:0;visibility:visible}100%{opacity:1;visibility:visible}}

/* Reveal floating previews after the three-second page entrance */
@media(prefers-reduced-motion:no-preference){
 .flight-screen{animation:flight-screen-left 44s linear var(--screen-delay,0s) infinite,flight-preview-visibility 3.5s step-end both}
 .flight-screen-right{animation-name:flight-screen-right,flight-preview-visibility}
 .flight-screen img{animation:flight-preview-reveal 4.5s linear both}
}
@keyframes flight-preview-reveal{0%,78%{opacity:0}100%{opacity:1}}

@keyframes flight-preview-visibility{from{visibility:hidden}to{visibility:visible}}
