@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Inter:wght@300;400;500;600&family=Mulish:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&display=swap');

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  --bg:           #F7F5F3;
  --bg-alt:       #EFEBE8;
  --surface:      #FFFFFF;
  --surface-alt:  #FAF8F6;
  --border:       #DDD;
  --border-soft:  #E8E3DF;
  --rose:         #B88A8A;
  --rose-dark:    #9A6F6F;
  --rose-light:   #C9A8A8;
  --rose-bg:      #E8DFDB;
  --green:        #3F5F55;
  --green-dark:   #2E4840;
  --green-light:  #527A6E;
  --charcoal:     #222222;
  --text-mid:     #444444;
  --muted:        #555555;
  --muted-light:  #888888;
  --radius:       16px;
  --radius-sm:    10px;
  --radius-xs:    6px;
  --shadow:       0 2px 24px rgba(0,0,0,0.07);
  --shadow-sm:    0 1px 10px rgba(0,0,0,0.05);
  --shadow-card:  0 4px 32px rgba(0,0,0,0.09);
  --transition:   0.3s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--charcoal);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── App Shell ──────────────────────────────────────────────── */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Progress Bar ───────────────────────────────────────────── */
#progress-bar-wrap {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--border-soft);
  z-index: 100;
}
#progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--green));
  transition: width 0.5s ease;
  width: 0%;
}

/* ── Site Header ────────────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  z-index: 99;
  display: flex;
  flex-direction: column;
}
.site-logo {
  max-width: 120px;
  max-height: 38px;
  width: auto;
  height: auto;
  display: block;
}

/* ── ALIGN Nav ──────────────────────────────────────────────── */
#align-nav {
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.align-steps {
  display: flex;
  align-items: center;
  gap: 4px;
}
.align-step {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-light);
  padding: 5px 12px;
  border-radius: 20px;
  transition: all var(--transition);
  white-space: nowrap;
}
.align-step.active {
  background: var(--rose-bg);
  color: var(--rose-dark);
}
.align-step.done {
  color: var(--green);
}
.align-sep {
  color: var(--border);
  font-size: 0.7rem;
}
#step-indicator {
  font-size: 0.75rem;
  color: var(--muted-light);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Main Content ───────────────────────────────────────────── */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 100px 20px 80px;
}

/* ── Screen ─────────────────────────────────────────────────── */
.screen {
  opacity: 0;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  width: 100%;
  max-width: 720px;
  transition: none;
}
.screen.active {
  opacity: 1;
  visibility: visible;
  height: auto;
  overflow: visible;
  transition: opacity 200ms ease;
}

/* ── Card ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 52px 56px;
  box-shadow: var(--shadow-card);
}

/* ── Welcome Screen ─────────────────────────────────────────── */
.welcome-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 600;
  margin-bottom: 22px;
}
.welcome-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--charcoal);
  margin-bottom: 18px;
}
.welcome-title em {
  font-style: italic;
  color: var(--rose-dark);
}
.welcome-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.55;
}
.welcome-headspace {
  font-family: 'Mulish', sans-serif;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
  font-style: italic;
  margin: 20px 0 28px;
  line-height: 1.6;
}
.welcome-body {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.7;
}
.welcome-note {
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
  margin: 28px 0 36px;
  padding: 18px 22px;
  border-left: 3px solid var(--rose);
  background: var(--rose-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.welcome-disclaimer {
  font-size: 0.78rem;
  color: #666666;
  font-style: italic;
  margin-top: -24px;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ── Welcome Video ──────────────────────────────────────────── */
.welcome-video-wrap {
  max-width: 640px;
  width: 100%;
  margin: 10px auto 30px;
  text-align: left;
}
.video-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}
#welcome-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  background: #000000;
}

/* ── Section Header ─────────────────────────────────────────── */
.section-tag {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.tag-awareness  { background: #EDE8F2; color: #7A5A9A; border: 1px solid #D4C8E8; }
.tag-liberation { background: #E8DFDB; color: #9A6F6F; border: 1px solid #D4C0BB; }
.tag-imagine    { background: #E2EDE9; color: #3F6A5A; border: 1px solid #BDDAD1; }
.tag-reality    { background: #EAE6DF; color: #7A6A4A; border: 1px solid #D4CAB8; }
.tag-goals      { background: #E2EAED; color: #3A5F70; border: 1px solid #BBCFD8; }
.tag-navigate   { background: #E8E2ED; color: #6A4A7A; border: 1px solid #CCBBD8; }
.tag-summary    { background: #E8DFDB; color: #9A6F6F; border: 1px solid #D4C0BB; }

.screen-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.65rem, 3.5vw, 2.2rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--charcoal);
  margin-bottom: 10px;
}
.screen-subtitle {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 36px;
  line-height: 1.65;
}

/* ── Form Elements ──────────────────────────────────────────── */
.form-group { margin-bottom: 30px; }
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 10px;
  line-height: 1.5;
}
.form-label span {
  display: block;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted-light);
  margin-top: 5px;
  font-style: italic;
}

textarea, input[type="text"], input[type="date"], input[type="time"] {
  width: 100%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  color: var(--charcoal);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  line-height: 1.65;
}
textarea { min-height: 120px; }
textarea:focus, input[type="text"]:focus,
input[type="date"]:focus, input[type="time"]:focus {
  border-color: var(--rose);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(184,138,138,0.12);
}
textarea::placeholder, input::placeholder {
  color: var(--muted-light);
  font-style: italic;
}

/* ── Select Buttons (single/multi) ─────────────────────────── */
.options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.option-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  line-height: 1.4;
}
.option-btn:hover {
  background: var(--rose-bg);
  border-color: var(--rose-light);
  color: var(--charcoal);
}
.option-btn.selected {
  background: var(--green);
  border-color: var(--green);
  color: #FFFFFF;
  font-weight: 500;
}

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border-soft);
  margin: 36px 0;
}

/* ── AI Reflection Box ──────────────────────────────────────── */
.reflection-box {
  background: var(--rose-bg);
  border: 1px solid #D8CFCB;
  border-radius: var(--radius-sm);
  padding: 30px 34px;
  margin-top: 34px;
  box-shadow: var(--shadow-sm);
  animation: fadeSlideIn 0.45s ease forwards;
}
.reflection-box .reflection-label {
  font-size: 0.67rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose-dark);
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.reflection-box .reflection-label::before {
  content: '✦';
  font-size: 0.6rem;
}
.reflection-box p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.12rem;
  color: var(--text-mid);
  line-height: 1.7;
  font-weight: 400;
}
.reflection-box p + p { margin-top: 12px; }
.reflection-box blockquote {
  border-left: 2px solid var(--rose);
  padding-left: 16px;
  margin: 14px 0;
  font-style: italic;
  color: var(--rose-dark);
  font-size: 1.08rem;
}

/* ── Risk Badge ─────────────────────────────────────────────── */
.risk-badge {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.risk-low      { background: #E2EDE9; color: #2E6A4A; border: 1px solid #BDDAD1; }
.risk-moderate { background: #FBF5EA; color: #8A6A20; border: 1px solid #E8D8A0; }
.risk-high     { background: #FAECEC; color: #9A3A3A; border: 1px solid #E8C0C0; }

/* ── Pattern Card ───────────────────────────────────────────── */
.pattern-card {
  background: linear-gradient(135deg, var(--rose-bg), #EEE8E8);
  border: 1px solid #D8CFCB;
  border-radius: var(--radius);
  padding: 34px 38px;
  margin-bottom: 28px;
}
.pattern-card .pattern-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--green);
  margin-bottom: 12px;
}
.pattern-card p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
}
.pattern-card .what-you-need {
  margin-top: 18px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.65);
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  color: var(--charcoal);
  border: 1px solid var(--border-soft);
}
.pattern-card .what-you-need strong { color: var(--green); }

/* ── Score Grid ─────────────────────────────────────────────── */
.scores-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 24px 0;
}
.score-item {
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 22px 16px;
  text-align: center;
}
.score-item .score-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--green);
  line-height: 1;
  margin-bottom: 6px;
}
.score-item .score-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-light);
  font-weight: 600;
}

/* ── Summary Sections ───────────────────────────────────────── */
.summary-block {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-soft);
}
.summary-block:last-child { border-bottom: none; }
.summary-block .summary-key {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rose-dark);
  font-weight: 700;
  margin-bottom: 7px;
}
.summary-block .summary-val {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.12rem;
  color: var(--charcoal);
  line-height: 1.65;
}

/* ── CTA Section ────────────────────────────────────────────── */
.cta-section {
  text-align: center;
  padding: 52px 56px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  margin-top: 28px;
  box-shadow: var(--shadow-card);
}
.cta-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 14px;
}
.cta-section > p {
  color: var(--muted);
  font-size: 0.93rem;
  margin-bottom: 24px;
  line-height: 1.7;
}
.cta-list {
  list-style: none;
  text-align: left;
  display: inline-block;
  margin-bottom: 0;
}
.cta-list li {
  padding: 7px 0;
  font-size: 0.93rem;
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.cta-list li::before {
  content: '→';
  color: var(--green);
  flex-shrink: 0;
  margin-top: 1px;
  font-weight: 600;
}
.soft-seed {
  font-size: 0.84rem;
  color: var(--muted-light);
  font-style: italic;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  line-height: 1.6;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--green);
  color: #FFFFFF;
  border: none;
  border-radius: 50px;
  padding: 15px 34px;
  font-family: 'Inter', sans-serif;
  font-size: 0.93rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 18px rgba(63,95,85,0.22);
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(63,95,85,0.3);
}
.btn-primary .btn-arrow { transition: transform var(--transition); }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--green);
  color: #FFFFFF;
  border: none;
  border-radius: 50px;
  padding: 18px 44px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(63,95,85,0.25);
  text-decoration: none;
}
.btn-gold:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(63,95,85,0.35);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted-light);
  border-radius: 50px;
  padding: 13px 28px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-ghost:hover {
  border-color: var(--muted);
  color: var(--charcoal);
  background: var(--bg-alt);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--green);
  color: var(--green);
  border-radius: 50px;
  padding: 12px 26px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-outline:hover {
  background: var(--green);
  color: #FFFFFF;
}

/* ── Nav Buttons ────────────────────────────────────────────── */
.nav-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  gap: 16px;
}

/* ── Error ──────────────────────────────────────────────────── */
.field-error {
  color: #C04040;
  font-size: 0.82rem;
  margin-top: 8px;
  display: none;
}
.field-error.visible { display: block; }

/* ── Final screen actions ───────────────────────────────────── */
.final-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
}
.save-copy-note {
  width: 100%;
  margin-bottom: 20px;
  text-align: left;
}
.save-copy-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 8px;
}
.save-copy-note p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 8px;
}
.save-copy-note p:last-child {
  margin-bottom: 0;
}
.mobile-only-text {
  display: none;
}
.desktop-only-text {
  display: block;
}

@media (max-width: 768px) {
  .mobile-only-text {
    display: block;
  }
  .desktop-only-text {
    display: none;
  }
}

/* ── Persistent Footer ──────────────────────────────────────── */
.app-footer {
  font-size: 12px;
  color: #666666;
  text-align: center;
  margin-top: 40px;
  padding-bottom: 30px;
  padding-left: 20px;
  padding-right: 20px;
  line-height: 1.6;
  max-width: 720px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .card { padding: 32px 24px; }
  .cta-section { padding: 36px 24px; }
  .scores-grid { grid-template-columns: 1fr; }
  #align-nav { padding: 12px 16px; }
  .align-steps { display: none; }
  .nav-buttons { flex-direction: column-reverse; }
  .nav-buttons .btn-primary { width: 100%; justify-content: center; }
  .final-actions { flex-direction: column; }
  main { padding: 90px 16px 60px; }
}
@media (max-width: 820px) {
  .align-step { padding: 5px 8px; font-size: 0.62rem; }
}
@media (max-width: 480px) {
  .site-logo {
    max-width: 90px;
    max-height: 30px;
  }
  main {
    padding: 80px 16px 60px;
  }
  .app-footer {
    font-size: 11px;
    line-height: 1.7;
  }
}

/* ── Saved Indicator ────────────────────────────────────────── */
.saved-indicator {
  position: fixed;
  top: 24px;
  right: 24px;
  background: var(--green);
  color: #FFFFFF;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.saved-indicator.show {
  opacity: 1;
}

/* ── Start Over Button ──────────────────────────────────────── */
.start-over-wrap {
  text-align: center;
  margin-top: 20px;
}
.btn-start-over {
  background: transparent;
  border: none;
  color: var(--muted-light);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  transition: color var(--transition);
  padding: 8px 16px;
}
.btn-start-over:hover {
  color: var(--rose-dark);
}

/* ── Submission Status Alert ────────────────────────────────── */
.submission-status {
  margin-bottom: 24px;
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  line-height: 1.6;
}
.submission-status.success {
  background: #E2EDE9;
  color: #2E6A4A;
  border: 1px solid #BDDAD1;
  display: block;
}
.submission-status.error {
  background: #FAECEC;
  color: #9A3A3A;
  border: 1px solid #E8C0C0;
  display: block;
}
.submission-status.pending {
  background: #FBF5EA;
  color: #8A6A20;
  border: 1px solid #E8D8A0;
  display: block;
}

/* ── Examples Helper (Screen 5) ────────────────────────────── */
.examples-helper-wrap {
  margin-top: -16px;
  margin-bottom: 30px;
}
.btn-examples-toggle {
  background: transparent;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
  font-weight: 500;
}
.btn-examples-toggle:hover {
  color: var(--rose-dark);
}
.btn-examples-toggle::after {
  content: '→';
  font-size: 0.8rem;
  display: inline-block;
  transition: transform var(--transition);
}
.btn-examples-toggle[aria-expanded="true"]::after {
  transform: rotate(90deg);
}
.examples-helper-content {
  margin-top: 14px;
  background: rgba(184, 138, 138, 0.05); /* faint rose/cream tint, lighter than .reflection-box */
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  animation: fadeSlideIn 0.3s ease forwards;
}
.examples-lead {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.6;
}
.examples-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.examples-list li {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
}
.examples-list li:last-child {
  margin-bottom: 0;
}
.examples-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--rose-light);
}
.examples-list li strong {
  color: var(--charcoal);
  font-weight: 600;
}

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

