:root {
  color-scheme: dark;
  --white: #fffdf5;
  --ink: #111516;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #050606; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(circle at 50% 38%, rgba(58, 62, 64, .38), transparent 36%),
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, .12), transparent 19%),
    linear-gradient(180deg, #080909 0%, #111516 48%, #050606 100%);
}

.portal-world {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.portal-world::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.5), transparent 24% 76%, rgba(0,0,0,.46)),
    radial-gradient(circle at 50% 48%, transparent 0 44%, rgba(0,0,0,.34) 80%);
}

.portal-video-scene {
  min-height: 100vh;
  position: relative;
}


.portal-fallback-tree {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: min(880px, 94vw);
  height: min(760px, 88vh);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: .72;
}

.portal-fallback-tree::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 5%;
  width: 82%;
  height: 58%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 48%, rgba(255,255,255,.72), rgba(255,255,255,.24) 38%, transparent 70%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.22) 0 9px, transparent 9px 18px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.12) 0 9px, transparent 9px 18px);
  clip-path: polygon(50% 0, 72% 10%, 91% 35%, 84% 63%, 66% 78%, 50% 73%, 32% 80%, 13% 62%, 9% 34%, 28% 9%);
  filter: blur(.2px);
}

.portal-fallback-tree::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 9%;
  width: min(580px, 76vw);
  height: 118px;
  transform: translateX(-50%);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.2) 0 12px, transparent 12px 24px),
    linear-gradient(90deg, transparent 0 8%, rgba(255,255,255,.54) 8% 12%, transparent 12% 42%, rgba(18,22,23,.82) 42% 58%, transparent 58% 88%, rgba(255,255,255,.42) 88% 92%, transparent 92%);
  clip-path: polygon(0 72%, 23% 42%, 42% 32%, 48% 0, 54% 0, 62% 32%, 80% 42%, 100% 72%, 100% 100%, 0 100%);
}

.portal-fallback-tree span {
  position: absolute;
  display: block;
  background: rgba(255,255,255,.74);
  box-shadow: 0 0 18px rgba(255,255,255,.42);
}

.portal-fallback-tree span:nth-child(1) { left: 48%; top: 26%; width: 32px; height: 310px; background: rgba(12,15,16,.72); }
.portal-fallback-tree span:nth-child(2) { left: 24%; top: 36%; width: 280px; height: 18px; transform: rotate(18deg); background: rgba(16,19,20,.62); }
.portal-fallback-tree span:nth-child(3) { right: 20%; top: 34%; width: 290px; height: 18px; transform: rotate(-20deg); background: rgba(16,19,20,.62); }
.portal-fallback-tree span:nth-child(4) { left: 30%; top: 20%; width: 18px; height: 18px; }
.portal-fallback-tree span:nth-child(5) { left: 58%; top: 13%; width: 24px; height: 24px; }
.portal-fallback-tree span:nth-child(6) { right: 25%; top: 29%; width: 20px; height: 20px; }

.has-background-video .portal-fallback-tree { opacity: .18; }

.portal-background-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  opacity: 0;
  filter: saturate(.82) contrast(1.08) brightness(.78);
  transform: scale(1.01);
  transition: opacity 420ms ease;
  pointer-events: none;
}

.portal-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 38%, rgba(0,0,0,.08), rgba(0,0,0,.34) 62%, rgba(0,0,0,.58) 100%),
    linear-gradient(90deg, rgba(0,0,0,.5), transparent 25% 72%, rgba(0,0,0,.44)),
    linear-gradient(180deg, rgba(0,0,0,.18), transparent 42%, rgba(0,0,0,.42));
}

.has-background-video .portal-background-video { opacity: 1; }

.portal-actions {
  position: relative;
  z-index: 8;
  min-height: 100vh;
  pointer-events: none;
}

.monita-portal-link,
.senjuworks-signature { pointer-events: auto; }

.monita-portal-link {
  position: absolute;
  right: clamp(38px, 10vw, 150px);
  top: 47%;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  transform: translateY(-50%);
  text-shadow: 0 0 18px rgba(0,0,0,.42), 0 0 28px rgba(255,255,255,.18);
  transition: color 180ms ease, text-shadow 180ms ease, transform 180ms ease;
}

.monita-portal-link:hover,
.monita-portal-link:focus-visible {
  color: rgba(255,255,255,.96);
  text-shadow: 0 0 24px rgba(255,255,255,.48), 0 0 36px rgba(0,0,0,.52);
  outline: 2px solid rgba(255,255,255,.34);
  outline-offset: 10px;
  transform: translateY(calc(-50% - 2px));
}

.monita-portal-link span {
  display: block;
  color: inherit;
  font-family: "Courier New", "Lucida Console", monospace;
  font-size: clamp(.95rem, 1.55vw, 1.45rem);
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1;
}

.senjuworks-signature {
  position: absolute;
  left: 50%;
  bottom: clamp(24px, 5vh, 54px);
  color: rgba(255,255,255,.72);
  text-decoration: none;
  font-family: "Courier New", "Lucida Console", monospace;
  font-size: clamp(.92rem, 1.45vw, 1.35rem);
  font-weight: 400;
  letter-spacing: .02em;
  text-shadow: 0 0 18px rgba(0,0,0,.42), 0 0 28px rgba(255,255,255,.18);
  transform: translateX(-50%);
  transition: color 180ms ease, text-shadow 180ms ease, transform 180ms ease;
}

.senjuworks-signature:hover,
.senjuworks-signature:focus-visible {
  color: rgba(255,255,255,.96);
  text-shadow: 0 0 24px rgba(255,255,255,.48), 0 0 36px rgba(0,0,0,.52);
  outline: 2px solid rgba(255,255,255,.34);
  outline-offset: 10px;
  transform: translateX(-50%) translateY(-2px);
}

.login-shell {
  display: grid;
  width: min(720px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 54px 0;
  align-items: center;
}
.portal-kicker { margin: 0; color: rgba(255,255,255,.58); font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.placeholder-card { width: 100%; padding: clamp(30px, 6vw, 52px); background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.14); box-shadow: 0 32px 90px rgba(0,0,0,.28); backdrop-filter: blur(10px); }
.placeholder-title { margin: 16px 0 14px; color: var(--white); font-size: clamp(2.8rem, 8vw, 5rem); line-height: .96; letter-spacing: 0; }
.placeholder-title-mono { font-family: "Courier New", "Lucida Console", monospace; }
.placeholder-copy { max-width: 58ch; margin: 0 0 28px; color: rgba(255,255,255,.72); font-size: 1rem; line-height: 1.65; }
.back-button { display: inline-flex; min-height: 46px; padding: 0 18px; color: #111; text-decoration: none; background: var(--white); border: 1px solid rgba(255,255,255,.32); align-items: center; font-weight: 850; }
.back-button:hover,
.back-button:focus-visible { outline: 3px solid rgba(255,255,255,.24); outline-offset: 4px; }

@media (max-width: 900px) {
  .monita-portal-link { right: clamp(26px, 6vw, 64px); top: 48%; }
}

@media (max-width: 620px) {
  .monita-portal-link { right: 24px; top: 58%; }
  .monita-portal-link span { font-size: clamp(.88rem, 4.8vw, 1.18rem); }
  .senjuworks-signature { bottom: 34px; font-size: clamp(.86rem, 4.6vw, 1.12rem); }
}
