/* ---------- design tokens (mirrors tailwind.config.ts) ---------- */
:root {
  --base: #121212;
  --elevated: #242424;
  --surface: #242424;
  --surface-light: #2e2e2e;
  --line: #333333;
  --ink: #ffffff;
  --ink-secondary: #d9d9e0;
  --muted: #b0afbe;
  --accent: #5e2d91;
  --accent-light: #7b47b5;
  --accent-dark: #3d1d6b;
  --mint: #009999;
  --mint-light: #1fb8b8;
  --danger: #ff5a5a;
}

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

html,
body {
  margin: 0;
  padding: 0;
  background: var(--base);
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-size: 18px;
  line-height: 1.5;
  min-height: 100svh;
  min-height: 100dvh;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ---------- layout: split (mirrors register) ---------- */
.layout {
  display: flex;
  min-height: 100svh;
  min-height: 100dvh;
}

/* Left: decorative hero image (≥ lg / 1024px) */
.hero {
  position: relative;
  display: none;
  width: 50%;
  overflow: hidden;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Side fade: subtle base wash, transparent toward the right where it meets the panel */
.hero__overlay--side {
  background: linear-gradient(
    to right,
    rgba(18, 18, 18, 0.45),
    rgba(18, 18, 18, 0.15) 60%,
    transparent
  );
}

/* Vertical: slight darken at top and bottom for cinematic framing */
.hero__overlay--vertical {
  background: linear-gradient(
    to bottom,
    rgba(18, 18, 18, 0.35),
    transparent 25%,
    transparent 70%,
    rgba(18, 18, 18, 0.45)
  );
}

/* Right: brand + copy + signup */
.panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  background: var(--base);
}

.panel__body {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  padding: 48px 24px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- brand ---------- */
.panel__logo {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 32px;
  user-select: none;
}

/* ---------- copy ---------- */
.title {
  margin: 0;
  font-size: 33.5px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.subtitle {
  margin: 8px 0 0;
  font-size: 15.5px;
  line-height: 22px;
  color: var(--muted);
}

/* ---------- features (relocated from the left hero) ---------- */
.features {
  margin-top: 32px;
}

.features__heading {
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.features__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15.5px;
  line-height: 22px;
  color: var(--ink-secondary);
}

.features__list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.features__check {
  margin-top: 2px;
  color: var(--mint-light);
  font-weight: 600;
}

/* ---------- form (mirrors register input + button styling) ---------- */
.signup {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.signup__label {
  display: block;
  font-size: 15.5px;
  line-height: 22px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.signup__input {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 2px;
  font: inherit;
  font-size: 15.5px;
  line-height: 22px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.signup__input::placeholder {
  color: var(--muted);
}

.signup__input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.signup__status {
  min-height: 18px;
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 18px;
  color: var(--muted);
}

.signup__status[data-tone="success"] {
  color: var(--mint-light);
}

.signup__status[data-tone="error"] {
  color: var(--danger);
}

.signup__submit {
  position: relative;
  width: 100%;
  margin-top: 14px;
  padding: 12px 18px;
  background: var(--accent);
  color: #ffffff;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 15.5px;
  line-height: 22px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.signup__submit:hover {
  background: var(--accent-dark);
}

.signup__submit:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

.signup__submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

.signup__spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.signup[data-state="loading"] .signup__spinner {
  display: inline-block;
}

.signup[data-state="done"] .signup__label,
.signup[data-state="done"] .signup__input,
.signup[data-state="done"] .signup__submit {
  display: none;
}

.signup[data-state="done"] .signup__status {
  margin-top: 0;
  font-size: 15.5px;
  line-height: 22px;
}

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

/* ---------- bottom strip (mirrors register's footer) ---------- */
.panel__bottom {
  border-top: 1px solid var(--line);
  padding: 20px 24px;
}

.panel__bottom p {
  margin: 0 auto;
  max-width: 28rem;
  text-align: center;
  font-size: 13.5px;
  line-height: 18px;
  color: var(--muted);
}

/* ---------- responsive (lg = 1024px) ---------- */
@media (min-width: 1024px) {
  .hero {
    display: block;
  }

  .panel {
    width: 50%;
  }

  .panel__body {
    padding: 64px 40px;
  }
}

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