:root {
  --ink: #17191c;
  --paper: #ffffff;
  --mist: #f2f2f3;
  --fog: #fafafb;
  --slate: #777b86;
  --ash: #979799;
  --smoke: #a3a6af;
  --peach: #fbe1d1;
  --sienna: #5d2a1a;
  --line: #ececec;
  --ok: #2f7a4f;
  --err: #b42318;
  --radius-card: 24px;
  --radius-artifact: 20px;
  --radius-input: 16px;
  --radius-pill: 9999px;
  --font: "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --display: "Segoe UI Semibold", "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, sans-serif;
  --shadow-artifact:
    0 0 0 1px rgba(4, 23, 43, 0.05),
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.35;
  color: var(--ink);
  background: var(--paper);
}

button,
input {
  font: inherit;
}

.page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(251, 225, 209, 0.35), transparent 55%),
    var(--fog);
}

.bg-motion {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-motion__grid {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(rgba(23, 25, 28, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 25, 28, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
  animation: grid-drift 28s linear infinite;
}

.bg-motion__line {
  position: absolute;
  height: 1px;
  border-radius: 9999px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(23, 25, 28, 0.12),
    rgba(251, 225, 209, 0.75),
    rgba(23, 25, 28, 0.12),
    transparent
  );
  animation: line-slide linear infinite;
}

.bg-motion__line--1 {
  top: 18%;
  left: -20%;
  width: 55%;
  animation-duration: 16s;
}

.bg-motion__line--2 {
  top: 36%;
  left: -30%;
  width: 70%;
  opacity: 0.7;
  animation-duration: 22s;
  animation-delay: -4s;
}

.bg-motion__line--3 {
  top: 58%;
  left: -25%;
  width: 60%;
  animation-duration: 18s;
  animation-delay: -8s;
}

.bg-motion__line--4 {
  top: 74%;
  left: -35%;
  width: 80%;
  opacity: 0.55;
  animation-duration: 26s;
  animation-delay: -2s;
}

.bg-motion__line--5 {
  top: 88%;
  left: -15%;
  width: 45%;
  animation-duration: 14s;
  animation-delay: -6s;
}

.bg-motion__orbit {
  position: absolute;
  border: 1px solid rgba(23, 25, 28, 0.08);
  border-radius: 50%;
  animation: orbit-spin linear infinite;
}

.bg-motion__orbit--1 {
  width: 420px;
  height: 420px;
  top: -80px;
  right: -100px;
  border-color: rgba(93, 42, 26, 0.08);
  animation-duration: 40s;
}

.bg-motion__orbit--2 {
  width: 280px;
  height: 280px;
  bottom: 8%;
  left: -60px;
  animation-duration: 32s;
  animation-direction: reverse;
}

.bg-motion__orbit--1::before,
.bg-motion__orbit--2::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--peach);
  box-shadow: 0 0 0 3px rgba(251, 225, 209, 0.45);
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
}

.bg-motion__dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(23, 25, 28, 0.18);
  animation: dot-float ease-in-out infinite;
}

.bg-motion__dot--1 {
  top: 22%;
  left: 12%;
  animation-duration: 7s;
}

.bg-motion__dot--2 {
  top: 48%;
  right: 14%;
  width: 8px;
  height: 8px;
  background: rgba(93, 42, 26, 0.2);
  animation-duration: 9s;
  animation-delay: -2s;
}

.bg-motion__dot--3 {
  bottom: 18%;
  left: 42%;
  animation-duration: 8s;
  animation-delay: -4s;
}

@keyframes line-slide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(55vw);
  }
}

@keyframes grid-drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(64px, 32px);
  }
}

@keyframes orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes dot-float {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  50% {
    transform: translateY(-18px);
    opacity: 0.9;
  }
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 64px 24px 80px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: start;
  animation: enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  padding-top: 8px;
}

.brand__title {
  margin: 0;
  font-family: var(--display);
  font-style: normal;
  font-weight: 700;
  font-size: clamp(44px, 8vw, 90px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-wrap: balance;
}

.brand__lead {
  margin: 20px 0 0;
  max-width: 36ch;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.009em;
  color: var(--slate);
  text-wrap: pretty;
}

.brand__points {
  margin: 32px 0 0;
  padding: 20px;
  list-style: none;
  display: grid;
  gap: 12px;
  background: var(--mist);
  border-radius: var(--radius-card);
}

.brand__points li {
  position: relative;
  padding-left: 18px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
}

.brand__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--ink);
}

.peach-card {
  margin-top: 24px;
  padding: 20px;
  background: var(--peach);
  border-radius: var(--radius-card);
  color: var(--sienna);
}

.peach-card__label {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--sienna);
  opacity: 0.75;
}

.peach-card__text {
  margin: 8px 0 16px;
  font-size: 16px;
  line-height: 1.45;
  text-wrap: pretty;
}

.integrations__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.integration {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  color: var(--sienna);
  cursor: default;
  user-select: none;
}

.integration img {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
  outline: 1px solid rgba(0, 0, 0, 0.08);
  outline-offset: -1px;
}

.integration span {
  font-size: 14px;
  font-weight: 450;
}

.artifact {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius-artifact);
  box-shadow: var(--shadow-artifact);
  padding: 20px 20px 24px;
  animation: auth-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
  transition-property: transform, box-shadow;
  transition-duration: 280ms;
  transition-timing-function: ease-out;
}

.artifact:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px rgba(4, 23, 43, 0.05),
    0 28px 40px -8px rgba(0, 0, 0, 0.12),
    0 12px 16px -8px rgba(0, 0, 0, 0.08);
}

@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 24px;
  padding: 4px;
  background: var(--mist);
  border-radius: var(--radius-pill);
  animation: auth-fade 0.55s ease-out 0.28s both;
}

.auth__tab {
  position: relative;
  border: 0;
  border-radius: var(--radius-pill);
  min-height: 40px;
  padding: 8px 16px;
  background: transparent;
  color: var(--slate);
  font-size: 15px;
  font-weight: 450;
  cursor: pointer;
  transition-property: color, background-color, transform, box-shadow;
  transition-duration: 180ms;
  transition-timing-function: ease-out;
}

.auth__tab:hover {
  color: var(--ink);
}

.auth__tab.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 0 0 1px rgba(4, 23, 43, 0.04);
}

.auth__tab:active {
  transform: scale(0.97);
}

.auth__panel {
  transform-origin: top center;
}

.auth__panel[hidden] {
  display: none;
}

.auth__panel.is-entering {
  animation: panel-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth__panel.is-leaving {
  animation: panel-out 0.22s ease-in both;
  pointer-events: none;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes panel-out {
  from {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
    filter: blur(3px);
  }
}

@keyframes auth-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth__title {
  margin: 0;
  font-family: var(--display);
  font-style: normal;
  font-weight: 600;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}

.auth__subtitle {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--slate);
  text-wrap: pretty;
}

.auth__panel.is-entering .auth__title,
.auth__panel.is-active:not(.is-leaving) .auth__title {
  animation: auth-fade 0.45s ease-out both;
}

.auth__panel.is-entering .auth__subtitle {
  animation: auth-fade 0.45s ease-out 0.05s both;
}

.form {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.auth__panel.is-entering .field,
.auth__panel.is-entering .field-row,
.auth__panel.is-entering .form__message,
.auth__panel.is-entering .btn-row {
  animation: field-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth__panel.is-entering .field:nth-child(1),
.auth__panel.is-entering .field-row {
  animation-delay: 0.08s;
}

.auth__panel.is-entering .field:nth-child(2) {
  animation-delay: 0.14s;
}

.auth__panel.is-entering .field:nth-child(3) {
  animation-delay: 0.2s;
}

.auth__panel.is-entering .field:nth-child(4) {
  animation-delay: 0.26s;
}

.auth__panel.is-entering .form__message {
  animation-delay: 0.28s;
}

.auth__panel.is-entering .btn-row {
  animation-delay: 0.32s;
}

@keyframes field-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: grid;
  gap: 8px;
}

.field__label {
  font-size: 14px;
  font-weight: 450;
  color: var(--slate);
  transition-property: color;
  transition-duration: 150ms;
}

.field:focus-within .field__label {
  color: var(--ink);
}

.field__input {
  width: 100%;
  min-height: 52px;
  padding: 16px;
  border-radius: var(--radius-input);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  outline: none;
  transition-property: border-color, box-shadow, background-color, transform;
  transition-duration: 180ms;
  transition-timing-function: ease-out;
}

select.field__input {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--slate) 50%),
    linear-gradient(135deg, var(--slate) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 2px),
    calc(100% - 14px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
  cursor: pointer;
}

.field__input::placeholder {
  color: var(--smoke);
}

.field__input:hover {
  background: var(--fog);
}

.field__input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(23, 25, 28, 0.07);
  background: var(--paper);
  transform: translateY(-1px);
}

.form__message {
  min-height: 1.25em;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.form__message.is-error {
  color: var(--err);
  animation: msg-shake 0.4s ease-out;
}

.form__message.is-success {
  color: var(--ok);
  animation: msg-pop 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes msg-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

@keyframes msg-pop {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition-property: transform, background-color, color, border-color, opacity, box-shadow;
  transition-duration: 180ms;
  transition-timing-function: ease-out;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.btn--filled {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.btn--filled::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.14) 48%,
    transparent 66%
  );
  transform: translateX(-120%);
  transition: none;
}

.btn--filled:hover {
  background: #2a2d32;
  border-color: #2a2d32;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -10px rgba(23, 25, 28, 0.55);
}

.btn--filled:hover::after {
  animation: btn-shine 0.7s ease-out;
}

@keyframes btn-shine {
  to {
    transform: translateX(120%);
  }
}

.btn--ghost {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--mist);
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 20px 64px;
  }

  .brand__title {
    font-size: clamp(44px, 14vw, 64px);
    letter-spacing: -0.015em;
  }

  .auth__title {
    font-size: 32px;
  }
}

@media (max-width: 520px) {
  .shell {
    padding: 32px 16px 48px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .btn-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .integration span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shell,
  .artifact,
  .auth__tabs,
  .auth__panel.is-entering,
  .auth__panel.is-leaving,
  .auth__panel.is-entering .auth__title,
  .auth__panel.is-entering .auth__subtitle,
  .auth__panel.is-entering .field,
  .auth__panel.is-entering .field-row,
  .auth__panel.is-entering .form__message,
  .auth__panel.is-entering .btn-row,
  .form__message.is-error,
  .form__message.is-success,
  .btn--filled:hover::after,
  .bg-motion__line,
  .bg-motion__grid,
  .bg-motion__orbit,
  .bg-motion__dot {
    animation: none;
  }

  .artifact:hover,
  .field__input:focus,
  .btn--filled:hover,
  .btn--ghost:hover {
    transform: none;
  }
}
