/*
 * BuildVision — Shared landing page styles
 * Extracted from individual page <style> blocks for maintainability.
 * Linked after typography-tokens.css on all landing pages.
 */

main {
  max-width: 920px;
  margin: 0 auto;
  padding: var(--main-padding-top) var(--space-page-gutter) var(--main-padding-bottom);
  display: flex;
  flex-direction: column;
  gap: var(--space-row-gap);
}

main > .hero {
  margin-bottom: calc(var(--space-section-gap) - var(--space-row-gap));
}

main > .faq-card {
  margin-top: calc(var(--space-section-gap) - var(--space-row-gap) * 2);
}

main > .cta {
  margin-top: calc(var(--space-section-gap) - var(--space-row-gap) * 2);
}

main > section > h2:first-child {
  margin-top: 0;
}

/* ── Scroll reveal ── */
.panel {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-spring), transform 0.6s var(--ease-spring);
}

.panel:nth-child(2) { transition-delay: 50ms; }
.panel:nth-child(3) { transition-delay: 100ms; }
.panel:nth-child(4) { transition-delay: 150ms; }

.panel.hero { transform: translateY(16px); }
.panel.cta  { transform: translateY(32px); transition-duration: 0.7s; }

.panel.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── FAQ card ── */
.faq-card {
  background: #fff;
  padding: var(--space-card-padding);
  border-radius: var(--radius-section);
  box-shadow: var(--shadow-section);
}

/* ── Hero ── */
.hero {
  background: linear-gradient(
    180deg,
    var(--bv-blue-600) 0%,
    #3a2392 40%,
    var(--bv-blue-400) 100%
  );
  border: 0;
  border-radius: var(--radius-section);
  padding: clamp(56px, 10vw, 72px) 32px;
  text-align: left;
  overflow: hidden;
  box-shadow:
    0 12px 40px rgba(45, 27, 105, 0.18),
    0 4px 16px rgba(79, 42, 224, 0.10),
    0 2px 6px rgba(27, 26, 24, 0.06);
}

.hero::before,
.hero::after {
  display: none !important;
  content: none !important;
}

.hero:hover {
  transform: none;
  box-shadow:
    0 12px 40px rgba(45, 27, 105, 0.18),
    0 4px 16px rgba(79, 42, 224, 0.10),
    0 2px 6px rgba(27, 26, 24, 0.06);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 700;
  font-variation-settings: 'SOFT' 0, 'WONK' 0.35;
  letter-spacing: -0.03em;
  line-height: var(--leading-tight);
  color: var(--text-inverse);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  margin-bottom: 16px;
}

.hero p {
  font-size: var(--text-subtitle);
  color: rgba(255, 255, 255, 0.88);
  line-height: var(--leading-normal);
  max-width: 65ch;
  margin: 0;
}

/* ── Content sections ── */
.content-section,
.feature-group {
  padding: 0 32px;
}

.content-section,
.feature-section,
.feature-group,
.related-section {
  background: none;
  border: none;
  box-shadow: none;
  text-align: left;
}

.faq-card,
.cta {
  margin-top: 0;
}

/* Surface variation on feature group */
.feature-group {
  display: flex;
  flex-direction: column;
  gap: 32px;
  background: var(--neutral-50);
  border-radius: var(--radius-section);
  padding: var(--space-card-padding);
  border: 1px solid var(--neutral-100);
}

.content-section h2,
.feature-section h3,
.faq-card h2,
.cta h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

.heading-with-icon {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
}

.heading-with-icon svg {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--bv-blue-400);
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.content-section p {
  max-width: 65ch;
  margin: 0;
}

.content-section p + p {
  margin-top: 18px;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.list li::before {
  content: '';
  width: 14px;
  height: 14px;
  margin-top: 4px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239E9EA5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E");
  background-size: 14px 14px;
  background-repeat: no-repeat;
  background-position: center;
}

/* ── Related section ── */
.related-section {
  border-top: none;
  padding-top: 0;
}

.link-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 24px;
  margin-top: 12px;
}

.link-list a {
  display: block;
  color: var(--text-link);
  text-decoration: none;
  border-bottom: 1px solid var(--neutral-200);
  font-size: var(--text-sm);
  padding-bottom: 2px;
  transition: border-color 0.15s var(--ease-spring), color 0.2s var(--ease-spring);
}

.link-list a:hover {
  border-color: var(--bv-blue-400);
}

/* ── FAQ ── */
.faq-list,
.faq-grid {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 16px;
}

.faq-card p {
  max-width: 65ch;
}

/* ── CTA ── */
.cta {
  text-align: center;
  background:
    radial-gradient(ellipse 75% 90% at 12% 88%, rgba(79, 42, 224, 0.25) 0%, transparent 45%),
    linear-gradient(122deg, var(--bv-blue-600) 0%, #3a2392 55%, var(--bv-blue-400) 100%);
  color: white;
  border-radius: var(--radius-section);
  border: none;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 12px 40px rgba(45, 27, 105, 0.22),
    0 4px 12px rgba(79, 42, 224, 0.10);
  padding: clamp(44px, 7.5vw, 60px) clamp(28px, 5vw, 40px) clamp(48px, 8vw, 64px);
}

.cta:hover {
  transform: none;
}

.cta h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 44px);
  font-weight: 700;
  font-variation-settings: 'SOFT' 0, 'WONK' 0.25;
  letter-spacing: -0.02em;
  color: var(--text-inverse);
}

.cta p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0 auto 24px;
  max-width: 52ch;
}

.try-btn {
  display: inline-block;
  font-size: 18px;
  font-weight: var(--weight-semibold);
  padding: 14px 36px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background 150ms var(--ease-snappy), color 150ms var(--ease-snappy), transform 150ms var(--ease-snappy);
  border: none;
}

.cta .try-btn {
  background: white;
  color: var(--bv-blue-400);
}

.cta .try-btn:hover {
  background: var(--bv-blue-100);
  color: var(--bv-blue-600);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27, 26, 24, 0.12);
}

.cta .try-btn:active {
  transform: scale(0.98) translateY(0);
}

/* ── Layout variation components ── */

/* Stat bar — horizontal row of 2-3 key metrics */
.stat-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--neutral-200);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.stat-bar-item {
  background: white;
  padding: 28px 24px;
  text-align: center;
}

.stat-bar-number {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bv-blue-400);
  line-height: 1.1;
}

.stat-bar-label {
  font-size: var(--text-sm);
  color: var(--neutral-700);
  margin-top: 6px;
}

/* Step flow — numbered vertical sequence */
.step-flow {
  display: grid;
  gap: 0;
  padding: 0 32px;
  counter-reset: step-counter;
}

.step-flow-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--neutral-100);
  counter-increment: step-counter;
}

.step-flow-item:last-child {
  border-bottom: none;
}

.step-flow-number {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--bv-blue-400);
  line-height: 1.2;
}

.step-flow-number::before {
  content: counter(step-counter);
}

.step-flow-title {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}

.step-flow-desc {
  font-size: var(--text-sm);
  color: var(--neutral-700);
  max-width: 55ch;
}

/* Split panel — two-column comparison or before/after */
.split-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--neutral-200);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.split-panel-side {
  background: white;
  padding: var(--space-card-padding);
}

.split-panel-side--accent {
  background: var(--bv-blue-100);
}

.split-panel-heading {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--ink);
}

.split-panel-side--accent .split-panel-heading {
  color: var(--bv-blue-600);
}

.split-panel p {
  font-size: 15px;
  color: var(--neutral-700);
  margin: 0 0 8px;
  max-width: none;
}

/* Callout box — highlighted insight with accent border */
.callout-box {
  border-left: 3px solid var(--bv-blue-400);
  padding: 24px 28px;
  background: white;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  box-shadow: var(--shadow-card);
}

.callout-box--olive {
  border-left-color: var(--olive-400);
  background: var(--olive-100);
}

.callout-box p {
  margin: 0;
  max-width: 65ch;
}

.callout-box p + p {
  margin-top: 12px;
}

.callout-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bv-blue-400);
  margin-bottom: 8px;
}

.callout-box--olive .callout-label {
  color: var(--gold-700);
}

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

  .step-flow {
    padding: 0 16px;
  }

  .step-flow-item {
    grid-template-columns: 32px 1fr;
    gap: 12px;
  }
}

/* ── Responsive ── */
@media (max-width: 820px) {
  .content-section,
  .feature-group,
  .hero,
  .faq-card,
  .cta {
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero p {
    font-size: 18px;
  }

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

@media (max-width: 639px) {
  .link-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .try-btn,
  .link-list a,
  .nav-link,
  .nav-btn,
  a {
    transition: none !important;
  }
}
