/* Mail Digest — landing site styles
 * Editorial light theme. Mirrors the app's design system.
 */

:root {
  --bg:      #f7f5f2;
  --bg2:     #ffffff;
  --bg3:     #efede9;
  --border:  rgba(0,0,0,0.07);
  --border2: rgba(0,0,0,0.13);
  --text:    #1a1917;
  --text2:   #6b6760;
  --text3:   #a8a49e;
  --urgent:  #c0392b;
  --today:   #b36a00;
  --week:    #0f7a58;
  --fyi:     #a8a49e;
  --blue:    #2563eb;
  --blue-d:  #1e3a8a;
}

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

html, body { background: var(--bg); color: var(--text); }
body {
  font-family: 'Syne', -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--text); color: var(--bg2); }

/* ---------- Layout containers ---------- */

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

section { padding: 96px 0; border-top: 0.5px solid var(--border); }
section:first-of-type { border-top: none; }

/* ---------- Topbar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(247, 245, 242, 0.85);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 0.5px solid var(--border);
}
.topbar .inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  max-width: 1080px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 22px; height: 22px; }
.brand-name {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.brand-dot {
  width: 6px; height: 6px;
  background: var(--urgent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.8); }
}

.topbar-nav { display: flex; align-items: center; gap: 22px; }
.topbar-nav a {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--text2);
}
.topbar-nav a:hover { color: var(--text); }

/* ---------- Buttons ---------- */

.btn {
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: 12px;
  padding: 8px 16px;
  border-radius: 5px;
  border: 0.5px solid var(--border2);
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.12s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { background: var(--bg3); color: var(--text); }
.btn-primary {
  background: var(--text); color: var(--bg2); border-color: var(--text);
}
.btn-primary:hover { background: var(--text); color: var(--bg2); opacity: 0.82; }

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: 120px 0 96px;
}
.hero-logo {
  width: 64px; height: 64px;
  margin: 0 auto 32px;
}
.hero-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 24px;
}
.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 760px;
  margin: 0 auto 22px;
}
.hero h1 em {
  font-style: italic;
  color: var(--text2);
}
.hero p.lead {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text2);
  max-width: 560px;
  margin: 0 auto 36px;
}
.hero-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.hero-meta {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text3);
  margin-top: 28px;
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .ai-badge {
  font-size: 9px;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 3px;
  color: var(--text3);
  background: var(--bg3);
  border: 0.5px solid var(--border);
  text-transform: lowercase;
}

/* ---------- Section labels ---------- */

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 18px;
}
h2.section-title {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 640px;
  margin-bottom: 16px;
}
.section-lead {
  font-size: 15px;
  color: var(--text2);
  max-width: 580px;
  margin-bottom: 48px;
  line-height: 1.6;
}

/* ---------- Features ---------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 0.5px solid var(--border);
  border-left: 0.5px solid var(--border);
}
.feature {
  padding: 32px 32px;
  border-right: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  background: var(--bg2);
}
.feature-icon {
  width: 18px; height: 18px;
  margin-bottom: 18px;
  color: var(--text);
}
.feature h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.feature p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 12px;
}
.step {
  padding: 0 24px 0 0;
  border-right: 0.5px solid var(--border);
}
.step:last-child { border-right: none; padding-right: 0; }
.step:not(:first-child) { padding-left: 24px; }
.step-num {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text3);
  margin-bottom: 12px;
}
.step h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.step p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
}

/* ---------- Compare table ---------- */

.compare-wrap { overflow-x: auto; }
.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg2);
  border: 0.5px solid var(--border);
  font-size: 12.5px;
}
.compare th, .compare td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--border);
  vertical-align: middle;
}
.compare th {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  font-weight: 400;
  background: var(--bg3);
  border-bottom: 0.5px solid var(--border2);
}
.compare td.us {
  background: rgba(37, 99, 235, 0.04);
  font-weight: 500;
  color: var(--text);
}
.compare td .yes { color: var(--week); }
.compare td .no  { color: var(--text3); }
.compare td .mid { color: var(--today); }

/* ---------- App preview ---------- */

.preview {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 460px;
  margin-top: 16px;
}
.preview-side {
  background: var(--bg2);
  border-right: 0.5px solid var(--border);
  display: flex; flex-direction: column;
}
.preview-stats {
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--border);
  display: flex; gap: 8px; flex-wrap: wrap;
}
.stat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg3);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--text2);
}
.stat-dot { width: 6px; height: 6px; border-radius: 50%; }
.preview-list { flex: 1; overflow: hidden; }
.email-item {
  position: relative;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--border);
}
.email-item.active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--text);
}
.email-item.active { background: var(--bg3); }
.email-row1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.email-from {
  font-family: 'Syne', sans-serif;
  font-weight: 500;
  font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.email-time {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text3);
  letter-spacing: 0.02em;
}
.email-subject {
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  color: var(--text2);
  margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.badge {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 3px;
  padding: 2px 6px;
}
.p-urgent { color: var(--urgent); background: rgba(192,57,43,0.08); }
.p-today  { color: var(--today);  background: rgba(179,106,0,0.08); }
.p-week   { color: var(--week);   background: rgba(15,122,88,0.08); }
.p-fyi    { color: var(--fyi);    background: rgba(168,164,158,0.15); }

.preview-main { padding: 22px 26px; overflow: hidden; background: var(--bg); }
.preview-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.preview-meta {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  color: var(--text3);
  letter-spacing: 0.02em;
}
.preview-subject {
  font-family: 'DM Serif Display', serif;
  font-size: 19px;
  letter-spacing: -0.02em;
  margin: 4px 0 12px;
}
.ai-badge {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 3px;
  color: var(--text3);
  background: var(--bg3);
  border: 0.5px solid var(--border);
  margin-left: 8px;
}
.preview-summary {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
  margin: 14px 0;
}
.divider { height: 0.5px; background: var(--border2); margin: 18px 0; }

.task-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg2);
  border: 0.5px solid var(--border2);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 6px;
}
.task-check {
  width: 14px; height: 14px;
  border: 0.5px solid var(--border2);
  border-radius: 3px;
  flex-shrink: 0;
}

.draft-box {
  background: var(--bg2);
  border: 0.5px solid var(--border2);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 12px;
  color: var(--text2);
  line-height: 1.75;
  white-space: pre-wrap;
}

/* ---------- Footer ---------- */

footer {
  border-top: 0.5px solid var(--border);
  padding: 36px 28px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between; align-items: center;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--text3);
}
.footer-links { display: flex; gap: 18px; }

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  section { padding: 64px 0; }
  .hero { padding: 80px 0 56px; }
  .features-grid { grid-template-columns: 1fr; }
  .feature { border-right: none; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .step { border-right: none; padding: 0; }
  .step:not(:first-child) { padding-left: 0; padding-top: 24px; border-top: 0.5px solid var(--border); }
  .preview { grid-template-columns: 1fr; height: auto; }
  .preview-side { border-right: none; border-bottom: 0.5px solid var(--border); }
  .topbar-nav { gap: 14px; }
  .topbar-nav a:nth-child(n+3) { display: none; }
}
