/* ── NexaMail landing page ─────────────────────────────── */
:root {
  --nm-dark:    #0f172a;
  --nm-dark2:   #1e293b;
  --nm-primary: #4f46e5;
  --nm-primary-h: #6366f1;
  --nm-border:  #e2e8f0;
  --nm-text:    #0f172a;
  --nm-muted:   #64748b;
  --nm-gray-bg: #f8fafc;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--nm-text);
  line-height: 1.6;
  margin: 0;
}

/* ── Nav ──────────────────────────────────────────── */
.nm-nav {
  background: var(--nm-dark);
  padding: .875rem 0;
}
.nm-nav .container {
  display: flex; align-items: center; justify-content: space-between;
}
.nm-logo {
  color: #fff; font-weight: 800; font-size: 1.15rem;
  text-decoration: none; letter-spacing: -.4px;
}
.nm-logo:hover { color: #a5b4fc; text-decoration: none; }
.nm-nav-links { display: flex; align-items: center; }

/* ── Hero ─────────────────────────────────────────── */
.nm-hero {
  background: var(--nm-dark);
  color: #fff;
  padding: 5.5rem 0 6.5rem;
  position: relative; overflow: hidden;
}
.nm-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 65% 35%, rgba(79,70,229,.3) 0%, transparent 60%);
  pointer-events: none;
}
.nm-tag {
  display: inline-block;
  background: rgba(99,102,241,.18);
  color: #a5b4fc;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .3rem .9rem; border-radius: 20px;
  border: 1px solid rgba(165,180,252,.22);
  margin-bottom: 1.5rem;
}
.nm-hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800; line-height: 1.18;
  margin-bottom: 1.25rem; letter-spacing: -.5px;
}
.nm-hero-sub {
  font-size: 1.1rem; color: #94a3b8;
  line-height: 1.75; max-width: 520px; margin: 0 auto;
}

/* ── Buttons ──────────────────────────────────────── */
.nm-btn-cta {
  display: inline-block;
  background: var(--nm-primary); color: #fff;
  padding: .75rem 2rem; border-radius: 8px;
  font-weight: 700; font-size: 1rem;
  text-decoration: none; border: none;
  transition: background .15s, transform .1s;
}
.nm-btn-cta:hover {
  background: var(--nm-primary-h); color: #fff;
  text-decoration: none; transform: translateY(-1px);
}
.nm-btn-ghost {
  display: inline-block;
  background: transparent; color: #fff;
  padding: .75rem 2rem; border-radius: 8px;
  font-weight: 500; font-size: 1rem;
  border: 1px solid rgba(255,255,255,.22);
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.nm-btn-ghost:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.4);
  color: #fff; text-decoration: none;
}

/* ── Sections ─────────────────────────────────────── */
.nm-section { padding: 5rem 0; }
.nm-section--gray { background: var(--nm-gray-bg); }
.nm-section-title {
  font-size: 1.875rem; font-weight: 800;
  color: var(--nm-text); margin-bottom: .5rem;
  letter-spacing: -.3px;
}
.nm-section-sub {
  color: var(--nm-muted); font-size: 1rem; line-height: 1.7;
}

/* ── Feature cards ────────────────────────────────── */
.nm-card {
  background: #fff; border: 1px solid var(--nm-border);
  border-radius: 12px; padding: 2rem 1.75rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  transition: box-shadow .2s, border-color .2s;
}
.nm-card:hover {
  box-shadow: 0 8px 28px rgba(79,70,229,.1);
  border-color: #c7d2fe;
}
.nm-card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(79,70,229,.08);
  color: var(--nm-primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.nm-card-title {
  font-size: 1.05rem; font-weight: 700;
  color: var(--nm-text); margin-bottom: .5rem;
}
.nm-card-text {
  color: var(--nm-muted); font-size: .95rem;
  line-height: 1.65; margin: 0;
}
.nm-card-text code {
  background: #eef2ff; color: var(--nm-primary);
  padding: .1em .35em; border-radius: 4px;
  font-size: .88em;
}

/* ── Rules ────────────────────────────────────────── */
.nm-rules { display: flex; flex-direction: column; gap: .875rem; }
.nm-rule {
  display: flex; gap: 1.25rem; align-items: flex-start;
  background: var(--nm-gray-bg); border: 1px solid var(--nm-border);
  border-radius: 10px; padding: 1.25rem 1.5rem;
}
.nm-rule--danger {
  background: #fff7f7; border-color: #fecaca;
}
.nm-rule--danger .nm-rule-icon { color: #ef4444; }
.nm-rule--danger strong { color: #b91c1c; }
.nm-rule-icon {
  flex-shrink: 0; margin-top: .15rem;
  color: var(--nm-primary);
}
.nm-rule strong {
  display: block; font-size: .975rem; font-weight: 700;
  margin-bottom: .3rem; color: var(--nm-text);
}
.nm-rule p {
  margin: 0; font-size: .9rem; color: var(--nm-muted); line-height: 1.65;
}

/* ── Steps ────────────────────────────────────────── */
.nm-step { padding: 1rem; }
.nm-step-num {
  font-size: 2.5rem; font-weight: 900; color: var(--nm-primary);
  opacity: .15; line-height: 1; margin-bottom: .75rem;
  letter-spacing: -.05em;
}
.nm-step-title {
  font-size: 1.05rem; font-weight: 700;
  margin-bottom: .5rem; color: var(--nm-text);
}
.nm-step-text {
  color: var(--nm-muted); font-size: .95rem; line-height: 1.65;
}

/* ── Footer ───────────────────────────────────────── */
.nm-footer {
  background: var(--nm-dark); color: #94a3b8;
  padding: 3.5rem 0 2rem;
}
.nm-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
}
.nm-footer-col--brand { padding-right: 1rem; }
.nm-footer-logo {
  display: inline-block;
  color: #fff; font-weight: 800; font-size: 1.05rem;
  text-decoration: none; letter-spacing: -.3px;
  margin-bottom: .75rem;
}
.nm-footer-logo:hover { color: #a5b4fc; }
.nm-footer-tagline {
  font-size: .85rem; line-height: 1.6;
  color: #64748b; margin-bottom: .75rem;
}
.nm-footer-copy { font-size: .8rem; color: #475569; margin: 0; }
.nm-footer-heading {
  font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: #475569; margin-bottom: .875rem;
}
.nm-footer-links { display: flex; flex-direction: column; gap: .55rem; }
.nm-footer-links a {
  color: #64748b; text-decoration: none; font-size: .875rem;
  transition: color .15s;
}
.nm-footer-links a:hover { color: #fff; }

/* ── Accent card (webmail highlight) ─────────────────── */
.nm-card--accent {
  border-color: #c7d2fe;
  background: linear-gradient(135deg, #f5f3ff 0%, #fff 60%);
}
.nm-card--accent .nm-card-icon {
  background: rgba(79,70,229,.14);
}

/* ── Feature list (webmail showcase) ─────────────────── */
.nm-feature-list {
  list-style: none; padding: 0; margin: 1.5rem 0 0;
  display: flex; flex-direction: column; gap: .65rem;
}
.nm-feature-list li {
  display: flex; align-items: center; gap: .6rem;
  font-size: .95rem; color: #334155;
}
.nm-feature-list svg { color: var(--nm-primary); flex-shrink: 0; }

/* ── Webmail preview mockup ───────────────────────────── */
.nm-webmail-preview {
  border: 1px solid var(--nm-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(15,23,42,.12);
  font-size: .78rem;
}
.nm-wm-topbar {
  background: #0f172a;
  padding: .6rem 1rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nm-wm-logo { color: #fff; font-weight: 800; font-size: .85rem; }
.nm-wm-btn  {
  background: #4f46e5; color: #fff;
  padding: .2rem .7rem; border-radius: 6px; font-size: .72rem; font-weight: 600;
}
.nm-wm-body {
  display: flex; height: 220px;
}
.nm-wm-folders {
  width: 130px; flex-shrink: 0;
  background: #f8fafc; border-right: 1px solid #e2e8f0;
  padding: .5rem .4rem;
  display: flex; flex-direction: column; gap: 2px;
}
.nm-wm-folder {
  padding: .35rem .55rem; border-radius: 7px;
  color: #475569; font-size: .72rem; font-weight: 500;
  display: flex; align-items: center; gap: .3rem;
}
.nm-wm-folder--active {
  background: #eef2ff; color: #4f46e5; font-weight: 600;
}
.nm-wm-badge {
  background: #4f46e5; color: #fff;
  font-size: .6rem; font-weight: 700;
  border-radius: 10px; padding: .05rem .35rem; margin-left: auto;
}
.nm-wm-list {
  width: 160px; flex-shrink: 0;
  border-right: 1px solid #e2e8f0;
  overflow: hidden;
}
.nm-wm-msg {
  padding: .55rem .7rem; border-bottom: 1px solid #f1f5f9;
}
.nm-wm-msg--unread { background: #fff; }
.nm-wm-msg--unread .nm-wm-from  { font-weight: 700; color: #0f172a; }
.nm-wm-msg--unread .nm-wm-subj  { font-weight: 600; color: #1e293b; }
.nm-wm-from  { font-size: .7rem; color: #334155; margin-bottom: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm-wm-subj  { font-size: .68rem; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm-wm-date  { font-size: .62rem; color: #94a3b8; margin-top: .1rem; }
.nm-wm-preview {
  flex: 1; padding: .75rem 1rem; background: #fff; overflow: hidden;
}
.nm-wm-preview-subj { font-size: .82rem; font-weight: 700; color: #0f172a; margin-bottom: .35rem; }
.nm-wm-preview-from { font-size: .7rem; color: #64748b; margin-bottom: .5rem; }
.nm-wm-preview-body { font-size: .72rem; color: #475569; line-height: 1.55; }

@media (max-width: 768px) {
  .nm-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .nm-footer-col--brand {
    grid-column: 1 / -1;
    padding-right: 0;
  }
}

@media (max-width: 576px) {
  .nm-hero { padding: 4rem 0 5rem; }
  .nm-section { padding: 3.5rem 0; }
  .nm-footer-grid { grid-template-columns: 1fr; }
}
