/* RevCalc — product landing page */

:root {
  --bg: #f7f2ea;
  --bg-alt: #efe6d9;
  --card: #ffffff;
  --ink: #1d1d1f;
  --ink-soft: #3d4654;
  --muted: #667085;
  --gold: #b88a44;
  --gold-dark: #8f672f;
  --gold-light: #fff7ea;
  --navy: #1f2933;
  --navy-soft: #2c3a47;
  --border: #e4d8c8;
  --border-strong: #d4c4ae;
  --success: #0f766e;
  --shadow: 0 22px 60px rgba(70, 50, 25, 0.08);
  --shadow-sm: 0 8px 24px rgba(70, 50, 25, 0.06);
  --radius: 20px;
  --radius-lg: 28px;
  --max: 1120px;
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 1rem;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  width: min(var(--max), 92%);
  margin: 0 auto;
}

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(247, 242, 234, 0.88);
  border-bottom: 1px solid rgba(228, 216, 200, 0.7);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.brand-byline {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.nav-links a:hover { color: var(--gold-dark); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-cta:hover {
  background: var(--navy-soft);
  transform: translateY(-1px);
}

@media (max-width: 520px) {
  .nav-actions .nav-cta-demo { display: none; }
}

@media (min-width: 860px) {
  .nav-links { display: flex; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 8px 24px rgba(184, 138, 68, 0.28);
}

.btn-primary:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--gold);
  background: var(--gold-light);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: #fff;
  border-color: var(--border-strong);
}

.btn-dark {
  background: var(--navy);
  color: #fff;
}

.btn-dark:hover { background: var(--navy-soft); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hero */
.hero {
  padding: 3.5rem 0 3rem;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: var(--gold-light);
  border: 1px solid var(--border);
  color: var(--gold-dark);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 6.5vw, 4.35rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  max-width: 14ch;
  margin: 0 auto 1.1rem;
}

.hero-lead {
  max-width: 42rem;
  margin: 0 auto 1.35rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.55;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1.25rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}

.trust-row li {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.trust-row li::before {
  content: "✓ ";
  color: var(--gold-dark);
  font-weight: 800;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero-note {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(239, 230, 217, 0.45) 0%, rgba(247, 242, 234, 0) 100%);
}

.section-title {
  text-align: center;
  max-width: 44rem;
  margin: 0 auto 2.5rem;
}

.section-title h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 0.75rem;
}

.section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.grid {
  display: grid;
  gap: 1.15rem;
}

.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

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

.icon-badge {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  background: var(--gold-light);
  color: var(--gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* Problem / solution split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
}

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
}

.panel-dark {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.panel-dark h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 1rem;
}

.panel-dark ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #cbd5df;
}

.panel-dark li + li { margin-top: 0.55rem; }

.panel-light {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
}

.panel-light h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 1rem;
}

.panel-light ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.panel-light li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.panel-light li:last-child { border-bottom: none; }

.panel-light li::before {
  content: "→ ";
  color: var(--gold-dark);
  font-weight: 700;
}

/* Product preview */
.preview-wrap {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.preview-wrap h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 0.65rem;
}

.preview-wrap > p {
  color: #cbd5df;
  margin: 0 0 1.5rem;
  max-width: 38rem;
}

.mock-app {
  background: var(--bg);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
}

.mock-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.mock-brand {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-dark);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mock-progress {
  display: flex;
  gap: 0.35rem;
}

.mock-progress span {
  width: 1.75rem;
  height: 3px;
  border-radius: 999px;
  background: var(--border);
}

.mock-progress span.on { background: var(--gold); }

.mock-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

@media (max-width: 640px) {
  .mock-row { grid-template-columns: 1fr; }
}

.mock-field {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.mock-result {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.15rem;
}

.mock-result-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.mock-result strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--gold-dark);
  letter-spacing: -0.04em;
  margin: 0.25rem 0 0.5rem;
}

.mock-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.pill-hot {
  background: rgba(180, 35, 24, 0.12);
  color: #9f1f1a;
}

.pill-neutral {
  background: rgba(31, 41, 51, 0.08);
  color: var(--ink-soft);
}

/* Steps */
.steps { counter-reset: step; }

.step-card {
  position: relative;
  padding-left: 3.25rem;
}

.step-card::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1.6rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .step-card {
    padding-left: 0;
    padding-top: 3.25rem;
  }
  .step-card::before {
    top: 1.6rem;
    left: 1.6rem;
  }
}

/* ROI */
.roi-box {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.roi-box p {
  margin: 0;
  font-size: 1.08rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

.roi-box strong {
  color: var(--gold-dark);
}

/* Pricing */
.pricing-card {
  max-width: 26rem;
  margin: 0 auto;
  text-align: center;
  transform: translateY(0);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}

.pricing-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}

.price {
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  margin: 0.35rem 0;
  line-height: 1;
}

.price span {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1.35rem 0 1.5rem;
  text-align: left;
}

.feature-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.feature-list li::before {
  content: "✓";
  color: var(--gold-dark);
  font-weight: 800;
  margin-right: 0.55rem;
}

.pricing-notes {
  margin-top: 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.pricing-notes p { margin: 0.35rem 0; }

.pricing-actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

/* Checkout modal (Stripe Embedded Checkout) */
body.modal-open { overflow: hidden; }

.checkout-overlay,
.demo-overlay {
  /* position/layout in index.html critical CSS (.modal-overlay) */
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(31, 41, 51, 0.72);
  backdrop-filter: blur(8px);
}

.checkout-overlay:not(.is-open),
.demo-overlay:not(.is-open) { display: none !important; }

.checkout-modal {
  width: min(100%, 32rem);
  max-height: min(92vh, 720px);
  overflow: auto;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 80px rgba(20, 15, 10, 0.28);
  border: 1px solid var(--border);
}

.checkout-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.checkout-eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.checkout-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.checkout-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 8px;
}

.checkout-close:hover { color: var(--ink); background: var(--bg-alt); }

.checkout-body {
  padding: 0.5rem 1rem 1.25rem;
  min-height: 12rem;
}

.checkout-loading {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.checkout-error {
  text-align: center;
  padding: 1.75rem 1rem;
  color: #b42318;
}

.checkout-error-help {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.checkout-error a { color: var(--gold-dark); font-weight: 600; }

.checkout-success {
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
}

.checkout-success[hidden] { display: none !important; }

.checkout-success-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #ecfdf5;
  color: var(--success);
  font-size: 1.5rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.checkout-success h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.checkout-success p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.checkout-steps {
  text-align: left;
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

.checkout-steps li { margin-bottom: 0.35rem; }

/* Live demo modal */
.demo-modal {
  width: min(100%, 44rem);
  max-height: min(96vh, 920px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: 0 28px 80px rgba(20, 15, 10, 0.28);
  border: 1px solid var(--border);
}

.demo-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem 0.85rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.demo-eyebrow {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.demo-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.demo-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}

.demo-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 8px;
  flex-shrink: 0;
}

.demo-close:hover { color: var(--ink); background: var(--bg-alt); }

.demo-body {
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  background: #f4f1ec;
  min-height: 20rem;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.demo-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  background: #f4f1ec;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.demo-loading.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.demo-loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(184, 138, 68, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: demo-spin 0.8s linear infinite;
}

@keyframes demo-spin {
  to { transform: rotate(360deg); }
}

.demo-frame {
  width: 100%;
  border: 0;
  display: block;
  min-height: 36rem;
  background: #f4f1ec;
}

.demo-frame[hidden] { display: none !important; }

.demo-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  flex-shrink: 0;
}

.demo-footer[hidden] { display: none !important; }

.demo-footer p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  flex: 1;
  min-width: 12rem;
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
}

.preview-demo-link {
  background: none;
  border: none;
  padding: 0;
  color: #e8c88a;
  font-weight: 700;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.preview-demo-link:hover { color: #f5ddb0; }

.nav-cta-demo {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: inherit;
}

.nav-cta-demo:hover {
  background: #fff;
  border-color: var(--border-strong);
}

@media (max-width: 720px) {
  .demo-overlay { padding: 0.5rem; align-items: flex-end; }
  .demo-modal {
    width: 100%;
    max-height: 96vh;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  .demo-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .demo-footer .btn { width: 100%; }
}

/* FAQ */
.faq-list {
  max-width: 44rem;
  margin: 0 auto;
  display: grid;
  gap: 0.85rem;
}

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

.faq-item h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 0.45rem;
  letter-spacing: -0.02em;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* Final CTA */
.final-cta {
  text-align: center;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 3rem 1.75rem;
  box-shadow: var(--shadow);
}

.final-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin: 0 0 0.85rem;
}

.final-cta p {
  color: #cbd5df;
  max-width: 36rem;
  margin: 0 auto 1.35rem;
  font-size: 1.05rem;
}

.site-footer {
  padding: 2rem 0 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--gold-dark);
  font-weight: 600;
}

.site-footer a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav-cta { transition: none; }
}
