/* ============================================================
   CLAIMANA — Design Tokens & Styles
   Financial / Analytical / Professional — Light & Airy
   ============================================================ */

/* --- Type Scale --- */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);

  /* --- Spacing (4px base) --- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* --- Radius --- */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* --- Transitions --- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);

  /* --- Content Widths --- */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* --- Fonts --- */
  --font-display: 'Switzer', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;
}

/* ============================================================
   LIGHT MODE — Professional financial palette
   Cool slate surfaces, deep navy primary, warm gold accent
   ============================================================ */
:root,
[data-theme='light'] {
  --color-bg: #f5f6f8;
  --color-surface: #fff;
  --color-surface-2: #eef0f4;
  --color-surface-offset: #e6e9ef;
  --color-divider: #d2d6de;
  --color-border: #c5cad4;
  --color-text: #1b2236;
  --color-text-muted: #5a6378;
  --color-text-faint: #9ba3b5;
  --color-primary: #1b4f72;
  --color-primary-hover: #153d5b;
  --color-primary-active: #0f2d44;
  --color-primary-light: #e8f0f7;
  --color-accent: #c6922a;
  --color-accent-hover: #a87b22;
  --color-accent-light: #fdf5e6;
  --color-success: #2e7d5b;
  --color-error: #b83b3b;
  --shadow-sm: 0 1px 2px oklch(25% 0.02 250deg / 6%);
  --shadow-md: 0 4px 12px oklch(25% 0.02 250deg / 8%);
  --shadow-lg: 0 12px 32px oklch(25% 0.02 250deg / 12%);
}

/* ============================================================
   DARK MODE
   ============================================================ */
[data-theme='dark'] {
  --color-bg: #0f1320;
  --color-surface: #171c2c;
  --color-surface-2: #1d2336;
  --color-surface-offset: #232a3e;
  --color-divider: #2a3248;
  --color-border: #354058;
  --color-text: #d4d8e4;
  --color-text-muted: #8891a8;
  --color-text-faint: #5a6378;
  --color-primary: #5ca0d0;
  --color-primary-hover: #7bb5dd;
  --color-primary-active: #3d89bf;
  --color-primary-light: #1d2a3e;
  --color-accent: #e0ad40;
  --color-accent-hover: #ecc25c;
  --color-accent-light: #2a2518;
  --color-success: #4dab82;
  --color-error: #e06060;
  --shadow-sm: 0 1px 2px oklch(0% 0 0deg / 20%);
  --shadow-md: 0 4px 12px oklch(0% 0 0deg / 30%);
  --shadow-lg: 0 12px 32px oklch(0% 0 0deg / 40%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0f1320;
    --color-surface: #171c2c;
    --color-surface-2: #1d2336;
    --color-surface-offset: #232a3e;
    --color-divider: #2a3248;
    --color-border: #354058;
    --color-text: #d4d8e4;
    --color-text-muted: #8891a8;
    --color-text-faint: #5a6378;
    --color-primary: #5ca0d0;
    --color-primary-hover: #7bb5dd;
    --color-primary-active: #3d89bf;
    --color-primary-light: #1d2a3e;
    --color-accent: #e0ad40;
    --color-accent-hover: #ecc25c;
    --color-accent-light: #2a2518;
    --color-success: #4dab82;
    --color-error: #e06060;
    --shadow-sm: 0 1px 2px oklch(0% 0 0deg / 20%);
    --shadow-md: 0 4px 12px oklch(0% 0 0deg / 30%);
    --shadow-lg: 0 12px 32px oklch(0% 0 0deg / 40%);
  }
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.container--narrow {
  max-width: var(--content-default);
}

.section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 92%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid oklch(from var(--color-border) l c h / 50%);
  transition: box-shadow 0.3s var(--ease-out);
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
}

.logo__icon {
  width: 36px;
  height: 36px;
  color: var(--color-primary);
}

.logo__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
}

.logo__sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 400;
  display: block;
  line-height: 1.1;
  margin-top: -2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive);
}

.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-block: clamp(var(--space-16), 10vw, var(--space-32));
  text-align: left;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: center;
}

@media (width >= 768px) {
  .hero__grid {
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-12);
  }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

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

.hero__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 52ch;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

.hero__visual {
  display: flex;
  justify-content: center;
}

.hero__card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-border) l c h / 50%);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
}

.hero__card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
}

.hero__card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.hero__card-badge {
  font-size: var(--text-xs);
  color: var(--color-success);
  font-weight: 600;
  background: oklch(from var(--color-success) l c h / 10%);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
}

.hero__card-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.hero__card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
}

.hero__card-label {
  color: var(--color-text-muted);
}

.hero__card-value {
  font-weight: 600;
  color: var(--color-text);
  font-variant-numeric: tabular-nums lining-nums;
}

.hero__card-value--positive {
  color: var(--color-success);
}

.hero__card-value--negative {
  color: var(--color-error);
}

.hero__card-total {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 2px solid var(--color-primary);
}

.hero__card-total .hero__card-value {
  font-size: var(--text-base);
  color: var(--color-primary);
  font-weight: 700;
}

/* ============================================================
   CTA FORM (used in hero + standalone)
   ============================================================ */
.cta-form {
  display: flex;
  gap: var(--space-2);
  max-width: 480px;
}

.cta-form__input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition:
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive);
  min-width: 0;
}

.cta-form__input::placeholder {
  color: var(--color-text-faint);
}

.cta-form__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 15%);
}

.cta-form__btn {
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}

.cta-form__btn:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.cta-form__btn:active {
  background: var(--color-primary-active);
  transform: translateY(0);
}

.cta-form__note {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-2);
}

.cta-form__note--error {
  color: var(--color-error);
}

.cta-form__success {
  display: none;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: oklch(from var(--color-success) l c h / 10%);
  color: var(--color-success);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
}

.cta-form__success.is-visible {
  display: flex;
}

/* ============================================================
   PAIN POINTS SECTION
   ============================================================ */
.pain-section {
  background: var(--color-surface);
}

.pain-section__header {
  text-align: left;
  max-width: 60ch;
  margin-bottom: var(--space-12);
}

.section-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
}

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

@media (width >= 640px) {
  .pain-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (width >= 960px) {
  .pain-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pain-card {
  padding: var(--space-6);
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 1px solid oklch(from var(--color-border) l c h / 40%);
}

.pain-card__icon {
  width: 24px;
  height: 24px;
  color: var(--color-error);
  margin-bottom: var(--space-3);
  opacity: 0.8;
}

.pain-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.pain-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================================================
   FEATURES SECTION
   ============================================================ */
.features-section__header {
  text-align: left;
  max-width: 60ch;
  margin-bottom: var(--space-12);
}

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

@media (width >= 768px) {
  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.feature-card {
  padding: var(--space-6);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid oklch(from var(--color-border) l c h / 40%);
  transition:
    box-shadow var(--transition-interactive),
    border-color var(--transition-interactive);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  border-color: oklch(from var(--color-primary) l c h / 30%);
}

.feature-card__icon {
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.feature-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.feature-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-section {
  background: var(--color-surface);
}

.how-section__header {
  text-align: left;
  max-width: 60ch;
  margin-bottom: var(--space-12);
}

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

@media (width >= 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.step__number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
}

.step__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
}

.step__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  text-align: center;
}

.cta-section__inner {
  background: var(--color-primary-light);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-10), 6vw, var(--space-16));
  border: 1px solid oklch(from var(--color-primary) l c h / 15%);
}

.cta-section .section-title {
  margin-inline: auto;
  text-align: center;
}

.cta-section .section-desc {
  margin-inline: auto;
  max-width: 52ch;
  text-align: center;
}

.cta-section .cta-form {
  margin-inline: auto;
  justify-content: center;
}

.cta-section .cta-form__note {
  text-align: center;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding-block: var(--space-8);
  border-top: 1px solid var(--color-divider);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}

@media (width >= 640px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer__copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.footer__links {
  display: flex;
  gap: var(--space-4);
}

.footer__links a {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-interactive);
}

.footer__links a:hover {
  color: var(--color-primary);
}

/* ============================================================
   FAQ SECTION
   ============================================================ */
.faq-section {
  background: var(--color-surface);
}

.faq-section__header {
  text-align: left;
  max-width: 60ch;
  margin-bottom: var(--space-10);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid var(--color-divider);
}

.faq-item:first-child {
  border-top: 1px solid var(--color-divider);
}

.faq-item__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.4;
  transition: color var(--transition-interactive);
}

.faq-item__question::-webkit-details-marker {
  display: none;
}

.faq-item__question::marker {
  content: '';
}

.faq-item__question:hover {
  color: var(--color-primary);
}

.faq-item__chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-text-faint);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item[open] .faq-item__chevron {
  transform: rotate(180deg);
}

.faq-item__answer {
  padding-bottom: var(--space-6);
  padding-right: var(--space-10);
}

.faq-item__answer p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 65ch;
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.fade-in {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}

@keyframes reveal-fade {
  to {
    opacity: 1;
  }
}

/* ============================================================
   TRUST BAR
   ============================================================ */
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  align-items: center;
  padding-block: var(--space-4);
  margin-top: var(--space-8);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.trust-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
  flex-shrink: 0;
}

/* ============================================================
   STAT STRIP
   ============================================================ */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-6);
  padding-block: var(--space-8);
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.stat__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--color-primary);
  font-variant-numeric: tabular-nums lining-nums;
}

.stat__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
