:root {
  --bg: #0f0b1e;
  --bg-alt: #150f28;
  --surface: #1c1536;
  --surface-border: #322a55;
  --text: #f5f3ff;
  --text-dim: #b8b0d9;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --orange: #f97316;
  --yellow: #fde047;
  --gradient: linear-gradient(120deg, var(--violet), var(--pink) 55%, var(--orange));
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -20px rgba(139, 92, 246, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  margin: 0 0 0.5em;
  line-height: 1.15;
}

p { margin: 0 0 1em; color: var(--text-dim); }

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 11, 30, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--surface-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  white-space: nowrap;
}

.logo span {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}

.nav a {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: #1a0b2e;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--surface-border);
}

.btn-ghost:hover {
  border-color: var(--violet);
  background: rgba(139, 92, 246, 0.1);
}

.btn-small { padding: 10px 20px; font-size: 0.9rem; }
.btn-full { width: 100%; padding: 16px; font-size: 1.05rem; }

/* Hero */
.hero {
  position: relative;
  padding: 110px 0 90px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(circle, rgba(139,92,246,0.35), rgba(236,72,153,0.15) 45%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 780px;
}

.badge {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--yellow);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: var(--text);
  margin-bottom: 20px;
}

.highlight {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 620px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
.section { padding: 90px 0; }
.section-alt { background: var(--bg-alt); }

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  text-align: center;
  color: var(--text);
}

.section-sub {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
}

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

.step {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 32px;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  color: #1a0b2e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 16px;
}

.step h3 { color: var(--text); font-size: 1.15rem; }
.step p { margin: 0; font-size: 0.95rem; }

/* Base plan */
.base-plan {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.base-plan::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0.06;
  pointer-events: none;
}

.tag {
  display: inline-block;
  background: rgba(139, 92, 246, 0.15);
  color: var(--violet);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.base-plan h3 { color: var(--text); font-size: 1.6rem; margin-bottom: 16px; }

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.feature-list li {
  color: var(--text-dim);
  font-size: 0.95rem;
  padding-left: 26px;
  position: relative;
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--pink);
  font-weight: 700;
}

.base-plan-price {
  text-align: right;
  flex-shrink: 0;
}

.price {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
}

.price-note {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.modules-title {
  color: var(--text);
  font-size: 1.3rem;
  margin: 56px 0 24px;
  text-align: center;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.module-card {
  display: block;
  cursor: pointer;
  position: relative;
}

.module-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.module-card-body {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 24px;
  height: 100%;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.module-card-body::after {
  content: '';
  position: absolute;
  top: 20px;
  right: 20px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--surface-border);
  background: transparent;
  transition: all 0.2s;
}

.module-check:checked + .module-card-body {
  border-color: var(--pink);
  background: linear-gradient(160deg, rgba(139,92,246,0.12), rgba(236,72,153,0.08));
  transform: translateY(-3px);
}

.module-check:checked + .module-card-body::after {
  background: var(--gradient);
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
}

.module-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 12px;
}

.module-card-body h4 {
  color: var(--text);
  font-size: 1.05rem;
  margin-bottom: 8px;
  padding-right: 24px;
}

.module-card-body p {
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.module-price {
  font-weight: 700;
  color: var(--yellow);
  font-size: 0.95rem;
}

.module-price small {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.75rem;
}

.total-bar {
  margin-top: 40px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.total-bar-inner {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.total-bar-inner span {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.total-bar-inner strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  color: var(--text);
}

/* Ownership banner */
.ownership {
  padding: 64px 0;
}

.ownership-inner {
  text-align: center;
  max-width: 680px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
}

.ownership-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: 0.08;
  pointer-events: none;
}

.ownership-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 12px;
}

.ownership-inner h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  color: var(--text);
  position: relative;
}

.ownership-inner p {
  position: relative;
  font-size: 1.02rem;
  margin: 0;
}

/* Clients */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 640px;
  margin: 0 auto;
}

.client-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 28px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.client-card:hover {
  border-color: var(--violet);
  transform: translateY(-3px);
}

.client-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 12px;
}

.client-card h4 {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.client-url {
  color: var(--pink);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Benefits */
.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.benefit {
  text-align: center;
  padding: 24px;
}

.benefit-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
}

.benefit h4 { color: var(--text); font-size: 1.05rem; }
.benefit p { font-size: 0.9rem; margin: 0; }

/* Form */
.form-container {
  max-width: 640px;
}

.form-intro { text-align: center; }

.quote-form {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 40px;
  display: grid;
  gap: 20px;
}

.form-row { display: grid; gap: 8px; }

.form-row label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.form-row input,
.form-row textarea {
  background: var(--bg-alt);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--violet);
}

.form-summary-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.selected-summary {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-dim);
}

.selected-total {
  margin: 4px 0 0;
  font-size: 1rem;
}

.selected-total strong { color: var(--yellow); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--surface-border);
  padding: 56px 0 24px;
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
  padding-bottom: 32px;
}

.footer-tagline {
  margin-top: 8px;
  font-size: 0.9rem;
}

.footer-contact p {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.footer-contact a:hover { color: var(--pink); }

.footer-bottom {
  border-top: 1px solid var(--surface-border);
  padding-top: 20px;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.85rem;
}

/* Assistant widget */
#assistant-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
}

#assistant-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--gradient);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  position: relative;
  transition: transform 0.2s;
}

#assistant-toggle:hover { transform: scale(1.06); }

.assistant-icon-close { display: none; }
#assistant-toggle.is-open .assistant-icon-open { display: none; }
#assistant-toggle.is-open .assistant-icon-close { display: inline; }

.assistant-panel {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 140px);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.assistant-panel[hidden] {
  display: none;
}

.assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--gradient);
  flex-shrink: 0;
}

.assistant-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.assistant-header-info strong {
  display: block;
  color: #1a0b2e;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
}

.assistant-status {
  display: block;
  color: rgba(26, 11, 46, 0.75);
  font-size: 0.75rem;
  font-weight: 600;
}

.assistant-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(26, 11, 46, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

#assistant-close {
  background: none;
  border: none;
  color: #1a0b2e;
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  opacity: 0.75;
}

#assistant-close:hover { opacity: 1; }

.assistant-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.assistant-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.assistant-msg-user {
  align-self: flex-end;
  background: var(--gradient);
  color: #1a0b2e;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}

.assistant-msg-assistant {
  align-self: flex-start;
  background: var(--bg-alt);
  border: 1px solid var(--surface-border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.assistant-msg-assistant.is-typing::after {
  content: '●●●';
  letter-spacing: 2px;
  color: var(--text-dim);
  animation: assistant-blink 1.2s infinite;
}

.assistant-msg-error {
  border-color: var(--pink);
}

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

.assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
  flex-shrink: 0;
}

.assistant-suggestions[hidden] {
  display: none;
}

.suggestion-chip {
  background: var(--bg-alt);
  border: 1px solid var(--surface-border);
  color: var(--text-dim);
  font-size: 0.78rem;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.suggestion-chip:hover {
  border-color: var(--violet);
  color: var(--text);
}

.assistant-input-row {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--surface-border);
  flex-shrink: 0;
}

.assistant-input-row input {
  flex: 1;
  background: var(--bg-alt);
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.assistant-input-row input:focus {
  outline: none;
  border-color: var(--violet);
}

#assistant-send {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: none;
  background: var(--gradient);
  color: #1a0b2e;
  font-size: 1rem;
  cursor: pointer;
}

@media (max-width: 480px) {
  #assistant-widget { right: 16px; bottom: 16px; }
  .assistant-panel {
    width: calc(100vw - 24px);
    height: calc(100vh - 110px);
    bottom: 72px;
    right: -8px;
  }
}

/* Admin panel */
.admin-body { background: var(--bg); }

.admin-badge {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
}

.admin-main { padding: 48px 0 80px; }

.admin-container { max-width: 780px; }

.admin-status {
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-status-ok {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid #22c55e;
  color: #4ade80;
}

.admin-status-error {
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid var(--orange);
  color: var(--orange);
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}

.admin-card h2 {
  color: var(--text);
  font-size: 1.15rem;
  margin-bottom: 18px;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.admin-card-header h2 { margin-bottom: 0; }

.admin-field { display: grid; gap: 6px; margin-bottom: 16px; }
.admin-field:last-child { margin-bottom: 0; }

.admin-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
}

.admin-field input,
.admin-field textarea {
  background: var(--bg-alt);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  resize: vertical;
}

.admin-field input:focus,
.admin-field textarea:focus {
  outline: none;
  border-color: var(--violet);
}

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

.admin-field-icon input { text-align: center; }
.admin-field-grow { grid-column: span 2; }

.admin-subcard {
  background: var(--bg-alt);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 14px;
}

.admin-subcard:last-child { margin-bottom: 0; }

.admin-remove-btn {
  margin-top: 12px;
  background: none;
  border: 1px solid var(--pink);
  color: var(--pink);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-remove-btn:hover { background: rgba(236, 72, 153, 0.1); }

.admin-save-bar {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}

.admin-link {
  color: var(--text-dim);
  text-decoration: underline;
}

.admin-link:hover { color: var(--text); }

@media (max-width: 600px) {
  .admin-field-grow { grid-column: span 1; }
  .admin-card { padding: 20px; }
}

/* Responsive */
@media (max-width: 860px) {
  .nav { display: none; }
  .steps { grid-template-columns: 1fr; }
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .base-plan { flex-direction: column; align-items: flex-start; }
  .base-plan-price { text-align: left; }
}

@media (max-width: 520px) {
  .benefits { grid-template-columns: 1fr; }
  .quote-form { padding: 28px 20px; }
  .total-bar { flex-direction: column; align-items: stretch; }
  .total-bar-inner { justify-content: space-between; }
}
