/* Homepage visual rhythm: Fibonacci-derived spacing with full-width mobile content. */
.is-home {
  --home-gr-1: 5px;
  --home-gr-2: 8px;
  --home-gr-3: 13px;
  --home-gr-4: 21px;
  --home-gr-5: 34px;
  --home-gr-6: 55px;
  --home-gr-control: 55px;
  --home-gr-radius-control: 21px;
  --home-gr-radius-panel: 21px;
  --home-gr-radius-feature: 34px;
  --home-gr-line: color-mix(in srgb, var(--theme-border) 72%, white);
  --home-gr-line-strong: color-mix(in srgb, var(--theme-primary) 30%, var(--theme-border));
  --home-gr-surface: rgba(255, 255, 255, 0.94);
  --home-gr-surface-soft: color-mix(in srgb, #f5f7fa 92%, var(--theme-primary));
  --home-gr-shadow: 0 13px 34px rgba(15, 23, 42, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.is-home,
.is-home :where(button, input, textarea, select) {
  font-family: inherit;
}

.is-home :where(h1, h2, h3, p, strong, small, a, button, input, span) {
  letter-spacing: 0;
}

.is-home :where(.lead, p, small) {
  line-height: 1.55;
}

.is-home .section-title {
  line-height: 1.13;
  text-wrap: balance;
}

.is-home section.wrap.home-hero {
  row-gap: var(--home-gr-4);
}

.is-home section.wrap.home-hero .hero-left-inner {
  gap: var(--home-gr-3);
}

.is-home section.wrap.home-hero .hero-eyebrow {
  margin: 0;
  font-weight: 720;
  line-height: 1.3;
}

.is-home section.wrap.home-hero .hero-title-main {
  line-height: 1.08;
  text-wrap: balance;
}

.is-home section.wrap.home-hero .hero-subtitle {
  line-height: 1.35;
  text-wrap: pretty;
}

.is-home .hero-art {
  overflow: hidden;
  border-color: var(--home-gr-line);
  border-radius: var(--home-gr-radius-feature);
  background: var(--home-gr-surface-soft);
  box-shadow: var(--home-gr-shadow);
}

.is-home .upgr-ai-demo {
  gap: var(--home-gr-2);
}

.is-home .upgr-ai-status {
  min-height: var(--home-gr-5);
  gap: var(--home-gr-2);
  padding: var(--home-gr-1) var(--home-gr-3);
  border-color: var(--home-gr-line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 13px rgba(15, 23, 42, 0.06);
  font-size: 0.78rem;
  font-weight: 650;
}

.is-home .upgr-ai-voice-hint {
  margin: 0;
  color: color-mix(in srgb, var(--text) 78%, var(--theme-link));
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.35;
  text-wrap: balance;
}

.is-home .upgr-ai-response {
  min-height: 76px;
  align-items: flex-start;
  padding: var(--home-gr-3) 16px;
  border-color: var(--home-gr-line);
  border-radius: var(--home-gr-radius-control);
  background: var(--home-gr-surface);
  box-shadow: 0 5px 13px rgba(15, 23, 42, 0.035);
  color: color-mix(in srgb, var(--text) 84%, white);
  font-size: 0.86rem;
  line-height: 1.48;
}

.is-home .upgr-ai-form {
  grid-template-columns: minmax(0, 1fr) 47px 47px;
  gap: var(--home-gr-1);
  min-height: var(--home-gr-control);
  padding: 4px;
  padding-left: var(--home-gr-4);
  border-color: var(--home-gr-line-strong);
  border-radius: var(--home-gr-radius-control);
  background: #ffffff;
  box-shadow: 0 8px 21px rgba(15, 23, 42, 0.07);
}

.is-home .upgr-ai-form:focus-within {
  border-color: color-mix(in srgb, var(--theme-primary) 68%, var(--text));
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--theme-primary) 12%, transparent),
    0 8px 21px rgba(15, 23, 42, 0.07);
}

.is-home .upgr-ai-form input {
  min-height: 47px;
  font-size: 1rem;
  line-height: 1.25;
}

.is-home .upgr-ai-form button,
.is-home .upgr-ai-form .upgr-ai-voice-button,
.is-home .upgr-ai-form .upgr-ai-send-button {
  width: 47px;
  height: 47px;
  border-radius: 17px;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.is-home .upgr-ai-form .upgr-ai-voice-button {
  border-color: var(--home-gr-line);
  background: color-mix(in srgb, var(--theme-primary) 5%, white);
}

.is-home .upgr-ai-form .upgr-ai-send-button {
  box-shadow: 0 5px 13px color-mix(in srgb, var(--theme-primary) 24%, transparent);
}

.is-home .upgr-ai-form button:hover {
  transform: translateY(-1px);
}

.is-home .upgr-ai-form button:active {
  transform: scale(0.96);
}

.is-home .upgr-ai-form button .material-symbols-outlined,
.is-home .material-symbols-outlined {
  font-size: var(--home-gr-4);
  font-variation-settings: "FILL" 0, "wght" 350, "GRAD" 0, "opsz" 24;
}

.is-home .upgr-ai-form button .upgr-ai-send-icon {
  font-size: 24px;
  font-weight: 500;
}

.is-home .upgr-ai-prompts {
  gap: var(--home-gr-2);
}

.is-home .upgr-ai-prompts button {
  min-height: var(--home-gr-5);
  padding: var(--home-gr-2) var(--home-gr-3);
  border-color: var(--home-gr-line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.75rem;
  font-weight: 650;
}

.is-home .upgr-ai-access {
  gap: var(--home-gr-2);
}

.is-home .upgr-ai-access a {
  min-height: 42px;
  padding: var(--home-gr-2) var(--home-gr-3);
  border-color: var(--home-gr-line);
  border-radius: var(--home-gr-3);
  font-size: 0.78rem;
  font-weight: 680;
}

.is-home :is(
  .btn,
  .home-process-rail-cta,
  .home-objection-cta,
  .home-route-handoff-primary,
  .home-route-handoff-secondary,
  .home-vendor-action,
  .home-partnership-action,
  .home-join-action,
  .home-contact-copy,
  .home-intake-action,
  .home-how-action
) {
  min-height: var(--home-gr-control);
  gap: var(--home-gr-2);
  padding: 0 var(--home-gr-4);
  border-radius: var(--home-gr-radius-control);
  font-weight: 680;
  line-height: 1.2;
}

.is-home :is(
  .home-process-steps > li,
  .home-objection-grid > div,
  .home-trust-strip-item,
  .home-route-card,
  .home-operating-card,
  .home-vendor-card,
  .home-ai-card,
  .home-tech-card,
  .home-goal-card,
  .home-step-card,
  .home-catalog-card,
  .home-roadmap-card,
  .home-changelog-card,
  .home-join-card,
  .home-intake-role-card
) {
  border-radius: var(--home-gr-radius-panel);
}

.is-home :is(
  .home-process-rail-head,
  .home-objection-strip-head,
  .home-route-snapshot,
  .home-route-decision,
  .home-route-proof-checkpoint,
  .home-route-contract,
  .home-route-handoff,
  .home-operating-console,
  .home-vendor-pack,
  .home-vendor-conversion,
  .home-ai-console,
  .home-tech-handoff,
  .home-goals-proof,
  .home-quality-gate,
  .home-quality-passport,
  .home-status-shell,
  .home-vitrine-signal,
  .home-catalog-console,
  .home-roadmap-console,
  .home-changelog-console,
  .home-partnership-console,
  .home-partnership-decision,
  .home-join-console,
  .home-join-response,
  .home-join-decision-check,
  .home-join-faq,
  .home-intake-panel,
  .home-intake-fallback,
  .home-contact-handoff,
  .home-contact-receipt,
  .home-trust-board
) {
  border-radius: var(--home-gr-radius-panel);
}

.is-home :is(
  .home-process-steps,
  .home-objection-grid,
  .home-trust-strip-grid,
  .home-route-grid,
  .home-operating-grid,
  .home-vendor-grid,
  .home-ai-grid,
  .home-tech-grid,
  .home-goals-grid,
  .home-quality-grid,
  .home-catalog-grid,
  .home-roadmap-lanes,
  .home-changelog-grid,
  .home-join-grid,
  .home-legal-grid
) {
  gap: var(--home-gr-3);
}

.is-home :is(
  .home-process-steps > li,
  .home-objection-grid > div,
  .home-trust-strip-item,
  .home-route-card,
  .home-operating-card,
  .home-vendor-card,
  .home-ai-card,
  .home-tech-card,
  .home-goal-card,
  .home-step-card,
  .home-catalog-card,
  .home-roadmap-card,
  .home-changelog-card,
  .home-join-card
) {
  padding: var(--home-gr-4);
}

.is-home :is(
  .home-icon-badge,
  .home-route-icon,
  .home-vendor-card-icon,
  .home-ai-card-icon,
  .home-tech-icon,
  .home-goal-icon,
  .home-roadmap-icon,
  .home-changelog-icon
) {
  border-radius: var(--home-gr-3);
}

.is-home :where(a, button, input):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--theme-primary) 28%, transparent);
  outline-offset: 3px;
}

@media (min-width: 769px) {
  .is-home section.wrap.home-hero {
    column-gap: var(--home-gr-5);
  }

  .is-home .hero-art {
    padding: var(--home-gr-4);
  }
}

@media (max-width: 768px) {
  body.is-home,
  body:has(> #pageShell .is-home) {
    background: #f7f9fc;
  }

  .is-home section.wrap {
    width: 100%;
    max-width: none;
    padding-inline: var(--home-gr-3);
  }

  .is-home section.wrap.home-hero {
    padding-top: var(--home-gr-3);
    padding-bottom: var(--home-gr-5);
  }

  .is-home section.wrap.home-hero .hero-left-inner {
    gap: var(--home-gr-2);
  }

  .is-home section.wrap.home-hero .hero-art.hero-art-mobile {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: var(--home-gr-2);
    border-radius: var(--home-gr-radius-feature);
  }

  .is-home .upgr-ai-demo {
    gap: var(--home-gr-2);
  }

  .is-home .upgr-ai-response {
    min-height: 76px;
  }

  .is-home :is(
    .home-process-rail,
    .home-objection-strip,
    .home-trust-strip,
    .home-route-picker,
    .home-operating,
    .home-vendor,
    .home-ai,
    .home-tech,
    .home-goals,
    .home-quality,
    .home-status-overview,
    .home-catalog,
    .home-roadmap,
    .home-changelog,
    .home-partnership,
    .home-join,
    .home-intake-main,
    .home-how,
    .home-contact,
    .home-legal
  ) {
    padding-top: var(--home-gr-5);
    padding-bottom: var(--home-gr-5);
  }

  .is-home :is(
    .home-process-steps > li,
    .home-objection-grid > div,
    .home-trust-strip-item,
    .home-route-card,
    .home-operating-card,
    .home-vendor-card,
    .home-ai-card,
    .home-tech-card,
    .home-goal-card,
    .home-step-card,
    .home-catalog-card,
    .home-roadmap-card,
    .home-changelog-card,
    .home-join-card
  ) {
    padding: var(--home-gr-3);
  }

  .is-home .home-process-steps > li,
  .is-home .home-objection-grid > div {
    min-height: var(--home-gr-control);
    column-gap: var(--home-gr-2);
  }

  .is-home .home-trust-strip-item {
    min-height: 76px;
  }

  .is-home .home-route-handoff-actions,
  .is-home .home-join-actions,
  .is-home .home-partnership-actions,
  .is-home .home-intake-actions {
    gap: var(--home-gr-2);
  }
}

@media (max-width: 480px) {
  .is-home section.wrap {
    padding-inline: var(--home-gr-3);
  }

  .is-home section.wrap.home-hero .hero-title-main {
    font-size: 24px;
    line-height: 1.08;
  }

  .is-home section.wrap.home-hero .hero-subtitle {
    font-size: 16px;
    line-height: 1.35;
  }

  .is-home section.wrap.home-hero .hero-art.hero-art-mobile {
    padding: var(--home-gr-2);
  }

  .is-home .upgr-ai-identity {
    min-height: 220px;
  }

  .is-home .upgr-ai-avatar-stage {
    width: min(100%, 220px);
  }

  .is-home .upgr-ai-avatar-shell {
    inset: var(--home-gr-4);
  }

  .is-home .upgr-ai-response {
    min-height: 76px;
    padding: var(--home-gr-3);
    border-radius: var(--home-gr-radius-control);
    font-size: 0.8rem;
    line-height: 1.46;
  }

  .is-home .upgr-ai-form {
    grid-template-columns: minmax(0, 1fr) 47px 47px;
    min-height: var(--home-gr-control);
    padding-left: var(--home-gr-3);
  }

  .is-home .upgr-ai-form input {
    font-size: 0.98rem;
  }
}

@media (max-width: 360px) {
  .is-home section.wrap {
    padding-inline: var(--home-gr-2);
  }

  .is-home section.wrap.home-hero .hero-art.hero-art-mobile {
    padding: var(--home-gr-2);
  }

  .is-home .upgr-ai-identity {
    min-height: 212px;
  }

  .is-home .upgr-ai-avatar-stage {
    width: min(100%, 212px);
  }

  .is-home .upgr-ai-form {
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    padding-left: var(--home-gr-3);
  }

  .is-home .upgr-ai-form button,
  .is-home .upgr-ai-form .upgr-ai-voice-button,
  .is-home .upgr-ai-form .upgr-ai-send-button {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .is-home .upgr-ai-form button {
    transition: none;
  }
}
