:root {
  --oe-black: #070708;
  --oe-ink: #151516;
  --oe-white: #ffffff;
  --oe-soft: #f4f0ea;
  --oe-red: #e31b23;
  --oe-red-deep: #9c0f16;
  --oe-steel: #7f858a;
  --oe-line: rgba(255, 255, 255, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--oe-black);
  color: var(--oe-white);
  font-family: "IBM Plex Sans", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body.login-page {
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.login-shell {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  display: grid;
  align-items: end;
  padding: clamp(26px, 5vw, 70px);
  overflow: hidden;
}

.login-bg,
.login-shade,
.login-redline {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.login-bg {
  background-image: url("/static/assets/login-hero-imagegen.png");
  background-size: cover;
  background-position: 70% center;
  transform: scale(1.04);
  animation: hero-breathe 18s ease-in-out infinite alternate;
}

.login-shade {
  z-index: 1;
  background:
    radial-gradient(circle at 76% 18%, rgba(255,255,255,0.24), transparent 30%),
    linear-gradient(90deg, rgba(0,0,0,0.985) 0%, rgba(0,0,0,0.96) 31%, rgba(0,0,0,0.58) 64%, rgba(0,0,0,0.20) 100%),
    linear-gradient(0deg, rgba(0,0,0,0.74) 0%, rgba(0,0,0,0.10) 48%, rgba(0,0,0,0.30) 100%);
}

.login-shade::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,0.85), transparent 78%);
}

.login-redline {
  z-index: 1;
  top: 49%;
  bottom: auto;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, var(--oe-red) 24%, #ff3640 46%, var(--oe-red) 66%, transparent 100%);
  box-shadow: 0 0 30px rgba(227, 27, 35, 0.56);
  opacity: 0.86;
  animation: redline-pass 7s cubic-bezier(.4,0,.2,1) infinite;
}

.sub-entry {
  position: absolute;
  top: clamp(20px, 4vw, 34px);
  right: clamp(20px, 4vw, 34px);
  z-index: 3;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--oe-white);
  padding: 9px 16px;
  border: 1px solid var(--oe-line);
  background: rgba(0, 0, 0, 0.35);
  transition: border-color .15s, background .15s;
}
.sub-entry:hover {
  border-color: var(--oe-red);
  background: rgba(227, 27, 35, 0.16);
  text-decoration: none;
}
.sub-entry .arrow { color: var(--oe-red); font-weight: 700; }

.login-hero {
  position: relative;
  z-index: 2;
  width: min(840px, 100%);
  display: grid;
  gap: clamp(22px, 4vw, 40px);
  padding-bottom: clamp(10px, 3vh, 30px);
}

.login-copy {
  display: grid;
  gap: 14px;
  animation: enter-soft 740ms ease-out both;
}

.login-company {
  margin: 0;
  color: rgba(255,255,255,0.74);
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-title {
  position: relative;
  width: fit-content;
  margin: 0;
  font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  font-size: clamp(72px, 12vw, 154px);
  line-height: 0.88;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-wrap: balance;
  text-shadow: 0 22px 60px rgba(0,0,0,0.50);
}

.login-title::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.22);
  transform: translate(7px, 7px);
  z-index: -1;
}

.login-title span {
  display: inline;
}

.login-subtitle {
  max-width: 620px;
  margin: 0;
  color: rgba(255,255,255,0.78);
  font-size: clamp(16px, 1.65vw, 21px);
  line-height: 1.48;
  font-weight: 500;
}

.login-values {
  max-width: 760px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: rgba(255,255,255,0.66);
  font-size: clamp(12px, 1.2vw, 14px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  animation: enter-soft 800ms 120ms ease-out both;
}

.login-values span {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.login-values b {
  color: var(--oe-red);
  font: inherit;
}

.login-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: enter-soft 820ms 220ms ease-out both;
}

.login-button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 0 24px;
  background: var(--oe-white);
  color: var(--oe-ink);
  border: 1px solid rgba(255,255,255,0.72);
  font-weight: 800;
  box-shadow: 0 22px 70px rgba(0,0,0,0.36);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.login-button:hover {
  transform: translateY(-2px);
  background: #f5f5f5;
  box-shadow: 0 28px 86px rgba(0,0,0,0.42);
}

.login-button:focus-visible {
  outline: 3px solid rgba(227, 27, 35, 0.85);
  outline-offset: 4px;
}

.login-button-icon {
  width: 18px;
  height: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
}

.login-button-icon span:nth-child(1) { background: #f25022; }
.login-button-icon span:nth-child(2) { background: #7fba00; }
.login-button-icon span:nth-child(3) { background: #00a4ef; }
.login-button-icon span:nth-child(4) { background: #ffb900; }

.login-version,
.login-unavailable {
  color: rgba(255,255,255,0.60);
  font-size: 13px;
  font-weight: 700;
}

.login-unavailable {
  color: #ffd2d5;
  border-left: 3px solid var(--oe-red);
  padding-left: 12px;
}

@keyframes hero-breathe {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.10) translate3d(-1.2%, -0.8%, 0); }
}

@keyframes redline-pass {
  0%, 18% { transform: translateX(-36%) scaleX(0.66); opacity: 0; }
  32%, 78% { opacity: 0.86; }
  100% { transform: translateX(36%) scaleX(1.08); opacity: 0; }
}

@keyframes enter-soft {
  from { opacity: 1; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .login-shell {
    align-items: center;
    padding: 28px 22px;
  }

  .login-bg {
    background-position: 62% center;
  }

  .login-shade {
    background:
      linear-gradient(90deg, rgba(0,0,0,0.88), rgba(0,0,0,0.54)),
      linear-gradient(0deg, rgba(0,0,0,0.70), rgba(0,0,0,0.20));
  }

  .login-title {
    width: 100%;
    max-width: 100%;
    font-size: clamp(42px, 10.4vw, 48px);
    line-height: 0.94;
  }

  .login-title::after {
    display: none;
  }

  .login-title span {
    display: block;
  }

  .login-subtitle {
    max-width: 100%;
    font-size: 15px;
  }

  .login-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
    font-size: 10px;
    line-height: 1.2;
  }

  .login-actions,
  .login-button {
    width: 100%;
  }

  .login-button {
    justify-content: center;
    gap: 10px;
    padding: 0 14px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
