/* ────────────────────────────────────────────
   FRAMELESS — TRIAL REGISTRATION
   Design system: Studio IVR dark tech
   Background: #0D0D12 · Violet: #7C3AED · Magenta: #EC4899
──────────────────────────────────────────── */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ── */
:root {
  --bg:        #0D0D12;
  --surface:   #13131C;
  --surface-2: #1A1A28;
  --border:    rgba(255, 255, 255, 0.08);
  --border-hi: rgba(124, 58, 237, 0.45);

  --violet:    #7C3AED;
  --magenta:   #EC4899;
  --violet-dim: rgba(124, 58, 237, 0.18);
  --magenta-dim: rgba(236, 72, 153, 0.12);

  --text-1:    #F0EFFF;
  --text-2:    rgba(240, 239, 255, 0.55);
  --text-3:    rgba(240, 239, 255, 0.35);

  --grad: linear-gradient(135deg, #7C3AED 0%, #EC4899 100%);
  --grad-text: linear-gradient(135deg, #a78bfa 0%, #f472b6 100%);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --font: 'Inter', -apple-system, sans-serif;
}

/* ── Base ── */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ────────────────────────────────────────────
   BACKGROUND
──────────────────────────────────────────── */

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#grid-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
  animation: glow-drift 12s ease-in-out infinite alternate;
}

.bg-glow--violet {
  width: 700px;
  height: 700px;
  background: #7C3AED;
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.bg-glow--magenta {
  width: 500px;
  height: 500px;
  background: #EC4899;
  bottom: -150px;
  left: -100px;
  animation-delay: -6s;
  opacity: 0.15;
}

@keyframes glow-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.08); }
}

.noise-overlay {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-size: 160px;
  opacity: 0.025;
}

/* ────────────────────────────────────────────
   LAYOUT
──────────────────────────────────────────── */

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 0;
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 48px;
  align-items: center;
}

/* ────────────────────────────────────────────
   LEFT COLUMN — COPY
──────────────────────────────────────────── */

.col-copy {
  padding-right: 72px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 32px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Badge pill */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 99px;
  padding: 6px 14px;
  width: fit-content;
  letter-spacing: 0.02em;
}

.badge-dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7C3AED;
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(124,58,237,0); }
}

/* Headline */
.headline {
  font-size: clamp(44px, 5.5vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: var(--text-1);
}

.headline-time {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.headline-dim {
  color: var(--text-3);
  font-style: italic;
  font-weight: 300;
  display: inline-block;
}

/* Subheadline */
.subheadline {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 52ch;
}

/* Proof list */
.proof-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.5;
}

.proof-item strong {
  color: var(--text-1);
  font-weight: 600;
}

.proof-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Social strip */
.social-strip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatars {
  display: flex;
}

.avatar {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  background: var(--surface-2);
  margin-left: -8px;
}

.avatar:first-child { margin-left: 0; }

.avatar-1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.avatar-2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.avatar-3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.avatar-4 { background: linear-gradient(135deg, #43e97b, #38f9d7); }

.social-text {
  font-size: 13.5px;
  color: var(--text-2);
}

.social-text strong {
  color: var(--text-1);
  font-weight: 600;
}

/* Time compare */
.time-compare {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}

.time-block {
  flex: 1;
}

.time-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 6px;
}

.time-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-2);
  line-height: 1;
  margin-bottom: 8px;
}

.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.time-bar-wrap {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
}

.time-bar {
  height: 100%;
  border-radius: 99px;
}

.time-bar--before {
  width: 100%;
  background: rgba(255,255,255,0.15);
}

.time-bar--after {
  width: 16%;
  background: var(--grad);
}

.time-tools {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.4;
}

.time-divider {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ────────────────────────────────────────────
   RIGHT COLUMN — FORM
──────────────────────────────────────────── */

.col-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Form card */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.1),
    0 32px 80px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Top gradient line on card */
.form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Subtle inner glow */
.form-card::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(124,58,237,0.12) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

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

.form-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-1);
  margin-bottom: 6px;
}

.form-subtitle {
  font-size: 14px;
  color: var(--text-2);
  font-weight: 400;
}

/* Form fields */
.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.01em;
}

/* Input wrap with icon */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--text-3);
  pointer-events: none;
  transition: color 0.2s;
  flex-shrink: 0;
}

.input {
  width: 100%;
  padding: 13px 16px 13px 40px;
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 400;
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.2s;
  -webkit-appearance: none;
}

.input::placeholder {
  color: var(--text-3);
}

.input:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.input:focus {
  border-color: var(--border-hi);
  background: rgba(124, 58, 237, 0.06);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.input:focus + .input-icon,
.input-wrap:focus-within .input-icon {
  color: #a78bfa;
}

/* Error state */
.field.has-error .input {
  border-color: rgba(236, 72, 153, 0.6);
  background: rgba(236, 72, 153, 0.05);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.field-error {
  font-size: 12px;
  color: #f472b6;
  font-weight: 500;
  min-height: 16px;
  display: block;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
}

.field.has-error .field-error {
  opacity: 1;
  transform: translateY(0);
}

/* Submit button */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 24px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  color: white;
  background: var(--grad);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s, opacity 0.2s;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
  margin-top: 4px;
  letter-spacing: 0.01em;
}

.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.55);
}

.btn-submit:hover::before { opacity: 1; }

.btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-text { transition: opacity 0.2s; }
.btn-arrow { width: 16px; height: 16px; transition: transform 0.2s, opacity 0.2s; }

/* Loader inside button */
.btn-loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.btn-submit.is-loading .btn-text { opacity: 0.3; }
.btn-submit.is-loading .btn-arrow { opacity: 0; }
.btn-submit.is-loading .btn-loader { display: block; }

/* Hover on arrow */
.btn-submit:not(:disabled):hover .btn-arrow {
  transform: translateX(3px);
}

/* Form footnote */
.form-footnote {
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.6;
}

.form-link {
  color: #a78bfa;
  text-decoration: none;
  transition: color 0.15s;
}

.form-link:hover { color: #c4b5fd; }

/* ── Success state ── */
.success-state {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 0;
  animation: fade-up 0.5s ease both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.success-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
}

.success-icon svg {
  width: 100%;
  height: 100%;
}

.success-check {
  stroke-dasharray: 28;
  stroke-dashoffset: 28;
  animation: draw-check 0.5s 0.3s ease forwards;
}

@keyframes draw-check {
  to { stroke-dashoffset: 0; }
}

.success-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.success-body {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 34ch;
  margin-bottom: 24px;
}

.success-timer {
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: var(--radius-sm);
  padding: 14px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.success-timer-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

.success-timer-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}

/* ── Trust row below card ── */
.trust-row {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}

.trust-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ────────────────────────────────────────────
   RESPONSIVE
──────────────────────────────────────────── */

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 40px 32px 60px;
    gap: 48px;
    align-items: start;
  }

  .col-copy {
    padding-right: 0;
    gap: 24px;
  }

  .headline { font-size: clamp(36px, 8vw, 56px); }

  .col-form { max-width: 540px; margin: 0 auto; width: 100%; }
}

@media (max-width: 600px) {
  .layout { padding: 28px 20px 48px; }

  .headline { font-size: 38px; letter-spacing: -1px; }

  .form-card { padding: 28px 22px; }

  .time-compare {
    flex-direction: column;
    gap: 16px;
    padding: 16px 20px;
  }

  .time-divider { transform: rotate(90deg); }

  .trust-row { gap: 16px; }

  .metrics-strip { grid-template-columns: 1fr 1fr; }
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Focus visible */
.input:focus-visible { outline: 2px solid #7C3AED; outline-offset: 2px; }
.btn-submit:focus-visible { outline: 2px solid #a78bfa; outline-offset: 3px; }