@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Source+Serif+4:wght@600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #07101d;
  --bg-alt: #0c1729;
  --panel: rgba(12, 23, 41, 0.78);
  --panel-strong: rgba(14, 27, 48, 0.92);
  --border: rgba(92, 132, 181, 0.22);
  --border-strong: rgba(121, 175, 235, 0.34);
  --text: #edf5ff;
  --muted: #9bb0cb;
  --muted-strong: #d2def0;
  --accent: #3ed7ff;
  --accent-2: #8ce8ff;
  --success: #8df2c9;
  --warning: #ffd480;
  --danger: #ff7f8f;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(circle at 15% 20%, rgba(62, 215, 255, 0.12), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(141, 242, 201, 0.08), transparent 26%),
    linear-gradient(180deg, #050b14 0%, #08111d 46%, #0c1628 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 92%);
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.03em;
}

h1,
h2 {
  font-family: "Source Serif 4", Georgia, serif;
}

p {
  margin: 0;
}

.page-shell,
.app-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.mother-shell,
.child-shell,
.admin-shell {
  display: grid;
  gap: 18px;
}

.glass-card,
.login-card,
.panel,
.mother-card,
.surface-card,
.content-card {
  background: linear-gradient(180deg, rgba(15, 28, 49, 0.9), rgba(10, 19, 35, 0.9));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
}

.header-status,
.top-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.hero-grid,
.surface-grid,
.content-grid,
.section-grid,
.dashboard-grid {
  display: grid;
  gap: 18px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
}

.hero-three {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr) minmax(320px, 0.8fr);
  align-items: stretch;
}

.hero-hub {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 1.05fr) minmax(280px, 0.78fr);
  grid-template-areas:
    "copy core side"
    "sophea core whatsapp"
    "web core human";
  align-items: stretch;
}

.hero-hub .hero-copy {
  grid-area: copy;
}

.hero-hub .hub-core {
  grid-area: core;
}

.hero-hub .hub-side {
  grid-area: side;
}

.hero-hub .hub-chip:nth-of-type(1) {
  grid-area: sophea;
}

.hero-hub .hub-chip:nth-of-type(2) {
  grid-area: web;
}

.hero-hub .hub-chip:nth-of-type(3) {
  grid-area: whatsapp;
}

.hero-hub .hub-chip:nth-of-type(4) {
  grid-area: human;
}

.hub-chip {
  min-height: 168px;
}

.hub-chip h3 {
  font-size: 21px;
}

.hero-copy,
.hero-side,
.surface-card,
.content-card,
.panel,
.login-card {
  padding: 24px;
}

.hero-copy h2 {
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.03;
  margin-bottom: 14px;
}

.lead,
.body-copy,
.subtle {
  color: var(--muted);
  line-height: 1.6;
}

.lead {
  font-size: 18px;
  max-width: 62ch;
}

.body-copy {
  max-width: 65ch;
}

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 12px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  font-weight: 700;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(141, 242, 201, 0.42);
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04111d;
  border-color: transparent;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.02);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.status-pill.live {
  color: #03111d;
  background: linear-gradient(135deg, var(--success), #beffe5);
  border-color: transparent;
}

.flow-rail {
  display: grid;
  gap: 12px;
}

.flow-rail.compact {
  gap: 10px;
}

.flow-step {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 16px 16px 16px 54px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.flow-step span {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #04111d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.flow-step strong {
  font-size: 16px;
}

.flow-step small {
  color: var(--muted);
}

.flow-step.active {
  border-color: rgba(141, 242, 201, 0.34);
  background: linear-gradient(180deg, rgba(141, 242, 201, 0.08), rgba(255, 255, 255, 0.02));
}

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

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

.plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  color: var(--muted-strong);
}

.plain-list.tight {
  gap: 8px;
  margin-top: 12px;
}

.plain-list.tight li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
}

.plain-list.tight li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--success));
}

.timeline {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.compact-timeline {
  margin-top: 12px;
}

.timeline div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
}

.timeline span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(62, 215, 255, 0.24), rgba(141, 242, 201, 0.18));
  color: var(--accent-2);
  font-weight: 800;
}

.timeline p {
  color: var(--muted);
  padding-top: 6px;
}

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

.metrics-row div {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
}

.metrics-row strong {
  display: block;
  margin-bottom: 4px;
}

.metrics-row span {
  color: var(--muted);
  font-size: 14px;
}

.hero-side {
  display: grid;
  align-content: start;
}

.centered-intake {
  display: grid;
  align-content: start;
  position: relative;
  min-height: 100%;
  border-color: rgba(141, 242, 201, 0.34);
  background:
    radial-gradient(circle at top, rgba(141, 242, 201, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(15, 28, 49, 0.98), rgba(10, 19, 35, 0.98));
}

.centered-intake::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: calc(var(--radius) - 8px);
  border: 1px solid rgba(141, 242, 201, 0.14);
  pointer-events: none;
}

.centered-intake .intake-form {
  margin-top: 14px;
}

.center-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.intake-result {
  margin-top: 14px;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(141, 242, 201, 0.18);
  background: rgba(4, 10, 18, 0.45);
}

.intake-result-text {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

.intake-result-link {
  width: 100%;
}

.learn-more {
  padding: 18px 20px;
}

.learn-more > summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
  list-style: none;
}

.learn-more > summary::-webkit-details-marker {
  display: none;
}

.intake-followup {
  margin-top: 16px;
}

.hub-core .body-copy {
  max-width: 58ch;
}

.hub-core .intake-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.hub-core .intake-form label:nth-child(4),
.hub-core .intake-form label:nth-child(5) {
  grid-column: 1 / -1;
}

.hub-core .intake-form .button {
  grid-column: 1 / -1;
}

.hub-core .intake-result {
  grid-column: 1 / -1;
}

.hub-core .center-note {
  grid-column: 1 / -1;
}

.topbar,
.dashboard-top,
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.dashboard-top {
  padding: 24px;
}

.dashboard-top h1 {
  font-size: clamp(28px, 3vw, 40px);
}

.grid.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.metric-card {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.metric-card strong {
  display: block;
  font-size: 30px;
  margin-top: 8px;
}

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

.kanban {
  display: grid;
  grid-template-columns: repeat(7, minmax(170px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.kanban-column {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 340px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
}

.kanban-column h3,
.content-card h3,
.surface-card h3 {
  font-size: 18px;
}

.kanban-card,
.stack-item {
  padding: 12px;
  border-radius: 14px;
  background: rgba(4, 10, 18, 0.45);
  border: 1px solid rgba(121, 175, 235, 0.18);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stack-item strong {
  display: block;
  margin-bottom: 4px;
}

form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted-strong);
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(4, 10, 18, 0.58);
  color: var(--text);
  padding: 12px 14px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button {
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #03111b;
  cursor: pointer;
  font-weight: 800;
  min-height: 46px;
}

button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.logout-btn {
  margin-top: 10px;
  align-self: flex-end;
}

.hint,
.muted,
.subtle {
  color: var(--muted);
}

.error {
  color: var(--danger);
}

.hidden {
  display: none;
}

@media (max-width: 1180px) {
  .hero-grid,
  .hero-three,
  .surface-grid,
  .content-grid,
  .section-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .site-header,
  .topbar,
  .dashboard-top,
  .panel-head {
    flex-direction: column;
  }

  .header-status,
  .top-badges {
    justify-content: flex-start;
  }

  .kanban {
    grid-template-columns: repeat(7, minmax(180px, 1fr));
  }
}

@media (max-width: 760px) {
  .page-shell,
  .app-shell {
    width: min(100% - 20px, 1240px);
  }

  .hero-copy h2 {
    font-size: 32px;
  }

  .hero-hub,
  .hero-three,
  .surface-grid,
  .content-grid,
  .section-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .hub-chip,
  .hub-core,
  .hub-side {
    grid-area: auto;
  }

  .hub-core .intake-form {
    grid-template-columns: 1fr;
  }

  .site-header,
  .hero-copy,
  .hero-side,
  .surface-card,
  .content-card,
  .panel,
  .login-card,
  .dashboard-top {
    padding: 18px;
  }

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