/* ============================================================
   Pulsium · Public landing — mirrors the sign-in atrium design.
   Tokens + atoms are copied from frontend/login.html so the two
   surfaces stay visually identical. Layout adapts to the landing's
   three-field form (First Name / Last Name / Website).
   ============================================================ */

:root {
  --pul-cyan:        #3AD5F4;
  --pul-blue:        #4977E7;
  --pul-violet:      #5630A9;
  --pul-glow:        #B5EAFC;
  --pul-charcoal:    #48434A;

  --pul-ink:         #2A272D;
  --pul-grey-700:    #6B6770;
  --pul-grey-500:    #9E9AA1;
  --pul-grey-300:    #D6D3D8;
  --pul-grey-200:    #E8E6EA;
  --pul-grey-100:    #F2F0F4;
  --pul-grey-50:     #F8F7F9;
  --pul-paper:       #FFFFFF;

  --accent-hover:    #3D67D8;
  --accent-press:    #3358C2;

  --status-success:  #1F9E6E;
  --status-danger:   #D93025;
  --status-danger-bg:#FCE8E6;

  --pul-blue-tint:   #ECF0FE;

  --font-display: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  --font-body:    Arial, 'Helvetica Neue', Helvetica, sans-serif;

  --ease-out:        cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:        120ms;
  --dur-base:        200ms;
  --shadow-glow-blue:0 0 0 4px rgba(73, 119, 231, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  color: #000000;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input { font-family: inherit; }
a { color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ── Atrium shell ──────────────────────────────────────────── */

.atrium {
  width: 100%; min-height: 100%;
  position: relative;
  overflow: hidden;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
}

.atrium__brand {
  position: absolute; top: 28px; left: 56px; z-index: 2;
  display: inline-flex; align-items: center;
  text-decoration: none;
}
.atrium__brand img { height: 40px; width: auto; display: block; }

.atrium__signin {
  position: absolute; top: 28px; right: 56px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 20px;
  border-radius: 999px;
  font-size: 14px; font-weight: 700;
  text-decoration: none;
  /* Surface comes from .glass-btn, then the `.atrium__signin.glass-btn`
     override below quiets it to a secondary light pill (the form's blue
     submit CTA is the primary action). Matches the onboarding wizard. */
}

/* Arrow glides forward on hover. */
.atrium__signin-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px;
  transition: transform 360ms var(--ease-out);
}
.atrium__signin-arrow svg { width: 15px; height: 15px; }
.atrium__signin:hover .atrium__signin-arrow { transform: translateX(5px); }

.atrium__stage {
  display: flex; flex-direction: row; align-items: center; justify-content: center;
  gap: 48px;
  width: 100%; max-width: 1080px; margin: 0 auto;
  padding: 96px 48px 120px;
}

/* ── Right-hand visual pane — the 3D Spline robot, on white ───── */

.atrium__visual-pane {
  position: relative; z-index: 1;
  flex: 1 1 auto;
  min-width: 360px; max-width: 560px;
  display: flex; align-items: center; justify-content: center;
}
.atrium__robot {
  position: relative;
  width: 100%; height: 520px;
  background: #FFFFFF;
  border-radius: 20px;
  overflow: hidden;
}
.atrium__robot canvas {
  display: block;
  width: 100% !important; height: 100% !important;
  outline: none;
}
.atrium__robot-loader {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.loader {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid var(--pul-grey-200);
  border-top-color: var(--pul-blue);
  animation: atrium-spin 0.8s linear infinite;
}
@keyframes atrium-spin { to { transform: rotate(360deg); } }

.atrium__form-pane {
  position: relative; z-index: 1;
  flex-shrink: 0;
  width: 480px; max-width: 100%;
}

.atrium__card {
  width: 100%;
  background: #F7F8FA;
  border: 1px solid #ECEDF0;
  box-shadow:
    0 1px 2px rgba(16,24,40,0.04),
    0 12px 28px -12px rgba(16,24,40,0.10);
  border-radius: 20px;
  padding: 40px 40px 32px;
  display: flex; flex-direction: column; gap: 28px;
}

.atrium__heading {
  display: flex; flex-direction: column; gap: 8px;
}
.atrium__h {
  font-family: var(--font-display);
  font-weight: 700; font-size: 34px;
  line-height: 1.05; letter-spacing: -0.022em;
  color: #000000;
  margin: 0;
}
.atrium__sub {
  font-size: 15px; line-height: 1.5;
  color: #000000;
  margin: 0;
}

.atrium__form { display: flex; flex-direction: column; gap: 18px; }

/* ── Field atoms ───────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-family: var(--font-display);
  font-weight: 500; font-size: 13px;
  letter-spacing: -0.005em; color: #000000;
}
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; min-width: 0; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .icon-leading {
  position: absolute; left: 16px; top: 50%;
  width: 18px; height: 18px;
  transform: translateY(-50%);
  color: var(--pul-grey-500); pointer-events: none;
}
.input {
  width: 100%; height: 48px;
  padding: 0 14px 0 44px;
  background: #fff;
  border: 1px solid var(--pul-grey-300);
  border-radius: 10px;
  font-size: 15px; color: #000000;
  outline: none;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.input::placeholder { color: var(--pul-grey-500); }
.input:hover { border-color: var(--pul-grey-500); }
.input:focus { border-color: var(--pul-blue); box-shadow: var(--shadow-glow-blue); }

/* ── Button ────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; height: 38px; padding: 0 20px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 14px; letter-spacing: -0.005em;
  width: 100%; white-space: nowrap;
  transition: all var(--dur-base) var(--ease-out);
}
.btn svg { width: 15px; height: 15px; }
.btn--primary {
  /* Surface (blue marketing-site pill) + hover/active scale come from
     .glass-btn; this rule only owns the positioning context the
     arrow ghost (::before) rides on. Hug the label like the Sign In
     pill instead of stretching full-width across the form. */
  position: relative; overflow: hidden;
  width: auto;
  align-self: flex-start;
}
.btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Arrow hover animation: the arrow simply glides forward on hover —
   the same clean motion as the Sign In pill, with no trailing ghost. */
.btn__arrow {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  transition: transform 360ms var(--ease-out);
}
.btn__arrow svg { width: 16px; height: 16px; }
.btn--primary:hover:not(:disabled) .btn__arrow { transform: translateX(6px); }
.btn--primary:active:not(:disabled) .btn__arrow { transform: translateX(3px); transition-duration: 120ms; }

/* Submit-in-progress: the arrow swaps to a small spinner in place — the
   label text is left untouched so the button reads the same while the
   draft is created in the background. Toggled by .is-loading on the btn. */
.btn__spinner { display: none; }
.btn.is-loading .btn__arrow-icon { display: none; }
.btn.is-loading .btn__spinner {
  display: block;
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: atrium-spin 0.7s linear infinite;
}

/* ── Button surface (both CTAs) ────────────────────────────────
   The solid Google-blue pill the marketing site (pulsium.ai) uses —
   #1A73E8 fill, white label, white hairline, soft blue glow, darkening
   on hover. Shared by .btn--primary and the Sign In pill; the Sign In
   pill is then quieted to a secondary light pill below so the form's
   submit CTA stays dominant. Matches the onboarding wizard's .btn. */
.glass-btn {
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: #1A73E8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    0 2px 8px rgba(26, 115, 232, 0.28),
    0 12px 26px rgba(26, 115, 232, 0.24);
  transition: transform var(--dur-base) var(--ease-out),
              background-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}
.glass-btn:hover {
  transform: scale(1.03);
  background: #1666d0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 4px 14px rgba(26, 115, 232, 0.36),
    0 16px 32px rgba(26, 115, 232, 0.28);
}
.glass-btn:active { transform: scale(0.98); }

/* The Sign In pill is secondary to the form's blue submit CTA — quiet
   it to a light pill with a subtle border + dark text. */
.atrium__signin.glass-btn {
  color: #000;
  background: var(--pul-paper);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.atrium__signin.glass-btn:hover {
  background: var(--pul-grey-50);
  border-color: rgba(0, 0, 0, 0.20);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}
.glass-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.glass-btn:disabled:active { transform: none; }
.glass-btn > span { position: relative; z-index: 1; }

/* ── Error notice ──────────────────────────────────────────── */

.notice {
  padding: 10px 12px; border-radius: 10px;
  font-size: 13px; line-height: 1.45;
}
.notice--error { background: var(--status-danger-bg); color: var(--status-danger); }

/* ── Responsive ─────────────────────────────────────────────── */

/* Below ~1024px the two-column row would overflow .atrium (overflow:
   hidden) and clip the robot, so drop the pane and centre the form.
   The loader script gates on the same 1024px floor. */
@media (max-width: 1023px) {
  .atrium__visual-pane { display: none; }
}

@media (max-width: 900px) {
  .atrium__brand { top: 20px; left: 24px; }
  .atrium__signin { top: 20px; right: 24px; }
  .atrium__stage { flex-direction: column; max-width: 480px; padding: 72px 20px 120px; gap: 20px; }
  .atrium__form-pane { width: 100%; max-width: 480px; }
  .atrium__card { padding: 32px 28px 28px; border-radius: 16px; }
  .atrium__h { font-size: 30px; }
}

@media (max-width: 560px) {
  .field-row { flex-direction: column; gap: 18px; }
}
