/* ========================================
   Anvil AI Landing Page — Mobile-First
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --dark: #1a1a2e;
  --orange: #e85d26;
  --orange-hover: #d04e1c;
  --blue: #2d6a9f;
  --off-white: #f5f5f0;
  --light-gray: #eaeaea;
  --white: #ffffff;
  --text: #333333;
  --text-light: #cccccc;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --nav-height: 64px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text);
  background: var(--off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 {
  line-height: 1.2;
}

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

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

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-weight: 600;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  text-align: center;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  padding: 14px 32px;
  font-size: 1rem;
}

.btn-primary:hover {
  background: var(--orange-hover);
  box-shadow: 0 4px 16px rgba(232, 93, 38, 0.35);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.1rem;
}

.btn-full {
  width: 100%;
}

.btn-nav {
  background: var(--orange);
  color: var(--white);
  padding: 10px 24px;
  font-size: 0.9rem;
}

.btn-nav:hover {
  background: var(--orange-hover);
}

.btn.submitted {
  background: #2a9d5c;
}

/* --- Sticky Nav --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--dark);
  z-index: 1000;
  transition: box-shadow 0.2s;
}

.nav.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--orange);
}

.nav-links {
  display: none;
  flex-direction: column;
  position: absolute;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--dark);
  padding: 20px;
  gap: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.nav-links.open {
  display: flex;
}

.nav-links a {
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.2s, opacity 0.2s;
  border-radius: 1px;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- Hero --- */
.hero {
  background: var(--dark);
  padding: calc(var(--nav-height) + 48px) 0 64px;
  color: var(--white);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.hero-text h1 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-light);
  margin-bottom: 28px;
  max-width: 540px;
}

/* Dashboard mockup shared styles */
.dashboard-mock, .browser-frame {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #e8e8e8;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.mock-url {
  margin-left: 12px;
  font-size: 0.75rem;
  color: #888;
  font-family: monospace;
}

.mock-body {
  padding: 16px;
}

.mock-header-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.mock-stat-card {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
}

.mock-stat-card.accent {
  background: var(--orange);
  color: var(--white);
}

.mock-stat-num {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
}

.mock-stat-label {
  display: block;
  font-size: 0.65rem;
  color: #888;
  margin-top: 2px;
}

.mock-stat-card.accent .mock-stat-label {
  color: rgba(255,255,255,0.8);
}

.mock-table {
  font-size: 0.8rem;
}

.mock-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.9fr 0.7fr;
  padding: 8px 0;
  border-bottom: 1px solid var(--light-gray);
  color: var(--text);
  align-items: center;
}

.mock-row.header {
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #999;
  border-bottom: 2px solid var(--light-gray);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.badge.qualified { background: #d4edda; color: #155724; }
.badge.follow-up { background: #fff3cd; color: #856404; }
.badge.new { background: #d1ecf1; color: #0c5460; }

/* --- Problem Section --- */
.problem {
  padding: 64px 0;
  background: var(--white);
  text-align: center;
}

.problem h2 {
  font-size: 1.75rem;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1.05rem;
  color: #666;
  max-width: 640px;
  margin: 0 auto 40px;
}

.stats-row {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.stat-card {
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--light-gray);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
}

.stat-suffix {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--orange);
}

.stat-desc {
  margin-top: 8px;
  font-size: 0.95rem;
  color: #666;
}

/* --- How It Works --- */
.how-it-works {
  padding: 64px 0;
  background: var(--off-white);
  text-align: center;
}

.how-it-works h2 {
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.steps-row {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 40px;
}

.step-arrow {
  display: none;
}

.step {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow);
}

.step-num {
  width: 48px;
  height: 48px;
  background: var(--orange);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 auto 16px;
}

.step h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.95rem;
  color: #666;
}

.follow-up-note {
  margin-top: 32px;
  padding: 20px 24px;
  background: var(--dark);
  color: var(--white);
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Features --- */
.features {
  padding: 64px 0;
  background: var(--white);
  text-align: center;
}

.features h2 {
  font-size: 1.75rem;
  margin-bottom: 40px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.feature-card {
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: left;
  border: 1px solid var(--light-gray);
  transition: box-shadow 0.2s, transform 0.2s;
}

.feature-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  color: #666;
}

/* --- Dashboard Preview --- */
.dashboard-preview {
  padding: 64px 0;
  background: var(--light-gray);
  text-align: center;
}

.dashboard-preview h2 {
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.browser-frame {
  margin-top: 32px;
  text-align: left;
}

.preview-body {
  display: flex;
  min-height: 320px;
}

.preview-sidebar {
  width: 160px;
  background: var(--dark);
  padding: 16px 0;
  flex-shrink: 0;
  display: none;
}

.sidebar-item {
  padding: 10px 20px;
  color: var(--text-light);
  font-size: 0.85rem;
  cursor: default;
  transition: background 0.15s;
}

.sidebar-item.active {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border-left: 3px solid var(--orange);
}

.preview-main {
  flex: 1;
  padding: 20px;
}

.preview-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.preview-stat {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.preview-stat.highlight {
  background: var(--orange);
  color: var(--white);
}

.ps-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
}

.ps-label {
  display: block;
  font-size: 0.7rem;
  color: #888;
  margin-top: 2px;
}

.preview-stat.highlight .ps-label {
  color: rgba(255,255,255,0.8);
}

.preview-chart {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 20px;
}

.chart-title {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 120px;
}

.chart-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  max-width: 48px;
  background: var(--blue);
  border-radius: 4px 4px 0 0;
  transition: height 0.3s;
}

.chart-bar.accent {
  background: var(--orange);
}

.chart-bar-group span {
  font-size: 0.75rem;
  color: #888;
  margin-top: 6px;
}

/* --- Pricing --- */
.pricing {
  padding: 64px 0;
  background: var(--off-white);
  text-align: center;
}

.pricing h2 {
  font-size: 1.75rem;
  margin-bottom: 32px;
}

.pricing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--orange);
}

.price-header {
  margin-bottom: 8px;
}

.price-amount {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--dark);
}

.price-period {
  font-size: 1.2rem;
  color: #888;
  font-weight: 500;
}

.price-tagline {
  color: #666;
  margin-bottom: 28px;
  font-size: 0.95rem;
}

.price-list {
  list-style: none;
  text-align: left;
  margin-bottom: 28px;
}

.price-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--light-gray);
  font-size: 0.95rem;
  padding-left: 28px;
  position: relative;
}

.price-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: 700;
}

.price-reframe {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #888;
  font-style: italic;
}

/* --- FAQ --- */
.faq {
  padding: 64px 0;
  background: var(--white);
}

.faq h2 {
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 32px;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

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

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  gap: 16px;
}

.faq-icon {
  font-size: 1.4rem;
  color: var(--orange);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: 18px;
}

.faq-answer p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.7;
}

/* --- Final CTA --- */
.cta-final {
  padding: 64px 0;
  background: var(--dark);
  color: var(--white);
  text-align: center;
}

.cta-final h2 {
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.cta-final .section-sub {
  color: var(--text-light);
}

.cta-form-wrapper {
  max-width: 440px;
  margin: 0 auto;
}

.cta-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cta-form input {
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.cta-form input::placeholder {
  color: rgba(255,255,255,0.4);
}

.cta-form input:focus {
  border-color: var(--orange);
}

.cta-disclaimer {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #888;
}

/* --- Footer --- */
.footer {
  background: #111122;
  color: var(--text-light);
  padding: 40px 0 20px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-brand p {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #888;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-light);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-contact a {
  color: var(--orange);
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
  font-size: 0.8rem;
  color: #666;
}

/* ========================================
   Tablet (600px+)
   ======================================== */
@media (min-width: 600px) {
  .stats-row {
    flex-direction: row;
  }

  .stat-card {
    flex: 1;
  }

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

  .preview-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .preview-sidebar {
    display: block;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .footer-links {
    flex-direction: row;
    gap: 24px;
  }
}

/* ========================================
   Desktop (900px+)
   ======================================== */
@media (min-width: 900px) {
  .container {
    padding: 0 40px;
  }

  /* Nav — horizontal */
  .hamburger {
    display: none;
  }

  .nav-links {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    padding: 0;
    gap: 28px;
    align-items: center;
    border: none;
  }

  /* Hero — side by side */
  .hero {
    padding: calc(var(--nav-height) + 72px) 0 80px;
  }

  .hero-inner {
    flex-direction: row;
    align-items: center;
  }

  .hero-text {
    flex: 1;
  }

  .hero-text h1 {
    font-size: 2.8rem;
  }

  .hero-image {
    flex: 1;
    max-width: 520px;
  }

  /* Sections padding */
  .problem, .how-it-works, .features, .dashboard-preview, .pricing, .faq, .cta-final {
    padding: 96px 0;
  }

  .problem h2, .how-it-works h2, .features h2, .dashboard-preview h2, .pricing h2, .faq h2, .cta-final h2 {
    font-size: 2.2rem;
  }

  /* Steps — horizontal */
  .steps-row {
    flex-direction: row;
    align-items: stretch;
  }

  .step {
    flex: 1;
  }

  .step-arrow {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    color: var(--orange);
    font-weight: 700;
  }

  /* Features 3-col */
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Stat counter */
  .stat-number {
    font-size: 3.5rem;
  }
}

/* ========================================
   Large Desktop (1200px+)
   ======================================== */
@media (min-width: 1200px) {
  .hero-text h1 {
    font-size: 3.2rem;
  }
}
