/* =========================================================
   IRONWASTELAND — LANDING PAGE
   Dedicated stylesheet for index / intro page
========================================================= */

:root{
  --ink:#e8e3d8;
  --rust:#c45b2a;
  --acid:#9bbf3a;

  --font-sans:Arial, Helvetica, sans-serif;
  --font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

*,
*::before,
*::after{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

html,
body{
  height:100%;
}

body{
  overflow:hidden;
  color:var(--ink);
  font-family:var(--font-sans);
  background:
    linear-gradient(180deg, rgba(8,8,10,.10), rgba(4,4,6,.18)),
    url("../img/bg_loading.jpg") center/cover no-repeat fixed;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    radial-gradient(1000px 500px at 12% 12%, rgba(196,91,42,.10), transparent 55%),
    radial-gradient(700px 350px at 72% 18%, rgba(155,191,58,.05), transparent 60%);
  mix-blend-mode:screen;
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:2;
  pointer-events:none;
  opacity:.22;
  background:
    linear-gradient(115deg, transparent 0 38%, rgba(255,255,255,.05) 45%, transparent 54%),
    linear-gradient(125deg, transparent 0 56%, rgba(255,255,255,.03) 63%, transparent 72%);
  mix-blend-mode:screen;
}
.overlay{
  position:absolute;
  inset:0;
  z-index:1;
  background:
    radial-gradient(700px 400px at 18% 18%, rgba(196,91,42,.22), transparent 60%),
    radial-gradient(900px 600px at 85% 80%, rgba(0,0,0,.85), transparent 70%),
    linear-gradient(180deg, rgba(10,6,5,.75), rgba(0,0,0,.95));
}

.grime{
  position:absolute;
  inset:-10%;
  z-index:2;
  opacity:.85;
  mix-blend-mode:multiply;
  background:
    radial-gradient(closest-side at 50% 50%, transparent 52%, rgba(0,0,0,.95) 100%),
    radial-gradient(closest-side at 15% 25%, rgba(0,0,0,.75), transparent 65%),
    radial-gradient(closest-side at 85% 70%, rgba(0,0,0,.85), transparent 70%),
    repeating-linear-gradient(
      125deg,
      rgba(255,255,255,.05) 0 1px,
      transparent 1px 8px
    );
  animation:scan 9s linear infinite;
}

.smoke{
  position:absolute;
  inset:-25%;
  z-index:3;
  pointer-events:none;
  opacity:.42;
  mix-blend-mode:screen;
  filter:blur(22px) contrast(1.08);
  background:
    radial-gradient(closest-side at 10% 30%, rgba(255,255,255,.12), transparent 60%),
    radial-gradient(closest-side at 30% 70%, rgba(255,255,255,.08), transparent 65%),
    radial-gradient(closest-side at 60% 40%, rgba(255,255,255,.10), transparent 62%),
    radial-gradient(closest-side at 80% 80%, rgba(255,255,255,.07), transparent 70%);
  animation:smoke-drift 18s ease-in-out infinite alternate;
}

.smoke.s2{
  opacity:.35;
  filter:blur(28px) contrast(1.05);
  mix-blend-mode:overlay;
  animation-duration:26s;
  animation-direction:alternate-reverse;
}

.smoke.s3{
  opacity:.22;
  filter:blur(36px) contrast(1);
  mix-blend-mode:lighten;
  animation-duration:34s;
}

.dust{
  position:absolute;
  inset:0;
  z-index:4;
  pointer-events:none;
}

.dust i{
  position:absolute;
  width:2px;
  height:2px;
  border-radius:50%;
  opacity:0;
  background:rgba(232,227,216,.7);
  box-shadow:0 0 12px rgba(232,227,216,.25);
  animation:dust-float linear infinite;
}

.center{
  position:relative;
  z-index:5;
  display:flex;
  align-items:center;
  justify-content:center;
  height:100%;
  padding:clamp(20px, 5vw, 60px);
  text-align:center;
  opacity:0;
  transform:translateY(8px);
  transition:opacity 900ms ease, transform 900ms ease;
}

.center.live{
  opacity:1;
  transform:translateY(0);
}

.stack{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:22px;
}

.logo{
  width:min(760px, 86vw);
  filter:drop-shadow(0 30px 70px rgba(0,0,0,.85));
  animation:float 6s ease-in-out infinite alternate;
}

.gate{
  position:absolute;
  inset:0;
  z-index:10;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:
    linear-gradient(180deg, rgba(10,6,5,.80), rgba(0,0,0,.92)),
    url("../img/bg_loading.jpg") center/cover no-repeat fixed;
  backdrop-filter:blur(2px) contrast(1.1);
  transition:opacity 700ms ease, visibility 700ms ease;
}

.gate.hidden{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}

.gateCard{
  position:relative;
  width:min(860px, 96vw);
  overflow:hidden;
  padding:22px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:22px;
  background:linear-gradient(180deg, rgba(12,12,16,.62), rgba(0,0,0,.42));
  box-shadow:
    0 25px 80px rgba(0,0,0,.65),
    inset 0 1px 0 rgba(255,255,255,.04);
}

.gateCard::before{
  content:"";
  position:absolute;
  inset:-2px;
  pointer-events:none;
  opacity:.28;
  mix-blend-mode:overlay;
  background:
    radial-gradient(700px 260px at 20% 0%, rgba(196,91,42,.22), transparent 60%),
    radial-gradient(700px 280px at 80% 100%, rgba(155,191,58,.10), transparent 65%),
    repeating-linear-gradient(125deg, rgba(255,255,255,.06) 0 1px, transparent 1px 10px);
}

.row{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:14px;
}

.gateTitle{
  font-size:clamp(18px, 2.2vw, 24px);
  font-weight:900;
  letter-spacing:.10em;
  text-transform:uppercase;
}

.gateSub,
.anyKey,
.logline,
.pct,
.pressEnter,
.tty{
  font-family:var(--font-mono);
  text-transform:uppercase;
}

.gateSub{
  opacity:.72;
  font-size:12px;
  letter-spacing:.12em;
}

.enterBtn{
  padding:12px 16px;
  border:1px solid rgba(196,91,42,.55);
  border-radius:14px;
  background:linear-gradient(180deg, rgba(196,91,42,.22), rgba(0,0,0,.35));
  color:var(--ink);
  cursor:pointer;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  transition:transform .12s ease, border-color .12s ease;
  user-select:none;
}

.enterBtn:hover{
  transform:translateY(-2px);
  border-color:rgba(196,91,42,.85);
}

.enterBtn:active{
  transform:translateY(0);
}

.anyKey{
  margin-top:10px;
  opacity:.65;
  font-size:12px;
  letter-spacing:.10em;
  animation:blink-soft 1.1s ease-in-out infinite;
}

.terminal{
  position:relative;
  margin-top:16px;
  padding:14px;
  border:1px dashed rgba(255,255,255,.14);
  border-radius:16px;
  background:rgba(0,0,0,.35);
}

.logline{
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
  color:rgba(232,227,216,.78);
  font-size:12px;
  letter-spacing:.06em;
}

.logline b{
  color:rgba(232,227,216,.92);
}

.logline .tag{
  opacity:.65;
}

.barWrap{
  position:relative;
  overflow:hidden;
  height:14px;
  margin-top:10px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:999px;
  background:rgba(255,255,255,.06);
}

.bar{
  position:relative;
  width:0;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(196,91,42,.85), rgba(155,191,58,.45));
  box-shadow:0 0 24px rgba(196,91,42,.16);
}

.bar::after{
  content:"";
  position:absolute;
  inset:0;
  opacity:.55;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transform:translateX(-120%);
  animation:shine 1.2s linear infinite;
}

.pct{
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
  color:rgba(232,227,216,.72);
  font-size:12px;
  letter-spacing:.08em;
}

.pct strong{
  color:rgba(232,227,216,.92);
}

.pressEnter{
  margin-top:34px;
  font-size:13px;
  letter-spacing:.38em;
  user-select:none;
  transition:opacity .3s ease, transform .2s ease, filter .3s ease, color .3s ease;
  animation:blink-enter 1.35s ease-in-out infinite;
}

.pressEnter.locked{
  opacity:.45;
  pointer-events:none;
  cursor:default;
  color:#ff3b3b;
  text-shadow:0 0 14px rgba(255,0,0,.45);
}

.pressEnter.unlockFlash{
  color:#6cff3b;
  text-shadow:0 0 18px rgba(108,255,59,.65);
  animation:unlock-glow .6s ease-out;
}

.pressEnter.ready{
  opacity:.9;
  pointer-events:auto;
  cursor:pointer;
  color:#e8e3d8;
  text-shadow:none;
}

.pressEnter.ready:hover{
  transform:translateY(-2px);
}

.fade{
  position:absolute;
  inset:0;
  z-index:20;
  opacity:0;
  pointer-events:none;
  background:#000;
  transition:opacity 650ms ease;
}

.fade.on{
  opacity:1;
}

.tty{
  min-height:78px;
  margin-top:12px;
  padding-top:10px;
  border-top:1px dashed rgba(232,227,216,.18);
  color:rgba(232,227,216,.78);
  font-size:12px;
  letter-spacing:.06em;
  line-height:1.55;
  white-space:pre-wrap;
}

.tty .cursor{
  display:inline-block;
  width:10px;
  opacity:.9;
  animation:cursor-blink .9s steps(2,end) infinite;
}

@media (max-width:700px){
  .gateCard{
    padding:18px;
  }

  .row{
    align-items:flex-start;
    flex-direction:column;
  }

  .enterBtn{
    width:100%;
  }

  .pressEnter{
    letter-spacing:.18em;
  }
}

@keyframes scan{
  0%{ transform:translateY(-8%); }
  100%{ transform:translateY(8%); }
}

@keyframes smoke-drift{
  0%{ transform:translate3d(-2%,-1%,0) rotate(-2deg) scale(1.05); }
  50%{ transform:translate3d(2%,1%,0) rotate(1deg) scale(1.10); }
  100%{ transform:translate3d(-1%,2%,0) rotate(-1deg) scale(1.08); }
}

@keyframes dust-float{
  0%{ transform:translate3d(var(--x0), 110%, 0) scale(var(--s)); opacity:0; }
  10%{ opacity:.55; }
  85%{ opacity:.38; }
  100%{ transform:translate3d(var(--x1), -15%, 0) scale(var(--s)); opacity:0; }
}

@keyframes float{
  from{ transform:translateY(0); }
  to{ transform:translateY(-14px); }
}

@keyframes shine{
  0%{ transform:translateX(-120%); }
  100%{ transform:translateX(120%); }
}

@keyframes blink-soft{
  0%,100%{ opacity:.25; }
  50%{ opacity:.85; }
}

@keyframes blink-enter{
  0%,100%{ opacity:.25; }
  50%{ opacity:.9; }
}

@keyframes unlock-glow{
  0%{ transform:scale(1); }
  40%{ transform:scale(1.05); }
  100%{ transform:scale(1); }
}

@keyframes cursor-blink{
  0%,100%{ opacity:0; }
  50%{ opacity:1; }
}
