/* ============================================================
   WUVERLY — COMPLETE STYLESHEET
   Your human currency. Rediscovered.
   ============================================================ */

/* ── Variables ── */
:root {
  --bg:        #F4F1EC;
  --text:      #1C1C1C;
  --gold:      #C17F3E;
  --gold-light:#D4954F;
  --green:     #4A6741;
  --surface:   #EDE8DF;
  --surface-2: #E5DFCF;
  --muted:     #7A7268;
  --crisis:    #C0392B;
  --border:    rgba(193,127,62,0.25);
  --shadow:    0 2px 24px rgba(28,28,28,0.07);
  --radius:    3px;
  --max-w:     680px;
  --transition: 500ms 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 {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Typography ── */
.display       { font-family: 'Playfair Display', Georgia, serif; }
.display-italic{ font-family: 'Playfair Display', Georgia, serif; font-style: italic; }

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.3;
  font-weight: 500;
}

h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.375rem); }

p { max-width: 60ch; }
p + p { margin-top: 1em; }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
  animation: fadeIn 0.5s ease both;
}

.screen--top {
  justify-content: flex-start;
  padding-top: 4rem;
}

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

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

@keyframes goldLineDraw {
  from { width: 0; opacity: 0; }
  to   { width: 100%; opacity: 1; }
}

@keyframes goldLineDrawSlow {
  0%   { width: 0; opacity: 0; }
  10%  { opacity: 1; }
  100% { width: 100%; opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%       { opacity: 1;   transform: scale(1); }
}

@keyframes progressFill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ── Gold Signature Line ── */
.gold-line {
  display: block;
  height: 1.5px;
  background: var(--gold);
  margin-bottom: 2.5rem;
  animation: goldLineDraw 1.8s cubic-bezier(0.4,0,0.2,1) both;
  transform-origin: left;
}

.gold-line--slow {
  animation: goldLineDrawSlow 2.8s cubic-bezier(0.25,0,0.25,1) both;
}

/* Staggered content reveal */
.reveal { opacity: 0; animation: fadeInUp 0.6s ease both; }
.reveal-1 { animation-delay: 0.6s; }
.reveal-2 { animation-delay: 1.2s; }
.reveal-3 { animation-delay: 1.8s; }
.reveal-4 { animation-delay: 2.5s; }
.reveal-5 { animation-delay: 3.2s; }

/* ── Progress Bar ── */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(193,127,62,0.15);
  z-index: 100;
}

.progress-bar__fill {
  height: 100%;
  background: var(--gold);
  transition: width 600ms cubic-bezier(0.4,0,0.2,1);
  transform-origin: left;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: 'Playfair Display', serif;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.9em 2em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 350ms ease;
  min-height: 48px;
  min-width: 160px;
  text-align: center;
  letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.btn--primary {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
}

.btn--primary:hover, .btn--primary:focus-visible {
  background: var(--gold);
  color: var(--bg);
  text-decoration: none;
}

.btn--ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(122,114,104,0.3);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
}

.btn--ghost:hover {
  border-color: var(--muted);
  color: var(--text);
  text-decoration: none;
}

.btn--green {
  background: var(--green);
  color: #fff;
  border: 1.5px solid var(--green);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
}

.btn--green:hover {
  background: #3d5636;
  border-color: #3d5636;
  text-decoration: none;
}

/* ── Landing Screen ── */
.landing {
  text-align: center;
  padding: 0 1.5rem;
}

.landing__name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1rem, 3vw, 1.1875rem);
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.landing__headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 4vw, 2.125rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 0.6em;
}

.landing__sub {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.landing__sub strong {
  color: var(--text);
  font-weight: 500;
}

.landing__meta {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 2rem;
  letter-spacing: 0.01em;
}

.landing__crisis {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1.25rem;
}

.landing__crisis a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Entry Screen ── */
.entry {
  text-align: left;
}

.entry__title {
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  margin-bottom: 1.75rem;
  color: var(--gold);
}

.entry__body {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 2.5rem;
}

/* ── Question Screen ── */
.question-screen {
  width: 100%;
}

.question-card {
  background: var(--surface);
  border-radius: 4px;
  padding: clamp(1.75rem, 5vw, 3rem);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  animation: slideInRight 0.35s ease both;
}

.question-card.slide-out {
  animation: slideOutLeft 0.35s ease both;
}

.question-number {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.question-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 2rem;
}

.answer-options {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.answer-option {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  transition: all 300ms ease;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text);
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  width: 100%;
}

.answer-option:hover {
  border-color: var(--border);
  background: #F0EBE2;
}

.answer-option.selected {
  border-color: var(--gold);
  background: #EDE0CE;
}

.answer-option__letter {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  transition: all 300ms ease;
  margin-top: 0.1em;
}

.answer-option.selected .answer-option__letter {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.question-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.question-footer__calm {
  font-size: 0.8125rem;
  color: var(--muted);
  font-style: italic;
}

.question-footer__crisis {
  font-size: 0.75rem;
  color: var(--muted);
}

.question-footer__crisis a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-continue {
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 350ms ease, transform 350ms ease;
}

.btn-continue.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ── Processing Screen ── */
.processing {
  text-align: center;
}

.processing__text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.processing__sub {
  font-size: 0.9375rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 2.5rem;
}

.processing__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.processing__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s ease-in-out infinite;
}

.processing__dot:nth-child(2) { animation-delay: 0.4s; }
.processing__dot:nth-child(3) { animation-delay: 0.8s; }

/* ── Output Screen ── */
.output {
  padding-bottom: 4rem;
}

.output__acknowledgment {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 3rem;
}

.output__acknowledgment p + p { margin-top: 1.25em; }

.output__divider {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 2.5rem auto;
  max-width: 200px;
}

.output__reveal-label {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-align: center;
  margin-bottom: 1.25rem;
}

.output__profile-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 500;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.875rem;
}

.output__profile-desc {
  font-size: 1rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.75;
  font-style: italic;
  max-width: 48ch;
  margin: 0 auto 2rem;
}

/* Currency Card */
.currency-card {
  background: var(--surface);
  border: 1.5px solid var(--gold);
  border-radius: 4px;
  padding: clamp(2rem, 6vw, 3rem);
  text-align: center;
  margin: 2.5rem 0;
  position: relative;
  box-shadow: 0 4px 32px rgba(193,127,62,0.12);
}

.currency-card::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(193,127,62,0.2);
  border-radius: 2px;
  pointer-events: none;
}

.currency-card__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 0.875rem;
}

.currency-card__profile {
  font-family: 'Playfair Display', serif;
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.currency-card__statement {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.6;
  color: var(--text);
  max-width: 44ch;
  margin: 0 auto 1.5rem;
}

.currency-card__truth {
  font-size: 0.875rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.currency-card__share {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.btn--share {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  padding: 0.6em 1.5em;
  min-height: 40px;
  min-width: auto;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 300ms ease;
}

.btn--share:hover { border-color: var(--gold); color: var(--gold); }

/* Concrete Truth */
.output__truth {
  margin: 2.5rem 0;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text);
}

.output__truth p + p { margin-top: 1.25em; }

/* Program Bridge */
.program-bridge {
  margin: 3.5rem 0 0;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.program-bridge__opening {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 2.5rem;
}

.program-bridge__divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 2rem auto;
  opacity: 0.5;
}

.program-bridge__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.375rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.program-bridge__tagline {
  font-size: 0.9375rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0.875rem;
  line-height: 1.7;
}

.program-bridge__price {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 500;
  color: var(--gold);
  margin: 1.25rem 0;
}

#paypal-button-container {
  max-width: 360px;
  margin: 0 auto 1rem;
}

.program-bridge__guarantee {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 1.25rem;
  line-height: 1.7;
}

.program-bridge__return {
  font-size: 0.875rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 1.25rem;
}

/* ── Post-Payment Screen ── */
.post-payment {
  text-align: center;
}

.post-payment__headline {
  font-size: clamp(1.375rem, 3.5vw, 1.875rem);
  margin-bottom: 1rem;
}

.post-payment__body {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 2.5rem;
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

.post-payment__actions {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  align-items: center;
}

/* ── Program Screen ── */
.program-screen {
  padding-bottom: 5rem;
}

.program-header {
  text-align: center;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.program-header__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.program-header__name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  font-weight: 500;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.program-header__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 400;
  margin-bottom: 1.25rem;
}

.program-header__print {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.875rem;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5em 1em;
  border-radius: var(--radius);
  transition: color 300ms ease;
}

.program-header__print:hover { color: var(--gold); }

.week-section {
  margin-bottom: 4rem;
}

.week-header {
  margin-bottom: 2rem;
}

.week-header__number {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 0.375rem;
}

.week-header__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  margin-bottom: 0.625rem;
}

.week-header__intention {
  font-size: 0.9375rem;
  color: var(--muted);
  font-style: italic;
  border-left: 2px solid var(--gold);
  padding-left: 1rem;
  line-height: 1.7;
}

.day-card {
  background: var(--surface);
  border-radius: 4px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--surface-2);
  transition: border-color 300ms ease;
}

.day-card:hover { border-left-color: var(--gold); }

.day-card__header {
  display: flex;
  align-items: baseline;
  gap: 0.875rem;
  margin-bottom: 1rem;
}

.day-card__number {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  flex-shrink: 0;
}

.day-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text);
}

.day-card__section {
  margin-bottom: 1.25rem;
}

.day-card__section-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 0.375rem;
}

.day-card__section-content {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text);
}

.day-card__question {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-family: 'Playfair Display', serif;
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Crisis Screen ── */
.crisis-screen {
  text-align: center;
}

.crisis-screen__headline {
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  margin-bottom: 1.25rem;
  color: var(--text);
}

.crisis-screen__body {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 2.5rem;
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
}

.crisis-resources {
  background: var(--surface);
  border-radius: 4px;
  padding: 2rem;
  text-align: left;
  margin: 0 auto 2rem;
  max-width: 480px;
}

.crisis-resource {
  display: flex;
  gap: 0.875rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}

.crisis-resource:last-child { border-bottom: none; }

.crisis-resource__country {
  font-weight: 500;
  min-width: 60px;
  color: var(--text);
}

.crisis-resource__line {
  color: var(--muted);
}

.crisis-resource__line strong { color: var(--text); }

.crisis-continue {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 1.5rem;
}

/* ── Error State ── */
.error-message {
  background: #FDF6EF;
  border: 1px solid rgba(193,127,62,0.3);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.7;
}

/* ── Loading ── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

/* ── Transitions between screens ── */
.screen-exit {
  animation: slideOutLeft 0.35s ease both;
}

.screen-enter {
  animation: slideInRight 0.35s ease both;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .screen { padding: 2rem 0; }
  .container { padding: 0 1.25rem; }
  .question-card { padding: 1.5rem; }
  .currency-card { padding: 1.5rem; }
  .day-card { padding: 1.25rem; }
  .crisis-resources { padding: 1.25rem; }

  .question-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .post-payment__actions { width: 100%; }
  .post-payment__actions .btn { width: 100%; }
}

@media (min-width: 768px) {
  .answer-options { gap: 0.75rem; }
  .week-section { margin-bottom: 5rem; }
}

/* ── Focus Management ── */
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ── Selection ── */
::selection {
  background: rgba(193,127,62,0.2);
  color: var(--text);
}
