/* PulseCheck — design system. First-party only, no external assets. */

:root {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --brand: #3b82f6;
  --brand-2: #06b6d4;
  --brand-grad: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  --ok: #22c55e;
  --warn: #f59e0b;
  --down: #ef4444;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1140px;
  --shadow: 0 10px 40px -12px rgba(8, 17, 32, 0.5);
  --shadow-sm: 0 2px 10px -4px rgba(8, 17, 32, 0.4);
  --transition: 160ms cubic-bezier(0.4, 0, 0.2, 1);
}

:root,
[data-theme="dark"] {
  --bg: #080f1c;
  --bg-soft: #0c1626;
  --surface: #101e34;
  --surface-2: #16273f;
  --border: #1e3251;
  --text: #eaf1fb;
  --muted: #9db4d4;
  --faint: #6b86ac;
  --ring: rgba(59, 130, 246, 0.4);
  --hero-glow: radial-gradient(60% 80% at 78% 0%, rgba(59, 130, 246, 0.22), transparent 70%);
  --on-brand: #04101f;
}

[data-theme="light"] {
  --bg: #f3f7fc;
  --bg-soft: #ffffff;
  --surface: #ffffff;
  --surface-2: #eef3fa;
  --border: #d9e3f0;
  --text: #0a1626;
  --muted: #4a607e;
  --faint: #7e94b3;
  --ring: rgba(59, 130, 246, 0.32);
  --hero-glow: radial-gradient(60% 80% at 78% 0%, rgba(59, 130, 246, 0.13), transparent 70%);
  --on-brand: #ffffff;
  --shadow: 0 14px 40px -16px rgba(30, 50, 81, 0.22);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 1.6;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.02em; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section-sm { padding: 56px 0; }
.eyebrow { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 62ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.text-grad { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent; }

.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(140%) blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.12rem; letter-spacing: -0.02em; }
.brand img { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 26px; margin-left: 8px; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 0.95rem; transition: color var(--transition); }
.nav-links a:hover { color: var(--text); }
.nav-spacer { flex: 1; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  background: transparent; border: 1px solid var(--border); color: var(--muted); transition: var(--transition); }
.icon-btn:hover { color: var(--text); border-color: var(--brand); }
.nav-toggle { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 11px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent; transition: var(--transition); white-space: nowrap; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.btn-primary { background: var(--brand-grad); color: var(--on-brand); box-shadow: var(--shadow-sm); }
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-soft { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-soft:hover { border-color: var(--brand); }
.btn-lg { padding: 14px 26px; font-size: 1rem; border-radius: 13px; }
.btn-block { width: 100%; }

.hero { position: relative; padding: 96px 0 64px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--hero-glow); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4.4vw, 3.5rem); font-weight: 800; margin-bottom: 18px; }
.hero .lead { font-size: 1.18rem; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 26px; margin-top: 30px; flex-wrap: wrap; }
.hero-meta div { font-size: 0.9rem; color: var(--muted); }
.hero-meta strong { display: block; font-size: 1.45rem; color: var(--text); font-weight: 700; letter-spacing: -0.02em; }

/* ---------- Status dashboard mockup ---------- */
.dash { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow); }
.dash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dash-title { font-weight: 700; font-size: 0.98rem; }
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 0.8rem; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; }
.badge.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.badge.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.badge.down { background: color-mix(in srgb, var(--down) 16%, transparent); color: var(--down); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dot.live { animation: pc-pulse 1.8s ease-out infinite; }
@keyframes pc-pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.monitor-row { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-top: 1px solid var(--border); }
.monitor-row:first-of-type { border-top: 0; }
.monitor-name { font-weight: 600; font-size: 0.92rem; min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.monitor-url { color: var(--faint); font-size: 0.78rem; font-family: var(--font-mono); }
.uptime-bars { display: flex; gap: 3px; align-items: flex-end; }
.uptime-bars i { width: 5px; height: 22px; border-radius: 2px; background: var(--ok); display: block; }
.uptime-bars i.w { background: var(--warn); height: 16px; }
.uptime-bars i.d { background: var(--down); height: 11px; }
.monitor-pct { font-size: 0.82rem; font-weight: 700; color: var(--muted); min-width: 52px; text-align: right; }
.spark { width: 100%; height: 60px; margin-top: 6px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: var(--transition); }
.feature:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 15%, transparent); color: var(--brand); margin-bottom: 16px; }
.feature h3 { font-size: 1.12rem; }
.feature p { color: var(--muted); font-size: 0.95rem; margin: 0; }

.proof { display: flex; align-items: center; justify-content: center; gap: 44px; flex-wrap: wrap; opacity: 0.7; }
.proof span { font-weight: 700; font-size: 1.15rem; letter-spacing: 0.02em; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat strong { display: block; font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 0.92rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; position: relative; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: -16px; left: 24px;
  width: 36px; height: 36px; border-radius: 10px; background: var(--brand-grad); color: var(--on-brand);
  display: grid; place-items: center; font-weight: 700; box-shadow: var(--shadow-sm); }
.step h3 { margin-top: 10px; font-size: 1.08rem; }
.step p { color: var(--muted); font-size: 0.94rem; margin: 0; }

.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px 28px; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--brand); box-shadow: var(--shadow); position: relative; }
.price-card.featured::after { content: "Most popular"; position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--brand-grad); color: var(--on-brand); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 5px 14px; border-radius: 999px; }
.price-card .plan { font-weight: 700; font-size: 1.1rem; }
.price-card .price { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; margin: 14px 0 2px; }
.price-card .price span { font-size: 0.95rem; font-weight: 500; color: var(--faint); }
.price-card .desc { color: var(--muted); font-size: 0.92rem; min-height: 40px; }
.price-card ul { list-style: none; padding: 0; margin: 22px 0; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.price-card li { display: flex; gap: 10px; font-size: 0.93rem; color: var(--text); }
.price-card li svg { flex-shrink: 0; color: var(--brand); margin-top: 3px; }

.auth-wrap { min-height: calc(100vh - 66px); display: grid; place-items: center; padding: 48px 24px; position: relative; }
.auth-wrap::before { content: ""; position: absolute; inset: 0; background: var(--hero-glow); pointer-events: none; }
.auth-card { position: relative; width: 100%; max-width: 440px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 38px 36px; box-shadow: var(--shadow); }
.auth-card .brand { justify-content: center; margin-bottom: 8px; font-size: 1.2rem; }
.auth-card h1 { text-align: center; font-size: 1.5rem; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: 0.95rem; margin-bottom: 26px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 7px; }
.input { width: 100%; padding: 12px 14px; border-radius: 11px; background: var(--bg-soft);
  border: 1px solid var(--border); color: var(--text); font-size: 0.97rem; transition: var(--transition); }
.input::placeholder { color: var(--faint); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.input.has-error { border-color: #ef4444; }
.field-hint { font-size: 0.8rem; color: var(--faint); margin-top: 6px; }
.form-alert { display: none; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 11px;
  background: color-mix(in srgb, #ef4444 12%, transparent); border: 1px solid color-mix(in srgb, #ef4444 40%, transparent);
  color: #fca5a5; font-size: 0.9rem; margin-bottom: 18px; }
.form-alert.show { display: flex; }
.form-alert svg { flex-shrink: 0; margin-top: 1px; }
.auth-foot { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 22px; }
.auth-foot a { color: var(--brand); font-weight: 600; }

.modal-overlay { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 24px;
  background: rgba(4, 10, 20, 0.7); backdrop-filter: blur(4px); }
.modal-overlay.open { display: grid; }
.modal { width: 100%; max-width: 410px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow); text-align: center; }
.modal .ic { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 16px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 15%, transparent); color: var(--brand); }
.modal h3 { font-size: 1.25rem; }
.modal p { color: var(--muted); font-size: 0.95rem; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }

.statusbar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--ok) 12%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
  color: var(--ok); font-weight: 600; font-size: 0.95rem; }

.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { font-size: 2.1rem; margin-bottom: 8px; }
.prose h2 { font-size: 1.4rem; margin: 38px 0 12px; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 20px; }
.prose .updated { color: var(--faint); font-size: 0.88rem; margin-bottom: 30px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 22px 24px; margin-bottom: 14px; }
.faq-item h3 { font-size: 1.05rem; margin-bottom: 6px; }
.faq-item p { color: var(--muted); margin: 0; font-size: 0.95rem; }

.cta-band { background: var(--brand-grad); border-radius: var(--radius-lg); padding: 56px 40px; text-align: center; color: var(--on-brand); }
.cta-band h2 { font-size: 2rem; color: var(--on-brand); }
.cta-band p { color: rgba(4, 16, 31, 0.78); max-width: 54ch; margin: 0 auto 26px; }
.cta-band .btn-soft { background: rgba(255,255,255,0.2); color: #04101f; border-color: rgba(255,255,255,0.35); }
.cta-band .btn-soft:hover { background: rgba(255,255,255,0.32); }

.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 56px 0 32px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
.footer-brand p { color: var(--muted); font-size: 0.92rem; max-width: 30ch; margin-top: 12px; }
.footer-col h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--muted); font-size: 0.92rem; padding: 5px 0; transition: color var(--transition); }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--faint); font-size: 0.86rem; flex-wrap: wrap; }

.error-wrap { min-height: calc(100vh - 66px); display: grid; place-items: center; text-align: center; padding: 60px 24px; }
.error-code { font-size: clamp(5rem, 16vw, 9rem); font-weight: 800; line-height: 1; }

.hidden { display: none !important; }

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .feature-grid, .steps { grid-template-columns: 1fr 1fr; }
  .price-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 680px) {
  .section { padding: 60px 0; }
  .nav-links { display: none; }
  .nav-toggle { display: grid; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 66px; left: 0; right: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 18px 24px; gap: 16px; }
  .feature-grid, .steps { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
