/* ============================================
   AngelPsy — Quiz Landing Page Styles
   Mobile-first, warm & cozy design
   ============================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Warm palette */
  --color-cream:        hsl(38, 50%, 96%);
  --color-cream-dark:   hsl(38, 40%, 92%);
  --color-sand:         hsl(35, 45%, 88%);
  --color-warm-green:   hsl(145, 35%, 48%);
  --color-warm-green-light: hsl(145, 40%, 94%);
  --color-warm-green-dark: hsl(145, 38%, 38%);
  --color-sage:         hsl(140, 20%, 65%);
  --color-text:         hsl(25, 20%, 20%);
  --color-text-muted:   hsl(25, 15%, 50%);
  --color-text-light:   hsl(25, 10%, 65%);
  --color-white:        hsl(0, 0%, 100%);
  --color-error:        hsl(0, 65%, 55%);
  --color-error-bg:     hsl(0, 60%, 96%);

  /* Shadows */
  --shadow-sm: 0 1px 3px hsla(25, 20%, 15%, 0.06);
  --shadow-md: 0 4px 16px hsla(25, 20%, 15%, 0.08);
  --shadow-lg: 0 8px 32px hsla(25, 20%, 15%, 0.1);
  --shadow-xl: 0 16px 48px hsla(25, 20%, 15%, 0.12);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transitions */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms;
  --duration-normal: 350ms;
  --duration-slow: 500ms;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--color-cream);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--space-md);
  overflow-x: hidden;
  position: relative;
}

/* ---------- Floating Decorative Shapes ---------- */
.floating-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
}

.shape-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--color-warm-green) 0%, transparent 70%);
  top: -80px;
  right: -80px;
  animation: float-1 18s ease-in-out infinite;
}

.shape-2 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--color-sage) 0%, transparent 70%);
  bottom: 10%;
  left: -60px;
  animation: float-2 22s ease-in-out infinite;
}

.shape-3 {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, hsl(35, 60%, 70%) 0%, transparent 70%);
  top: 50%;
  right: 15%;
  animation: float-3 15s ease-in-out infinite;
}

@keyframes float-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 40px) scale(1.1); }
}

@keyframes float-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -20px) scale(1.15); }
}

@keyframes float-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, -30px) scale(0.9); }
}

@media (prefers-reduced-motion: reduce) {
  .shape {
    animation: none;
  }
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
  padding-top: var(--space-lg);
  padding-bottom: var(--space-2xl);
}

/* ---------- Screens ---------- */
.screen {
  display: none;
  animation: slideIn var(--duration-normal) var(--ease-out) both;
}

.screen--active {
  display: block;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

.screen--leaving {
  animation: slideOut var(--duration-fast) var(--ease-out) both;
}

/* ---------- Card ---------- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid hsla(35, 30%, 85%, 0.6);
}

/* ---------- Hero Screen ---------- */
.card--hero {
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
}

.hero-badge {
  display: inline-block;
  background: var(--color-warm-green-light);
  color: var(--color-warm-green-dark);
  padding: var(--space-xs) var(--space-md);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  letter-spacing: 0.02em;
}

.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.highlight {
  color: var(--color-warm-green);
  position: relative;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--color-warm-green-light);
  border-radius: 4px;
  z-index: -1;
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  max-width: 340px;
  margin-inline: auto;
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.feature-icon {
  font-size: 1.3rem;
}

.feature-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.hero-note {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-top: var(--space-md);
}

/* ---------- Primary Button ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition:
    background var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-spring),
    box-shadow var(--duration-fast) var(--ease-out);
}

.btn--primary {
  background: var(--color-warm-green);
  color: var(--color-white);
  padding: var(--space-md) var(--space-xl);
  font-size: 1.05rem;
  box-shadow: 0 4px 16px hsla(145, 35%, 48%, 0.3);
  width: 100%;
  min-height: 56px;
}

.btn--primary:hover {
  background: var(--color-warm-green-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px hsla(145, 35%, 48%, 0.35);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px hsla(145, 35%, 48%, 0.25);
}

.btn-arrow {
  transition: transform var(--duration-fast) var(--ease-out);
}

.btn--primary:hover .btn-arrow {
  transform: translateX(3px);
}

/* ---------- Progress Bar ---------- */
.progress-bar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: var(--space-md) var(--space-md) var(--space-sm);
  padding-left: 60px; /* Space for back button */
  background: hsla(38, 50%, 96%, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9;
}

.progress-bar--visible {
  display: block;
}

.progress-bar__track {
  background: var(--color-sand);
  border-radius: 100px;
  height: 8px;
  position: relative;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-warm-green), var(--color-sage));
  border-radius: 100px;
  width: 0%;
  transition: width var(--duration-normal) var(--ease-out);
}

.progress-bar__text {
  font-size: 0.72rem;
  color: var(--color-text-light);
  font-weight: 500;
  text-align: right;
  margin-top: 4px;
}

/* When quiz is active, push content down */
.container--quiz-active {
  padding-top: 60px;
}

/* ---------- Question ---------- */
.question-number {
  font-size: 0.8rem;
  color: var(--color-warm-green);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

.question-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
}

/* ---------- Answer Options ---------- */
.options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.option {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-cream);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--color-text);
  text-align: left;
  transition:
    background var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-spring),
    box-shadow var(--duration-fast) var(--ease-out);
}

.option:hover {
  background: var(--color-cream-dark);
  border-color: var(--color-sand);
  transform: translateY(-1px);
}

.option:active {
  transform: scale(0.98);
}

.option--selected {
  background: var(--color-warm-green-light);
  border-color: var(--color-warm-green);
  box-shadow: 0 2px 12px hsla(145, 35%, 48%, 0.15);
}

.option--selected:hover {
  background: var(--color-warm-green-light);
  border-color: var(--color-warm-green);
}

.option-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  border-radius: var(--radius-sm);
}

.option--selected .option-icon {
  background: var(--color-warm-green);
  border-radius: var(--radius-sm);
}

.option-text {
  font-weight: 500;
  line-height: 1.3;
}

/* ---------- Lead Capture Screen ---------- */
.card--lead {
  text-align: center;
}

.result-badge {
  display: inline-block;
  background: linear-gradient(135deg, hsl(45, 90%, 95%), hsl(35, 70%, 92%));
  color: hsl(35, 60%, 35%);
  padding: var(--space-xs) var(--space-md);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.lead-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.lead-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  max-width: 340px;
  margin-inline: auto;
}

/* ---------- Form ---------- */
.lead-form {
  text-align: left;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group--hidden {
  display: none;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.form-input {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--color-sand);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-cream);
  transition:
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
  outline: none;
}

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

.form-input:focus {
  border-color: var(--color-warm-green);
  box-shadow: 0 0 0 4px hsla(145, 35%, 48%, 0.12);
  background: var(--color-white);
}

.form-input--error {
  border-color: var(--color-error);
  background: var(--color-error-bg);
}

.form-input--error:focus {
  box-shadow: 0 0 0 4px hsla(0, 65%, 55%, 0.12);
}

.form-error {
  font-size: 0.8rem;
  color: var(--color-error);
  margin-top: var(--space-xs);
  display: none;
}

.form-error--visible {
  display: block;
}

/* ---------- Contact Toggle ---------- */
.contact-toggle {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-xs);
}

.toggle-btn {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--color-sand);
  border-radius: var(--radius-md);
  background: var(--color-cream);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition:
    background var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.toggle-btn--active {
  background: var(--color-warm-green-light);
  border-color: var(--color-warm-green);
  color: var(--color-warm-green-dark);
}

.toggle-btn:hover:not(.toggle-btn--active) {
  border-color: var(--color-sage);
}

/* ---------- Submit Button ---------- */
.btn--submit {
  margin-top: var(--space-lg);
}

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

.form-note {
  font-size: 0.75rem;
  color: var(--color-text-light);
  text-align: center;
  margin-top: var(--space-md);
}

/* ---------- Thank You Screen ---------- */
.card--thanks {
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
}

.thanks-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  animation: bounceIn var(--duration-slow) var(--ease-spring) both;
}

@keyframes bounceIn {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.thanks-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-warm-green);
  margin-bottom: var(--space-md);
}

.thanks-text {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  max-width: 340px;
  margin-inline: auto;
}

.thanks-info {
  background: var(--color-warm-green-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-size: 0.9rem;
  color: var(--color-warm-green-dark);
}

.thanks-signature {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-top: var(--space-lg);
  font-style: italic;
}

/* ---------- Back Button ---------- */
.back-btn {
  position: fixed;
  top: var(--space-sm);
  left: var(--space-sm);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-white);
  border: 1px solid var(--color-sand);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  z-index: 11;
  transition:
    background var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-spring);
}

.back-btn--visible {
  display: flex;
}

.back-btn:hover {
  background: var(--color-cream);
  box-shadow: var(--shadow-md);
  transform: translateX(-2px);
}

.back-btn:active {
  transform: scale(0.95);
}

/* ---------- Desktop Enhancements ---------- */
@media (min-width: 640px) {
  body {
    align-items: center;
    padding: var(--space-xl);
    min-height: 100dvh;
  }

  .container {
    padding-top: 0;
    padding-bottom: 0;
  }

  .card {
    padding: var(--space-2xl);
  }

  .card--hero {
    padding: var(--space-2xl) var(--space-2xl);
  }

  .hero-title {
    font-size: 2.3rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .question-title {
    font-size: 1.4rem;
  }

  .option {
    padding: var(--space-md) var(--space-lg);
  }

  .shape-1 {
    width: 500px;
    height: 500px;
  }

  .shape-2 {
    width: 350px;
    height: 350px;
  }

  .shape-3 {
    width: 250px;
    height: 250px;
  }
}

/* ---------- Touch Target Safety ---------- */
@media (pointer: coarse) {
  .option {
    min-height: 56px;
  }

  .btn--primary {
    min-height: 56px;
  }

  .form-input {
    min-height: 52px;
  }
}

/* ---------- Loading / Pulse Animation ---------- */
.btn--loading {
  pointer-events: none;
  position: relative;
}

.btn--loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---------- Footer ---------- */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: hsla(38, 50%, 96%, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid hsla(35, 30%, 85%, 0.5);
  font-size: 0.72rem;
  color: var(--color-text-light);
  z-index: 5;
}

.footer-brand {
  font-weight: 500;
}

.footer-link {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.footer-link:hover {
  color: var(--color-warm-green);
  text-decoration: underline;
}

/* ---------- Privacy Policy Page ---------- */
.card--privacy {
  text-align: left;
}

.privacy-back-link {
  display: inline-block;
  color: var(--color-warm-green);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
  transition: color var(--duration-fast) var(--ease-out);
}

.privacy-back-link:hover {
  color: var(--color-warm-green-dark);
}

.privacy-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.privacy-updated {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-xl);
}

.privacy-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.privacy-content p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.privacy-content ul {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.privacy-content li {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-xs);
}

.privacy-btn {
  margin-top: var(--space-xl);
  text-decoration: none;
  text-align: center;
}

/* Body padding for fixed footer */
body {
  padding-bottom: 60px;
}

/* ---------- Smooth Scroll for iOS ---------- */
@supports (-webkit-touch-callout: none) {
  body {
    min-height: -webkit-fill-available;
  }
}
