/* ===========================================================================
   The splash and the location/language gate — carried over unchanged from the
   approved build. The ARCHIC mark and its animation are not to be edited.
   Its own palette is scoped here so the rest of the site can move to the
   brand-book colours without touching a pixel of the splash.
=========================================================================== */
#gate{--navy:#1F214A;--navy-deep:#171934;--navy-lift:#262957;--rule:#32355F;--orange:#F78D13;--ink:#F9F9F9;--muted:#8A8CA8;
  font-family:Roboto,Alexandria,system-ui,sans-serif;color:var(--ink)}
#gate[dir="rtl"]{font-family:Alexandria,Roboto,system-ui,sans-serif}
#gate .track{text-transform:uppercase;letter-spacing:.22em;font-weight:500}
#gate[dir="rtl"] .track{letter-spacing:0}
#gate .mono{font-family:"Roboto Mono",ui-monospace,monospace}
@keyframes rise{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
/* ================= gate =================
   The splash is the name, switched on. Letters come up left to right; the C of
   ARCHIC is drawn as a spotlight already, so when its turn comes it strikes the
   way a lamp does — two false starts, then steady — and throws a beam across
   the letters that follow. Everything after it waits for that strike. */
#gate{
  position:fixed;inset:0;z-index:80;background:var(--navy-deep);
  display:grid;place-items:center;overflow-y:auto;padding:32px 20px;
}
#gate::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(60% 45% at 50% 34%,rgba(247,141,19,.10),transparent 70%);
  opacity:0;animation:gateHalo 1.4s 1s ease-out forwards;
}
#gate.hide{display:none}
.gate-inner{position:relative;width:100%;max-width:660px;display:flex;flex-direction:column;align-items:center}

.gate-art{width:100%}
.gate-art .mark{width:100%;height:auto;display:block;color:var(--ink);overflow:visible}


.mk-lamp{
  transform-box:view-box;
  animation:travel 3.4s cubic-bezier(.45,0,.2,1) both;
}
.mk-c{color:var(--orange);opacity:0;
  animation:dimIn .34s .06s ease-out both, strike 1s .34s cubic-bezier(.3,.7,.3,1) forwards}
.mk-core{opacity:0;
  animation:lampUp .3s .42s ease-out both, coreBreathe 5.5s 2.6s ease-in-out infinite}

.mk-beam{opacity:0;
  animation:lampUp .32s .46s ease-out both}
.mk-flood{transform-box:view-box;transform-origin:460px 488px;
  transform:scaleX(0);opacity:0;
  animation:flood 3.4s cubic-bezier(.45,0,.2,1) both}
/* what the lamp leaves behind on A and R once it has lit them */
.mk-rest{opacity:0;animation:lampUp 1s 2.2s ease-out both}
.ltr{opacity:0;animation:letterOn .62s var(--d) cubic-bezier(.2,.8,.25,1) forwards}
/* the twinkle-in plays once; starBlink then takes over opacity and keeps the
   dot flickering on/off for good, same hand-off trick as coreBreathe below */
.mk-star{opacity:0;animation:twinkle .8s 3.15s ease-out forwards, starBlink 1.7s 3.95s ease-in-out infinite}
.mk-lighting{opacity:0;animation:letterOn .7s 3.1s cubic-bezier(.2,.8,.25,1) forwards}
.mk-rule{
  transform-box:view-box;transform-origin:266px 592px;transform:scaleX(0);
  animation:ruleOut .9s 3.25s cubic-bezier(.2,.8,.25,1) forwards;
}

@keyframes travel{
  0%,40%{transform:translateX(254.36px);animation-timing-function:cubic-bezier(.8,0,.55,1)}
  62%,100%{transform:translateX(0)}
}

@keyframes flood{
  0%,62%{transform:scaleX(0);opacity:0}
  72%,84%{transform:scaleX(1);opacity:1}
  92%,100%{transform:scaleX(0);opacity:0}
}
@keyframes dimIn{from{opacity:0}to{opacity:.34}}
@keyframes lampUp{from{opacity:0}to{opacity:1}}
@keyframes letterOn{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:none}}
/* the strike starts from the unlit level, not from nothing */
@keyframes strike{
  0%{opacity:.34} 11%{opacity:.95} 19%{opacity:.1} 33%{opacity:.8}
  42%{opacity:.16} 57%{opacity:1} 67%{opacity:.58} 100%{opacity:1}
}
@keyframes twinkle{0%{opacity:0;transform:scale(.2) rotate(-40deg)}100%{opacity:1;transform:none}}
@keyframes starBlink{0%,100%{opacity:1}50%{opacity:.12}}
@keyframes beamOut{from{opacity:1}to{opacity:0}}
@keyframes ruleOut{to{transform:scaleX(1)}}
@keyframes coreBreathe{0%,100%{opacity:.72}50%{opacity:1}}
@keyframes beamBreathe{0%,100%{opacity:.66}50%{opacity:1}}
@keyframes gateHalo{to{opacity:1}}
.ltr,.mk-star,.mk-lighting{transform-box:fill-box;transform-origin:center}

/* the returning-visitor pass: the name plays, the question never appears */
#gate.auto .gate-card{display:none}
#gate.auto{transition:opacity .42s ease}
#gate.out{opacity:0;pointer-events:none}

.gate-card{width:100%;max-width:520px;margin-top:30px;text-align:center}
.gate-intro{color:var(--muted);font-size:14.5px;margin:0 auto;max-width:44ch}
.gate-card p.track{font-size:10px;color:var(--muted);margin:28px 0 0}
.gate-grid{display:grid;gap:8px;margin-top:12px}
.gate-grid.two{grid-template-columns:1fr 1fr}
.gate-grid button{
  font:inherit;font-size:12px;letter-spacing:.12em;text-transform:uppercase;font-weight:500;
  padding:14px 16px;background:transparent;color:var(--ink);
  border:1px solid var(--rule);cursor:pointer;text-align:start;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  transition:border-color .25s,background .25s,transform .25s;
}
[dir="rtl"] .gate-grid button{letter-spacing:0}
.gate-grid button:hover:not([disabled]){border-color:var(--muted);transform:translateY(-2px)}
.gate-grid button[aria-pressed="true"]{border-color:var(--orange);background:var(--navy-lift)}
.gate-grid button small{font-size:9.5px;letter-spacing:.14em;color:var(--muted);font-family:"IBM Plex Mono",monospace}
.gate-grid button[disabled]{opacity:.42;cursor:not-allowed;border-style:dashed}
.gate-enter{
  font:inherit;font-size:11.5px;letter-spacing:.2em;text-transform:uppercase;font-weight:500;
  margin-top:24px;padding:16px 42px;border:1px solid var(--orange);
  background:var(--orange);color:var(--navy);cursor:pointer;width:100%;
  transition:filter .25s,transform .25s;
}
[dir="rtl"] .gate-enter{letter-spacing:0}
.gate-enter:not([disabled]):hover{filter:brightness(1.08);transform:translateY(-2px)}
.gate-enter[disabled]{background:transparent;color:var(--muted);border-color:var(--rule);border-style:dashed;cursor:not-allowed}
.gate-foot{margin:22px 0 0;font-size:9.5px;letter-spacing:.26em;color:var(--muted)}
/* the card waits for the name to finish arriving */
.gate-card > *{opacity:0;animation:rise .7s cubic-bezier(.2,.8,.25,1) forwards;animation-delay:calc(3.5s + var(--n,0) * .07s)}
.gate-card > :nth-child(1){--n:0}.gate-card > :nth-child(2){--n:1}.gate-card > :nth-child(3){--n:2}
.gate-card > :nth-child(4){--n:3}.gate-card > :nth-child(5){--n:4}.gate-card > :nth-child(6){--n:5}
.gate-card > :nth-child(7){--n:6}
@media (max-width:600px){
  .gate-card{margin-top:22px}
  .gate-foot{letter-spacing:.18em}
}
@media (prefers-reduced-motion:reduce){
  .ltr,.mk-c,.mk-core,.mk-beam,.mk-rest,.mk-star,.mk-lighting,.mk-rule,.mk-lamp,.gate-card > *,#gate::before{
    animation:none!important;opacity:1!important;transform:none!important}
}

/* Fixed-position lamp: face CHIC, mirror toward AR, then restore the wordmark. */
.mk-lamp { animation:none; transform:none; }
.mk-beam { animation: apertureLight 4s linear both; }
@keyframes apertureLight {
  0%,12% { opacity:0; }
  20%,40% { opacity:1; }
  46%,48% { opacity:0; }
  54%,100% { opacity:1; }
}
.mk-flood,.mk-rest { display:none; }
@media (prefers-reduced-motion:reduce) {
  .mk-lamp,.mk-flip { animation:none!important; transform:none!important; }
  .mk-beam { display:none; }
}
