﻿:root {
  --color-bg: #050b0a;
  --color-bg-soft: #0a1412;
  --color-panel: rgba(10, 18, 17, 0.82);
  --color-panel-solid: #0d1715;
  --color-foreground: #f4f7f2;
  --color-muted: #a8b0ab;
  --color-subtle: #68736e;
  --color-primary: #caff24;
  --color-primary-strong: #b6ff00;
  --color-primary-ink: #111800;
  --color-accent: #5cff85;
  --color-border: rgba(202, 255, 36, 0.16);
  --color-input: rgba(255, 255, 255, 0.055);
  --color-input-border: rgba(255, 255, 255, 0.12);
  --color-danger: #ff7373;
  --color-ring: rgba(202, 255, 36, 0.58);
  --font-ui: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Inter, system-ui, sans-serif;
  --radius-panel: 22px;
  --radius-control: 12px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--color-bg); }

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-ui);
  color: var(--color-foreground);
  background:
    radial-gradient(circle at 50% 52%, rgba(202, 255, 36, .13), transparent 23rem),
    radial-gradient(circle at 18% 18%, rgba(92, 255, 133, .12), transparent 26rem),
    linear-gradient(135deg, #07100f 0%, #020504 54%, #070c0b 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background-image:
    linear-gradient(rgba(202, 255, 36, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(202, 255, 36, .03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 45% 55%, black, transparent 68%);
}

body::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, .18), transparent 42%, rgba(0, 0, 0, .42));
}

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

button,
input { font: inherit; }

button { cursor: pointer; }

svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .82fr);
  gap: clamp(2rem, 4.4vw, 5rem);
  min-height: 100dvh;
  padding: clamp(1.5rem, 3vw, 3.5rem) clamp(1.25rem, 5vw, 5.25rem);
}

.brand-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  min-width: 0;
  padding-bottom: 1.2rem;
}

.brand-header { min-height: 4.5rem; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  min-height: 3.25rem;
}

.logo {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  color: var(--color-primary-ink);
  background: linear-gradient(145deg, #e7ff31, #ffc400);
  border-radius: 16px 16px 22px 22px;
  box-shadow: 0 0 24px rgba(202, 255, 36, .28);
}

.logo svg { width: 2.05rem; height: 2.05rem; stroke-width: 2.2; }

.brand-copy { display: grid; gap: .18rem; }

.brand-name {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-edition {
  display: inline-flex;
  align-items: center;
  height: 1.72rem;
  margin-left: .28rem;
  padding: 0 .45rem;
  border-radius: .45rem;
  color: var(--color-primary);
  background: rgba(202, 255, 36, .1);
  border: 1px solid rgba(202, 255, 36, .22);
  font-size: 1rem;
}

.brand-tagline { color: var(--color-muted); font-size: .9rem; }

.hero-copy {
  max-width: 43rem;
  margin-top: clamp(3.5rem, 9vh, 8rem);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.45rem, 4.8vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-copy h1 span { color: var(--color-primary); }

.hero-copy p {
  margin: 1.2rem 0 0;
  color: #f0f4ee;
  font-size: clamp(1.18rem, 2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.42;
  text-wrap: pretty;
}

.feature-stack {
  display: grid;
  gap: 1.35rem;
  width: min(28rem, 50%);
  margin-top: 3.2rem;
}

.feature-item {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  color: var(--color-primary);
  background: radial-gradient(circle at 50% 30%, rgba(202, 255, 36, .2), rgba(202, 255, 36, .06));
  border: 1px solid rgba(202, 255, 36, .12);
  border-radius: 50%;
}

.feature-item h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.feature-item p {
  margin: .35rem 0 0;
  color: var(--color-muted);
  font-size: .92rem;
  line-height: 1.55;
}

.core-visual {
  position: absolute;
  right: -2vw;
  bottom: 9.5rem;
  width: min(52vw, 47rem);
  margin: 0;
  opacity: .96;
  filter: drop-shadow(0 2rem 4rem rgba(0, 0, 0, .55));
}

.core-visual img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  mix-blend-mode: screen;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(31rem, 58%);
  margin: 4.6rem 0 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  background: rgba(8, 14, 13, .54);
}

.trust-strip div {
  text-align: center;
  padding: 0 .85rem;
}

.trust-strip div + div { border-left: 1px solid rgba(255, 255, 255, .12); }

.trust-strip dt {
  color: var(--color-primary);
  font-size: 1.28rem;
  font-weight: 800;
}

.trust-strip dd {
  margin: .35rem 0 0;
  color: var(--color-muted);
  font-size: .86rem;
}

.auth-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
}

.login-card {
  width: min(100%, 32rem);
  padding: clamp(2rem, 4vw, 4rem) clamp(1.5rem, 3.2vw, 3.5rem) 2.4rem;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .012)),
    var(--color-panel);
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.card-heading { text-align: center; }

.card-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 3.1vw, 2.65rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: 0;
}

.card-heading h2 span { color: var(--color-primary); }

.card-heading p {
  margin: 1rem 0 0;
  color: var(--color-muted);
  font-size: 1rem;
}

.login-tabs {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
  margin: 2.3rem 0 1.85rem;
}

.tab-button {
  position: relative;
  min-height: 44px;
  padding: 0 .2rem;
  color: var(--color-subtle);
  background: transparent;
  border: 0;
  font-weight: 700;
  transition: color 180ms var(--ease-out);
}

.tab-button::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: .15rem;
  width: 1.7rem;
  height: 2px;
  border-radius: 1rem;
  background: var(--color-primary);
  opacity: 0;
  transform: translateX(-50%) scaleX(.4);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.tab-button.active { color: var(--color-primary); }
.tab-button.active::after { opacity: 1; transform: translateX(-50%) scaleX(1); }

.field-group { margin-top: 1rem; }

.field-group label:not(.check-line) {
  display: block;
  margin-bottom: .48rem;
  color: #d9dfda;
  font-size: .9rem;
  font-weight: 700;
}

.input-shell {
  display: grid;
  grid-template-columns: 1.45rem minmax(0, 1fr) auto;
  align-items: center;
  min-height: 3.65rem;
  padding: 0 1rem;
  color: var(--color-muted);
  background: var(--color-input);
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius-control);
  transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out), background 180ms var(--ease-out);
}

.input-shell:focus-within {
  color: var(--color-foreground);
  border-color: var(--color-ring);
  background: rgba(255, 255, 255, .075);
  box-shadow: 0 0 0 4px rgba(202, 255, 36, .08);
}

.input-shell input {
  width: 100%;
  min-width: 0;
  height: 100%;
  color: var(--color-foreground);
  background: transparent;
  border: 0;
  outline: 0;
  padding: 0 .65rem;
}

.input-shell input::placeholder { color: #858d88; opacity: 1; }

.ghost-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -.65rem;
  color: var(--color-muted);
  background: transparent;
  border: 0;
  border-radius: 10px;
  transition: color 180ms var(--ease-out), background 180ms var(--ease-out);
}

.ghost-icon:hover,
.ghost-icon:focus-visible { color: var(--color-primary); background: rgba(202, 255, 36, .08); }

.eye-off,
.password-visible .eye-on { display: none; }
.password-visible .eye-off { display: block; }

.field-error {
  min-height: 1.15rem;
  margin: .4rem 0 0;
  color: var(--color-danger);
  font-size: .82rem;
  line-height: 1.4;
}

.field-group.invalid .input-shell {
  border-color: rgba(255, 115, 115, .78);
  box-shadow: 0 0 0 4px rgba(255, 115, 115, .09);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: .9rem 0 1.55rem;
  color: #d8ded8;
  font-size: .95rem;
}

.form-row a,
.signup-copy a { color: var(--color-primary); font-weight: 800; }

.check-line {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: .65rem;
  cursor: pointer;
}

.check-line input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-line span {
  display: grid;
  place-items: center;
  width: 1.28rem;
  height: 1.28rem;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: .35rem;
  background: rgba(255, 255, 255, .055);
}

.check-line input:checked + span {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.check-line input:checked + span::before {
  content: "";
  width: .55rem;
  height: .3rem;
  border-left: 2px solid var(--color-primary-ink);
  border-bottom: 2px solid var(--color-primary-ink);
  transform: rotate(-45deg) translateY(-1px);
}

.primary-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 100%;
  min-height: 3.75rem;
  color: var(--color-primary-ink);
  background: linear-gradient(180deg, #d9ff31, var(--color-primary-strong));
  border: 0;
  border-radius: var(--radius-control);
  font-weight: 800;
  box-shadow: 0 0 30px rgba(202, 255, 36, .24);
  transition: transform 180ms var(--ease-out), filter 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.primary-button:hover { filter: brightness(1.05); box-shadow: 0 0 38px rgba(202, 255, 36, .32); }
.primary-button:active { transform: translateY(1px) scale(.997); }
.primary-button:disabled { cursor: wait; filter: saturate(.8) brightness(.82); }

.button-loader {
  display: none;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid rgba(17, 24, 0, .25);
  border-top-color: var(--color-primary-ink);
  border-radius: 50%;
  animation: spin 850ms linear infinite;
}

.primary-button.loading .button-label { display: none; }
.primary-button.loading .button-loader { display: block; }

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.1rem 0 1.2rem;
  color: var(--color-muted);
  font-size: .9rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, .1);
}

.social-row {
  display: flex;
  justify-content: center;
  gap: 1.1rem;
}

.social-row button {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  color: var(--color-accent);
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  transition: color 180ms var(--ease-out), border-color 180ms var(--ease-out), background 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.social-row button:nth-child(2) { color: #37b9ff; }
.social-row button:hover { transform: translateY(-2px); border-color: rgba(202, 255, 36, .35); background: rgba(202, 255, 36, .055); }
.social-row svg { width: 1.55rem; height: 1.55rem; }

.signup-copy {
  margin: 2rem 0 0;
  color: #d9dfda;
  text-align: center;
}

.page-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem 1.05rem;
  width: min(100%, 32rem);
  margin-top: 2.1rem;
  color: #737d77;
  font-size: .86rem;
}

.page-links a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.page-links a + a::before {
  content: "";
  width: 1px;
  height: .8rem;
  margin-right: 1.05rem;
  background: rgba(255, 255, 255, .14);
}

:focus-visible {
  outline: 3px solid var(--color-ring);
  outline-offset: 3px;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1120px) {
  .login-shell {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.4rem;
  }

  .brand-panel {
    min-height: auto;
    padding-bottom: 0;
  }

  .hero-copy { margin-top: 2.5rem; }

  .feature-stack {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }

  .feature-item {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    background: rgba(255, 255, 255, .025);
  }

  .core-visual {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(100%, 44rem);
    margin: -1rem auto -2rem;
  }

  .trust-strip { width: 100%; margin-top: 2rem; }

  .auth-panel { align-content: start; padding-bottom: 1.5rem; }
}

@media (max-width: 720px) {
  .login-shell { padding: 1rem; }

  .brand-header { min-height: 3.5rem; }
  .logo { width: 2.8rem; height: 2.8rem; border-radius: 14px 14px 18px 18px; }
  .brand-name { font-size: 1.22rem; }
  .brand-tagline { font-size: .78rem; }

  .hero-copy { margin-top: 2rem; }
  .hero-copy h1 { font-size: 2.35rem; }
  .hero-copy p { font-size: 1.08rem; }

  .feature-stack { grid-template-columns: 1fr; margin-top: 2rem; }
  .feature-item { grid-template-columns: 3rem minmax(0, 1fr); }

  .core-visual { opacity: .72; margin: -.5rem auto -1rem; }

  .trust-strip {
    grid-template-columns: 1fr;
    gap: .9rem;
  }

  .trust-strip div + div {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding-top: .9rem;
  }

  .login-card { padding: 2rem 1.1rem 1.7rem; }
  .login-tabs { gap: 2rem; margin-top: 1.7rem; }
  .form-row { align-items: flex-start; }
  .page-links a + a::before { display: none; }
}

@media (max-width: 420px) {
  .brand-mark { gap: .7rem; }
  .brand-edition { height: 1.4rem; font-size: .8rem; }
  .hero-copy h1 { font-size: 2rem; }
  .login-card { border-radius: 18px; }
  .input-shell { min-height: 3.4rem; }
  .social-row button { width: 3.5rem; height: 3.5rem; }
}

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

.logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Future video stage: .hero-stage is the permanent slot; current img is only a poster fallback. Replace .hero-stage-media with muted autoplay loop video/canvas/three.js later. */
.hero-copy,
.feature-stack,
.trust-strip {
  position: relative;
  z-index: 2;
}

.hero-stage {
  z-index: 1;
  right: clamp(-4rem, -3vw, -1.5rem);
  bottom: 7.4rem;
  width: min(46vw, 43rem);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  opacity: .9;
  filter: drop-shadow(0 1.8rem 4rem rgba(0, 0, 0, .5));
  mask-image: radial-gradient(ellipse at 58% 52%, black 42%, rgba(0, 0, 0, .75) 58%, transparent 76%);
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 14% 8% 6%;
  background: radial-gradient(circle at 58% 54%, rgba(202, 255, 36, .28), transparent 48%);
  filter: blur(30px);
  opacity: .65;
  pointer-events: none;
}

.hero-stage-media,
.hero-stage video,
.hero-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-stage-media {
  mix-blend-mode: screen;
}

@media (max-width: 1120px) {
  .hero-stage {
    width: min(100%, 42rem);
    aspect-ratio: 16 / 9;
    margin: .25rem auto -1rem;
    opacity: .82;
    mask-image: radial-gradient(ellipse at 52% 50%, black 40%, rgba(0, 0, 0, .7) 58%, transparent 78%);
  }
}

@media (max-width: 720px) {
  .hero-stage {
    width: min(100%, 28rem);
    margin: .75rem auto -.25rem;
    opacity: .58;
  }
}

/* Desktop one-screen lock for the login surface. */
@media (min-width: 1121px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }

  .login-shell {
    height: 100dvh;
    min-height: 760px;
    padding-top: clamp(1.25rem, 2.4vh, 2.25rem);
    padding-bottom: clamp(1rem, 2vh, 1.75rem);
    align-items: stretch;
  }

  .brand-panel {
    grid-template-rows: auto auto auto auto;
  }

  .brand-header {
    min-height: 3.8rem;
  }

  .hero-copy {
    margin-top: clamp(3rem, 8vh, 5.9rem);
  }

  .hero-copy h1 {
    font-size: clamp(3.2rem, 4.25vw, 4.9rem);
  }

  .hero-copy p {
    margin-top: .9rem;
    font-size: clamp(1.2rem, 1.55vw, 1.55rem);
  }

  .feature-stack {
    gap: clamp(1.35rem, 3.3vh, 2.55rem);
    margin-top: clamp(3.2rem, 8.5vh, 5.5rem);
  }

  .core-visual {
    bottom: clamp(4.7rem, 8vh, 7.1rem);
    width: min(40vw, 43rem);
  }

  .hero-stage {
    bottom: clamp(4.7rem, 8vh, 7.1rem);
    width: min(39vw, 42rem);
  }

  .trust-strip {
    margin-top: clamp(2.6rem, 5.8vh, 4.2rem);
  }

  .auth-panel {
    align-content: center;
  }

  .login-card {
    width: min(100%, 32rem);
    padding-top: clamp(2rem, 3.5vh, 3rem);
    padding-bottom: clamp(1.45rem, 2.3vh, 2rem);
  }

  .card-heading p {
    margin-top: .65rem;
  }

  .login-tabs {
    margin-top: clamp(1.4rem, 3.1vh, 2rem);
    margin-bottom: clamp(1.1rem, 2.4vh, 1.45rem);
  }

  .field-group {
    margin-top: .72rem;
  }

  .input-shell {
    min-height: 3.28rem;
  }

  .form-row {
    margin-top: .45rem;
    margin-bottom: 1rem;
  }

  .primary-button {
    min-height: 3.28rem;
  }

  .divider {
    margin-top: 1.35rem;
    margin-bottom: .85rem;
  }

  .social-row button {
    width: 3.45rem;
    height: 3.45rem;
  }

  .signup-copy {
    margin-top: 1.25rem;
  }

  .page-links {
    margin-top: 1rem;
  }
}

@media (min-width: 1121px) and (max-height: 820px) {
  .login-shell {
    min-height: 680px;
  }

  .hero-copy {
    margin-top: 2.4rem;
  }

  .feature-stack {
    gap: 1.25rem;
    margin-top: 2.5rem;
  }

  .feature-icon {
    width: 2.65rem;
    height: 2.65rem;
  }

  .feature-item {
    grid-template-columns: 2.65rem minmax(0, 1fr);
  }

  .hero-stage,
  .core-visual {
    width: min(36vw, 38rem);
    bottom: 4.2rem;
  }

  .trust-strip {
    margin-top: 2rem;
    padding: .75rem .9rem;
  }

  .login-card {
    padding-top: 1.65rem;
    padding-bottom: 1.35rem;
  }

  .card-heading h2 {
    font-size: 2rem;
  }

  .login-tabs {
    margin-top: 1rem;
    margin-bottom: .85rem;
  }

  .field-group label:not(.check-line) {
    margin-bottom: .32rem;
  }

  .input-shell,
  .primary-button {
    min-height: 3rem;
  }

  .field-error {
    min-height: .8rem;
    margin-top: .22rem;
  }

  .divider {
    margin-top: 1rem;
    margin-bottom: .65rem;
  }

  .social-row button {
    width: 3.1rem;
    height: 3.1rem;
  }

  .signup-copy,
  .page-links {
    margin-top: .75rem;
  }
}

/* Third-party login removed for this version. */
.divider,
.social-row {
  display: none;
}

/* Polish: integrate the G.1 visual as a background-grade stage, not a rectangular poster. */
@media (min-width: 1121px) {
  .brand-panel {
    isolation: isolate;
  }

  .auth-panel {
    position: relative;
    z-index: 4;
  }

  .hero-copy,
  .feature-stack,
  .trust-strip {
    z-index: 3;
  }

  .hero-stage,
  .core-visual.hero-stage {
    position: fixed;
    left: clamp(31rem, 42vw, 52rem);
    top: 54%;
    right: auto;
    bottom: auto;
    width: min(40vw, 43rem);
    max-width: 720px;
    min-width: 470px;
    transform: translate(-50%, -42%);
    z-index: 1;
    opacity: .72;
    pointer-events: none;
    overflow: visible;
    background: transparent;
    filter: saturate(1.08) contrast(1.06) drop-shadow(0 2.2rem 4.5rem rgba(0, 0, 0, .58));
    -webkit-mask-image: radial-gradient(ellipse at 54% 53%, #000 0 36%, rgba(0, 0, 0, .82) 49%, rgba(0, 0, 0, .28) 64%, transparent 78%);
    mask-image: radial-gradient(ellipse at 54% 53%, #000 0 36%, rgba(0, 0, 0, .82) 49%, rgba(0, 0, 0, .28) 64%, transparent 78%);
  }

  .hero-stage::before {
    inset: 6% 4% 0;
    background:
      radial-gradient(circle at 54% 58%, rgba(202, 255, 36, .42), transparent 34%),
      radial-gradient(ellipse at 50% 62%, rgba(92, 255, 133, .16), transparent 56%);
    filter: blur(42px);
    opacity: .75;
  }

  .hero-stage::after {
    content: "";
    position: absolute;
    inset: -18%;
    background: radial-gradient(ellipse at 52% 55%, transparent 34%, rgba(5, 11, 10, .44) 64%, rgba(5, 11, 10, .88) 86%);
    pointer-events: none;
    mix-blend-mode: multiply;
  }

  .hero-stage-media {
    opacity: .95;
    mix-blend-mode: screen;
    -webkit-mask-image: radial-gradient(ellipse at 54% 53%, #000 0 38%, rgba(0, 0, 0, .76) 55%, transparent 76%);
    mask-image: radial-gradient(ellipse at 54% 53%, #000 0 38%, rgba(0, 0, 0, .76) 55%, transparent 76%);
  }

  .feature-stack {
    width: min(25rem, 43%);
  }

  .trust-strip {
    width: min(30rem, 54%);
  }
}

@media (min-width: 1121px) and (max-width: 1500px) {
  .hero-stage,
  .core-visual.hero-stage {
    left: 43vw;
    top: 55%;
    width: min(38vw, 40rem);
    min-width: 430px;
    opacity: .66;
  }
}

@media (min-width: 1121px) and (max-height: 820px) {
  .hero-stage,
  .core-visual.hero-stage {
    left: 42vw;
    top: 57%;
    width: min(34vw, 37rem);
    min-width: 390px;
    opacity: .62;
  }
}


/* Polish final: real logo proportions + future video stage proportions. */
.logo {
  width: 3.25rem;
  height: 3.9rem;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  filter: drop-shadow(0 0 10px rgba(202, 255, 36, .26));
}

@media (min-width: 1121px) {
  .brand-mark {
    align-items: center;
  }

  .hero-stage,
  .core-visual.hero-stage {
    aspect-ratio: 21 / 9;
    left: clamp(34rem, 43.5vw, 54rem);
    top: 56%;
    width: min(45vw, 50rem);
    min-width: 560px;
    transform: translate(-50%, -50%);
    opacity: .64;
    overflow: visible;
    -webkit-mask-image: radial-gradient(ellipse at 54% 52%, #000 0 30%, rgba(0, 0, 0, .78) 45%, rgba(0, 0, 0, .2) 62%, transparent 76%);
    mask-image: radial-gradient(ellipse at 54% 52%, #000 0 30%, rgba(0, 0, 0, .78) 45%, rgba(0, 0, 0, .2) 62%, transparent 76%);
  }

  .hero-stage-media,
  .hero-stage video,
  .hero-stage canvas {
    object-fit: contain;
  }

  .hero-stage-media {
    -webkit-mask-image: radial-gradient(ellipse at 54% 52%, #000 0 32%, rgba(0, 0, 0, .72) 47%, transparent 72%);
    mask-image: radial-gradient(ellipse at 54% 52%, #000 0 32%, rgba(0, 0, 0, .72) 47%, transparent 72%);
  }
}

@media (min-width: 1121px) and (max-width: 1500px) {
  .hero-stage,
  .core-visual.hero-stage {
    left: 43.5vw;
    top: 56%;
    width: min(42vw, 45rem);
    min-width: 500px;
  }
}

@media (min-width: 1121px) and (max-height: 820px) {
  .hero-stage,
  .core-visual.hero-stage {
    left: 43vw;
    top: 58%;
    width: min(39vw, 42rem);
    min-width: 460px;
    opacity: .58;
  }
}

@media (max-width: 720px) {
  .logo {
    width: 2.8rem;
    height: 3.35rem;
  }
}

/* Polish final: enlarge G.1 engine visual while keeping it as a future video stage. */
@media (min-width: 1121px) {
  .hero-stage,
  .core-visual.hero-stage {
    width: min(52vw, 58rem);
    min-width: 650px;
    left: clamp(37rem, 45vw, 59rem);
    top: 56%;
    opacity: .7;
  }
}

@media (min-width: 1121px) and (max-width: 1500px) {
  .hero-stage,
  .core-visual.hero-stage {
    width: min(48vw, 52rem);
    min-width: 580px;
    left: 45vw;
  }
}

@media (min-width: 1121px) and (max-height: 820px) {
  .hero-stage,
  .core-visual.hero-stage {
    width: min(44vw, 48rem);
    min-width: 520px;
    left: 44.5vw;
    top: 58%;
    opacity: .64;
  }
}

/* Polish final: hero/video stage matches the large red-frame composition. */
@media (min-width: 1121px) {
  .hero-stage,
  .core-visual.hero-stage {
    position: fixed;
    left: 7.2vw;
    top: 10vh;
    width: 70.8vw;
    height: 82.8vh;
    min-width: 0;
    max-width: none;
    aspect-ratio: auto;
    transform: none;
    opacity: .58;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(ellipse at 50% 53%, #000 0 42%, rgba(0, 0, 0, .7) 58%, rgba(0, 0, 0, .22) 74%, transparent 92%);
    mask-image: radial-gradient(ellipse at 50% 53%, #000 0 42%, rgba(0, 0, 0, .7) 58%, rgba(0, 0, 0, .22) 74%, transparent 92%);
  }

  .hero-stage-media,
  .hero-stage video,
  .hero-stage canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  .hero-stage-media {
    opacity: .96;
    -webkit-mask-image: radial-gradient(ellipse at 50% 53%, #000 0 43%, rgba(0, 0, 0, .72) 60%, transparent 86%);
    mask-image: radial-gradient(ellipse at 50% 53%, #000 0 43%, rgba(0, 0, 0, .72) 60%, transparent 86%);
  }

  .hero-stage::before {
    inset: 8% 12% 8% 18%;
    background:
      radial-gradient(circle at 52% 55%, rgba(202, 255, 36, .46), transparent 28%),
      radial-gradient(ellipse at 48% 56%, rgba(202, 255, 36, .22), transparent 58%);
    filter: blur(58px);
    opacity: .72;
  }

  .hero-stage::after {
    inset: 0;
    background: radial-gradient(ellipse at 50% 54%, transparent 34%, rgba(5, 11, 10, .24) 62%, rgba(5, 11, 10, .92) 95%);
  }
}

@media (min-width: 1121px) and (max-height: 820px) {
  .hero-stage,
  .core-visual.hero-stage {
    left: 7vw;
    top: 9.5vh;
    width: 70vw;
    height: 83vh;
    opacity: .54;
  }
}

/* Video integration polish: MP4 is now primary, poster remains fallback. */
.hero-stage video.hero-stage-media {
  display: block;
  border: 0;
  background: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .hero-stage video.hero-stage-media {
    animation: none;
  }
}

/* Temporarily hide phone login until the flow is ready. */
.tab-button[data-login-mode="phone"] {
  display: none;
}

.login-tabs {
  gap: 0;
}

/* Decrypted title effect: inherits existing title typography, color, size, and position. */
.hero-copy h1 .title-white {
  color: var(--color-foreground);
}

.decrypt-text {
  font: inherit;
  letter-spacing: inherit;
}

.decrypt-text.is-encrypted {
  text-shadow: 0 0 14px rgba(202, 255, 36, .22);
}

/* Stabilize decrypted title layout: each character keeps its original slot width. */
.decrypt-text {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  vertical-align: baseline;
}

.decrypt-char {
  display: inline-block;
  text-align: center;
  line-height: inherit;
  font: inherit;
  color: inherit;
  transform: translateZ(0);
}

.decrypt-char.space {
  text-align: left;
}

/* Keep the second hero title line white during and after decrypted animation. */
.hero-copy h1 .title-white,
.hero-copy h1 .title-white .decrypt-char {
  color: #f4f7f2 !important;
}

/* Polish brand lockup alignment. */
.brand-mark {
  gap: .85rem;
  align-items: flex-end;
}

.logo {
  flex: 0 0 auto;
  width: 3rem;
  height: 3.45rem;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: .22rem;
}

.brand-title-row {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  white-space: nowrap;
}

.brand-name {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  font-size: 1.52rem;
  white-space: nowrap;
}

.brand-edition {
  flex: 0 0 auto;
  margin-left: 0;
  height: 1.48rem;
  padding: 0 .42rem;
  border-radius: .42rem;
  font-size: .9rem;
  line-height: 1;
}

.brand-tagline {
  line-height: 1.15;
  font-size: .82rem;
}

.hero-version {
  margin-left: .72rem;
  vertical-align: .38em;
}

@media (max-width: 720px) {
  .brand-mark {
    gap: .7rem;
  }

  .logo {
    width: 2.65rem;
    height: 3.05rem;
  }

  .brand-name {
    font-size: 1.2rem;
  }

  .brand-edition {
    height: 1.28rem;
    font-size: .78rem;
  }

  .brand-title-row {
    gap: .4rem;
  }

  .hero-version {
    margin-left: .48rem;
    vertical-align: .28em;
  }
}

/* G1.2 auth mode additions */
.code-button {
  width: auto;
  min-width: 4rem;
  padding: 0 .72rem;
  color: var(--color-primary);
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}

.register-only.check-line {
  margin-top: .9rem;
  color: var(--color-muted);
  font-size: .9rem;
  line-height: 1.5;
}

.register-only.check-line a {
  color: var(--color-primary);
  font-weight: 800;
}

/* Register form composition fixes */
body[data-auth-mode="register"] .auth-panel,
body[data-auth-mode="reset"] .auth-panel {
  align-items: center;
}

body[data-auth-mode="register"] .login-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1rem;
  row-gap: .58rem;
  width: min(100%, 40rem);
  max-height: none;
  overflow: visible;
  padding: 1.55rem 2.05rem 1.25rem;
}

body[data-auth-mode="register"] .card-heading,
body[data-auth-mode="register"] .login-tabs,
body[data-auth-mode="register"] .form-row,
body[data-auth-mode="register"] .register-only.check-line,
body[data-auth-mode="register"] .primary-button,
body[data-auth-mode="register"] .signup-copy {
  grid-column: 1 / -1;
}

body[data-auth-mode="register"] .card-heading {
  margin-bottom: .22rem;
  text-align: center;
}

body[data-auth-mode="register"] .card-heading h2 {
  font-size: 2.35rem;
  line-height: 1.02;
}

body[data-auth-mode="register"] .card-heading p {
  margin-top: .34rem;
}

body[data-auth-mode="register"] .login-tabs {
  justify-content: center;
  margin-top: .34rem;
}

body[data-auth-mode="register"] .field-group {
  margin-top: 0;
}

body[data-auth-mode="register"] .field-group label:not(.check-line) {
  margin-bottom: .26rem;
  font-size: .84rem;
}

body[data-auth-mode="register"] .input-shell {
  min-height: 2.78rem;
  border-radius: .72rem;
}

body[data-auth-mode="register"] .input-shell input {
  font-size: .91rem;
}

body[data-auth-mode="register"] .code-button {
  min-width: 3.55rem;
  padding-inline: .52rem;
}

body[data-auth-mode="register"] .field-error {
  min-height: .66rem;
  margin-top: .1rem;
  font-size: .72rem;
  line-height: 1.15;
}

body[data-auth-mode="register"] .register-only.check-line {
  justify-self: center;
  margin-top: .06rem;
  font-size: .82rem;
  line-height: 1.35;
}

body[data-auth-mode="register"] .primary-button {
  min-height: 3rem;
  margin-top: .18rem;
}

body[data-auth-mode="register"] .signup-copy {
  margin-top: .15rem;
}

@media (max-width: 980px) {
  body[data-auth-mode="register"] .login-card {
    grid-template-columns: 1fr;
    width: min(100%, 32rem);
    padding: 1.45rem 1.35rem 1.2rem;
  }
}

@media (max-height: 820px) and (min-width: 981px) {
  body[data-auth-mode="register"] .login-card {
    row-gap: .44rem;
    padding-top: 1.12rem;
    padding-bottom: .95rem;
  }

  body[data-auth-mode="register"] .card-heading h2 {
    font-size: 2rem;
  }

  body[data-auth-mode="register"] .card-heading p {
    margin-top: .2rem;
    font-size: .88rem;
  }

  body[data-auth-mode="register"] .input-shell {
    min-height: 2.52rem;
  }

  body[data-auth-mode="register"] .field-error {
    min-height: .5rem;
  }

  body[data-auth-mode="register"] .primary-button {
    min-height: 2.72rem;
  }
}

/* Auth mode visibility guards */
[hidden],
body[data-auth-mode="reset"] .form-row,
body[data-auth-mode="reset"] .register-only,
body[data-auth-mode="register"] .form-row {
  display: none !important;
}
