/* ---------- welcome intro + hero glass + hero landscape (approved 2026-10-19) ---------- */
/* ---------- welcome intro: the motion gallery opens, flips, morphs into the A7 logo, which lands in the hero ----------
   html.ix       = intro running (nav hidden, page locked)
   html.ix-hold  = hero intro held at its start (logo hidden, heading/tags paused) until the intro hands over */
html.ix .nav { opacity: 0; pointer-events: none; transform: translateY(-8px); }
html.ix-hold .hero, html.ix-hold .hero * { animation-play-state: paused !important; }
html.ix-hold .hero .logo-wrap { visibility: hidden; }

#ix { position: fixed; inset: 0; z-index: 9999; overflow: hidden; background: #111214; contain: strict; }
#ix .mk { position: absolute; inset: 0; }                 /* everything inside the (later) A7 shape */
#ix .row { position: absolute; left: 0; top: 0; perspective: 1400px; }
#ix .c { position: absolute; left: 0; top: 0; transform-style: preserve-3d; will-change: transform; }
#ix .c > i { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden;
  background: #1A1442 center / cover no-repeat; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .65); }
#ix .c > i.b { transform: rotateY(180deg); }
#ix .c video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
#ix .ln { position: absolute; width: 2px; margin-left: -1px; background: #F4F1E9; transform-origin: 50% 50%; box-shadow: 0 0 14px rgba(244, 241, 233, .55); }
#ix .fill { position: absolute; inset: 0; }
#ix .fill svg { position: absolute; display: block; overflow: visible; }


/* ---------- hero: a frosted glass panel behind the heading, the service tags and the note (under VISUALS) ---------- */
.hero-glass {
  position: relative; display: flex; flex-direction: column; align-items: center;
  margin-top: clamp(22px, 3.6vh, 38px); padding: clamp(18px, 2.6vw, 30px) clamp(22px, 4vw, 52px) clamp(20px, 2.8vw, 32px);
  max-width: min(92vw, 880px); border-radius: 26px;
  background: linear-gradient(140deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .035) 55%, rgba(255, 255, 255, .06));
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(255, 255, 255, .04), 0 30px 70px -36px rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(6px) saturate(140%); backdrop-filter: blur(6px) saturate(140%);   /* light frost: the landscape stays readable through it */
  opacity: 0; transform: translateY(14px); animation: up .9s var(--ease) 1.3s forwards;   /* arrives just before the heading */
}
.hero-glass::before {   /* a soft glass sheen along the top edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 38%);
}
.hero-glass .hero-t { margin-top: 0; }
@media (hover: none) { .hero-glass { -webkit-backdrop-filter: blur(5px) saturate(135%); backdrop-filter: blur(5px) saturate(135%); border-radius: 22px; } }

/* the glass edge: a thin, soft light travels round the border (a conic band masked to a 1.5 px ring) */
@property --gl { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.hero-glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--gl), transparent 0deg, transparent 250deg, rgba(157, 180, 255, .55) 300deg, rgba(255, 255, 255, .95) 330deg, rgba(157, 180, 255, .55) 345deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  filter: drop-shadow(0 0 3px rgba(190, 205, 255, .55));
  animation: glassEdge 5.5s linear infinite;
}
@keyframes glassEdge { to { --gl: 360deg; } }
@media (prefers-reduced-motion: reduce) { .hero-glass::after { animation: none; opacity: 0; } }

/* the landscape that stays behind the hero after the intro (moved in by intro.js) */
.hero { isolation: isolate; }
.hero > .hero-bg { position: absolute; z-index: -1; pointer-events: none;
  --f: 0;   /* 0 = resting · 1 = scrolled away: the fade climbs from the bottom edge up */
  -webkit-mask-image: linear-gradient(180deg, #000 calc(52% - var(--f) * 100%), transparent calc(100% - var(--f) * 100%));
  mask-image: linear-gradient(180deg, #000 calc(52% - var(--f) * 100%), transparent calc(100% - var(--f) * 100%)); }

/* during the intro the stage is plain black — no glow, no light (the page's moving orbs are hidden until it ends) */
html.ix .hero { background-color: #000; }
html.ix .bg-orb { opacity: 0; }
/* after the intro nothing may "drop in": the stage colour and the page glow come back slowly, under the video */
.hero { transition: background-color 1.6s ease; }
.bg-orb { transition: translate 1.2s cubic-bezier(.22, 1, .36, 1), opacity 1.8s ease; }

/* weak devices (html.lite, set by app.js): no live blur behind the glass — a quiet tinted pane instead */
html.lite .hero-glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(140deg, rgba(17, 18, 20, .55), rgba(17, 18, 20, .38)); }
/* the same light painting the phones already get, now for every weak device (html.lite) */
html.lite .nav::before { -webkit-backdrop-filter: none; backdrop-filter: none; background: color-mix(in srgb, var(--bg) 94%, transparent); }
html.lite .lang, html.lite .sound, html.lite .ca-head, html.lite .making .mk-tag-b, html.lite .making .mk-tagbtn, html.lite .making .cmp-chip, html.lite .gal-box { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.lite .bg-orb { transition: opacity 1.8s ease; }

/* ---------- phones & tablets: «tap anywhere» before the intro (same dark stage as the intro; the A7 mark breathes, one quiet line under it) ---------- */
#ixgate { position: fixed; inset: 0; z-index: 10000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px;
  background: #111214; color: #F4F1E9; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none;
  transition: opacity .5s var(--ease, cubic-bezier(.22, 1, .36, 1)); }   /* fully dark from the first frame: nothing of the page shows before the touch */
#ixgate .gt-mark, #ixgate .gt-t { opacity: 0; translate: 0 8px; transition: opacity .7s ease, translate .7s cubic-bezier(.22, 1, .36, 1); }
#ixgate .gt-t { transition-delay: .15s; }
#ixgate.in .gt-mark, #ixgate.in .gt-t { opacity: 1; translate: 0 0; }
#ixgate::before { content: ""; position: absolute; left: 50%; top: 50%; width: 120vmax; height: 120vmax; margin: -60vmax 0 0 -60vmax; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(45, 91, 227, .16), rgba(45, 91, 227, 0) 70%); animation: gtGlow 3.6s ease-in-out infinite; }
#ixgate .gt-mark { position: relative; width: min(46vw, 210px); animation: gtBreathe 3.6s ease-in-out infinite; }
#ixgate .gt-mark svg { display: block; width: 100%; height: auto; fill: #F4F1E9; filter: drop-shadow(0 0 22px rgba(244, 241, 233, .18)); }
#ixgate .gt-mark .gt-blue { fill: #2D5BE3; }
#ixgate .gt-t { position: relative; display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 11px 20px; border-radius: 999px;
  font: 500 15px/1 "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif; letter-spacing: .02em; color: rgba(244, 241, 233, .86);
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); animation: gtFade 3.6s ease-in-out infinite; }
#ixgate .gt-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: #2D5BE3; box-shadow: 0 0 10px #2D5BE3; }
#ixgate .gt-dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(45, 91, 227, .7); animation: gtPing 1.8s ease-out infinite; }
/* the touch: a soft ring opens from the finger and the stage clears */
#ixgate::after { content: ""; position: absolute; left: var(--gx, 50%); top: var(--gy, 50%); width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  border: 1.5px solid rgba(244, 241, 233, .7); opacity: 0; pointer-events: none; }
#ixgate.out { opacity: 0; transition-duration: .6s; pointer-events: none; }
#ixgate.out::after { animation: gtTap .6s cubic-bezier(.22, 1, .36, 1) forwards; }
#ixgate.out .gt-mark { animation: none; transform: scale(1.04); transition: transform .6s cubic-bezier(.22, 1, .36, 1); }
@keyframes gtBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes gtGlow { 0%, 100% { opacity: .6; transform: scale(.94); } 50% { opacity: 1; transform: scale(1); } }
@keyframes gtFade { 0%, 100% { color: rgba(244, 241, 233, .66); } 50% { color: rgba(244, 241, 233, .95); } }
@keyframes gtPing { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
@keyframes gtTap { from { transform: scale(1); opacity: .9; } to { transform: scale(26); opacity: 0; } }
