:root {
  color-scheme: dark;
  --ink: #ffffff;
  --muted: #b8b8b8;
  --line: rgba(255, 255, 255, 0.16);
  --panel: rgba(8, 8, 10, 0.86);
  --white: #ffffff;
  --teal: #ff1f3d;
  --green: #ffffff;
  --coral: #ff1f3d;
  --gold: #ffffff;
  --blue: #b8001f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 31, 61, 0.24), transparent 31%),
    radial-gradient(circle at 82% 22%, rgba(255, 255, 255, 0.08), transparent 27%),
    radial-gradient(circle at 50% 92%, rgba(184, 0, 31, 0.22), transparent 33%),
    linear-gradient(135deg, #000000 0%, #0c0c0f 48%, #1b0509 100%);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

a {
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.motion-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.65;
}

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.74fr);
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100vh - 56px);
  margin: 0 auto;
  gap: clamp(28px, 5vw, 72px);
  padding: 28px 0;
}

.brand-panel {
  position: relative;
  display: flex;
  min-height: 610px;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)),
    linear-gradient(155deg, rgba(255, 31, 61, 0.2), rgba(184, 0, 31, 0.12));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.brand-panel::before,
.brand-panel::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.85;
  animation: drift 11s ease-in-out infinite alternate;
}

.brand-panel::before {
  width: 220px;
  height: 220px;
  right: -74px;
  top: 82px;
  background: rgba(255, 31, 61, 0.28);
}

.brand-panel::after {
  width: 180px;
  height: 180px;
  left: -46px;
  bottom: 92px;
  background: rgba(255, 255, 255, 0.1);
  animation-delay: -3s;
}

.brand-lockup,
.headline-group,
.floating-stack {
  position: relative;
  z-index: 1;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--white);
  color: #000000;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.32);
}

.brand-mark span {
  font-size: 1.35rem;
  font-weight: 900;
}

.brand-name {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 680px;
  font-size: clamp(2.7rem, 6vw, 5.9rem);
  line-height: 0.94;
}

.subcopy {
  max-width: 570px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.28rem);
  line-height: 1.65;
}

.floating-stack {
  min-height: 190px;
}

.mini-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  background: rgba(10, 10, 12, 0.82);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  animation: lift 6.5s ease-in-out infinite;
}

.mini-card strong,
.mini-card span {
  display: block;
}

.mini-card strong {
  font-size: 1.04rem;
}

.mini-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
}

.mini-card-main {
  left: 8%;
  bottom: 18px;
  padding: 18px 22px;
  min-width: 260px;
}

.mini-card-top {
  right: 9%;
  top: 4px;
  display: block;
  padding: 18px 22px;
  animation-delay: -2s;
}

.mini-card-bottom {
  right: 22%;
  bottom: 54px;
  display: block;
  padding: 16px 22px;
  animation-delay: -4s;
}

.mini-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius);
  background: rgba(255, 31, 61, 0.16);
  color: var(--teal);
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-panel {
  display: flex;
  justify-content: center;
}

.form-card {
  width: min(100%, 430px);
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  animation: enter 720ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.form-header {
  margin-bottom: 28px;
}

h2 {
  font-size: clamp(2rem, 3vw, 2.65rem);
}

form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field > span,
.remember span {
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.input-wrap:focus-within {
  border-color: rgba(255, 31, 61, 0.75);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: 0 0 0 4px rgba(255, 31, 61, 0.14);
  transform: translateY(-1px);
}

.input-wrap svg {
  flex: 0 0 auto;
  color: var(--teal);
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

input::placeholder {
  color: #8f8f8f;
}

.icon-button {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover {
  background: rgba(22, 32, 51, 0.06);
  color: var(--ink);
}

.error-message {
  min-height: 16px;
  color: #ff6b7e;
  font-size: 0.78rem;
  font-weight: 700;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.remember input {
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
}

.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ff1f3d, #b8001f);
  color: var(--white);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(255, 31, 61, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px rgba(255, 31, 61, 0.34);
  filter: saturate(1.08);
}

.submit-button:active {
  transform: translateY(0);
}

.submit-button.is-loading {
  pointer-events: none;
}

.submit-button.is-loading svg {
  animation: pulseArrow 650ms ease-in-out infinite alternate;
}

.status-message {
  min-height: 22px;
  margin: 0;
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
}

.divider span {
  height: 1px;
  background: var(--line);
}

.divider p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.social-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.social-actions button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.social-actions button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 31, 61, 0.56);
  background: rgba(255, 255, 255, 0.12);
}

.signup-text {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-24px, 18px, 0) scale(1.08);
  }
}

@keyframes lift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@keyframes pulseArrow {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(5px);
  }
}

@media (max-width: 920px) {
  .page-shell {
    grid-template-columns: 1fr;
    align-items: start;
    width: min(650px, calc(100% - 28px));
  }

  .brand-panel {
    min-height: 450px;
  }

  .login-panel {
    margin-top: -96px;
    padding-bottom: 28px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 22px, 440px);
    padding: 12px 0;
    gap: 18px;
  }

  .brand-panel {
    min-height: 390px;
    padding: 24px;
  }

  h1 {
    font-size: clamp(2.25rem, 14vw, 3.65rem);
  }

  .subcopy {
    font-size: 0.98rem;
  }

  .floating-stack {
    min-height: 142px;
  }

  .mini-card-main {
    left: 0;
    bottom: 4px;
    min-width: min(246px, 82%);
  }

  .mini-card-top {
    right: 0;
    top: 4px;
  }

  .mini-card-bottom {
    display: none;
  }

  .login-panel {
    margin-top: -56px;
  }

  .form-card {
    padding: 22px;
  }

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

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

  .motion-canvas {
    display: none;
  }
}
