/* Vesta design system — Inter + trust/clarity palette */

:root {
  --bg: #eef2f7;
  --bg-accent: #e0e9f5;
  --surface: rgba(255, 255, 255, 0.62);
  --surface-solid: #f4f7fb;
  --surface-elevated: rgba(255, 255, 255, 0.78);
  --surface-muted: rgba(226, 232, 240, 0.55);
  --text: #0f172a;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.16);
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --accent-glow: rgba(37, 99, 235, 0.18);
  --navy: #0f172a;
  --navy-soft: rgba(15, 23, 42, 0.04);
  --success: #16a34a;
  --success-bg: rgba(22, 163, 74, 0.1);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.1);
  --error: #dc2626;
  --error-bg: rgba(220, 38, 38, 0.08);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 32px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.1);
  --blur: blur(12px);
  --container: 1080px;
  --container-narrow: 560px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--accent-glow), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(30, 64, 175, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg-accent) 0%, var(--bg) 40%, var(--bg) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* Layout */

.vesta-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(238, 242, 247, 0.82);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
}

.vesta-header__inner,
.vesta-footer__inner,
.vesta-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.vesta-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.vesta-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.vesta-logo:hover { color: var(--text); }

.vesta-logo__mark {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #1e40af 100%);
  display: grid;
  place-items: center;
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
}

.vesta-main {
  min-height: calc(100vh - 4rem - 12rem);
}

.vesta-footer {
  margin-top: 4rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  background: rgba(226, 232, 240, 0.35);
  backdrop-filter: var(--blur);
  color: var(--muted);
  font-size: 0.875rem;
}

.vesta-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vesta-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.vesta-footer__links a { color: var(--muted); }
.vesta-footer__links a:hover { color: var(--text); }

/* Typography */

h1, h2, h3 {
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 700; margin: 0 0 1rem; }
h2 { font-size: 1.375rem; font-weight: 600; margin: 0 0 0.5rem; }
h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 0.35rem; }

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 0 2rem;
}

.page-title { font-size: 1.75rem; margin-bottom: 0.5rem; }
.page-lead { color: var(--muted); margin-bottom: 2rem; }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--navy);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: #1e293b;
  color: white;
  box-shadow: var(--shadow-md);
}

.btn--accent {
  background: var(--accent);
  color: white;
}

.btn--accent:hover {
  background: var(--accent-hover);
  color: white;
}

.btn--ghost {
  background: var(--surface);
  backdrop-filter: var(--blur);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: var(--surface-elevated);
  color: var(--text);
  border-color: var(--border-strong);
}

/* Cards & options */

.card-grid {
  display: grid;
  gap: 1rem;
}

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

.option-card {
  display: block;
  padding: 1.35rem 1.5rem;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, background 0.15s;
}

.option-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: inherit;
}

.option-card--featured {
  border-color: rgba(37, 99, 235, 0.35);
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.14) 0%, var(--surface) 55%);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.option-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.badge--dark { background: var(--navy); color: white; }
.badge--accent { background: var(--accent-soft); color: var(--accent); }

/* Landing page */

.hero {
  padding: 3.5rem 0 1.5rem;
  text-align: center;
}

.hero__inner {
  max-width: 42rem;
  margin: 0 auto;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero .lead { margin-left: auto; margin-right: auto; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.section {
  padding: 2.5rem 0;
}

.section--alt {
  background: var(--navy-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section__title {
  text-align: center;
  margin-bottom: 0.35rem;
}

.section__subtitle {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 2rem;
  max-width: 32rem;
}

.steps {
  display: grid;
  gap: 1.25rem;
  counter-reset: step;
}

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

.step {
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.trust-strip {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .trust-strip { grid-template-columns: repeat(3, 1fr); }
}

.trust-item {
  text-align: center;
  padding: 1.25rem 1rem;
  background: var(--surface-muted);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.trust-item strong {
  display: block;
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.trust-item span {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Form pages */

.page-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.form-field { margin-bottom: 1rem; }

.form-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 480px) {
  .form-row--2 { grid-template-columns: 1fr 1fr; }
}

.hint {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: -0.25rem;
  margin-bottom: 1rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.back-link:hover { color: var(--text); }

.alert {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
}

.alert--success { background: var(--success-bg); color: #166534; }
.alert--error { background: var(--error-bg); color: #991b1b; }

/* Status page badges */

.status-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.status-badge.likely_eligible { background: var(--success-bg); color: #065f46; }
.status-badge.possibly_eligible { background: var(--warning-bg); color: #92400e; }
.status-badge.not_eligible { background: #f1f5f9; color: #475569; }
.status-badge.needs_more_information,
.status-badge.needs_review { background: var(--accent-soft); color: #1e40af; }
.status-badge.unsupported,
.status-badge.fetch_pending { background: var(--warning-bg); color: #92400e; }
.status-badge.error { background: var(--error-bg); color: #991b1b; }

.info-card {
  background: var(--surface);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.info-card h2 { font-size: 1rem; margin-bottom: 0.5rem; }
.info-card .meta { color: var(--muted); font-size: 0.9rem; margin: 0; }
.info-card .amount { font-size: 1.5rem; font-weight: 700; margin: 0.5rem 0; }

/* Mobile sticky CTA */

.mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(238, 242, 247, 0.92);
  backdrop-filter: var(--blur);
  border-top: 1px solid var(--border);
  z-index: 40;
}

.mobile-cta .btn { width: 100%; }

@media (max-width: 767px) {
  .mobile-cta { display: block; }
  .vesta-main--landing { padding-bottom: 5rem; }
}

/* Upload dropzone */

.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 2rem 1rem;
  text-align: center;
  background: var(--surface-muted);
  cursor: pointer;
  margin-bottom: 1rem;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover { border-color: #94a3b8; }

.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone.has-file {
  border-style: solid;
  background: var(--success-bg);
  border-color: #86efac;
}

.dropzone p { margin: 0.25rem 0; color: var(--muted); }
.filename { font-weight: 600; color: var(--text); word-break: break-all; }

.btn--block { width: 100%; }

.result { margin-top: 1.5rem; display: none; }
.result.success { display: block; background: var(--success-bg); color: #166534; padding: 1rem 1.15rem; border-radius: var(--radius-sm); }
.result.error { display: block; background: var(--error-bg); color: #991b1b; padding: 1rem 1.15rem; border-radius: var(--radius-sm); }

.claim-email {
  font-size: 1.1rem;
  font-weight: 600;
  word-break: break-all;
}

.loading { color: var(--muted); }

/* Auth / account */

.auth-panel {
  margin-top: 1.5rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: 0.875rem;
}

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

.auth-divider span {
  flex-shrink: 0;
}

.auth-alt,
.auth-note,
.auth-muted {
  color: var(--muted);
  font-size: 0.9375rem;
}

.auth-note {
  margin-top: 1rem;
  font-size: 0.875rem;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.auth-msg {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.auth-signout {
  margin-top: 1.5rem;
}

.btn--google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  background: white;
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn--google:hover {
  background: #f8fafc;
  color: var(--text);
  box-shadow: var(--shadow-md);
}

.btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #4285f4;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
}

/* Quick eligibility checker */

.quick-check {
  max-width: 42rem;
  margin: 2.5rem auto 0;
  text-align: left;
}

.quick-check__panel {
  background: var(--surface-elevated);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
}

.quick-check__header {
  margin-bottom: 1.25rem;
}

.quick-check__header h2 {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.quick-check__header p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.quick-check__form .form-row {
  margin-bottom: 0;
}

.quick-check__actions {
  margin-top: 1rem;
}

.check-result {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: none;
}

.check-result.visible { display: block; }

.check-result--likely_eligible,
.check-result--possibly_eligible {
  background: var(--success-bg);
  border-color: rgba(22, 163, 74, 0.25);
}

.check-result--not_eligible {
  background: var(--surface-muted);
}

.check-result--needs_more_information,
.check-result--unsupported {
  background: var(--accent-soft);
  border-color: rgba(37, 99, 235, 0.2);
}

.check-result__badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.check-result--likely_eligible .check-result__badge { color: #065f46; }
.check-result--possibly_eligible .check-result__badge { color: #92400e; }
.check-result--not_eligible .check-result__badge { color: #475569; }
.check-result--needs_more_information .check-result__badge,
.check-result--unsupported .check-result__badge { color: #1e40af; }

.check-result__amount {
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0.35rem 0;
}

.check-result p {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
}

.check-result__cta {
  margin-top: 1rem;
}

.check-result__disclaimer {
  margin-top: 0.75rem !important;
  font-size: 0.8125rem !important;
  color: var(--muted) !important;
}

/* Affiliate / partner pages */

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

.affiliate-link-demo {
  max-width: 36rem;
  margin: 0 auto;
  padding: 1.5rem;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.affiliate-link-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.affiliate-link-preview__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.affiliate-link-preview code {
  flex: 1 1 12rem;
  font-size: 0.8125rem;
  word-break: break-all;
  color: var(--text);
}

.affiliate-link-preview .btn {
  min-height: 36px;
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
}

.affiliate-apply {
  margin-top: 1.5rem;
}

.trust-strip--compact {
  max-width: 42rem;
  margin: 2rem auto 0;
}

.ref-notice {
  margin: -0.5rem 0 1.25rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  text-align: center;
}

/* SEO guide pages */

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

.content-panel {
  padding: 1.5rem 1.75rem;
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.content-panel h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
}

.content-panel h3:first-child {
  margin-top: 0;
}

.content-panel ul,
.content-panel ol {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
}

.content-panel li + li {
  margin-top: 0.35rem;
}

.video-embed {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.video-embed iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.video-embed__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 12rem;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

.video-embed__placeholder p {
  margin: 0;
  font-size: 0.95rem;
}

.comparison-table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.comparison-table th,
.comparison-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  font-weight: 600;
  background: var(--surface-muted);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table .highlight {
  background: var(--accent-soft);
  font-weight: 600;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.faq-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}
