:root {
  --bg: #f7f9ff;
  --bg-soft: #eef3ff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --text: #162544;
  --text-soft: #5f6f92;
  --text-faint: #7b8eaf;
  --line: rgba(26, 59, 127, 0.12);
  --line-strong: rgba(26, 59, 127, 0.18);
  --primary: #2b66ea;
  --primary-strong: #1d4fc7;
  --secondary: #82c8ff;
  --accent: #ba8cff;
  --success: #30bb78;
  --warning: #f29f4b;
  --shadow-xl: 0 34px 80px rgba(19, 37, 75, 0.10);
  --shadow-lg: 0 24px 52px rgba(19, 37, 75, 0.08);
  --shadow-md: 0 14px 30px rgba(19, 37, 75, 0.07);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-sm: 16px;
  --max-width: 1280px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 6%, rgba(130, 200, 255, 0.22), transparent 18%),
    radial-gradient(circle at 90% 8%, rgba(186, 140, 255, 0.14), transparent 22%),
    linear-gradient(180deg, #fbfdff 0%, #f3f7ff 55%, #f7fbff 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
}

body::before {
  background-image:
    linear-gradient(rgba(25, 63, 138, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 63, 138, 0.026) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 0%, #000 16%, transparent 72%);
}

body::after {
  background:
    radial-gradient(circle at 20% 22%, rgba(130, 200, 255, 0.14), transparent 22%),
    radial-gradient(circle at 80% 30%, rgba(43, 102, 234, 0.10), transparent 22%);
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button, input, select { font: inherit; }

.page-shell {
  position: relative;
  isolation: isolate;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(14px);
  z-index: -1;
  opacity: .75;
  pointer-events: none;
}

.orb-a {
  width: 360px;
  height: 360px;
  left: -120px;
  top: 110px;
  background: radial-gradient(circle, rgba(130, 200, 255, 0.38), rgba(130, 200, 255, 0) 72%);
}

.orb-b {
  width: 340px;
  height: 340px;
  right: -120px;
  top: 420px;
  background: radial-gradient(circle, rgba(186, 140, 255, 0.26), rgba(186, 140, 255, 0) 72%);
}

.orb-c {
  width: 260px;
  height: 260px;
  right: 4%;
  top: 1250px;
  background: radial-gradient(circle, rgba(43, 102, 234, 0.18), rgba(43, 102, 234, 0) 72%);
}

.container {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
}

.section {
  padding: 92px 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(239,244,255,0.78));
  border-top: 1px solid rgba(26, 59, 127, 0.06);
  border-bottom: 1px solid rgba(26, 59, 127, 0.06);
}

.card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.92);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(43, 102, 234, 0.10);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(19, 37, 75, 0.05);
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 6px rgba(43, 102, 234, 0.10);
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  letter-spacing: -0.045em;
}

h1 {
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: .95;
  margin-top: 22px;
}

h2 {
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: .98;
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.74rem);
  line-height: 1.08;
}

p, li {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.8;
}

.accent {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}

.btn:hover,
.btn:focus-visible { transform: translateY(-3px); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #538dff 60%, #c3a4ff 100%);
  box-shadow: 0 18px 40px rgba(43, 102, 234, 0.24);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255,255,255,0.88);
  border-color: rgba(43, 102, 234, 0.12);
  box-shadow: 0 14px 28px rgba(19, 37, 75, 0.06);
}

.btn-full { width: 100%; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 18px 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(248,251,255,0.92), rgba(248,251,255,0.64));
  border-bottom: 1px solid rgba(26, 59, 127, 0.06);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #74a2ff 70%, #dec2ff 100%);
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  box-shadow: 0 16px 28px rgba(43, 102, 234, 0.22);
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--text-soft);
  margin-top: 2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ghost-link {
  color: var(--text-soft);
  font-weight: 600;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 32px;
  align-items: center;
}

.hero-copy,
.hero-visual {
  position: relative;
}

.hero-text {
  max-width: 680px;
  font-size: 1.06rem;
  margin-top: 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

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

.metric-card {
  padding: 22px 20px;
}

.metric-card strong {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-size: 1.85rem;
  letter-spacing: -0.04em;
}

.metric-card span {
  color: var(--text-soft);
  font-size: .92rem;
}

.hero-visual {
  padding: 28px;
  overflow: hidden;
}

.visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.live-pill,
.visual-subtitle,
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(247,250,255,0.88);
  border: 1px solid rgba(43, 102, 234, 0.10);
  color: var(--text-soft);
  font-size: .84rem;
  font-weight: 700;
}

.live-pill {
  color: var(--success);
}

.mini-chat {
  display: grid;
  gap: 16px;
}

.mini-message {
  display: flex;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
}

.mini-message.customer {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(26, 59, 127, 0.08);
}

.mini-message.ai {
  background: linear-gradient(135deg, rgba(43, 102, 234, 0.12), rgba(186, 140, 255, 0.12));
  border: 1px solid rgba(43, 102, 234, 0.08);
}

.mini-message strong {
  display: block;
  margin-bottom: 6px;
}

.mini-avatar,
.profile-avatar {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: .85rem;
  font-weight: 800;
  color: var(--primary-strong);
  background: rgba(43, 102, 234, 0.10);
}

.mini-avatar.ai,
.profile-avatar {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #74a2ff 64%, #c3a4ff 100%);
}

.mini-analysis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.analysis-chip {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(26, 59, 127, 0.08);
}

.analysis-chip span,
.insight-card span,
.next-step-card span,
.benefit-index,
.salon-badge {
  display: block;
  color: var(--text-faint);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 8px;
  font-weight: 700;
}

.analysis-chip strong,
.insight-card strong,
.next-step-card strong {
  font-size: 1rem;
  color: var(--text);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading p {
  max-width: 520px;
}

.simulation-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

.control-panel,
.chat-panel,
.insight-panel {
  padding: 24px;
}

.panel-head {
  margin-bottom: 18px;
}

.panel-head p {
  margin-top: 8px;
  font-size: .95rem;
}

.salon-card {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,0.86), rgba(243,247,255,0.92));
  border: 1px solid rgba(26, 59, 127, 0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
  margin-bottom: 18px;
}

.salon-card h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.selector-group {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.selector-group label {
  font-size: .9rem;
  font-weight: 700;
}

select,
.chat-composer input {
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(26, 59, 127, 0.10);
  background: rgba(255,255,255,0.86);
  color: var(--text);
  padding: 0 16px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

select:focus,
.chat-composer input:focus {
  border-color: rgba(43, 102, 234, 0.26);
  box-shadow: 0 0 0 4px rgba(43, 102, 234, 0.08);
}

.scenario-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.scenario-option {
  width: 100%;
  text-align: left;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(26, 59, 127, 0.08);
  background: rgba(255,255,255,0.8);
  cursor: pointer;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}

.scenario-option:hover,
.scenario-option.active {
  transform: translateY(-2px);
  border-color: rgba(43, 102, 234, 0.18);
  box-shadow: 0 16px 28px rgba(19, 37, 75, 0.07);
}

.scenario-option strong,
.scenario-option span {
  display: block;
}

.scenario-option strong {
  font-size: .98rem;
  margin-bottom: 6px;
}

.scenario-option span {
  color: var(--text-soft);
  font-size: .9rem;
  line-height: 1.55;
}

.cta-stack {
  display: grid;
  gap: 12px;
}

.panel-note {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(43, 102, 234, 0.08), rgba(186, 140, 255, 0.08));
}

.panel-note strong {
  display: block;
  margin-bottom: 8px;
}

.chat-panel {
  min-height: 740px;
  display: flex;
  flex-direction: column;
}

.chat-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(26, 59, 127, 0.08);
}

.profile-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-block strong,
.profile-block span {
  display: block;
}

.profile-block span {
  color: var(--text-soft);
  margin-top: 3px;
  font-size: .9rem;
}

.chat-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chat-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 0;
  min-height: 420px;
}

.message {
  display: flex;
  gap: 12px;
  max-width: 84%;
  animation: fadeUp .45s var(--ease);
}

.message.user {
  align-self: flex-start;
}

.message.assistant {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-bubble {
  padding: 16px 18px;
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(26, 59, 127, 0.08);
}

.message.user .message-bubble {
  background: rgba(255,255,255,0.92);
}

.message.assistant .message-bubble {
  background: linear-gradient(135deg, rgba(43, 102, 234, 0.14), rgba(186, 140, 255, 0.14));
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.message-meta strong {
  font-size: .92rem;
}

.message-meta time {
  color: var(--text-faint);
  font-size: .78rem;
}

.message p {
  color: var(--text);
  line-height: 1.7;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: .82rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.message.user .message-avatar {
  background: rgba(43, 102, 234, 0.10);
  color: var(--primary-strong);
}

.message.assistant .message-avatar {
  background: linear-gradient(135deg, var(--primary), #74a2ff 64%, #c3a4ff 100%);
  color: #fff;
}

.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(26, 59, 127, 0.08);
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  opacity: .35;
  animation: blink 1.1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: .15s; }
.typing-indicator span:nth-child(3) { animation-delay: .3s; }
.typing-indicator small {
  margin-left: 8px;
  color: var(--text-soft);
}

.hidden { display: none !important; }

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.quick-chip {
  border: 1px solid rgba(43, 102, 234, 0.10);
  background: rgba(255,255,255,0.84);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform .22s var(--ease), border-color .22s var(--ease);
}

.quick-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(43, 102, 234, 0.18);
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 18px;
}

.insight-stack {
  display: grid;
  gap: 12px;
}

.insight-card,
.next-step-card,
.knowledge-card {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(26, 59, 127, 0.08);
  background: rgba(255,255,255,0.82);
}

.next-step-card {
  margin-top: 14px;
  background: linear-gradient(135deg, rgba(43, 102, 234, 0.08), rgba(186, 140, 255, 0.10));
}

.knowledge-card {
  margin-top: 14px;
}

.knowledge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.knowledge-head h4 {
  font-size: 1rem;
}

.success-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 8px rgba(48, 187, 120, 0.12);
}

.knowledge-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.benefit-card {
  padding: 26px;
}

.benefit-card h3 {
  margin-bottom: 12px;
}

.benefit-index {
  color: var(--primary);
}

.closing-cta {
  padding: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.closing-cta p {
  margin-top: 12px;
  max-width: 740px;
}

.closing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes blink {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

@media (max-width: 1180px) {
  .simulation-grid {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .insight-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .section-heading,
  .closing-cta {
    grid-template-columns: 1fr;
    display: grid;
  }

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

  .hero-metrics,
  .mini-analysis,
  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(var(--max-width), calc(100% - 24px));
  }

  .section {
    padding: 74px 0;
  }

  .topbar-inner,
  .topbar-actions,
  .hero-actions,
  .closing-actions,
  .chat-composer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .chat-topbar {
    align-items: start;
  }

  .message {
    max-width: 100%;
  }
}
