/* ============================================================
   BLUMI — Design System
   Airbnb-inspired, Headspace motion principles
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* --- Design Tokens --- */
:root {
  /* Colors */
  --color-primary: #FF5A5F;
  --color-primary-soft: #FFF0F0;
  --color-primary-hover: #e04e53;

  --color-sage: #7EB5A6;
  --color-sage-dark: #5A9E8E;
  --color-sage-light: #E8F4F1;
  --color-sage-mid: #B8D9D2;

  --color-warm-white: #FAFAFA;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F7F7F7;

  --color-text-primary: #222222;
  --color-text-secondary: #717171;
  --color-text-tertiary: #B0B0B0;

  --color-success: #00A699;
  --color-success-soft: #E6F7F6;
  --color-warning: #FFB400;
  --color-warning-soft: #FFFBEB;
  --color-alert: #FF5A5F;
  --color-alert-soft: #FFF0F0;

  --color-border: #EBEBEB;
  --color-border-focus: #7EB5A6;
  --color-shadow: rgba(0, 0, 0, 0.08);

  /* Aspect pill colors */
  --color-gerak-kasar: #DBEAFE;
  --color-gerak-kasar-text: #1E40AF;
  --color-gerak-halus: #EDE9FE;
  --color-gerak-halus-text: #5B21B6;
  --color-bicara: #FEF3C7;
  --color-bicara-text: #92400E;
  --color-sosialisasi: #D1FAE5;
  --color-sosialisasi-text: #065F46;

  /* Typography */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-hero: 32px;
  --font-size-h1: 24px;
  --font-size-h2: 20px;
  --font-size-body: 16px;
  --font-size-small: 14px;
  --font-size-caption: 12px;
  --line-height-body: 1.6;
  --font-weight-bold: 700;
  --font-weight-semibold: 600;
  --font-weight-medium: 500;
  --font-weight-regular: 400;

  /* Spacing (8px base) */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Border radius */
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  --border-radius-pill: 999px;

  /* Shadows */
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.08);
  --shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);

  /* Transitions */
  --transition-default: all 0.2s ease;
  --transition-slow: all 0.3s ease;
  --transition-fast: all 0.15s ease;
}

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

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

body {
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-text-primary);
  background-color: var(--color-warm-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Page transition */
body {
  animation: pageFadeIn 0.3s ease-out forwards;
}

body.page-exit {
  animation: pageFadeOut 0.15s ease-in forwards;
}

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

@keyframes pageFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-warm-white);
}

.centered-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: var(--space-xl) var(--space-md);
}

/* --- Typography --- */
h1, h2, h3 {
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  color: var(--color-text-primary);
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }

p {
  color: var(--color-text-secondary);
  line-height: var(--line-height-body);
}

.text-small  { font-size: var(--font-size-small); }
.text-caption { font-size: var(--font-size-caption); color: var(--color-text-tertiary); }
.text-center { text-align: center; }
.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-sage   { color: var(--color-sage); }

/* --- Blumi Logo --- */
.blumi-logo {
  font-size: 28px;
  font-weight: var(--font-weight-bold);
  color: var(--color-sage);
  letter-spacing: -0.5px;
  text-decoration: none;
  line-height: 1;
}

.blumi-logo span {
  color: var(--color-primary);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px var(--space-lg);
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  border: none;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-default);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-full {
  width: 100%;
  display: flex;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
  box-shadow: 0 4px 16px rgba(255, 90, 95, 0.3);
}

.btn-sage {
  background-color: var(--color-sage);
  color: white;
}
.btn-sage:hover {
  background-color: var(--color-sage-dark);
  box-shadow: 0 4px 16px rgba(126, 181, 166, 0.35);
}

.btn-outline {
  background-color: var(--color-surface);
  color: var(--color-text-secondary);
  border: 1.5px solid var(--color-border);
}
.btn-outline:hover {
  border-color: var(--color-sage);
  color: var(--color-sage);
  background-color: var(--color-sage-light);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-sage);
  padding: 10px var(--space-md);
}
.btn-ghost:hover {
  background-color: var(--color-sage-light);
}

.btn-pill {
  border-radius: var(--border-radius-pill);
}

.btn-sm {
  padding: 10px var(--space-md);
  font-size: var(--font-size-small);
}

.btn-lg {
  padding: 16px var(--space-xl);
  font-size: var(--font-size-body);
}

/* White button (for use on colored backgrounds) */
.btn-white {
  background-color: white;
  color: var(--color-sage);
}
.btn-white:hover {
  background-color: rgba(255,255,255,0.9);
  box-shadow: var(--shadow-elevated);
}

/* Disabled state */
.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- Form Elements --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
}

.form-label {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

.form-input {
  width: 100%;
  padding: 14px var(--space-md);
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  color: var(--color-text-primary);
  background-color: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--border-radius-md);
  transition: var(--transition-default);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: var(--color-sage);
  box-shadow: 0 0 0 3px rgba(126, 181, 166, 0.15);
}

.form-input:user-invalid,
.form-input.invalid {
  border-color: var(--color-alert);
  box-shadow: 0 0 0 3px rgba(255, 90, 95, 0.1);
}

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

.form-input-large {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-medium);
  text-align: center;
  padding: var(--space-md) var(--space-lg);
}

/* Input with icon */
.input-wrapper {
  position: relative;
}

.input-wrapper .form-input {
  padding-right: 44px;
}

.input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-tertiary);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
}

/* --- Cards --- */
.card {
  background-color: var(--color-surface);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition-slow);
}

.card:hover {
  transform: translateY(-2px) scale(1.005);
  box-shadow: var(--shadow-elevated);
}

.card-flat {
  background-color: var(--color-surface);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  border: 1.5px solid var(--color-border);
}

/* Hero card (sage gradient) */
.card-hero {
  background: linear-gradient(135deg, var(--color-sage) 0%, var(--color-sage-dark) 100%);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  color: white;
  position: relative;
  overflow: hidden;
}

.card-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.card-hero::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: -20px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}

.card-hero > * {
  position: relative;
  z-index: 1;
}

/* --- Tabs --- */
.tabs {
  display: flex;
  background-color: var(--color-surface-alt);
  border-radius: var(--border-radius-pill);
  padding: 4px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  font-family: var(--font-family);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--border-radius-pill);
  cursor: pointer;
  transition: var(--transition-default);
  text-align: center;
}

.tab-btn.active {
  background: var(--color-surface);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
}

/* --- Pills / Badges --- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 12px;
  border-radius: var(--border-radius-pill);
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-semibold);
}

.pill-sage {
  background-color: var(--color-sage-light);
  color: var(--color-sage-dark);
}

.pill-success {
  background-color: var(--color-success-soft);
  color: var(--color-success);
}

.pill-warning {
  background-color: var(--color-warning-soft);
  color: #92400E;
}

.pill-alert {
  background-color: var(--color-alert-soft);
  color: var(--color-alert);
}

/* Aspect pills */
.pill-gerak-kasar   { background: var(--color-gerak-kasar);   color: var(--color-gerak-kasar-text); }
.pill-gerak-halus   { background: var(--color-gerak-halus);   color: var(--color-gerak-halus-text); }
.pill-bicara        { background: var(--color-bicara);        color: var(--color-bicara-text); }
.pill-sosialisasi   { background: var(--color-sosialisasi);   color: var(--color-sosialisasi-text); }

/* --- Alerts / Notifications --- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-small);
  animation: fadeUp 0.3s ease-out;
}

.alert-error {
  background-color: var(--color-primary-soft);
  color: var(--color-primary);
  border: 1px solid rgba(255,90,95,0.2);
}

.alert-success {
  background-color: var(--color-success-soft);
  color: var(--color-success);
  border: 1px solid rgba(0,166,153,0.2);
}

.alert-warning {
  background-color: var(--color-warning-soft);
  color: #92400E;
  border: 1px solid rgba(255,180,0,0.2);
}

.alert-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* --- Progress Bar --- */
.progress-bar-track {
  width: 100%;
  height: 4px;
  background-color: var(--color-border);
  border-radius: var(--border-radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--color-sage);
  border-radius: var(--border-radius-pill);
  transition: width 0.4s ease-out;
}

/* Progress dots */
.progress-dots {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-border);
  transition: var(--transition-slow);
}

.progress-dot.active {
  background-color: var(--color-sage);
  transform: scale(1.3);
}

.progress-dot.done {
  background-color: var(--color-sage-mid);
}

/* --- Modal (native <dialog>) --- */
dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  border: none;
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  max-width: 440px;
  width: calc(100% - var(--space-xl));
  box-shadow: var(--shadow-elevated);
  background: var(--color-surface);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

dialog[open] {
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-icon {
  font-size: 40px;
  text-align: center;
  margin-bottom: var(--space-md);
}

.modal-title {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  text-align: center;
  margin-bottom: var(--space-sm);
}

.modal-body {
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
  text-align: center;
  line-height: var(--line-height-body);
  margin-bottom: var(--space-xl);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* --- Divider --- */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--color-text-tertiary);
  font-size: var(--font-size-small);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--color-border);
}

/* --- Spinner --- */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  opacity: 0.7;
}

.spinner-lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

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

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-2xl);
  color: var(--color-text-secondary);
}

/* --- Checkbox Items --- */
.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-surface);
  border-radius: var(--border-radius-md);
  border: 1.5px solid var(--color-border);
  cursor: pointer;
  transition: var(--transition-default);
  user-select: none;
}

.checkbox-item:hover {
  border-color: var(--color-warning);
  background-color: var(--color-warning-soft);
}

.checkbox-item.checked {
  border-color: var(--color-warning);
  background-color: var(--color-warning-soft);
}

.checkbox-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--color-border);
  border-radius: 5px;
  background: var(--color-surface);
  cursor: pointer;
  transition: var(--transition-default);
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-item input[type="checkbox"]:checked {
  background-color: var(--color-warning);
  border-color: var(--color-warning);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 14 11' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5.5L5 9.5L13 1.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.checkbox-label {
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
  line-height: 1.5;
}

/* --- Toggle / Gender Select Cards --- */
.option-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-md);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  transition: var(--transition-slow);
  font-size: 32px;
  position: relative;
}

.option-card .option-label {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

.option-card:hover {
  border-color: var(--color-sage-mid);
  background: var(--color-sage-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.option-card.selected {
  border-color: var(--color-sage);
  background: var(--color-sage-light);
  box-shadow: 0 0 0 3px rgba(126,181,166,0.2);
}

.option-card.selected .option-label {
  color: var(--color-sage-dark);
  font-weight: var(--font-weight-semibold);
}

/* Yes/No toggle */
.toggle-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.toggle-card {
  padding: var(--space-md) var(--space-lg);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: var(--transition-default);
  text-align: center;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  font-family: var(--font-family);
}

.toggle-card:hover {
  border-color: var(--color-sage);
  color: var(--color-sage);
}

.toggle-card.selected {
  border-color: var(--color-sage);
  background: var(--color-sage-light);
  color: var(--color-sage-dark);
  font-weight: var(--font-weight-semibold);
}

/* --- Range input --- */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--color-border);
  border-radius: var(--border-radius-pill);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-sage);
  box-shadow: 0 2px 8px rgba(126,181,166,0.4);
  cursor: pointer;
  transition: var(--transition-default);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: var(--color-sage);
  cursor: pointer;
}

/* --- Collapsible --- */
.collapsible-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-md);
  background: var(--color-surface-alt);
  border: none;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-family: var(--font-family);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  transition: var(--transition-default);
  text-align: left;
}

.collapsible-trigger:hover {
  background: var(--color-sage-light);
  color: var(--color-sage-dark);
}

.collapsible-icon {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.collapsible-trigger[aria-expanded="true"] .collapsible-icon {
  transform: rotate(180deg);
}

.collapsible-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease;
  opacity: 0;
}

.collapsible-content.open {
  opacity: 1;
}

.collapsible-body {
  padding: var(--space-md);
  font-size: var(--font-size-small);
  color: var(--color-text-secondary);
  line-height: var(--line-height-body);
}

/* --- Header / Nav --- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,250,250,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md);
}

.header-inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  cursor: pointer;
  transition: var(--transition-default);
  color: var(--color-text-secondary);
  text-decoration: none;
  position: relative;
}

.icon-btn:hover {
  border-color: var(--color-sage);
  color: var(--color-sage);
  background: var(--color-sage-light);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-elevated);
  min-width: 160px;
  overflow: hidden;
  animation: fadeUp 0.2s ease-out;
  z-index: 200;
}

.dropdown-menu.hidden {
  display: none;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  font-size: var(--font-size-small);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-family);
}

.dropdown-item:hover {
  background: var(--color-surface-alt);
}

.dropdown-item.danger {
  color: var(--color-alert);
}

/* --- Disclaimer --- */
.disclaimer {
  padding: var(--space-lg);
  font-size: var(--font-size-caption);
  color: var(--color-text-tertiary);
  text-align: center;
  line-height: 1.6;
  border-top: 1px solid var(--color-border);
}

/* --- Section spacing --- */
.section {
  padding: var(--space-lg) 0;
}

.section-title {
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-up {
  animation: fadeUp 0.3s ease-out;
}

/* Staggered children */
.stagger-children > * {
  animation: fadeUp 0.3s ease-out both;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }

/* Slide transitions for multi-step form */
.step-container {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.step {
  width: 100%;
}

.step.slide-out-left {
  animation: slideOutLeft 0.25s ease-in forwards;
}

.step.slide-in-right {
  animation: slideInFromRight 0.25s ease-out forwards;
}

.step.slide-out-right {
  animation: slideOutRight 0.25s ease-in forwards;
}

.step.slide-in-left {
  animation: slideInFromLeft 0.25s ease-out forwards;
}

@keyframes slideOutLeft {
  to { opacity: 0; transform: translateX(-30px); }
}

@keyframes slideInFromRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  to { opacity: 0; transform: translateX(30px); }
}

@keyframes slideInFromLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* --- Google button --- */
.btn-google {
  background: white;
  color: var(--color-text-primary);
  border: 1.5px solid var(--color-border);
  gap: var(--space-sm);
  font-weight: var(--font-weight-medium);
}

.btn-google:hover {
  border-color: #4285F4;
  box-shadow: 0 2px 12px rgba(66,133,244,0.15);
}

.google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* --- Milestone items --- */
.milestone-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

.milestone-item:last-child {
  border-bottom: none;
}

.milestone-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  border-radius: 50%;
  background: var(--color-sage);
  margin-top: 6px;
}

/* --- Aspect summary row --- */
.aspect-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  background: var(--color-surface);
  border-radius: var(--border-radius-md);
  border: 1.5px solid var(--color-border);
}

.aspect-row-label {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.aspect-status {
  font-size: var(--font-size-caption);
  font-weight: var(--font-weight-semibold);
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-ok   { color: var(--color-success); }
.status-warn { color: var(--color-warning); }
.status-fail { color: var(--color-alert); }

/* --- Utility --- */
.gap-xs  { gap: var(--space-xs); }
.gap-sm  { gap: var(--space-sm); }
.gap-md  { gap: var(--space-md); }
.gap-lg  { gap: var(--space-lg); }
.gap-xl  { gap: var(--space-xl); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Locked feature badge --- */
.locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--color-text-tertiary);
}

/* --- Responsive --- */
@media (min-width: 480px) {
  .centered-page {
    padding: var(--space-2xl) var(--space-md);
  }
}

/* Safe area for mobile */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .page-wrapper {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
