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

:root {
  --bg:              #09090b;
  --bg-elevated:     #18181b;
  --bg-muted:        #27272a;
  --border:          #3f3f46;
  --border-subtle:   #27272a;
  --text:            #fafafa;
  --text-muted:      #a1a1aa;
  --text-subtle:     #71717a;
  --accent:          #10b981;
  --accent-dim:      rgba(16, 185, 129, 0.12);
  --font: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Monaco, Consolas, monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Nav ── */

nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(9, 9, 11, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}

.logo {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.logo::before {
  content: '> ';
  color: var(--accent);
}

.nav-cta {
  font-size: 0.775rem;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid currentColor;
  padding: 0.35rem 0.9rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ── Shared layout ── */

section {
  padding: 6rem 2rem;
  border-top: 1px solid var(--border-subtle);
}

.section-content {
  max-width: 1100px;
  margin: 0 auto;
}

.label,
.eyebrow {
  display: block;
  font-size: 0.675rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

/* ── Hero ── */

#hero {
  border-top: none;
  height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;   /* lock row to fill container — prevents reflow */
  gap: 4rem;
  align-items: center;
  overflow: hidden;
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 7rem;
}

.hero-visual {
  min-height: 0;    /* allow grid item to shrink below its content size */
  overflow: hidden;
}

.hero-content h1 {
  font-size: clamp(1.875rem, 3.25vw, 2.875rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
}

.subhead {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  padding: 0.7rem 1.6rem;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 0.825rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: opacity 0.15s;
}

.btn-primary:hover {
  opacity: 0.82;
}

/* ── Inbox widget ── */

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.inbox-widget {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.inbox-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.65rem 1rem;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.inbox-chrome-title {
  font-size: 0.675rem;
  color: var(--text-subtle);
  margin-left: 0.35rem;
  letter-spacing: 0.02em;
}

.inbox-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
}

.inbox-folder {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.inbox-count {
  font-size: 0.675rem;
  color: var(--bg);
  background: var(--text-subtle);
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  font-weight: 600;
  transition: background 0.5s, color 0.5s;
}

.inbox-count.relevant {
  background: var(--accent);
  color: var(--bg);
}

.inbox-list {
  /* fixed height prevents layout shift as rows collapse */
  min-height: 420px;
}

/* ── Email row ── */

.email-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  max-height: 80px;
  overflow: hidden;
  transition:
    max-height 0.38s ease,
    opacity    0.32s ease,
    transform  0.32s ease,
    padding    0.32s ease;
}

.email-row.removing {
  max-height: 0;
  opacity: 0;
  transform: translateX(-12px);
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-color: transparent;
}

.email-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--bg);
  margin-top: 2px;
}

.email-meta {
  flex: 1;
  min-width: 0;
}

.email-from {
  font-size: 0.7rem;
  color: var(--text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.2rem;
}

.email-subject {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  transition: color 0.3s;
}

.email-row.match .email-subject {
  color: var(--text);
}

/* Signal badge — hidden until filter runs */
.email-signal {
  flex-shrink: 0;
  font-size: 0.63rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.3s ease, transform 0.3s ease;
  align-self: center;
  white-space: nowrap;
}

.email-signal.visible {
  opacity: 1;
  transform: scale(1);
}

.sig-strong   { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.sig-likely   { background: rgba(16, 185, 129, 0.08); color: #6ee7b7; }
.sig-possible { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }

/* ── Inbox status bar ── */

.inbox-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  font-size: 0.675rem;
  color: var(--text-subtle);
  border-top: 1px solid var(--border-subtle);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.inbox-status.visible {
  opacity: 1;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

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

/* ── Problem ── */

#problem h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.22;
  margin-bottom: 1.75rem;
  max-width: 640px;
}

#problem p {
  font-size: 0.925rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 1rem;
  line-height: 1.85;
}

#problem em {
  color: var(--text);
  font-style: normal;
}

/* ── Modes ── */

#modes h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.22;
  margin-bottom: 3rem;
}

.modes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.mode-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
}

.mode-direction {
  display: inline-block;
  font-size: 0.675rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.mode-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.875rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.mode-card > p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 1.75rem;
}

.mode-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.flow-step {
  display: block;
  font-size: 0.75rem;
  color: var(--text-subtle);
  padding: 0.45rem 0.875rem;
  background: var(--bg-muted);
  border-radius: 4px;
  border-left: 2px solid var(--accent);
}

.flow-arrow {
  display: block;
  font-size: 0.65rem;
  color: var(--text-subtle);
  padding: 0.1rem 0 0.1rem 0.875rem;
}

/* ── Capabilities ── */

#capabilities h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.22;
  margin-bottom: 3rem;
}

.capabilities-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.capability {
  padding: 2rem;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s;
}

.capability:hover {
  border-color: var(--border);
  background: var(--bg-elevated);
}

.cap-number {
  display: block;
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 0.875rem;
}

.capability h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.capability p {
  font-size: 0.845rem;
  color: var(--text-muted);
  line-height: 1.85;
}

/* ── Early access / CTA ── */

.cta-content {
  max-width: 640px;
}

#early-access h2 {
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.22;
  margin-bottom: 1rem;
}

#early-access > .section-content > p {
  font-size: 0.925rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.85;
}


/* ── Footer ── */

footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

footer p {
  font-size: 0.775rem;
  color: var(--text-subtle);
}

/* ── Responsive ── */

@media (max-width: 860px) {
  #hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
    min-height: auto;
    overflow: visible;
    gap: 3rem;
    padding-top: 6.5rem;
    padding-bottom: 5rem;
  }

  .hero-visual {
    min-height: unset;
    overflow: visible;
  }

  .subhead {
    max-width: 100%;
  }

  .modes-grid,
  .capabilities-grid {
    grid-template-columns: 1fr;
  }

  #modes h2,
  #capabilities h2,
  #early-access h2,
  #problem h2 {
    br { display: none; }
  }
}

@media (max-width: 540px) {
  nav {
    padding: 0.875rem 1.25rem;
  }

  section {
    padding: 4rem 1.25rem;
  }

  footer {
    padding: 2.5rem 1.25rem;
  }
}
