/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  --bg:         #050509;
  --surface:    #0c0c14;
  --panel:      #111118;
  --panel-2:    #18181f;
  --border:     rgba(255,255,255,.07);
  --border-med: rgba(255,255,255,.12);
  --text:       #f0f0fc;
  --muted:      #8b8ba7;
  --subtle:     #52526a;
  --accent:     #6366f1;
  --accent-2:   #818cf8;
  --accent-glow:rgba(99,102,241,.35);
  --green:      #34d399;
  --amber:      #fbbf24;
  --red:        #f87171;
  --radius-sm:  8px;
  --radius:     14px;
  --radius-lg:  20px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.4);
  --shadow:     0 8px 32px rgba(0,0,0,.5);
  --shadow-lg:  0 24px 80px rgba(0,0,0,.6);
  --header-h:   60px;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; }
ul { list-style: none; }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-weight: 600;
  font-size: .9rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity .15s, background .15s, border-color .15s, box-shadow .15s;
  min-height: 40px;
  padding: 0 18px;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border-med);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.04); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-med);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent-2); }

.btn-sm { min-height: 34px; padding: 0 14px; font-size: .84rem; border-radius: 7px; }
.btn-lg { min-height: 48px; padding: 0 26px; font-size: .95rem; border-radius: 10px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: .84rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 10px;
}
.link-btn:hover { color: var(--text); }

/* ── Header ────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(5,5,9,.8);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  height: 100%;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-name { font-weight: 700; letter-spacing: -.01em; }
.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}
.header-nav a {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s;
}
.header-nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ── Modal ─────────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card {
  background: var(--panel);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 420px;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--subtle);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
}
.modal-close:hover { color: var(--text); background: var(--border); }
.modal-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 6px;
}
.modal-card h2 { font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.modal-sub { color: var(--muted); font-size: .88rem; margin-top: 6px; }
.modal-foot { color: var(--muted); font-size: .82rem; margin-top: 14px; }
.modal-foot a { color: var(--accent-2); }

/* account step */
.account-meta { display: grid; gap: 6px; margin-top: 14px; }
.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: .85rem;
  gap: 12px;
}
.account-row span { color: var(--muted); }
.account-row strong { font-weight: 600; }
.account-row a { font-size: .78rem; word-break: break-all; color: var(--accent-2); }
.status-active { color: var(--green); }
.status-inactive { color: var(--red); }
.url-chip {
  background: rgba(99,102,241,.12);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: .75rem;
  color: var(--accent-2);
  word-break: break-all;
}

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-stack { display: grid; gap: 12px; }
.field-label { display: grid; gap: 5px; font-size: .83rem; font-weight: 500; color: var(--muted); }
input, select {
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-med);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 0 13px;
  font: inherit;
  font-size: .92rem;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.2);
}
input::placeholder { color: var(--subtle); }
select option { background: var(--panel-2); }
.form-error { color: var(--red); font-size: .82rem; min-height: 1.2em; margin-top: 4px; }
.form-note { color: var(--muted); font-size: .82rem; text-align: center; }

/* ── Shared section layout ─────────────────────────────────────────────────── */
main > section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 28px;
}
.section-header { text-align: center; margin-bottom: 56px; }
.section-eyebrow {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.section-sub { color: var(--muted); font-size: .95rem; max-width: 52ch; margin: 0 auto; }

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
  padding-top: calc(var(--header-h) + 64px) !important;
  padding-bottom: 96px !important;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-60%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(99,102,241,.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 8px;
  border: 1px solid var(--border-med);
  border-radius: 99px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 500;
  margin-bottom: 24px;
  text-decoration: none;
  transition: border-color .2s, color .2s;
}
.hero-badge:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.badge-pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(52,211,153,.4);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52,211,153,.4); }
  50% { box-shadow: 0 0 0 6px rgba(52,211,153,0); }
}
.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.05em;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent-2) 0%, #a78bfa 50%, #c4b5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 48ch;
  margin-bottom: 32px;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-note { color: var(--subtle); font-size: .78rem; }

/* ── Dashboard preview ─────────────────────────────────────────────────────── */
.dash-preview {
  background: var(--panel);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(99,102,241,.1);
}
.dash-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
}
.dash-dots { display: flex; gap: 5px; }
.dash-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border-med);
}
.dash-dots span:nth-child(1) { background: #ff5f57; }
.dash-dots span:nth-child(2) { background: #ffbd2e; }
.dash-dots span:nth-child(3) { background: #28c840; }
.dash-title-bar { flex: 1; height: 8px; border-radius: 4px; background: var(--border); margin: 0 8px; }
.dash-avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); opacity: .6; }
.dash-body { display: flex; }
.dash-sidebar {
  width: 44px;
  border-right: 1px solid var(--border);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0,0,0,.15);
}
.dash-nav-item { height: 6px; border-radius: 3px; background: var(--border-med); }
.dash-nav-item.active { background: var(--accent); opacity: .7; }
.dash-content { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.dash-stat-row { display: flex; gap: 8px; }
.dash-stat {
  flex: 1;
  padding: 8px 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.dash-stat-num {
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
  margin-bottom: 4px;
}
.dash-stat-num.c-accent { color: var(--accent-2); }
.dash-stat-num.c-green { color: var(--green); }
.dash-stat-lbl { height: 5px; width: 70%; border-radius: 3px; background: var(--border); }
.dash-table { display: flex; flex-direction: column; gap: 3px; }
.dash-th-row { display: flex; gap: 6px; padding: 0 6px 4px; }
.dash-th { flex: 1; height: 5px; border-radius: 3px; background: var(--border); }
.dash-th.short { flex: 0 0 52px; }
.dash-tr {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 6px;
  background: transparent;
  transition: background .1s;
}
.dash-tr.hl { background: rgba(99,102,241,.07); }
.dash-td { flex: 1; height: 6px; border-radius: 3px; background: var(--border-med); }
.dash-td.short { flex: 0 0 40px; }
.dash-td.short2 { flex: 1; width: 55%; }
.dash-badge {
  flex-shrink: 0;
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: .03em;
  white-space: nowrap;
}
.dash-badge.running { background: rgba(99,102,241,.18); color: var(--accent-2); }
.dash-badge.done { background: rgba(52,211,153,.12); color: var(--green); }
.dash-badge.hold { background: rgba(251,191,36,.1); color: var(--amber); }

/* ── Features bento ────────────────────────────────────────────────────────── */
.features { border-top: 1px solid var(--border); }
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 12px;
}
.bento-wide { grid-column: span 2; }
.bento-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s;
}
.bento-card:hover { border-color: var(--border-med); }
.bento-glow::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(99,102,241,.15) 0%, transparent 70%);
  pointer-events: none;
}
.bento-dark { background: var(--surface); }
.bento-icon { font-size: 1.6rem; line-height: 1; }
.bento-card h3 { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }
.bento-card p { color: var(--muted); font-size: .88rem; line-height: 1.6; }

/* work-order mini visual */
.wo-visual { margin-top: 8px; display: flex; flex-direction: column; gap: 7px; }
.wo-row { display: flex; align-items: center; gap: 8px; }
.wo-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(99,102,241,.35);
  transition: width .3s;
}
.wo-bar.wo-done { background: rgba(52,211,153,.4); }
.wo-bar.wo-hold { background: rgba(251,191,36,.3); }

/* ── Pricing ───────────────────────────────────────────────────────────────── */
.pricing { border-top: 1px solid var(--border); }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  align-items: start;
}
.pricing-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: border-color .2s;
}
.pricing-card:hover { border-color: var(--border-med); }
.pricing-featured {
  border-color: var(--accent);
  background: linear-gradient(160deg, var(--panel) 0%, rgba(99,102,241,.07) 100%);
  box-shadow: 0 0 32px rgba(99,102,241,.12);
}
.plan-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 99px;
  white-space: nowrap;
}
.plan-badge-alt {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: -4px;
}
.plan-name { font-size: .84rem; font-weight: 600; color: var(--muted); }
.plan-price-row { display: flex; align-items: baseline; gap: 3px; margin-top: 2px; }
.plan-price { font-size: 1.75rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.plan-period { font-size: .8rem; color: var(--muted); font-weight: 500; }
.plan-note { font-size: .76rem; color: var(--muted); margin-bottom: 4px; }
.plan-features { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; flex: 1; }
.plan-features li {
  font-size: .84rem;
  color: var(--muted);
  padding-left: 16px;
  position: relative;
}
.plan-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-size: .75rem;
  top: 1px;
}

/* ── Trial section ─────────────────────────────────────────────────────────── */
.trial-section {
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.trial-glow {
  position: absolute;
  bottom: -100px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse, rgba(99,102,241,.12) 0%, transparent 70%);
  pointer-events: none;
}
.trial-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--border-med);
  border-radius: 24px;
  padding: 48px;
  position: relative;
}
.trial-card h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.15;
  margin: 6px 0 12px;
}
.trial-sub { color: var(--muted); font-size: .9rem; line-height: 1.6; }
.trial-checklist { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.trial-checklist li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .88rem;
  color: var(--muted);
}
.trial-checklist svg { flex-shrink: 0; }
.trial-form-wrap {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 28px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-tagline { color: var(--subtle); font-size: .8rem; margin-top: 4px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--muted); font-size: .84rem; text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: var(--text); }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .bento-wide { grid-column: span 2; }
}
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; }
  .dash-preview { display: none; }
  .trial-card { grid-template-columns: 1fr; gap: 32px; }
  .pricing-grid { grid-template-columns: 1fr 1fr; }
  .header-nav { display: none; }
  main > section { padding: 64px 20px; }
}
@media (max-width: 520px) {
  .bento { grid-template-columns: 1fr; }
  .bento-wide { grid-column: span 1; }
  .pricing-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.2rem; }
  .header-inner { padding: 0 16px; }
  .trial-card { padding: 28px 20px; }
}
