:root {
  --bg: #0b1220;
  --bg-elev: #121a2b;
  --bg-soft: #182338;
  --ink: #e8eef7;
  --muted: #93a0b8;
  --line: rgba(184, 204, 230, 0.14);
  --accent: #7ea4c8;
  --accent-strong: #9bbad6;
  --accent-dim: rgba(126, 164, 200, 0.16);
  --ok: #8fbfa8;
  --danger: #d98989;
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", sans-serif;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(126, 164, 200, 0.18), transparent 55%),
    radial-gradient(900px 600px at 90% 10%, rgba(70, 98, 140, 0.22), transparent 50%),
    linear-gradient(180deg, #0a101c 0%, var(--bg) 40%, #0d1524 100%);
  line-height: 1.55;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.site-header,
main,
.site-footer,
.modal,
.toast {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--accent-strong), #4d6f93);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a:hover,
.nav-login {
  color: var(--ink);
}

.nav-login {
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
}

.view[hidden] {
  display: none !important;
}

.view.is-active {
  animation: rise 0.55s ease both;
}

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

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
  min-height: calc(100vh - 88px);
}

.brand-hero {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}

.hero h1,
.auth-panel h1,
.gate-shell h1,
.support-main h1,
.preview-shell h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.hero h1 {
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  max-width: 18ch;
  color: #c9d6e8;
}

.lede {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 38ch;
}

.lede.narrow {
  max-width: 42ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.cta-row.center {
  justify-content: center;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(180deg, #9bbad6, #6f93b7);
  color: #0b1220;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: rgba(184, 204, 230, 0.35);
  background: rgba(255, 255, 255, 0.03);
}

.btn.full {
  width: 100%;
}

.hero-visual {
  position: relative;
  min-height: 420px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

.hero-panel {
  background:
    linear-gradient(180deg, rgba(24, 35, 56, 0.92), rgba(18, 26, 43, 0.88));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.15rem;
  box-shadow: var(--shadow);
}

.hero-chat {
  transform: translateY(18px);
}

.hero-desk {
  transform: translateY(-12px);
}

.panel-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.chat-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}

.chat-line .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4d617d;
}

.chat-line.active .dot {
  background: var(--accent);
}

.bar {
  height: 8px;
  border-radius: 99px;
  background: rgba(147, 160, 184, 0.25);
}

.w45 { width: 45%; }
.w55 { width: 55%; }
.w70 { width: 70%; }
.w80 { width: 80%; }

.msg-stack {
  margin-top: 1.4rem;
  display: grid;
  gap: 0.55rem;
}

.msg {
  height: 34px;
  border-radius: 12px;
  background: rgba(126, 164, 200, 0.12);
  border: 1px solid rgba(126, 164, 200, 0.12);
}

.msg.short { width: 68%; }
.msg.mid { width: 84%; }

.spark {
  width: 100%;
  color: var(--accent-strong);
  margin-bottom: 1rem;
}

.desk-rows {
  display: grid;
  gap: 0.65rem;
}

.desk-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.desk-row > span:first-child {
  width: 42%;
  height: 8px;
  border-radius: 99px;
  background: rgba(147, 160, 184, 0.28);
}

.desk-row .up,
.desk-row .dn {
  width: 28%;
  height: 8px;
  border-radius: 99px;
}

.desk-row .up { background: rgba(143, 191, 168, 0.7); }
.desk-row .dn { background: rgba(217, 137, 137, 0.7); }

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem 1.5rem;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-head h2,
.support-side h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.split-block h3 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
}

.split-block p {
  margin: 0;
  color: var(--muted);
}

.split-block ul {
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  color: #c4d0e2;
}

.split-block li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.step-num {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 1.1rem;
}

.steps h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
}

.preview-open {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.preview-open:hover {
  background: rgba(126, 164, 200, 0.08);
}

.arrow {
  color: var(--accent-strong);
}

.auth-shell,
.gate-shell,
.support-shell,
.preview-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  min-height: calc(100vh - 140px);
}

.auth-panel {
  max-width: 460px;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent-strong);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

.form {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.95rem;
}

.form label {
  display: grid;
  gap: 0.4rem;
}

.form label span {
  font-size: 0.88rem;
  color: #c2cede;
  font-weight: 500;
}

.form label em {
  font-style: normal;
  color: var(--muted);
  font-weight: 400;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 12, 22, 0.55);
  color: var(--ink);
  padding: 0.85rem 0.95rem;
  font: inherit;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 2px solid rgba(126, 164, 200, 0.35);
  border-color: rgba(126, 164, 200, 0.45);
}

.form-row {
  display: flex;
  justify-content: flex-end;
}

.linkish {
  appearance: none;
  border: 0;
  background: none;
  color: var(--accent-strong);
  font: inherit;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.form-note,
.gate-status {
  min-height: 1.25rem;
  margin: 0.25rem 0 0;
  color: var(--danger);
  font-size: 0.92rem;
}

.form-note.is-ok,
.gate-status.is-ok {
  color: var(--ok);
}

.auth-foot {
  margin-top: 1.25rem;
  color: var(--muted);
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.plan {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(18, 26, 43, 0.65);
}

.plan.featured {
  border-color: rgba(126, 164, 200, 0.45);
  background: linear-gradient(180deg, rgba(126, 164, 200, 0.12), rgba(18, 26, 43, 0.8));
}

.plan h3 {
  margin: 0;
  font-size: 1.1rem;
}

.price {
  margin: 0.7rem 0 1rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}

.price span {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--muted);
}

.plan ul {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.support-shell {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 2rem;
  align-items: start;
}

.support-side {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(18, 26, 43, 0.7);
}

.support-side dl {
  margin: 1.2rem 0;
  display: grid;
  gap: 1rem;
}

.support-side dl div {
  display: grid;
  gap: 0.2rem;
}

.support-side dt {
  color: var(--muted);
  font-size: 0.85rem;
}

.support-side dd {
  margin: 0;
}

.side-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.workspace {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(10, 16, 28, 0.7);
}

.ws-chat,
.ws-desk {
  padding: 1rem;
}

.ws-head {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.ws-list {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.ws-item {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.9rem;
}

.ws-item.active {
  background: var(--accent-dim);
  color: var(--ink);
}

.ws-messages {
  display: grid;
  gap: 0.55rem;
}

.ws-bubble {
  height: 42px;
  width: 78%;
  border-radius: 14px;
  background: rgba(126, 164, 200, 0.12);
}

.ws-bubble.alt {
  width: 62%;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.05);
}

.ws-metrics,
.ws-watch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.ws-metrics div,
.ws-watch div {
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.ws-chart {
  height: 120px;
  margin-bottom: 0.8rem;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(126, 164, 200, 0.18), transparent),
    rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.workspace.locked .ws-chat,
.workspace.locked .ws-desk {
  filter: blur(5px);
  opacity: 0.55;
}

.lock-veil {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 1rem;
  text-align: center;
  background: rgba(8, 12, 22, 0.35);
  backdrop-filter: blur(1px);
}

.lock-veil p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.workspace.locked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.06) 45%, transparent 70%);
  animation: shimmer 3.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmer {
  from { transform: translateX(-30%); }
  to { transform: translateX(30%); }
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--line);
}

.modal[hidden],
.toast[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 16, 0.72);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 1.5rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #121a2b;
  box-shadow: var(--shadow);
  animation: rise 0.3s ease both;
}

.modal-panel h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-weight: 500;
}

.modal-panel > p {
  margin: 0;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 50;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  background: #182338;
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: var(--shadow);
}

@media (max-width: 920px) {
  .hero,
  .split,
  .plans,
  .support-shell,
  .workspace,
  .hero-visual {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 1.5rem;
  }

  .hero-chat,
  .hero-desk {
    transform: none;
  }

  .hero-visual {
    min-height: 0;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 72px;
    right: 1.5rem;
    left: 1.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.8rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(12, 18, 32, 0.96);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.7rem 0.8rem;
  }

  .nav-login {
    border: 0;
    border-radius: 10px;
    background: rgba(126, 164, 200, 0.1);
  }

  .brand-hero {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }
}
