/* MailDesk — public promo site styles */

:root {
  --bg: #070910;
  --surface: #0F1117;
  --surface2: #161920;
  --border: #1E2230;
  --accent: #F59E0B;
  --accent2: #EF4444;
  --text: #E2E6F0;
  --muted: #6B7280;
  --white: #fff;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #fbbf24; }

img { max-width: 100%; display: block; }

/* ─── Layout ─────────────────────────────────────── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }
.section--sm { padding: 64px 0; }
.section--alt { background: var(--surface); }

/* ─── Nav ─────────────────────────────────────────── */
.pub-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7,9,16,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.pub-nav__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 60px;
}
.pub-nav__logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pub-nav__logo i { color: var(--accent); font-size: 20px; }
.pub-nav__links {
  display: flex;
  gap: 24px;
  list-style: none;
  flex: 1;
}
.pub-nav__links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color .15s;
}
.pub-nav__links a:hover { color: var(--text); }
.pub-nav__cta { margin-left: auto; display: flex; gap: 12px; align-items: center; }

/* ─── Buttons ─────────────────────────────────────── */
.btn-pub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .15s, transform .1s, box-shadow .15s;
  text-decoration: none;
}
.btn-pub:hover { transform: translateY(-1px); text-decoration: none; }
.btn-pub--primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 4px 16px rgba(245,158,11,.3);
}
.btn-pub--primary:hover { background: #fbbf24; color: #000; box-shadow: 0 6px 24px rgba(245,158,11,.4); }
.btn-pub--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-pub--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-pub--lg { padding: 14px 32px; font-size: 17px; }

/* ─── Hero ────────────────────────────────────────── */
.hero {
  padding: 120px 0 96px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(245,158,11,.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245,158,11,.12);
  border: 1px solid rgba(245,158,11,.25);
  color: var(--accent);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero__title {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--white);
  margin-bottom: 24px;
}
.hero__title span { color: var(--accent); }
.hero__sub {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--muted);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}
.hero__trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.hero__trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}
.hero__trust-item i { color: var(--accent); }

/* ─── Section headings ────────────────────────────── */
.section-label {
  display: inline-block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 16px;
}
.section-sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.7;
}
.section-head { margin-bottom: 56px; }
.section-head--center { text-align: center; }
.section-head--center .section-sub { margin: 0 auto; }

/* ─── Pain → Solution ─────────────────────────────── */
.pain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.pain-col { padding: 48px; }
.pain-col--bad { background: rgba(239,68,68,.05); border-right: 1px solid var(--border); }
.pain-col--good { background: rgba(245,158,11,.05); }
.pain-col__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.pain-col--bad .pain-col__label { color: var(--accent2); }
.pain-col--good .pain-col__label { color: var(--accent); }
.pain-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.pain-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}
.pain-list li i { margin-top: 3px; flex-shrink: 0; }
.pain-col--bad .pain-list li i { color: var(--accent2); }
.pain-col--good .pain-list li i { color: #34d399; }

/* ─── Features ────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feat-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: border-color .2s, transform .2s;
}
.feat-card:hover {
  border-color: rgba(245,158,11,.4);
  transform: translateY(-3px);
}
.feat-icon {
  width: 48px; height: 48px;
  background: rgba(245,158,11,.12);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feat-icon i { color: var(--accent); font-size: 22px; }
.feat-card h3 { font-size: 17px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.feat-card p { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ─── How it works ────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  top: 28px; left: calc(12.5% + 24px);
  right: calc(12.5% + 24px);
  height: 1px;
  background: linear-gradient(to right, var(--accent), var(--border));
}
.step { text-align: center; position: relative; }
.step__num {
  width: 56px; height: 56px;
  background: var(--accent);
  color: #000;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
}
.step h3 { font-size: 16px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ─── Pricing ─────────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
.plan-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  position: relative;
}
.plan-card--popular {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 16px 48px rgba(245,158,11,.15);
}
.plan-badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #000;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 100px;
  white-space: nowrap;
}
.plan-name { font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.plan-price { margin-bottom: 8px; }
.plan-price b { font-size: 48px; font-weight: 800; color: var(--white); }
.plan-price span { color: var(--muted); font-size: 14px; }
.plan-desc { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}
.plan-features li i { color: #34d399; flex-shrink: 0; margin-top: 2px; }
.plan-features li.disabled { opacity: .4; }
.plan-features li.disabled i { color: var(--muted); }

/* ─── Blog preview ────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.blog-card:hover { border-color: rgba(245,158,11,.4); transform: translateY(-3px); text-decoration: none; }
.blog-card__img {
  height: 180px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.blog-card__img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card__img i { font-size: 40px; color: var(--border); }
.blog-card__body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blog-card__cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.blog-card__title { font-size: 16px; font-weight: 700; color: var(--white); margin-bottom: 8px; line-height: 1.4; }
.blog-card__excerpt { font-size: 14px; color: var(--muted); line-height: 1.6; flex: 1; }
.blog-card__meta { margin-top: 16px; font-size: 12px; color: var(--muted); }

/* ─── CTA ─────────────────────────────────────────── */
.cta-box {
  background: linear-gradient(135deg, rgba(245,158,11,.12) 0%, rgba(239,68,68,.08) 100%);
  border: 1px solid rgba(245,158,11,.25);
  border-radius: 24px;
  padding: 80px 48px;
  text-align: center;
}
.cta-box .section-title { margin-bottom: 16px; }
.cta-box .section-sub { margin: 0 auto 40px; }
.cta-box .hero__actions { margin-bottom: 0; }

/* ─── Footer ──────────────────────────────────────── */
.pub-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}
.pub-footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.pub-footer__brand .pub-nav__logo { margin-bottom: 12px; }
.pub-footer__brand p { font-size: 14px; color: var(--muted); line-height: 1.6; max-width: 240px; }
.pub-footer__col h4 { font-size: 13px; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.pub-footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.pub-footer__col ul a { font-size: 14px; color: var(--muted); transition: color .15s; }
.pub-footer__col ul a:hover { color: var(--text); }
.pub-footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  gap: 16px;
  flex-wrap: wrap;
}

/* ─── Blog list page ──────────────────────────────── */
.blog-hero { padding: 80px 0 48px; }
.cat-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all .15s;
}
.cat-pill:hover, .cat-pill.is-active {
  background: rgba(245,158,11,.12);
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Blog post page ──────────────────────────────── */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
  padding: 64px 0;
}
.post-cover {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 40px;
  border: 1px solid var(--border);
}
.post-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.post-title { font-size: clamp(26px, 4vw, 40px); font-weight: 800; color: var(--white); line-height: 1.15; margin-bottom: 32px; letter-spacing: -0.5px; }
.post-body {
  font-size: 17px;
  line-height: 1.8;
  color: #c9cfe0;
}
.post-body h2 { font-size: 24px; font-weight: 700; color: var(--white); margin: 40px 0 16px; }
.post-body h3 { font-size: 20px; font-weight: 700; color: var(--white); margin: 32px 0 12px; }
.post-body p { margin-bottom: 20px; }
.post-body ul, .post-body ol { margin: 0 0 20px 24px; }
.post-body li { margin-bottom: 8px; }
.post-body code {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 14px;
  font-family: 'JetBrains Mono', monospace;
}
.post-body pre {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  overflow-x: auto;
  margin-bottom: 24px;
}
.post-body pre code { background: none; border: none; padding: 0; font-size: 14px; }
.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  background: rgba(245,158,11,.05);
  border-radius: 0 8px 8px 0;
  margin-bottom: 24px;
  color: var(--muted);
}
.post-sidebar { position: sticky; top: 80px; }
.sidebar-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
}
.sidebar-card h4 { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 16px; }

/* ─── Pagination ──────────────────────────────────── */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: all .15s;
}
.page-link:hover, .page-link.is-active { border-color: var(--accent); color: var(--accent); background: rgba(245,158,11,.08); }

/* ─── Pricing page FAQ ────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 720px; margin: 0 auto; }
.faq-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::after {
  content: '+';
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 24px 20px; color: var(--muted); font-size: 15px; line-height: 1.7; }

/* ─── Responsive ──────────────────────────────────── */
@media (max-width: 1024px) {
  .pub-footer__inner { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .container { padding: 0 16px; }
  .pub-nav__links { display: none; }
  .hero { padding: 80px 0 64px; }
  .pain-grid { grid-template-columns: 1fr; }
  .pain-col--bad { border-right: none; border-bottom: 1px solid var(--border); }
  .features-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card { flex-direction: row; }
  .blog-card__img { width: 120px; height: auto; flex-shrink: 0; }
  .pub-footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .cta-box { padding: 48px 24px; }
  .post-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero__title { letter-spacing: -0.5px; }
  .hero__actions { flex-direction: column; align-items: stretch; text-align: center; }
  .btn-pub { justify-content: center; }
  .steps { grid-template-columns: 1fr; }
  .blog-card { flex-direction: column; }
  .blog-card__img { width: 100%; height: 160px; }
}
