/* =============================================
   Small Helix — Marketing landing (index-landing)
   Spec: purple scale, 8/12/16 radii, tiered shadows
   Breakpoints: 1440 / 768 / 375
   ============================================= */

@import url("/assets/css/site-header.css");
@import url("/assets/css/sh-icons.css");

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

:root {
  --sh-lp-accent: #7c3aed;
  --sh-lp-accent-soft: #a78bfa;
  --sh-lp-accent-legacy: #7c5cfc;
  --sh-lp-ink: #1e1b4b;
  --sh-lp-muted: #555;
  --sh-lp-bg-soft: #f5f3ff;
  --sh-lp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --sh-lp-shadow-lg: 0 10px 25px -5px rgba(30, 27, 75, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.06);
}

.landing-body {
  margin: 0;
  font-family: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1a1a1a;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  animation: sh-landing-in 0.35s ease-out;
  overflow-x: hidden;
  max-width: 100%;
}

@keyframes sh-landing-in {
  from {
    opacity: 0.92;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-body {
    animation: none;
  }
}

/* ----- Hero ----- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: max(100px, calc(56px + env(safe-area-inset-top, 0px) + 32px)) max(24px, env(safe-area-inset-right, 0px)) 60px max(24px, env(safe-area-inset-left, 0px));
  padding-bottom: max(60px, env(safe-area-inset-bottom, 0px));
  background:
    linear-gradient(180deg, rgba(15, 15, 26, 0.9) 0%, rgba(26, 26, 46, 0.88) 100%),
    linear-gradient(135deg, rgba(124, 92, 252, 0.18) 0%, rgba(167, 139, 250, 0.12) 45%, rgba(15, 15, 26, 0.2) 100%),
    url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1920&q=80") center / cover no-repeat;
  position: relative;
  overflow: hidden;
}

@supports (min-height: 100dvh) {
  .hero {
    min-height: 100dvh;
  }
}

.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(90px);
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.2);
  filter: blur(70px);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #c4b5fd;
  background: rgba(255, 255, 255, 0.12);
  padding: 8px 18px;
  border-radius: 20px;
  letter-spacing: 0.12em;
  margin-bottom: 24px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.hero-badge__mark {
  display: flex;
  color: #c4b5fd;
}
.hero-badge__mark svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw + 1rem, 3rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.18;
  letter-spacing: -0.03em;
  max-width: 680px;
  margin: 0 auto 20px;
  position: relative;
}

.hero h1 em {
  font-style: normal;
  color: #c4b5fd;
}

.hero p {
  font-size: clamp(1rem, 0.35vw + 0.95rem, 1.125rem);
  color: rgba(255, 255, 255, 0.78);
  max-width: 520px;
  line-height: 1.68;
  margin: 0 auto 26px;
  position: relative;
  font-weight: 400;
}

.hero-cta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 8px;
  position: relative;
}

.hero-login-hint {
  margin-top: 32px;
  font-size: 14px;
  text-align: center;
  position: relative;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}

.hero-login-hint a {
  color: #c4b5fd;
  font-weight: 600;
  text-decoration: none;
}

.hero-login-hint a:hover {
  text-decoration: underline;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: var(--sh-lp-accent-legacy);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(124, 92, 252, 0.3);
}

.btn-primary:hover {
  background: #6a4ce0;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124, 92, 252, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--sh-lp-shadow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 16px 28px;
  background: transparent;
  color: #c4b5fd;
  border: 1.5px solid var(--sh-lp-accent-legacy);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn-secondary:hover {
  background: rgba(124, 92, 252, 0.06);
}

.btn-secondary:active {
  transform: scale(0.98);
}

.hero-trust {
  display: flex;
  gap: 24px;
  margin-top: 48px;
  position: relative;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-trust span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-trust svg {
  width: 16px;
  height: 16px;
  stroke: var(--sh-lp-accent-legacy);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ----- Sections ----- */
.section#pain {
  background: #fafaff;
}

/* 工作方式区（位于诊断区后、模块区前） */
#diagnose + .section {
  background: #f5f5f7;
}

.section {
  padding: 80px max(24px, env(safe-area-inset-right, 0px)) 80px max(24px, env(safe-area-inset-left, 0px));
}

.section-inner {
  max-width: 1080px;
  margin: 0 auto;
  overflow-wrap: anywhere;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  color: #c4b5fd;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.375rem, 2.2vw + 0.85rem, 2rem);
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 12px;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.section-desc {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.68;
  max-width: 600px;
  margin-bottom: 40px;
}

/* Pain */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* 纯展示：勿做成可点击样式（见 frontend/notes/for-autoclaw-pain-block.md） */
.pain-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 28px 24px;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-shadow: var(--sh-lp-shadow);
}

.pain-card:hover {
  border-color: #c4b5fd;
  box-shadow: var(--sh-lp-shadow-lg);
}

.pain-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, #f4f0ff, #ebe4ff);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--sh-icon-color);
}
.pain-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pain-icon.pain-icon-emoji {
  font-size: 22px;
  line-height: 1;
  color: inherit;
}

.pain-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.pain-card p {
  font-size: 14px;
  color: #5c5c5c;
  line-height: 1.65;
  margin: 0;
}

/* Diagnosis — anchor offset for fixed nav */
.diagnose-section {
  background: #ffffff;
  scroll-margin-top: calc(88px + env(safe-area-inset-top, 0px));
}

.diagnose-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.diag-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  transition: border-color 0.3s, transform 0.2s, box-shadow 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--sh-lp-shadow);
  min-width: 0;
}

.diag-card:hover {
  border-color: #c4b5fd;
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(124, 92, 252, 0.12);
}

.diag-card:active {
  transform: translateY(-2px);
}

/* v4：E0 单一诊断入口（landing） */
.diagnose-grid--e0 {
  grid-template-columns: 1fr;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.diag-card--e0 {
  background: linear-gradient(135deg, #7C5CFC 0%, #6344E0 100%);
  border: none;
  color: #fff;
  text-align: center;
  padding: 32px 24px;
  box-shadow: 0 16px 40px rgba(124, 92, 252, 0.28);
}
.diag-card--e0:hover {
  border-color: transparent;
  box-shadow: 0 22px 50px rgba(124, 92, 252, 0.36);
}
.diag-card--e0 .diag-icon { color: #fff; }
.diag-card--e0 .diag-icon svg { width: 34px; height: 34px; }
.diag-card--e0 h3 { color: #fff; font-size: 22px; }
.diag-card--e0 p { color: rgba(255, 255, 255, 0.92); font-size: 14px; line-height: 1.6; max-width: 460px; margin-left: auto; margin-right: auto; }
.diag-card--e0 .tag {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  padding: 5px 14px;
  border-radius: 20px;
  font-weight: 600;
}

.diag-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--sh-icon-color);
}
.diag-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.diag-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.diag-card p {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 12px;
  line-height: 1.55;
}

.diag-card .tag {
  display: inline-block;
  font-size: 11px;
  color: #c4b5fd;
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 10px;
  border-radius: 6px;
}

.diag-card--wide {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  text-align: left;
  gap: 16px;
  padding: 22px 24px;
}

.diag-card--wide .diag-icon {
  margin-bottom: 0;
  flex-shrink: 0;
  line-height: 1;
}

.diag-card-wide__body {
  flex: 1;
  min-width: 0;
}

.diag-card-wide__body h3 {
  margin: 0 0 8px;
}

.diag-card-wide__body p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: #666;
}

.diag-card-wide__body .tag {
  margin-top: 2px;
}

/* Services preview */
.service-cats {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.service-cat-label {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 10px;
  padding-left: 12px;
  border-left: 3px solid var(--sh-lp-accent-legacy);
}

.service-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.service-item {
  background: #f5f5f7;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.service-item:hover {
  background: #f0edff;
  border-color: #c4b5fd;
  color: #c4b5fd;
}

.service-item:active {
  transform: scale(0.98);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.step {
  text-align: center;
  padding: 20px 16px;
}

.step-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(145deg, #8b6cff, var(--sh-lp-accent-legacy));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 6px 16px rgba(124, 92, 252, 0.28);
}

.step h4 {
  font-size: 15px;
  font-weight: 700;
  margin: 6px 0 4px;
  letter-spacing: -0.01em;
}

.step p {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.55;
  margin: 0;
}

/* Bottom CTA */
.bottom-cta {
  text-align: center;
  padding: 80px max(24px, env(safe-area-inset-right, 0px)) 80px max(24px, env(safe-area-inset-left, 0px));
  background:
    radial-gradient(circle at 50% 100%, rgba(124, 92, 252, 0.24) 0%, rgba(124, 92, 252, 0) 46%),
    linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 60%, #16162a 100%);
}

.bottom-cta h2 {
  font-size: clamp(1.375rem, 2.5vw + 0.75rem, 2rem);
  font-weight: 700;
  margin: 0 0 12px;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.bottom-cta p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.65;
  margin: 0 0 28px;
}

.bottom-cta .btn-primary {
  font-size: 18px;
  padding: 18px 40px;
}

/* Footer */
.footer {
  border-top: 1px solid #eee;
  padding: 32px max(24px, env(safe-area-inset-right, 0px)) max(32px, env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
  text-align: center;
}

.footer p {
  font-size: 13px;
  color: #999;
  margin: 4px 0;
}

.footer a {
  color: #c4b5fd;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ----- 平板 / 窄屏桌面：避免 3～4 列过挤 ----- */
@media (max-width: 900px) {
  .pain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

/* ----- 1440+ ----- */
@media (min-width: 1440px) {
  .section-inner {
    max-width: 1200px;
  }

  .hero h1 {
    max-width: 760px;
    font-size: clamp(2.25rem, 3vw + 1.25rem, 3.25rem);
  }

  .hero p {
    max-width: 560px;
  }
}

/* ----- 768 ----- */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 32px;
  }

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

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

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

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

  .section {
    padding: 48px max(20px, env(safe-area-inset-right, 0px)) 48px max(20px, env(safe-area-inset-left, 0px));
  }

  .section-title {
    font-size: 26px;
  }
}

/* ----- 375 (small phone) ----- */
@media (max-width: 375px) {
  .hero {
    padding-top: max(88px, calc(52px + env(safe-area-inset-top, 0px) + 28px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-bottom: max(48px, env(safe-area-inset-bottom, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px));
  }

  .hero h1 {
    font-size: 26px;
    letter-spacing: -0.5px;
  }

  .hero-badge {
    font-size: 11px;
    padding: 5px 12px;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .hero-trust {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

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

  .diag-card--wide {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 18px;
  }

  .diag-card-wide__body {
    text-align: center;
  }

  .diag-card--wide .diag-icon {
    margin-bottom: 4px;
  }

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

  .section {
    padding: 40px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px));
  }

  .section-title {
    font-size: 22px;
  }

  .section-desc {
    font-size: 15px;
    margin-bottom: 28px;
  }

  .pain-card,
  .diag-card:not(.diag-card--wide) {
    padding: 20px 16px;
  }

  .bottom-cta {
    padding: 56px 16px;
  }

  .bottom-cta h2 {
    font-size: 24px;
  }

  .bottom-cta .btn-primary {
    font-size: 16px;
    padding: 16px 24px;
    width: 100%;
    max-width: 300px;
  }

  .hero-login-hint {
    font-size: 13px;
    padding: 0 8px;
  }
}
