/* =============================================
   INDEX PAGE - Modern Redesign
   ============================================= */

/* --- Hero Section --- */
.home-hero {
  position: relative;
  padding: clamp(16px, 3vw, 32px) 0 clamp(64px, 8vw, 100px);
}

.home-hero::before {
  content: "";
  position: absolute;
  top: -100px;
  left: -100px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 109, 100, 0.08), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: -1;
}

.home-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.home-copy {
  display: flex;
  flex-direction: column;
  gap: clamp(26px, 3.8vw, 42px);
}

.home-copy-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-copy-head .eyebrow {
  margin: 0;
}

.home-copy h1 {
  font-size: clamp(3.2rem, 6vw, 5.5rem);
  line-height: 1.08;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0;
}

.home-copy h2 {
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 4px 0 0;
  opacity: 0.92;
}

.home-copy-ledes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.home-copy-ledes .lede {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 92%;
  line-height: 1.65;
  margin: 0;
}

.hero-feature-strip {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 2.5vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1 1 160px;
  min-width: 0;
}

.hero-feature-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.hero-feature-icon svg {
  flex-shrink: 0;
}

.hero-feature-icon--mint {
  background: linear-gradient(145deg, #e4f5f0, #d8f0ea);
  color: var(--accent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.hero-feature-icon--sky {
  background: linear-gradient(145deg, #e8f4ff, #dbeafe);
  color: #1e6db5;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.hero-feature-icon--teal {
  background: linear-gradient(145deg, #e6fffa, #ccfbf1);
  color: #0f766e;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.hero-feature-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.hero-feature-text strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.hero-feature-text span {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 720px) {
  .hero-feature {
    flex: 1 1 100%;
  }
}

.llm-provider-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: clamp(40px, 5.5vw, 56px);
  padding-top: clamp(4px, 1vw, 8px);
}

.llm-provider-label {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.llm-provider-logos {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
  row-gap: 12px;
}

.llm-provider-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 249, 242, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 6px 20px rgba(56, 36, 20, 0.06), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.llm-provider-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(56, 36, 20, 0.09), 0 1px 0 rgba(255, 255, 255, 0.95) inset;
}

.llm-provider-logo {
  display: block;
  height: 34px;
  width: auto;
  max-width: 108px;
  object-fit: contain;
}

/* =============================================
   KEEP: Dashboard Preview Card (home-stage)
   ============================================= */
.home-stage {
  position: relative;
  min-height: 760px;
  display: grid;
  place-items: center;
  isolation: isolate;
  perspective: 1200px;
}

.home-stage::before {
  content: "";
  position: absolute;
  inset: 10% 10% 18%;
  border-radius: 42px;
  background:
    radial-gradient(circle at top, rgba(15, 109, 100, 0.14), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 249, 242, 0.24));
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.home-stage::after {
  content: "";
  position: absolute;
  width: 76%;
  height: 76%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(223, 125, 72, 0.16), transparent 62%);
  filter: blur(10px);
  z-index: -1;
}

.dashboard-card {
  width: min(100%, 552px);
  transform: rotate(-5deg) translateY(-8px);
  transition: transform 500ms cubic-bezier(0.23, 1, 0.32, 1);
  transform-style: preserve-3d;
}

.dashboard-card:hover {
  transform: rotate(-2deg) translateY(-16px) scale(1.02);
}

.dashboard-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.92rem;
}

.dashboard-topline span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 109, 100, 0.12);
  color: var(--accent);
  font-weight: 700;
  position: relative;
}

.dashboard-topline span::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 2s ease infinite;
}

.dashboard-topline span {
  padding-left: 22px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.dashboard-metrics article,
.task-stack div {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(24, 22, 27, 0.06);
  transition: transform 280ms ease, box-shadow 280ms ease;
}

.dashboard-metrics article:hover,
.task-stack div:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.dashboard-metrics article:first-child {
  grid-column: span 2;
  background:
    linear-gradient(135deg, rgba(15, 109, 100, 0.08), rgba(255, 255, 255, 0.52)),
    rgba(255, 255, 255, 0.56);
}

.dashboard-metrics span,
.task-stack span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-metrics strong {
  display: block;
  margin-top: 10px;
  font-size: 2.1rem;
}

.dashboard-metrics em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
  font-size: 0.9rem;
}

.trend-panel {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  padding: 20px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(15, 109, 100, 0.16), rgba(223, 125, 72, 0.16));
}

.trend-visual {
  position: relative;
  height: 110px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.04)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.12) 0 1px, transparent 1px);
  background-size: auto, 40px 100%, 100% 26px;
}

.trend-visual::after {
  content: "";
  position: absolute;
  inset: 22px 10px 26px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.46) 15%, rgba(15, 109, 100, 0.26) 30%, rgba(223, 125, 72, 0.26) 56%, rgba(255, 255, 255, 0.52) 82%, transparent 100%);
  filter: blur(16px);
  animation: wave-flow 4s ease-in-out infinite alternate;
}

@keyframes wave-flow {
  from { transform: translateX(-10px); }
  to { transform: translateX(10px); }
}

.trend-copy {
  position: absolute;
  left: 20px;
  bottom: 20px;
}

.trend-copy span {
  display: block;
  color: rgba(24, 22, 27, 0.72);
  font-size: 0.88rem;
}

.trend-copy strong {
  font-size: 2.4rem;
}

.task-stack {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.task-stack div:nth-child(2) {
  transform: translateX(18px);
}

.task-stack strong {
  display: block;
  margin-top: 8px;
  font-size: 1.02rem;
}

.floating-panel {
  position: absolute;
  max-width: 248px;
  transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1);
}

.floating-panel:hover {
  transform: scale(1.05);
}

.floating-panel h2 {
  margin-top: 10px;
  font-size: 1.5rem;
}

.panel-left {
  top: 11%;
  left: -4%;
}

.panel-right {
  right: -2%;
  bottom: 10%;
}
/* =============================================
   END KEEP
   ============================================= */

/* --- Value Strip --- */
.summary-strip {
  padding: 40px 0;
}

.summary-strip .strip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}

.summary-strip .strip-grid p {
  padding: 16px 32px;
  background: var(--surface-strong);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.05rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.summary-strip .strip-grid p:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(15, 109, 100, 0.1);
  background: #fff;
}

.summary-strip .strip-grid p:first-child {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* --- Pain Points --- */
.home-problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.home-problem-grid > article {
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-xl);
  padding: 32px;
  transition: transform 300ms ease, box-shadow 300ms ease;
  position: relative;
  overflow: hidden;
}

.home-problem-grid > article:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

.home-problem-grid > article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 300ms ease;
}

.home-problem-grid > article:hover::before {
  opacity: 1;
}

.home-problem-grid h3 {
  font-size: 1.5rem;
  margin: 16px 0 12px;
  color: var(--ink);
}

.home-problem-grid .card-copy {
  font-size: 1.05rem;
  color: var(--muted);
}

/* --- Capability Map --- */
.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.capability-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-xl);
  padding: 32px;
  transition: all 300ms ease;
}

.capability-card:hover {
  background: #fff;
  box-shadow: 0 16px 32px rgba(15, 109, 100, 0.08);
  transform: translateY(-4px);
}

.capability-card-wide {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 249, 242, 0.8));
}

.capability-card h3 {
  font-size: 1.6rem;
  margin: 16px 0 12px;
}

/* --- Timeline --- */
.timeline-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
  position: relative;
}

.timeline-grid::before {
  content: "";
  position: absolute;
  left: 32px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(223, 125, 72, 0.5));
}

.timeline-grid > article {
  display: flex;
  flex-direction: column;
  padding: 24px 24px 24px 80px;
  background: var(--surface-strong);
  border-radius: var(--radius-lg);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: transform 300ms ease;
}

.timeline-grid > article:hover {
  transform: translateX(8px);
  background: #fff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
}

.timeline-grid > article::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 32px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 109, 100, 0.1);
}

.timeline-grid h3 {
  font-size: 1.4rem;
  margin: 8px 0;
}

/* --- Outcome --- */
.home-outcome {
  margin-top: 80px;
  padding: 60px 0;
  background: linear-gradient(180deg, transparent, rgba(15, 109, 100, 0.03), transparent);
}

.outcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.outcome-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.outcome-cards > article {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(24, 22, 27, 0.04);
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.outcome-cards > article:hover {
  transform: translateX(-8px);
  box-shadow: 12px 12px 32px rgba(15, 109, 100, 0.08);
  border-color: rgba(15, 109, 100, 0.2);
}

/* --- Feature split（与功能页「客服可以」一致）--- */
.section.feat-split-section {
  margin-top: 22px;
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}

.feat-split-section {
  background: linear-gradient(
    180deg,
    rgba(251, 247, 242, 0.95) 0%,
    rgba(245, 238, 230, 0.9) 45%,
    rgba(237, 227, 215, 0.88) 100%
  );
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 44px 24px;
}

.feat-split-inner {
  max-width: 1220px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.feat-cs-list {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 251, 246, 0.72)),
    var(--surface);
  border-radius: 20px;
  padding: 26px 24px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-soft);
}

.feat-cs-list h2 {
  margin: 0 0 20px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
}

.feat-cs-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}

.feat-cs-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.feat-cs-item:first-of-type {
  padding-top: 0;
}

.feat-cs-item .ic {
  flex: 0 0 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feat-cs-item p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--ink);
  font-weight: 600;
}

.feat-scenarios {
  display: grid;
  gap: 16px;
}

.feat-scenario-box {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 251, 246, 0.72)),
    var(--surface);
  border-radius: 20px;
  padding: 22px 22px 20px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow-soft);
}

.feat-scenario-box h3 {
  margin: 0 0 14px;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.45;
}

.feat-scenario-box ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: sc;
  display: grid;
  gap: 10px;
}

.feat-scenario-box li {
  counter-increment: sc;
  position: relative;
  padding-left: 32px;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
}

.feat-scenario-box li::before {
  content: counter(sc);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .feat-split-inner {
    grid-template-columns: 1fr;
  }
}

/* --- Responsive --- */
@media (max-width: 1180px) {
  .home-hero-grid,
  .outcome-grid {
    grid-template-columns: 1fr;
  }

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

  .capability-card-wide {
    grid-column: span 2;
  }
}

@media (max-width: 860px) {
  .feat-split-section {
    padding: 32px 16px;
  }

  .home-problem-grid {
    grid-template-columns: 1fr;
  }

  .capability-grid {
    grid-template-columns: 1fr;
  }

  .capability-card-wide {
    grid-column: span 1;
  }

  .home-stage {
    min-height: auto;
    padding-bottom: 32px;
    perspective: none;
  }

  .dashboard-card {
    transform: none;
  }

  .dashboard-card:hover {
    transform: none;
  }

  .dashboard-metrics {
    grid-template-columns: 1fr;
  }

  .task-stack div:nth-child(2),
  .floating-panel {
    transform: none;
  }

  .floating-panel {
    position: static;
    max-width: none;
    margin-top: 14px;
  }
}

/* --- Index welcome popup (half-screen) --- */
body.index-welcome-popup-open {
  overflow: hidden;
}

.index-welcome-popup {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  align-items: end;
  pointer-events: none;
}

.index-welcome-popup:not([hidden]) {
  pointer-events: auto;
}

.index-welcome-popup__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(24, 22, 27, 0.34);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 460ms cubic-bezier(0.22, 1, 0.36, 1);
}

.index-welcome-popup.is-open .index-welcome-popup__backdrop {
  opacity: 1;
}

.index-welcome-popup__panel {
  position: relative;
  z-index: 1;
  width: min(100%, var(--content-width));
  margin: 0 auto;
  min-height: clamp(240px, 46vh, 420px);
  max-height: min(56vh, 520px);
  padding: clamp(24px, 4vw, 36px) clamp(22px, 4vw, 40px) clamp(22px, 3.5vw, 32px);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  border-bottom: 0;
  box-shadow: 0 -18px 60px rgba(56, 36, 20, 0.14);
  transform: translate3d(0, 105%, 0);
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  gap: 18px;
  outline: none;
}

.index-welcome-popup.is-open .index-welcome-popup__panel {
  transform: translate3d(0, 0, 0);
}

.index-welcome-popup.is-closing .index-welcome-popup__panel {
  transform: translate3d(0, 105%, 0);
}

.index-welcome-popup.is-closing .index-welcome-popup__backdrop {
  opacity: 0;
}

.index-welcome-popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 251, 246, 0.88);
  color: var(--muted);
  cursor: pointer;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.index-welcome-popup__close:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  transform: scale(1.04);
}

.index-welcome-popup__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 44px;
}

.index-welcome-popup__qq {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--accent-strong);
  font-family: var(--font-serif);
  white-space: pre-line;
}

.index-welcome-popup__title {
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
  white-space: pre-line;
}

.index-welcome-popup__intro {
  margin-top: 4px;
  max-width: 62ch;
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--muted);
  white-space: pre-line;
}

.index-welcome-popup__actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .index-welcome-popup__panel {
    min-height: clamp(220px, 52vh, 460px);
    max-height: min(68vh, 560px);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  .index-welcome-popup__body {
    padding-right: 0;
    padding-top: 8px;
  }

  .index-welcome-popup__actions {
    justify-content: stretch;
  }

  .index-welcome-popup__actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .index-welcome-popup__backdrop,
  .index-welcome-popup__panel,
  .index-welcome-popup__close {
    transition: none;
  }

  .index-welcome-popup__panel {
    transform: none;
  }
}
