/* ========================================
   Hoobase LP — Section Styles
   ======================================== */

@keyframes heroGlow {
  0% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}
@keyframes corePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 82, 22, 0.4); }
  50% { box-shadow: 0 0 24px 8px rgba(255, 82, 22, 0.15); }
}

/* --- Hero --- */
.hero { padding-top: clamp(140px, 20vh, 220px); padding-bottom: clamp(80px, 12vh, 160px); text-align: left; position: relative; overflow: visible; display: flex; align-items: center; gap: 48px; max-width: 1080px; }
.hero::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 900px; height: 900px; max-width: 100vw; max-height: 100vw; pointer-events: none;
  background: radial-gradient(ellipse 55% 45% at 50% 35%, rgba(255, 82, 22, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 80% 60% at 45% 50%, rgba(255, 159, 108, 0.06) 0%, transparent 60%);
  animation: heroGlow 5s ease-in-out infinite alternate;
}
.hero::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 5%, var(--border-accent), var(--accent) 50%, var(--border-accent), transparent 95%);
}
.hero h1 {
  font-size: clamp(36px, 5.5vw, 54px); font-weight: 900; margin-bottom: 24px;
  background: linear-gradient(170deg, #fff 30%, var(--text) 60%, var(--warm) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  will-change: transform, opacity;
}
.hero-sub { font-size: clamp(15px, 1.8vw, 18px); max-width: 480px; margin: 0 0 40px; line-height: 1.9; color: var(--text-muted); }

.hero-content { flex: 1; min-width: 0; }
.hero-phone { flex-shrink: 0; position: relative; }

/* --- Problem --- */
.problem { text-align: center; position: relative; max-width: 100%; padding-left: 24px; padding-right: 24px; }
.problem::before {
  content: ""; position: absolute; top: -40px; bottom: -40px; left: 50%;
  width: 100vw; transform: translateX(-50%); z-index: -1;
  background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.problem > p { margin: 0 auto 48px; max-width: 640px; }
.problem h2 { font-size: clamp(30px, 5vw, 44px); }

.dunbar { position: relative; width: 280px; height: 280px; margin: 0 auto 24px; }
.dunbar-ring {
  position: absolute; width: var(--size); height: var(--size); top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.8); border: 1px solid rgba(255, 255, 255, var(--opacity));
  border-radius: 50%; opacity: 0; transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--delay); box-shadow: 0 0 20px rgba(255, 82, 22, calc(var(--opacity) * 0.3));
}
.dunbar-ring::after {
  content: attr(data-count); position: absolute; bottom: -8px; left: 50%;
  transform: translateX(-50%); font-size: 10px; color: var(--text-muted); white-space: nowrap; letter-spacing: 0.02em;
}
.dunbar-core {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8);
  width: 48px; height: 48px; background: radial-gradient(circle, var(--warm) 0%, var(--accent) 100%);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 20px; font-weight: 700; color: #fff;
  opacity: 0; transition: opacity 0.5s ease, transform 0.5s ease; transition-delay: var(--delay);
}
.problem.is-visible .dunbar-ring,
.problem.is-visible .dunbar-core { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.problem.is-visible .dunbar-core { animation: corePulse 3s ease-in-out 1s infinite; }
.dunbar-caption { font-size: 13px; text-align: center; color: var(--text-muted); opacity: 0.7; }

/* --- Solution --- */
.solution { display: flex; align-items: center; gap: 48px; }
.solution-content { flex: 1; min-width: 0; }
.solution-content > p { margin-bottom: 16px; }
.solution-content > p:last-of-type {
  color: var(--text); font-weight: 500; padding: 20px 24px; margin-top: 8px;
  border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, var(--accent-glow), transparent 60%);
}
.solution-visual { flex-shrink: 0; width: 340px; }
.solution-img { width: 100%; height: auto; filter: drop-shadow(0 0 40px rgba(255, 82, 22, 0.15)); }

/* --- Use Cases --- */
.cases-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px; margin-top: 48px; background: var(--border); border-radius: 16px;
  overflow: hidden; counter-reset: case-count;
}
.case-card {
  background: var(--bg); padding: 36px 32px; position: relative;
  transition: background 0.3s; counter-increment: case-count;
}
.case-card::before {
  content: counter(case-count, decimal-leading-zero);
  position: absolute; top: 32px; right: 28px; font-size: 48px; font-weight: 800;
  font-family: var(--font-display); color: rgba(255, 255, 255, 0.025); line-height: 1; pointer-events: none;
}
.case-card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--warm)); opacity: 0; transition: opacity 0.3s;
}
.case-card:hover { background: rgba(255, 255, 255, 0.02); }
.case-card:hover::after { opacity: 1; }
.case-card h3 { margin-bottom: 12px; color: var(--text); }
.case-card p { font-size: 14px; line-height: 1.7; margin-bottom: 16px; }
.case-example { display: block; font-size: 13px; color: var(--accent); font-weight: 500; line-height: 1.5; }

/* --- How it works --- */
.steps { display: flex; align-items: flex-start; gap: 0; margin-top: 48px; }
.step {
  flex: 1; padding: 28px; border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface); position: relative; transition: border-color 0.3s, background 0.3s;
}
.step::before {
  content: ""; position: absolute; top: -1px; left: 16px; right: 16px;
  height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--warm));
  opacity: 0; transition: opacity 0.3s;
}
.step:hover { border-color: var(--border-accent); background: var(--surface-hover); }
.step:hover::before { opacity: 1; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent);
  color: #fff; font-size: 13px; font-weight: 600; margin-bottom: 16px;
}
.step h3 { margin-bottom: 10px; }
.step-img { width: 180px; height: 180px; object-fit: contain; margin-bottom: 16px; }
.step p { font-size: 14px; }
.step-connector { width: 40px; min-width: 40px; display: flex; align-items: center; justify-content: center; padding-top: 40px; }
.step-connector::after { content: ""; display: block; width: 24px; border-top: 2px dashed rgba(255, 82, 22, 0.3); }

/* --- Why Hoobase --- */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; margin-top: 48px; }
.why-item { padding-left: 20px; border-left: 3px solid var(--border); position: relative; transition: border-color 0.4s; }
.why-item::before {
  content: ""; position: absolute; left: -3px; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--warm)); opacity: 0; transition: opacity 0.4s;
}
.why-item:hover { border-left-color: transparent; }
.why-item:hover::before { opacity: 1; }
.why-item h3 { margin-bottom: 8px; color: var(--text); font-size: 16px; }
.why-item p { font-size: 14px; }

/* --- Market --- */
.phases { display: flex; align-items: stretch; gap: 0; margin-top: 48px; }
.phase {
  flex: 1; padding: 28px; border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface); position: relative; overflow: hidden; transition: border-color 0.3s;
}
.phase::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--warm)); opacity: 0.4;
}
.phase::after {
  content: attr(data-phase-num); position: absolute; bottom: -12px; right: 12px;
  font-size: 72px; font-weight: 800; font-family: var(--font-display);
  color: rgba(255, 255, 255, 0.015); line-height: 1; pointer-events: none;
}
.phase:hover { border-color: var(--border-accent); }
.phase-label {
  display: inline-block; font-size: 11px; font-weight: 600; color: var(--accent);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px;
}
.phase h3 { font-size: 15px; margin-bottom: 6px; color: var(--text); }
.phase p { font-size: 13px; }
.phase-arrow { width: 32px; min-width: 32px; display: flex; align-items: center; justify-content: center; }
.phase-arrow::after { content: ""; display: block; width: 20px; border-top: 2px dashed rgba(255, 82, 22, 0.25); }

/* --- Vision --- */
.vision { text-align: center; padding-top: clamp(120px, 16vh, 200px); padding-bottom: clamp(80px, 10vh, 120px); position: relative; }
.vision::before {
  content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 600px; height: 400px; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255, 82, 22, 0.08) 0%, transparent 70%);
}
.vision h2 {
  font-size: clamp(32px, 5vw, 48px); margin-bottom: 24px;
  background: linear-gradient(170deg, #fff 20%, var(--text) 50%, var(--warm) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.vision p { margin: 0 auto; font-size: clamp(16px, 2vw, 20px); }

/* --- Final CTA --- */
.cta-final { text-align: center; padding-bottom: clamp(120px, 16vh, 200px); position: relative; }
.cta-final::before {
  content: ""; position: absolute; top: 10%; left: 50%; transform: translateX(-50%);
  width: 700px; height: 500px; pointer-events: none;
  background: radial-gradient(ellipse 50% 40% at center, rgba(255, 82, 22, 0.07) 0%, transparent 70%);
}
.cta-final h2 { margin-bottom: 16px; }
.cta-final p { margin: 0 auto 40px; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero { flex-direction: column; text-align: center; gap: 40px; }
  .hero-sub { margin: 0 auto 40px; }
  .hero-phone { order: -1; }
  .solution { flex-direction: column; gap: 32px; }
  .solution-visual { width: 280px; margin: 0 auto; }
  .step-img { width: 150px; height: 150px; }
  .steps, .phases { flex-direction: column; }
  .step-connector, .phase-arrow { width: 100%; padding: 12px 0; min-width: unset; }
  .step-connector::after, .phase-arrow::after { width: 0; height: 16px; border-top: 0; border-left: 2px dashed rgba(255, 82, 22, 0.25); }
  .cases-grid { grid-template-columns: 1fr; }
  .why-grid { gap: 24px; }
  .dunbar { width: 220px; height: 220px; }
  .hero::before, .vision::before, .cta-final::before { width: 100vw; }
}
