@font-face{
  font-family:"SWEuro";
  src:url("../fonts/SWEuroRegular.woff2") format("woff2");
  font-style:normal; font-weight:400; font-display:swap;
}
@font-face{
  font-family:"SWEuro";
  src:url("../fonts/SWEuroBold.woff2") format("woff2");
  font-style:normal; font-weight:700; font-display:swap;
}
@font-face{
  font-family:"Restore";
  src:url("../fonts/Restore-W00-Bold.ttf") format("truetype");
  font-style:normal; font-weight:700; font-display:swap;
}

:root{
  --cyan:#43c4ef;
  --cyan-bright:#b0f3ff;
  --cyan-dim:#246980;
  --gold:#f5c413;
  --text:#d2f5fb;
  --muted:#6bbbd3;
  --ink:#02070d;
  --f-body:"SWEuro","Arial Narrow",system-ui,sans-serif;
  --f-display:"Restore","SWEuro","Arial Narrow",system-ui,sans-serif;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ min-height:100%; background:var(--ink); }
body{
  min-height:100svh; margin:0; overflow-x:hidden;
  display:grid; grid-template-rows:auto 1fr auto;
  color:var(--text); font-family:var(--f-body);
  background:
    linear-gradient(180deg,rgba(1,5,10,.2),rgba(1,5,10,.34) 58%,rgba(1,4,8,.78)),
    url("../images/space-bg.jpg") center bottom / cover fixed no-repeat,
    var(--ink);
  cursor:url("../images/cursor-default.png") 8 3,default;
}
body::before{
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:
    radial-gradient(ellipse at 28% 46%,rgba(16,110,196,.18),transparent 42%),
    radial-gradient(ellipse at 72% 46%,rgba(173,20,38,.15),transparent 42%),
    linear-gradient(90deg,rgba(4,31,61,.2),transparent 44%,transparent 56%,rgba(61,5,14,.17));
}
body::after{
  content:""; position:fixed; inset:0; z-index:20; pointer-events:none;
  background:repeating-linear-gradient(0deg,rgba(0,0,0,.14) 0 1px,transparent 1px 4px);
  mix-blend-mode:multiply;
}
body.is-modal-open{ overflow:hidden; }
button,a{ font:inherit; }
button{ cursor:url("../images/cursor-pointer.png") 13 1,pointer; }
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

.gate-header{
  position:relative; z-index:2; width:min(980px,calc(100% - 32px));
  margin:0 auto; padding:clamp(28px,5vh,58px) 0 16px; text-align:center;
}
.gate-domain{
  margin:0 0 11px; font-size:10px; letter-spacing:.2em; text-transform:uppercase;
  color:var(--muted);
}
.gate-header h1{
  margin:0; font-family:var(--f-display); font-size:clamp(31px,5vw,58px);
  line-height:1; letter-spacing:.1em; text-transform:uppercase; color:#f2fbff;
  text-shadow:0 0 10px rgba(79,195,247,.66),0 0 32px rgba(54,131,184,.44);
}
.gate-lead{ margin:14px 0 0; font-size:13px; letter-spacing:.08em; color:var(--muted); }

.gate-main{
  position:relative; z-index:2; width:min(1180px,calc(100% - 32px));
  margin:0 auto; display:grid; place-items:center; padding:8px 0 22px;
}
.gate-selection{
  width:100%; display:flex; align-items:center; justify-content:center;
  gap:clamp(34px,8vw,118px);
}
.faction-banner{
  --faction:67,196,239;
  position:relative; width:min(34vw,420px); margin:0; padding:0; border:0;
  color:inherit; background:transparent; isolation:isolate;
  transition:transform .24s ease,filter .24s ease;
}
.faction-banner--empire{ --faction:226,48,62; }
.faction-banner picture,.faction-banner img{ display:block; width:100%; height:auto; }
.faction-banner img{
  filter:drop-shadow(0 12px 18px rgba(0,0,0,.65)) drop-shadow(0 0 12px rgba(var(--faction),.18));
  transition:filter .28s ease;
}
.faction-banner::before{
  content:""; position:absolute; inset:8% 10%; z-index:-1; opacity:0;
  background:radial-gradient(ellipse,rgba(var(--faction),.34),transparent 68%);
  filter:blur(18px); transition:opacity .25s ease;
}
.faction-banner:hover,.faction-banner:focus-visible{ outline:none; transform:translateY(-7px) scale(1.015); }
.faction-banner:hover::before,.faction-banner:focus-visible::before{ opacity:1; }
.faction-banner:hover img,.faction-banner:focus-visible img{
  filter:drop-shadow(0 16px 22px rgba(0,0,0,.68)) drop-shadow(0 0 18px rgba(var(--faction),.66));
}

.gate-footer{
  position:relative; z-index:2; display:flex; justify-content:center; align-items:center;
  gap:12px; flex-wrap:wrap; padding:10px 18px 22px;
  color:#477f92; font-size:9px; letter-spacing:.16em; text-transform:uppercase;
}
.gate-footer i{ width:5px; height:5px; background:var(--cyan-dim); transform:rotate(45deg); }

.gate-modal[hidden]{ display:none; }
.gate-modal{
  --tone:67,196,239;
  position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:16px;
}
.gate-modal.is-empire{ --tone:226,48,62; }
.gate-modal__scrim{
  position:absolute; inset:0; background:rgba(0,4,10,.82); backdrop-filter:blur(5px);
  animation:gate-scrim-in .34s ease both;
}
.gate-modal__frame{
  position:relative; width:min(720px,100%); max-height:calc(100svh - 32px);
  overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain;
  border:2px solid rgb(var(--tone)); border-radius:12px;
  background:linear-gradient(155deg,rgba(5,31,48,.98),rgba(2,14,23,.99) 64%,rgba(1,8,14,.99));
  box-shadow:
    0 0 0 4px rgba(2,11,18,.9),0 0 0 5px rgba(var(--tone),.42),
    0 0 36px rgba(var(--tone),.38),inset 0 0 32px rgba(var(--tone),.08);
  animation:gate-modal-open .56s cubic-bezier(.2,.82,.25,1) both;
  scrollbar-color:rgba(var(--tone),.65) #02070d;
}
.gate-modal__frame::before,.gate-modal__frame::after{
  content:""; position:absolute; z-index:3; pointer-events:none;
}
.gate-modal__frame::before{
  inset:5px; border:1px solid rgba(var(--tone),.38); border-radius:8px;
}
.gate-modal__frame::after{
  left:0; right:0; top:0; height:2px;
  background:linear-gradient(90deg,transparent,rgb(var(--tone)),#fff,rgb(var(--tone)),transparent) -45% 0/40% 100% no-repeat;
  box-shadow:0 0 16px rgba(var(--tone),.9); animation:gate-edge-sweep .76s .1s ease both;
}
.gate-modal__energy{
  position:absolute; left:50%; top:0; bottom:0; width:1px; z-index:4; pointer-events:none;
  background:linear-gradient(transparent,rgba(var(--tone),.82),#fff,rgba(var(--tone),.82),transparent);
  box-shadow:0 0 18px rgba(var(--tone),.9); animation:gate-spine .68s ease both;
}
.gate-modal__close{
  position:absolute; right:14px; top:14px; z-index:8; width:34px; height:34px;
  border:1px solid rgba(var(--tone),.7); border-radius:5px; background:rgba(1,10,17,.9);
  box-shadow:0 0 10px rgba(var(--tone),.18);
  transition:border-color .2s ease,background .2s ease,box-shadow .22s ease,transform .12s ease;
}
.gate-modal__close::before,.gate-modal__close::after{
  content:""; position:absolute; left:8px; top:15px; width:17px; height:2px;
  background:rgb(var(--tone)); box-shadow:0 0 8px rgba(var(--tone),.8);
  transition:background .2s ease,box-shadow .2s ease;
}
.gate-modal__close::before{ transform:rotate(45deg); }
.gate-modal__close::after{ transform:rotate(-45deg); }
.gate-modal__close:hover,.gate-modal__close:focus-visible{
  border-color:#fff; background:rgba(var(--tone),.18); transform:scale(1.06);
  box-shadow:0 0 16px rgba(var(--tone),.72),inset 0 0 10px rgba(var(--tone),.2);
}
.gate-modal__close:hover::before,.gate-modal__close:hover::after,
.gate-modal__close:focus-visible::before,.gate-modal__close:focus-visible::after{
  background:#fff; box-shadow:0 0 10px rgba(var(--tone),1);
}
.gate-modal__close:focus-visible{ outline:2px solid #fff; outline-offset:3px; }
.gate-modal__close:active{ transform:scale(.96); }
.gate-modal__visual{
  position:relative; padding:22px 54px 0; overflow:hidden;
  opacity:0; animation:gate-content-in .34s .38s ease forwards;
}
.gate-modal__visual img{
  display:block; width:100%; max-height:210px; object-fit:contain;
  filter:drop-shadow(0 0 16px rgba(var(--tone),.34));
}
.gate-modal__content{
  position:relative; padding:22px 34px 32px; opacity:0;
  animation:gate-content-in .38s .43s ease forwards;
}
.gate-modal__eyebrow{
  margin:0 0 8px; color:rgb(var(--tone)); font-size:9px;
  letter-spacing:.18em; text-transform:uppercase;
}
.gate-modal h2{
  margin:0; font-family:var(--f-display); font-size:clamp(27px,5vw,42px);
  letter-spacing:.08em; text-transform:uppercase; color:#f2fbff;
  text-shadow:0 0 10px rgba(var(--tone),.56);
}
.gate-modal__description{ margin:14px 0 0; color:#b9dce5; font-size:13px; line-height:1.65; }
.gate-modal__facts{ margin:20px 0 0; display:grid; gap:7px; }
.gate-modal__facts div{
  display:grid; grid-template-columns:100px minmax(0,1fr); gap:12px;
  padding:9px 11px; border:1px solid rgba(var(--tone),.25); border-radius:6px;
  background:rgba(2,17,27,.7);
}
.gate-modal__facts dt{ color:#5f9caf; font-size:9px; letter-spacing:.13em; text-transform:uppercase; }
.gate-modal__facts dd{ min-width:0; margin:0; color:#d9f6fb; text-align:right; overflow-wrap:anywhere; }
.gate-enter{
  position:relative; isolation:isolate; overflow:hidden;
  display:block; margin-top:22px; padding:12px 16px; text-align:center; text-decoration:none;
  border:1px solid rgba(var(--tone),.62); border-radius:6px;
  color:#d9edf4; background:linear-gradient(180deg,rgba(var(--tone),.24),rgba(var(--tone),.08));
  font-weight:700; letter-spacing:.1em; text-transform:uppercase;
  box-shadow:inset 0 0 16px rgba(var(--tone),.08);
  text-shadow:0 0 6px rgba(var(--tone),.28);
  transition:color .2s ease,border-color .2s ease,box-shadow .25s ease,transform .08s ease;
  cursor:url("../images/cursor-pointer.png") 13 1,pointer;
}
.gate-enter::before{
  content:""; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  opacity:0; mix-blend-mode:screen; transition:opacity .25s ease;
  background:
    linear-gradient(90deg,transparent 5%,rgba(var(--tone),1) 50%,transparent 95%) top/100% 1.5px no-repeat,
    linear-gradient(90deg,transparent 5%,rgba(var(--tone),1) 50%,transparent 95%) bottom/100% 1.5px no-repeat,
    radial-gradient(72% 125% at 50% 0%,rgba(var(--tone),.8),rgba(var(--tone),.22) 42%,transparent 78%),
    radial-gradient(72% 125% at 50% 100%,rgba(var(--tone),.8),rgba(var(--tone),.22) 42%,transparent 78%);
}
.gate-enter:hover,.gate-enter:focus-visible{
  outline:none; color:#fff; border-color:rgba(var(--tone),.9);
  text-shadow:0 0 10px rgba(var(--tone),.95);
  box-shadow:
    0 -7px 18px -8px rgba(var(--tone),.95),
    0 7px 18px -8px rgba(var(--tone),.95),
    0 0 24px -8px rgba(var(--tone),.55);
}
.gate-enter:hover::before,.gate-enter:focus-visible::before{ opacity:1; }
.gate-enter:active{ transform:translateY(1px); color:#7c9caa; text-shadow:none; box-shadow:inset 0 3px 9px rgba(0,0,0,.8); }
.gate-modal.is-closing .gate-modal__frame{ animation:gate-modal-close .24s ease both; }
.gate-modal.is-closing .gate-modal__scrim{ animation:gate-scrim-out .24s ease both; }

@keyframes gate-modal-open{
  0%{ opacity:0; clip-path:inset(49.5% 0); transform:none; filter:brightness(2.2); }
  42%{ opacity:1; clip-path:inset(48.8% 0); transform:none; filter:brightness(1.7); }
  72%{ clip-path:inset(7% 0); transform:none; filter:brightness(1.15); }
  100%{ opacity:1; clip-path:inset(0); transform:none; filter:none; }
}
@keyframes gate-modal-close{
  0%{ opacity:1; clip-path:inset(0); transform:none; filter:none; }
  28%{ clip-path:inset(7% 0); transform:none; filter:brightness(1.15); }
  68%{ opacity:1; clip-path:inset(48.8% 0); transform:none; filter:brightness(1.7); }
  100%{ opacity:0; clip-path:inset(49.5% 0); transform:none; filter:brightness(2.2); }
}
@keyframes gate-content-in{ from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:none} }
@keyframes gate-scrim-in{ from{opacity:0} to{opacity:1} }
@keyframes gate-scrim-out{ to{opacity:0} }
@keyframes gate-edge-sweep{ from{background-position:-45% 0;opacity:0} 50%{background-position:50% 0;opacity:1} to{background-position:145% 0;opacity:0} }
@keyframes gate-spine{ 0%{opacity:0;transform:scaleY(0)} 30%{opacity:1;transform:scaleY(1)} 100%{opacity:0;transform:scaleY(1)} }

@media (max-width:700px){
  .gate-header{ padding-top:24px; }
  .gate-header h1{ font-size:clamp(28px,11vw,42px); }
  .gate-lead{ max-width:310px; margin-inline:auto; line-height:1.5; }
  .gate-main{ width:min(100% - 20px,760px); place-items:start center; padding-top:clamp(20px,4vh,34px); }
  .gate-selection{ display:grid; gap:18px; }
  .faction-banner{ width:100%; }
  .faction-banner:hover,.faction-banner:focus-visible{ transform:translateY(-3px) scale(1.005); }
  .gate-footer{ padding-top:2px; }
  .gate-modal{ padding:10px; }
  .gate-modal__visual{ padding:42px 18px 0; }
  .gate-modal__content{ padding:18px 18px 24px; }
  .gate-modal__facts div{ grid-template-columns:1fr; gap:3px; }
  .gate-modal__facts dd{ text-align:left; }
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{ scroll-behavior:auto!important; transition:none!important; }
  .gate-modal__frame,.gate-modal__scrim,.gate-modal__visual,.gate-modal__content,
  .gate-modal__frame::after,.gate-modal__energy{ animation:none!important; opacity:1; }
}
