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

:root {
  --ink: #0d1117;
  --ink-muted: #4a5260;
  --ink-faint: #8a929e;
  --surface: #f7f6f3;
  --surface-card: #ffffff;
  --border: rgba(13,17,23,0.1);
  --border-strong: rgba(13,17,23,0.18);
  --accent: #1a4fd6;
  --accent-muted: #e8eefb;
  --signal: #0d8a5f;
  --signal-muted: #e4f5ef;
  --amber: #c27c0e;
  --amber-muted: #fdf3dc;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── NOISE TEXTURE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── GRID LINES ── */
.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ── LAYOUT ── */
.wrapper {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── NAV ── */
nav {
  position: relative;
  z-index: 10;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  background: rgba(247,246,243,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

nav .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}

.nav-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--signal);
  background: var(--signal-muted);
  border: 1px solid rgba(13,138,95,0.2);
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── HERO ── */
.hero {
  padding: 6rem 0 5rem;
  position: relative;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fade-up 0.8s ease both;
}

.hero-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--ink-faint);
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 1.75rem;
  max-width: 820px;
  animation: fade-up 0.8s 0.1s ease both;
}

h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 18px;
  font-weight: 300;
  color: var(--ink-muted);
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: 2.5rem;
  animation: fade-up 0.8s 0.2s ease both;
}

/* ── EMAIL FORM ── */
.signup-form {
  display: flex;
  gap: 10px;
  max-width: 480px;
  animation: fade-up 0.8s 0.3s ease both;
}

.signup-form input {
  flex: 1;
  height: 46px;
  padding: 0 1rem;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}

.signup-form input::placeholder { color: var(--ink-faint); }
.signup-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,79,214,0.08); }
.signup-form input:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
  height: 46px;
  padding: 0 1.25rem;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.01em;
}

.btn-primary:hover { background: #1a2540; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.form-note {
  font-size: 13px;
  color: var(--ink-faint);
  margin-top: 10px;
  animation: fade-up 0.8s 0.4s ease both;
}

/* ── FORM FEEDBACK MESSAGES ── */
.success-msg {
  display: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--signal);
  margin-top: 10px;
  align-items: center;
  gap: 6px;
}

.success-msg.show { display: flex; }

.error-msg {
  display: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber);
  margin-top: 10px;
}

.error-msg.show { display: block; }

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 4rem 0;
}

/* ── PROBLEM STRIP ── */
.problem-strip {
  padding: 3.5rem 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.5rem;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.problem-item {
  background: var(--surface-card);
  padding: 1.75rem;
  transition: background 0.2s;
}

.problem-item:hover { background: #fbfaf8; }

.problem-icon {
  font-size: 22px;
  margin-bottom: 0.75rem;
  display: block;
}

.problem-item h3 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.problem-item p {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.55;
}

/* ── HOW IT WORKS ── */
.how-section { padding: 4rem 0; }

.how-section h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 2.5rem;
}

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0;
  margin-bottom: 3rem;
}

.flow-step {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
}

.flow-step .step-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.flow-step .step-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.flow-step .step-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
}

.flow-step.highlight {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.flow-step.highlight .step-title { color: var(--accent); }

.flow-arrow {
  text-align: center;
  padding: 0 1rem;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--ink-faint);
}

.how-body {
  font-size: 15px;
  color: var(--ink-muted);
  max-width: 560px;
  line-height: 1.7;
}

/* ── COMPATIBLE SYSTEMS ── */
.compat-section { padding: 4rem 0; }

.compat-section h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 2rem;
}

.pbx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.pbx-tag {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-muted);
  transition: border-color 0.2s, color 0.2s;
  cursor: default;
}

.pbx-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pbx-tag span {
  display: block;
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 3px;
}

/* ── PRICING ── */
.pricing-section { padding: 4rem 0; }

.pricing-section h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 2.5rem;
}

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

.plan-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  transition: border-color 0.2s;
}

.plan-card:hover { border-color: var(--border-strong); }

.plan-card.featured {
  border-color: var(--accent);
  border-width: 1.5px;
}

.plan-badge {
  position: absolute;
  top: -11px;
  left: 1.5rem;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  padding: 3px 10px;
  border-radius: 100px;
}

.plan-name {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}

.plan-price {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.plan-price sub {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-muted);
  vertical-align: baseline;
}

.plan-unit {
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 1.5rem;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-features li {
  font-size: 13px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-features li::before {
  content: '';
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--signal-muted);
  border: 1px solid rgba(13,138,95,0.25);
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='8' viewBox='0 0 10 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4l2.5 2.5L9 1' stroke='%230d8a5f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ── SECURITY STRIP ── */
.security-strip {
  background: var(--ink);
  color: rgba(255,255,255,0.85);
  border-radius: 14px;
  padding: 3rem;
  margin: 4rem 0;
}

.security-strip h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 1rem;
}

.security-strip p {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  margin-bottom: 2rem;
  font-weight: 300;
}

.security-pillars {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pillar {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 6px 14px;
  border-radius: 100px;
  letter-spacing: 0.03em;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 4rem;
}

footer .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-faint);
}

.footer-copy {
  font-size: 13px;
  color: var(--ink-faint);
}

/* ── ANIMATIONS ── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 680px) {
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); padding: 0.25rem 0; }
  .signup-form { flex-direction: column; }
  .btn-primary { width: 100%; }
  .security-strip { padding: 2rem; }
}
