/* Landing page — shown when user has no companies */

/* Desktop: center landing vertically in .page */
.landing {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

/* Hero */
.landing-hero {
  text-align: center;
  margin-bottom: 48px;
  max-width: 520px;
  margin-inline: auto;
}

.landing-headline {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 14px;
}

.landing-subline {
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 28px;
}

/* Sections */
.landing-section {
  margin-bottom: 40px;
}

.landing-section:last-child {
  margin-bottom: 0;
}

.landing-section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* Steps — 3 columns on desktop */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.step-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-info { flex: 1; }
.step-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.step-text { font-size: 14px; color: var(--color-text-secondary); line-height: 1.4; }

/* Capabilities — 2x2 grid, icon + info side by side */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.cap-card {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
}

.cap-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cap-icon svg { width: 18px; height: 18px; }
.cap-icon--primary { background: var(--color-primary-light); color: var(--color-primary); }
.cap-icon--info { background: var(--color-info-light); color: var(--color-info); }
.cap-icon--success { background: var(--color-success-light); color: var(--color-success); }
.cap-icon--warning { background: rgba(196, 151, 42, 0.08); color: var(--color-warning); }

.cap-info { flex: 1; min-width: 0; }
.cap-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.cap-text { font-size: 14px; color: var(--color-text-secondary); line-height: 1.4; }

/* Bottom CTA */
.landing-bottom-cta {
  text-align: center;
  padding: 36px 0;
  border-top: 1px solid var(--color-border-light);
}

.landing-bottom-text {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin-bottom: 18px;
}

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ─── Mobile: fullscreen slides ─── */
@media (max-width: 768px) {

  /* Disable .page scroll when landing is shown */
  .page:has(> .landing) {
    overflow: hidden;
    padding: 0;
  }

  /* Landing = vertical snap-scroll container */
  .landing {
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Each child = one fullscreen slide ── */
  .landing-hero,
  .landing-section {
    min-height: 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 24px;
    box-sizing: border-box;
    margin: 0;
  }

  /* ══ Slide 1: Hero ══ */
  .landing-hero {
    position: relative;
    max-width: none;
    text-align: center;
  }

  /* Brand mark — same style as chat avatar */
  .landing-hero::before {
    content: '✦';
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 20px;
    flex-shrink: 0;
    animation: fadeUp 0.5s ease-out both;
  }

  .landing-headline {
    font-size: 26px;
    letter-spacing: -0.5px;
    line-height: 1.15;
    margin-bottom: 12px;
    animation: fadeUp 0.5s ease-out 0.1s both;
  }

  .landing-subline {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 28px;
    animation: fadeUp 0.5s ease-out 0.2s both;
  }

  .landing-hero .btn-lg {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    animation: fadeUp 0.5s ease-out 0.3s both;
  }

  /* Scroll indicator — bouncing chevron */
  .landing-hero::after {
    content: '';
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    border-inline-end: 2px solid var(--color-text-tertiary);
    border-bottom: 2px solid var(--color-text-tertiary);
    transform-origin: center;
    rotate: 45deg;
    animation: bounceDown 1.8s ease-in-out 1.5s infinite;
  }

  /* ══ Section labels (slides 2 & 3) ══ */
  .landing-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-text-tertiary);
    text-align: center;
    margin-bottom: 24px;
  }

  /* ══ Slide 2: Steps timeline ══ */
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding-inline-start: 14px;
    max-width: 280px;
    margin-inline: auto;
  }

  .step-card {
    flex-direction: row;
    align-items: flex-start;
    background: none;
    border: none;
    border-inline-start: 2px solid var(--color-primary-light);
    border-radius: 0;
    padding: 0 0 28px 20px;
    gap: 0;
    position: relative;
  }

  .step-card:last-child {
    padding-bottom: 0;
    border-inline-start-color: transparent;
  }

  .step-number {
    width: 30px;
    height: 30px;
    font-size: 13px;
    position: absolute;
    inset-inline-start: -16px;
    top: 0;
  }

  .step-info {
    padding-inline-start: 20px;
  }

  .step-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 30px;
    margin-bottom: 4px;
  }

  .step-text {
    display: block;
    font-size: 13px;
    line-height: 1.45;
    color: var(--color-text-secondary);
  }

  /* ══ Slide 3: Capabilities 2×2 ══ */
  .cap-grid {
    gap: 10px;
    max-width: 340px;
    margin-inline: auto;
  }

  .cap-card {
    flex-direction: column;
    padding: 14px;
    gap: 0;
  }

  .cap-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
  }

  .cap-icon svg { width: 17px; height: 17px; }

  .cap-info { min-width: 0; }

  .cap-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
  }

  .cap-text {
    font-size: 11px;
    line-height: 1.4;
    color: var(--color-text-tertiary);
  }

  /* ── Hide tabbar + in-HTML bottom CTA on mobile ── */
  .app:has(.landing) > .tabbar { display: none; }
  .landing-bottom-cta { display: none; }
}

/* Sticky CTA bar — lives at .app level, edge-to-edge */
.landing-sticky-cta {
  display: none;
}

@media (max-width: 768px) {
  .landing-sticky-cta {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--color-surface);
    border-top: 1px solid var(--color-border-light);
    z-index: 200;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .landing-sticky-cta.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .landing-sticky-cta .btn-lg {
    width: 100%;
    padding: 14px;
    font-size: 15px;
  }
}
