/* ============================
   HERO SECTION
   ============================ */
.hero {
  padding: 80px 0 80px;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
}

.hero__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xl);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.hero__content {
  text-align: center;
  max-width: 700px;
}

/* Eyebrow */
.hero__eyebrow {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  margin-bottom: var(--space-xl);
  opacity: 0;
  animation: revealUp var(--duration-reveal) var(--ease-out-expo) 0s forwards;
}

/* Heading: "I want to" in quiet sans, goal in HUGE serif italic */
.hero__heading {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.3;
  margin-bottom: var(--space-xl);
  opacity: 0;
  animation: revealUp var(--duration-reveal) var(--ease-out-expo) 0.12s forwards;
}

.hero__goal-carousel {
  display: block;
  position: relative;
  font-weight: 800;
  font-size: clamp(36px, 8vw, 76px);
  line-height: 1.15;
  margin-top: var(--space-sm);
  min-height: 1.3em;
  text-align: center;
}

.hero__goal {
  display: inline-block;
  padding: 0;
  border-radius: 0;
  background: none;
  border: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero__goal--active {
  opacity: 1;
  transform: none;
  text-shadow: 0 0 60px currentColor;
}

.hero__goal--exit {
  opacity: 0;
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%) translateY(-15px);
}

.hero__goal--enter {
  opacity: 0;
  transform: translateY(15px);
}

/* Subtitle */
.hero__subtitle {
  font-size: clamp(15px, 2.5vw, 18px);
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
  margin-bottom: var(--space-2xl);
  opacity: 0;
  animation: revealUp var(--duration-reveal) var(--ease-out-expo) 0.3s forwards;
}

/* CTA */
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  justify-content: center;
  opacity: 0;
  animation: revealUp var(--duration-reveal) var(--ease-out-expo) 0.45s forwards;
}

/* ── Hero metric card ── */
.hero__metric-card {
  width: 100%;
  max-width: 480px;
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-2xl);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: var(--space-xl);
  color: #FFFFFF;
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo);
  opacity: 0;
  animation: revealUp var(--duration-reveal) var(--ease-out-expo) 0.2s forwards;
}

/* Animated gradient border */
.hero__metric-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-2xl);
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.4),
    rgba(59, 130, 246, 0.15),
    rgba(124, 58, 237, 0.08),
    rgba(102, 220, 126, 0.2)
  );
  background-size: 300% 300%;
  animation: borderShimmer 8s ease-in-out infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes borderShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero__metric-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 60px rgba(124, 58, 237, 0.15), 0 0 80px rgba(124, 58, 237, 0.05);
}

.hero__metric-card-title {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-lg);
}

.hero__metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.hero__metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero__metric-label {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
}

.hero__metric-value {
  font-size: var(--font-size-title);
  font-weight: 700;
  color: #FFFFFF;
}

.hero__metric-trend {
  font-size: var(--font-size-xs);
  font-weight: 600;
}

.hero__metric-trend--up { color: var(--trend-up); }
.hero__metric-trend--down { color: var(--trend-down); }

/* Mini chart */
.hero__mini-chart {
  height: 120px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: var(--space-lg);
  overflow: hidden;
  position: relative;
}

.hero__mini-chart svg {
  width: 100%;
  height: 100%;
}

.hero__metric-footer {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.5;
  margin-bottom: var(--space-lg);
}

/* ============================
   FEATURES SECTION
   ============================ */
.features {
  padding: var(--space-5xl) 0;
}

.features__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  text-align: center;
}

.features__heading {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: var(--space-md);
}

.features__subtitle {
  font-size: var(--font-size-body-lg);
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: var(--space-3xl);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.feature-card {
  --card-accent: var(--color-primary-light);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  text-align: left;
  transition: transform 0.4s var(--ease-out-expo),
              border-color 0.3s,
              box-shadow 0.4s;
}

.feature-card:nth-child(1) { --card-accent: var(--feature-green); }
.feature-card:nth-child(2) { --card-accent: var(--feature-blue); }
.feature-card:nth-child(3) { --card-accent: var(--feature-yellow); }
.feature-card:nth-child(4) { --card-accent: var(--feature-purple); }

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.feature-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: var(--space-lg);
  font-size: 24px;
  color: var(--card-accent);
  transition: box-shadow 0.4s;
}

.feature-card:nth-child(1):hover .feature-card__icon { box-shadow: 0 0 24px rgba(52, 211, 153, 0.35); }
.feature-card:nth-child(2):hover .feature-card__icon { box-shadow: 0 0 24px rgba(96, 165, 250, 0.35); }
.feature-card:nth-child(3):hover .feature-card__icon { box-shadow: 0 0 24px rgba(252, 211, 77, 0.35); }
.feature-card:nth-child(4):hover .feature-card__icon { box-shadow: 0 0 24px rgba(168, 85, 247, 0.35); }

.feature-card__title {
  font-size: var(--font-size-body-xl);
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: var(--space-sm);
}

.feature-card__desc {
  font-size: var(--font-size-body);
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.7;
}

/* ============================
   HOW IT WORKS SECTION
   ============================ */
.how-it-works {
  padding: var(--space-5xl) 0;
  color: #FFFFFF;
}

.how-it-works__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  text-align: center;
}

.how-it-works__heading {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.how-it-works__subtitle {
  font-size: var(--font-size-body-lg);
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: var(--space-3xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.how-it-works__steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  text-align: left;
}

.how-it-works__step {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  transition: border-color 0.3s;
}

.how-it-works__step:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.how-it-works__step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid rgba(124, 58, 237, 0.5);
  font-size: var(--font-size-title);
  font-weight: 700;
  color: var(--color-primary-light);
  margin-bottom: var(--space-lg);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.15);
}

.how-it-works__step-title {
  font-size: var(--font-size-body-xl);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.how-it-works__step-desc {
  font-size: var(--font-size-body);
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.how-it-works__highlights {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.how-it-works__highlight {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: var(--font-size-body);
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.6;
}

.how-it-works__highlight::before {
  content: '~';
  color: var(--color-accent);
  font-weight: 600;
  flex-shrink: 0;
}

/* ============================
   PLAN CARDS SECTION (dark glass)
   ============================ */
.plan-cards {
  padding: var(--space-5xl) 0;
}

.plan-cards__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  text-align: center;
}

.plan-cards__heading {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: var(--space-3xl);
}

.plan-cards__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.plan-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-2xl);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: var(--space-2xl);
  text-align: left;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s;
}

/* Colored top accent per card */
.plan-card:nth-child(1) { border-top: 2px solid var(--feature-purple); }
.plan-card:nth-child(2) { border-top: 2px solid var(--feature-pink); }
.plan-card:nth-child(3) { border-top: 2px solid var(--feature-green); }

.plan-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.plan-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(124, 58, 237, 0.15);
  margin-bottom: var(--space-lg);
  color: var(--color-primary-light);
  font-size: 24px;
}

.plan-card__title {
  font-size: var(--font-size-title);
  font-weight: 600;
  color: #FFFFFF;
  margin-bottom: var(--space-sm);
}

.plan-card__desc {
  font-size: var(--font-size-body);
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}

.plan-card__preview {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Debt items (dark theme) */
.debt-item {
  margin-bottom: var(--space-md);
}

.debt-item__header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
  font-size: var(--font-size-sm);
}

.debt-item__name {
  font-weight: 500;
  color: #FFFFFF;
}

.debt-item__amount {
  color: rgba(255, 255, 255, 0.4);
}

.debt-item__bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.debt-item__fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.debt-free-date {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.4);
}

.debt-free-date strong {
  color: var(--color-primary-light);
  font-weight: 600;
}

/* Budget preview (dark theme) */
.budget-preview {
  display: flex;
  gap: var(--space-xl);
  justify-content: center;
}

.budget-ring {
  text-align: center;
}

.budget-ring__label {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.4);
  margin-top: var(--space-sm);
}

/* ============================
   CTA BANNER
   ============================ */
.cta-banner {
  padding: var(--space-5xl) 0;
}

.cta-banner__container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
  text-align: center;
}

.cta-banner__heading {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: var(--space-lg);
}

.cta-banner__text {
  font-size: var(--font-size-body-lg);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  margin-bottom: var(--space-2xl);
}

/* ============================
   ASK FRANCIS SECTION
   ============================ */
.ask-francis {
  padding: var(--space-5xl) 0;
}

.ask-francis__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  text-align: center;
}

.ask-francis__heading {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: var(--space-3xl);
}

.ask-francis__subtitle {
  color: rgba(255, 255, 255, 0.45);
  max-width: 520px;
  margin: calc(-1 * var(--space-xl)) auto var(--space-2xl);
  font-size: var(--font-size-body-lg);
  line-height: 1.7;
}

/* Chat preview */
.chat-preview {
  max-width: 520px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-2xl);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

.chat-preview__header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-preview__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cta-start), var(--cta-end));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.chat-preview__name {
  font-size: var(--font-size-body);
  font-weight: 600;
  color: #FFFFFF;
}

.chat-preview__status {
  font-size: var(--font-size-xs);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-preview__status::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.chat-preview__messages {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.chat-msg {
  max-width: 85%;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-body);
  line-height: 1.6;
}

.chat-msg--user {
  align-self: flex-end;
  background: var(--color-primary);
  color: #FFFFFF;
  border-bottom-right-radius: var(--space-xs);
}

.chat-msg--ai {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  border-bottom-left-radius: var(--space-xs);
}

.chat-preview__actions {
  display: flex;
  gap: var(--space-sm);
  padding: 0 var(--space-xl);
  padding-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.chat-action {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--font-size-xs);
  cursor: default;
  transition: border-color 0.2s, background 0.2s;
}

.chat-action:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.chat-preview__input {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-preview__input-field {
  flex: 1;
  font-size: var(--font-size-body);
  color: rgba(255, 255, 255, 0.25);
}

.chat-preview__send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-accent);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.chat-preview__send svg {
  width: 16px;
  height: 16px;
  fill: #111827;
}

/* ============================
   SCROLL REVEAL ANIMATIONS
   ============================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease-out-expo),
              transform 0.8s var(--ease-out-expo);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out-expo),
              transform 0.7s var(--ease-out-expo);
}

[data-reveal-stagger].is-revealed > * {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-stagger].is-revealed > *:nth-child(1) { transition-delay: 0s; }
[data-reveal-stagger].is-revealed > *:nth-child(2) { transition-delay: 0.1s; }
[data-reveal-stagger].is-revealed > *:nth-child(3) { transition-delay: 0.15s; }
[data-reveal-stagger].is-revealed > *:nth-child(4) { transition-delay: 0.25s; }
