/* TITAN site motion (2027) — styles that go with assets/motion/motion.js */

/* hero: pinned while the 3D TITAN mark assembles (hero3d.js) */
.hero .swap{position:relative;margin-top:22px;max-width:520px}
.hero .swap p{margin-top:0}
.hero .swap .detail-line{position:absolute;top:0;inset-inline-start:0;font-size:clamp(16px,1.35vw,19px);color:#fff;font-weight:400;opacity:0;visibility:hidden}
.mo .hero .scroll{display:none}
.hero.seq{background:#0B1A2C}
.hero.seq #scene,.hero.seq .fallback{display:none}
.hero .stage{position:absolute;inset:0;z-index:0}
.hero .stage video,.hero .stage img.final{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:62% 50%}
.hero .stage img.final{opacity:0;transition:opacity .25s}
.hero .stage.ended img.final{opacity:1}
.hero .swap p{transition:opacity .8s}
.hero .stage::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,rgba(11,26,44,.82) 0%,rgba(11,26,44,.45) 30%,rgba(11,26,44,0) 46%),linear-gradient(0deg,rgba(11,26,44,.75),rgba(11,26,44,0) 24%)}
/* the clip sits opposite the headline: left in Arabic, right in English; its inner edge fades into the page */
@media (min-width:900px){
  .hero.seq .stage{right:auto}   /* left and width are set by motion.js so the logo sits opposite the headline */
  .hero.seq .stage video,.hero.seq .stage img.final{object-fit:cover;object-position:50% 50%}
  .hero.seq .stage::after{background:linear-gradient(0deg,rgba(11,26,44,.7),rgba(11,26,44,0) 22%)}
}

@media (max-width:899px){
  .hero.seq{display:block;min-height:auto}
  .hero.seq .stage{position:relative;inset:auto;aspect-ratio:4/3;margin-top:60px}
  .hero.seq .stage video,.hero.seq .stage img.final{object-position:70% 50%}
  .hero.seq .stage::after{background:linear-gradient(0deg,#0B1A2C,rgba(11,26,44,0) 35%)}
  .hero.seq .wrap{padding-block:0 60px}
  .hero.seq .tx{margin-top:-10px}
}
.hero .hp{position:absolute;bottom:34px;left:50%;transform:translateX(-50%);z-index:3;display:flex;gap:8px;align-items:center}
.hero .hp i{display:block;height:3px;background:rgba(166,188,215,.3);transition:background .3s}
.hero .hp i.l{width:22px}.hero .hp i.d{width:6px}
.hero .hp i.on{background:var(--mist)}

/* Morse progress spine on the page edge */
.spine{position:fixed;top:50%;inset-inline-end:18px;transform:translateY(-50%);z-index:40;display:flex;flex-direction:column;gap:6px;opacity:0;transition:opacity .4s;pointer-events:none}
.spine.show{opacity:1}
.spine i{display:block;width:3px;background:rgba(93,114,153,.28);transition:background .35s}
.spine i.l{height:18px}.spine i.d{height:5px}
.spine i.on{background:var(--steel)}
@media (max-width:899px){.spine{display:none}}

/* masked headline lines */
.ln{display:block;overflow:hidden;padding-bottom:.06em;margin-bottom:-.06em}
.ln .li{display:block;will-change:transform}
h2 .ln.sub .li,footer h3 .ln.sub .li{color:inherit}
section h2 .ln.sub,footer h3 .ln.sub{color:var(--steel)}
.method h2 .ln.sub,.band h2 .ln.sub,footer h3 .ln.sub{color:var(--mist)}

/* method: the frame that assembles beside the four steps */
.method .wrap{position:relative}
.mframe{position:absolute;top:0;inset-inline-end:0;width:min(13vw,160px);aspect-ratio:1;opacity:.95}
.mframe svg{width:100%;height:100%;overflow:visible}
.mframe .fr,.fmark .fr{fill:none;stroke:#fff;stroke-width:16;stroke-linecap:butt;stroke-linejoin:miter}
.mframe .cb,.fmark .cb{fill:var(--mist)}
.mframe .mstep{position:absolute;inset:0;display:grid;place-items:center;font-size:clamp(40px,5vw,70px);font-weight:500;color:var(--mist)}
.method .head{padding-inline-end:min(16vw,200px);min-height:min(13vw,160px)}
@media (max-width:899px){.mframe{position:relative;top:auto;width:120px;margin:0 0 26px}.method .head{padding-inline-end:0}}

/* footer: the big mark that draws itself */
footer#contact .wrap{position:relative}
.fmark{position:absolute;inset-inline-end:0;top:-30px;width:min(30vw,360px);aspect-ratio:1;opacity:.07;pointer-events:none}
.fmark svg{width:100%;height:100%;overflow:visible}

/* depth for the card grids */
.prog,.pillars{perspective:1400px}
@media (prefers-reduced-motion: reduce){.hero .stage video{display:none}.hero .stage img.final{opacity:1}}

html,body{overflow-x:clip}
footer#contact{overflow:hidden}

/* hero wave field */
.hero canvas.wave{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;mix-blend-mode:screen}
@media (max-width:899px){.hero canvas.wave{display:none}}

/* TITAN cursor */
.has-tcur,.has-tcur a,.has-tcur button,.has-tcur .pc,.has-tcur .pg{cursor:none}
.has-tcur input,.has-tcur textarea,.has-tcur select{cursor:text}
.tcur{position:fixed;left:0;top:0;z-index:9999;pointer-events:none;opacity:0;transition:opacity .25s}
.tcur.on{opacity:1}
.tcur svg{position:absolute;width:22px;height:22px;left:-11px;top:-11px;overflow:visible;transition:width .35s cubic-bezier(.2,.8,.2,1),height .35s cubic-bezier(.2,.8,.2,1),left .35s cubic-bezier(.2,.8,.2,1),top .35s cubic-bezier(.2,.8,.2,1),opacity .2s}
.tcur polyline{fill:none;stroke:#5D7299;stroke-width:22;transition:stroke .25s}
.tcur rect{fill:#A6BCD7;opacity:0;transition:opacity .25s}
.tcur rect:first-of-type{opacity:1}
.tcur i{position:absolute;width:4px;height:4px;left:-2px;top:-2px;background:#193452;transition:transform .2s}
.tcur.hot svg{width:46px;height:46px;left:-23px;top:-23px}
.tcur.hot rect{opacity:1}
.tcur.hot polyline{stroke:#193452}
.tcur.hot i{transform:scale(0)}
.tcur.down svg{width:16px;height:16px;left:-8px;top:-8px}
.tcur.txt svg{opacity:0}
.tcur.dk polyline,.tcur.dk.hot polyline{stroke:#A6BCD7}
.tcur.dk i{background:#fff}

/* X-ray lens on cards: a square TITAN-frame window that follows the pointer and shows a glimpse inside */
.xr-card{position:relative;overflow:hidden}
.xr{--r:0;--x:50%;--y:50%;--s:calc(var(--base,200px) * var(--r));position:absolute;inset:0;pointer-events:none;z-index:5}
.xr-img{position:absolute;inset:0;background-size:cover;background-position:var(--px,50%) var(--py,50%);filter:saturate(1.05) contrast(1.05);
  clip-path:inset(calc(var(--y) - var(--s) / 2) calc(100% - var(--x) - var(--s) / 2) calc(100% - var(--y) - var(--s) / 2) calc(var(--x) - var(--s) / 2));
  transform:scale(calc(1.12 - .12 * var(--r)))}
.xr-frame{position:absolute;left:var(--x);top:var(--y);width:calc(var(--s) + 22px);height:calc(var(--s) + 22px);transform:translate(-50%,-50%);opacity:var(--r)}
.xr-frame svg{width:100%;height:100%;overflow:visible}
.xr-frame polyline{fill:none;stroke:#fff;stroke-width:9;vector-effect:non-scaling-stroke;stroke-width:5px}
.xr-frame rect{fill:#A6BCD7}
.xr-frame span{position:absolute;top:calc(100% + 6px);left:50%;transform:translateX(-50%);white-space:nowrap;font-family:'Jost';font-size:10px;letter-spacing:.28em;color:#fff;text-shadow:0 1px 6px rgba(11,26,44,.9)}
.in-xr .tcur{opacity:0}
/* phones: the lens runs from scroll (motion.js); keep it a little smaller and softer */
@media (hover:none){
  .xr-frame span{font-size:9px}
  .xr-card{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
  .xr-card.xr-hold{touch-action:none}
  html.xr-locked,html.xr-locked body{touch-action:none}
  /* on phones the photo stays fixed behind the card (anchored on its subject, --fp) and the window uncovers the part under it, as on desktop */
  .xr-img{background-position:var(--fp,50% 50%);transform:none;filter:brightness(1.2) saturate(1.05)}
}
/* tap marker on touch screens (in place of the desktop cursor) */
.ttap{position:fixed;width:44px;height:44px;margin:-22px 0 0 -22px;z-index:9999;pointer-events:none}
.ttap svg{width:100%;height:100%;overflow:visible}
.ttap polyline{fill:none;stroke:#5D7299;stroke-width:18}
.ttap rect{fill:#A6BCD7}
.ttap.dk polyline{stroke:#A6BCD7}

/* the clip on other pages: consult header (side) and the planner sign-in panel (backdrop) */
.seq{position:relative;overflow:hidden}
.seq > .wrap,.seq > .tx,.auth .hero.seq > :not(.stage):not(.wave){position:relative;z-index:2}
.hero.seq .stage.bd{position:absolute;inset:0;width:auto;height:auto;aspect-ratio:auto;margin:0;opacity:.5}
.hero.seq .stage.bd video,.hero.seq .stage.bd img.final{object-fit:cover;object-position:50% 50%}
.hero.seq .stage.bd::after{background:linear-gradient(90deg,rgba(11,26,44,.55),rgba(11,26,44,.25))}
header.hero.seq{background:#0B1A2C}
@media (max-width:899px){header.hero.seq .stage{margin-top:-30px;margin-bottom:6px}}

/* the X-ray lens must never take the card's own block styles (e.g. .lc>div paints every child div navy) */
.xr,.xr-frame{background:none!important;padding:0!important;border:0!important;margin:0!important}
.xr-img{background-color:transparent!important;padding:0!important;border:0!important;margin:0!important}
