/* =============================================
   AISetupWizard — Home Page
   ============================================= */

/* ── Shell ── */
.aihome {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: #1a1523;
  background: #f8f7ff;
  min-height: 100vh;
}
.aihome *, .aihome *::before, .aihome *::after { box-sizing: border-box; }

/* ── Logo (dark variant for footer) ── */
.aihome-footer .sf-logo-wordmark { color: #e9d5ff; }
.aihome-footer .sf-logo-purple   { color: #a78bfa; }
.aihome-footer .sf-logo-tagline  { color: #6b7280; }

/* ── Logo compact overrides (nav + footer) ── */
.aihome .sf-logo          { gap: 6px; }
.aihome .sf-logo-badge    { width: 32px; height: 32px; }
.aihome .sf-logo-text     { gap: 1px; }
.aihome .sf-logo-wordmark { letter-spacing: -0.04em; font-stretch: condensed; }

/* ── Navigation ── */
.aihome-nav {
  background: #ffffff;
  border-bottom: 1.5px solid #ece8f8;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.aihome-nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.aihome-nav-links a {
  font-size: 1rem;
  font-weight: 600;
  color: #4b5563;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.15s;
}

.aihome-nav-links a:hover {
  color: #7c3aed;
  background: #f3f0fd;
}

.aihome-nav-cta a {
  background: #7c3aed;
  color: #ffffff !important;
  padding: 0.5rem 1.2rem !important;
}

.aihome-nav-cta a:hover {
  background: #6d28d9 !important;
}

/* ── Section shells ── */
.aihome-dots {
  background-color: #f8f7ff !important;
  background-image: radial-gradient(circle, #c4b5fd 1px, transparent 1px) !important;
  background-size: 24px 24px !important;
  border-radius: 20px;
  margin: 1.5rem;
  padding: 4.5rem 2rem;
  text-align: center;
}

.aihome-panel {
  background: #ffffff;
  border-radius: 20px;
  margin: 0 1.5rem;
  padding: 4.5rem 2rem;
  text-align: center;
}

/* ── Eyebrow / headline / subhead ── */
.aihome-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #7c3aed;
  margin-bottom: 1rem;
}

.aihome-headline {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  color: #1a1523;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.04em;
  font-stretch: condensed;
}

.aihome-subhead {
  font-size: 1.15rem;
  color: #6b7280;
  max-width: 560px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.aihome-section-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: #1a1523;
  margin-bottom: 1rem;
  letter-spacing: -0.04em;
  font-stretch: condensed;
}

.aihome-section-sub {
  font-size: 1.1rem;
  color: #6b7280;
  max-width: 520px;
  margin: 0 auto 3.5rem;
  line-height: 1.7;
}

/* ── Cards (tool + benefit) ── */
.aihome-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 960px;
  margin: 0 auto;
  text-align: left;
}

.aihome-card {
  background: #ffffff;
  border: 0.5px solid #e5e0f5;
  border-radius: 16px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.aihome-card-icon {
  font-size: 2rem;
  line-height: 1;
}

.aihome-card-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1523;
  letter-spacing: -0.04em;
  font-stretch: condensed;
}

.aihome-card-desc {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.65;
  flex: 1;
}

.aihome-card-btn {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #7c3aed;
  text-decoration: none;
  transition: color 0.15s;
}

.aihome-card-btn:hover { color: #6d28d9; }

/* ── Tool selector card variants ── */
.aihome-card--link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.aihome-card--link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.12);
  border-color: #c4b5fd;
}

.aihome-card--muted {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.aihome-card-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #7c3aed;
  color: #ffffff;
  border-radius: 9999px;
  padding: 3px 10px;
  margin-bottom: 0.5rem;
}

/* ── How it works ── */
.aihome-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

.aihome-step {
  padding: 0 2.5rem;
  border-right: 0.5px solid #e5e0f5;
}

.aihome-step:first-child { padding-left: 0; }
.aihome-step:last-child  { border-right: none; padding-right: 0; }

.aihome-step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.aihome-step-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1523;
  margin-bottom: 0.75rem;
  letter-spacing: -0.04em;
  font-stretch: condensed;
}

.aihome-step-desc {
  font-size: 1rem;
  color: #6b7280;
  line-height: 1.65;
}

/* ── Footer ── */
.aihome-footer {
  background: #1a1523;
  border-radius: 20px;
  margin: 1.5rem;
  padding: 2.5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 2rem;
}

.aihome-footer-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.aihome-footer-nav a {
  font-size: 0.95rem;
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.15s;
}

.aihome-footer-nav a:hover { color: #e9d5ff; }

.aihome-footer-copy {
  text-align: right;
  font-size: 0.85rem;
  color: #4b5563;
}

/* ── 4-card 2×2 grid (claude.php) ── */
.aihome-cards--four {
  grid-template-columns: repeat(2, 1fr);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .aihome-nav { padding: 0 1rem; }

  .aihome-dots,
  .aihome-panel {
    margin: 0.75rem;
    padding: 3rem 1.25rem;
  }

  .aihome-headline     { font-size: 2rem; }
  .aihome-section-title { font-size: 1.7rem; }

  .aihome-cards { grid-template-columns: 1fr; }

  .aihome-steps { grid-template-columns: 1fr; }

  .aihome-step {
    padding: 1.5rem 0;
    border-right: none;
    border-bottom: 0.5px solid #e5e0f5;
  }
  .aihome-step:last-child { border-bottom: none; }

  .aihome-footer {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }
  .aihome-footer-nav   { align-items: center; }
  .aihome-footer-copy  { text-align: center; }
}

/* =============================================
   Dropdown Navigation
   ============================================= */

/* ── Dropdown trigger items ── */
.aihome-nav-links .has-dropdown {
  position: relative;
}

/* Bridge the gap between trigger and panel so hover state is unbroken */
.aihome-nav-links .has-dropdown::after {
  content: '';
  position: absolute;
  height: 12px;
  width: 100%;
  bottom: -12px;
  left: 0;
}

.nav-dropdown-toggle {
  display: flex !important;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.nav-chevron {
  font-size: 0.65rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.2s ease;
  margin-top: 1px;
}

.has-dropdown:hover .nav-chevron {
  transform: rotate(180deg);
}

/* ── Dropdown panel ── */
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1.5px solid #ece8f8;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  min-width: 220px;
  padding: 0.5rem;
  list-style: none;
  z-index: 200;
  animation: sfDropIn 0.15s ease;
}

@keyframes sfDropIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown .dropdown-menu:hover {
  display: block;
}

.dropdown-menu li a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.12s;
  background: transparent;
}

.dropdown-menu li a:hover,
.dropdown-menu li a[aria-current="page"] {
  color: #7c3aed;
  background: #f3f0fd;
}

/* ── Divider with Claude Code label ── */
.nav-divider {
  padding: 0.5rem 0.75rem 0;
  margin-top: 0.2rem;
}

.nav-divider span {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9ca3af;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #ece8f8;
  margin-bottom: 0.1rem;
}

/* ── ChatGPT coming soon item ── */
.nav-item-muted {
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #9ca3af;
  cursor: default;
  border-radius: 8px;
  user-select: none;
}

/* ── Hamburger button (hidden on desktop) ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.15s;
  flex-shrink: 0;
}

.nav-hamburger:hover { background: #f3f0fd; }

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #4b5563;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Animated X state */
.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile nav ── */
@media (max-width: 768px) {
  .nav-hamburger {
    display: flex;
  }

  .aihome-nav {
    position: relative;
    flex-wrap: wrap;
  }

  .aihome-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1.5px solid #ece8f8;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1rem 1rem;
    z-index: 150;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

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

  /* Top-level dropdown triggers full width */
  .has-dropdown > .nav-dropdown-toggle {
    justify-content: space-between;
    width: 100%;
    border-radius: 8px;
    border-bottom: 1px solid #f3f0fd;
    padding: 0.65rem 0.75rem !important;
  }

  /* Mobile dropdowns expand inline */
  .dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0.25rem 0 0.25rem 0.75rem;
    min-width: 0;
    animation: none;
  }

  .has-dropdown .dropdown-menu   { display: none; }
  .has-dropdown.is-open .dropdown-menu { display: block; }

  .has-dropdown.is-open .nav-chevron {
    transform: rotate(180deg);
  }

  .dropdown-menu li a {
    padding: 0.4rem 0.5rem;
  }

  .nav-divider {
    padding: 0.4rem 0.5rem 0;
    margin-top: 0.15rem;
  }

  /* CTA full width on mobile */
  .aihome-nav-cta {
    margin-top: 0.5rem;
  }

  .aihome-nav-cta a {
    display: block;
    text-align: center;
    border-radius: 10px !important;
    padding: 0.65rem 1.2rem !important;
  }
}
