/* Shared styles for the vanilla signup flow.
   Matches the React signup pages 1:1: Figtree font, light mode default,
   same CSS variables (--background, --foreground, --muted-foreground,
   --border), same rounded-xl options + filled-button selected state. */

@font-face {
  font-family: 'Figtree';
  src: url('/assets/fonts/Figtree-VariableFont_wght.ttf') format('truetype');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('/assets/fonts/Figtree-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --background: #FFFFFF;
  --foreground: #0D0D0D;
  --muted: #F4F4F4;
  --muted-foreground: #666666;
  --border: #E5E5E5;
  --sidebar-hover: #ECECEC;
}

* { box-sizing: border-box; border-color: var(--border); }

html, body {
  margin: 0;
  padding: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.signup-header {
  padding: 16px;
  display: flex;
  align-items: center;
}

.back-btn {
  background: none;
  border: 0;
  color: var(--muted-foreground);
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 120ms ease, color 120ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.back-btn:hover { background: var(--sidebar-hover); color: var(--foreground); }
.back-btn svg { width: 20px; height: 20px; }

.signup-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 48px;
}

/* Onboarding: single thin progress bar that grows with each step,
   matching OnboardingStep.tsx (var(--border) track, var(--foreground)
   fill, 4px tall, transition-all 300ms). */
.progress {
  width: 100%;
  max-width: 460px;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin: 0 0 24px;
}
.progress > .fill {
  height: 100%;
  background: var(--foreground);
  border-radius: 999px;
  transition: width 300ms ease;
}

.step-counter {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 8px;
  align-self: flex-start;
  max-width: 460px;
  width: 100%;
}

h1.question {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 700;
  margin: 0 0 32px;
  max-width: 460px;
  width: 100%;
  color: var(--foreground);
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 460px;
}

/* Match: text-left px-4 py-3.5 rounded-xl border, transparent bg ->
   filled foreground bg when selected. */
.option {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.4;
}
.option:hover { border-color: rgba(0, 0, 0, 0.4); background: var(--muted); }
.option:active { transform: scale(0.99); }
.option.selected {
  background: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}

/* Trial page */
.trial-headline {
  font-size: 24px;
  font-weight: 700;
  margin: 16px 0 6px;
  text-align: center;
  color: var(--foreground);
}
.trial-sub {
  font-size: 14px;
  color: var(--muted-foreground);
  text-align: center;
  margin-bottom: 28px;
}

.trial-card {
  width: 100%;
  max-width: 380px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 20px;
  background: var(--background);
}
.trial-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}
.trial-price .amount { font-size: 32px; font-weight: 700; color: var(--foreground); }
.trial-price .for { font-size: 14px; color: var(--muted-foreground); }
.trial-after {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 20px;
}

.features { display: flex; flex-direction: column; gap: 10px; }
.feature {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--foreground);
}
.feature .check {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 2px;
}

.cta-primary {
  width: 100%;
  max-width: 380px;
  padding: 14px 24px;
  border-radius: 12px;
  background: var(--foreground);
  color: var(--background);
  border: 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 120ms ease;
  font-family: inherit;
}
.cta-primary:hover { opacity: 0.9; }
.cta-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.fine-print {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 12px;
  text-align: center;
  max-width: 380px;
  line-height: 1.5;
}
.fine-print a { color: var(--muted-foreground); text-decoration: underline; }

/* Success page */
.success-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.success-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--foreground);
}
.success-sub {
  font-size: 14px;
  color: var(--muted-foreground);
  margin-bottom: 28px;
}
.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--foreground);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.download-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 120ms ease;
  font-family: inherit;
}
.download-btn:hover { background: var(--muted); }
