/*
 * contextmail.net landing page.
 * Tokens and measurements come from the design canvas ("ContextMail",
 * artboard "Landing page · contextmail.net"). The two live panels are the
 * design's own components and carry their styles inline (demo/*.html).
 */

:root {
  --ink: #182A41;
  --ink-2: #253447;
  --ink-3: #404E60;
  --muted: #586474;
  --line: #E3E7EC;
  --line-strong: #CFD5DC;
  --line-card: #DCE1E7;
  --line-soft: #EEF1F4;
  --wash: #F6F8FA;
  --paper: #FFFFFF;
  --blue: #245FD4;
  --blue-deep: #1A4AB0;
  --signal: #D35F00;

  --sans: 'IBM Plex Sans', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --condensed: 'IBM Plex Sans Condensed', 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); }
a:hover { color: var(--blue-deep); }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.scene :focus-visible { outline-color: #FFFFFF; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #FFFFFF; }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  box-sizing: border-box;
}
.wrap--wide {
  max-width: 1360px;
  padding: 0 clamp(12px, 3vw, 40px);
}

/* ── Shared pieces ─────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px;
  border-radius: 10px;
  background: var(--blue);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--blue-deep); color: #FFFFFF; }
.btn--sm {
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14.5px;
}

/* Stands where the sign-up and sign-in buttons go until they open. */
.soon {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 22px;
  box-sizing: border-box;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--wash);
  color: var(--ink-3);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  cursor: default;
}
.soon--sm {
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14.5px;
}
.soon--light {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.btn-quiet {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
}
.btn-quiet:hover { background: var(--wash); color: var(--ink); }

.link-quiet {
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: #B4BDC9;
  text-underline-offset: 5px;
}
.link-quiet:hover { color: var(--ink); text-decoration-color: var(--ink); }

.link-light {
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 5px;
}
.link-light:hover { color: #FFFFFF; text-decoration-color: #FFFFFF; }

.title {
  margin: 0;
  font-family: var(--condensed);
  font-weight: 600;
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.title--light { color: #FFFFFF; }

.lede {
  margin: 0;
  max-width: 32em;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-3);
  text-wrap: pretty;
}
.lede--wide { max-width: 34em; }

.note-mono {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.overline {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.band { padding: clamp(80px, 9vw, 128px) 0; }
.band--wash { background: var(--wash); padding: clamp(72px, 8vw, 120px) 0; }
.band--tall { padding: clamp(72px, 9vw, 128px) 0; }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: 56px 72px;
  align-items: center;
}
.split--assist { grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); }

.stack { display: flex; flex-direction: column; gap: 22px; }
.stack--tight { gap: 20px; }

.lead {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: 20px 64px;
  align-items: end;
  margin-bottom: 48px;
}
.lead--keys { margin-bottom: 56px; }

/* ── Header ────────────────────────────────────────────────────────────── */

.site-header { border-bottom: 1px solid var(--line); }
.site-header__in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 36px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand__name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.brand--small { gap: 7px; }
.brand--small .brand__name { font-size: 15px; }

.site-nav {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  font-size: 14.5px;
}
.site-nav a { color: var(--ink-3); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }

.site-header__actions { display: flex; align-items: center; gap: 6px; }

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero { padding-top: clamp(56px, 7vw, 96px); }

.hero__stamp {
  margin: 0 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--muted);
}

.hero__title {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.06em;
  font-family: var(--condensed);
  font-weight: 600;
  font-size: clamp(42px, 9.4vw, 136px);
  line-height: 0.94;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.hero__line { display: flex; align-items: center; gap: 0.2em; }
.hero__line--rest { color: #7C8696; }
.hero__box {
  flex: 0 0 auto;
  position: relative;
  top: 0.03em;
  width: 0.46em;
  height: 0.46em;
  box-sizing: border-box;
  border-radius: 0.05em;
  background: var(--signal);
}
.hero__box--empty { border: 0.05em solid #A3ACB8; background: none; }

.hero__grid {
  margin-top: clamp(32px, 4vw, 52px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: 28px 64px;
  align-items: end;
}
.hero__lede {
  margin: 0;
  max-width: 34em;
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.55;
  color: var(--ink-3);
  text-wrap: pretty;
}
.hero__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.hero__buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.hero__note { margin: 0; font-size: 14px; color: var(--muted); }

/* The inbox window sits half over the photograph behind it. */
.stage { margin-top: clamp(48px, 6vw, 76px); }
.stage__photo {
  height: clamp(300px, 39vw, 560px);
  overflow: hidden;
  border-radius: 20px;
  background: #0B1018;
}
.stage__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.stage__window {
  position: relative;
  width: calc(100% - clamp(16px, 7.8vw, 112px));
  margin: calc(-1 * clamp(170px, 23.6vw, 340px)) auto 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 2px 4px rgba(6, 10, 17, 0.08), 0 40px 80px -30px rgba(6, 10, 17, 0.5);
}
/* The inbox is a desktop layout. On a narrow screen the window scrolls sideways. */
.stage__canvas { min-width: 1120px; min-height: 660px; }
.stage__note { padding: 14px 4px 0; }

.demo-off {
  margin: 0;
  padding: 48px 24px;
  font-size: 14.5px;
  color: var(--muted);
  text-align: center;
}

/* ── Assist ────────────────────────────────────────────────────────────── */

.eyebrow {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  box-sizing: border-box;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: inset 0 -2px 0 var(--line);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}

.points {
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 24px 32px;
}
.point {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line-strong);
}
.point dt { font-size: 16px; font-weight: 600; }
.point dd { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-3); }
.points + .note-mono { margin-top: 4px; }

.assist-stage {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  padding: clamp(20px, 3.4vw, 40px);
  border-radius: 20px;
  background: #0B1018;
}
.assist-stage > img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 50%;
}
.assist-stage__panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  min-height: 900px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

/* ── How it sorts ──────────────────────────────────────────────────────── */

.labels {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(232px, 1fr);
  gap: 1px;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--line-card);
  border: 1px solid var(--line-card);
  border-radius: 14px;
}
.label {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 22px 24px;
  background: var(--paper);
}
.label__head { display: flex; align-items: center; gap: 10px; }
.label__head h3 { margin: 0; flex: 1; font-size: 16px; font-weight: 600; }
.label__dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  box-sizing: border-box;
  border-radius: 2px;
  background: var(--label);
}
.label__count {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}
.label__about { margin: 0; min-height: 63px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.label__mail { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.label__mail li {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
}
.label__from { font-weight: 600; }
.label__subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); }
.label__mail .label__more {
  border-bottom: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.label--ignore { background: #F9FAFB; }
.label--ignore h3 { color: var(--ink-3); }
.label--ignore .label__dot { border: 1.5px solid #8993A0; background: none; }
.label--ignore .label__count,
.label--ignore .label__mail,
.label--ignore .label__subject { color: var(--muted); }

.aside { margin: 20px 0 0; font-size: 14.5px; color: var(--muted); }

/* ── Summaries ─────────────────────────────────────────────────────────── */

.spec {
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.5;
}
.spec dt {
  padding: 14px 28px 14px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.spec dd { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }

.letter {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-card);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(18, 34, 55, 0.05), 0 28px 56px -32px rgba(18, 34, 55, 0.3);
}
.letter__head { display: flex; flex-direction: column; gap: 14px; padding: 22px 26px 18px; }
.letter__meta { display: flex; align-items: center; gap: 10px; }
.letter__time { margin-left: auto; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.letter__subject {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.letter__sender { display: flex; align-items: center; gap: 10px; }
.letter__who { display: flex; flex-direction: column; }
.letter__name { font-size: 14px; font-weight: 600; }
.letter__address { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.letter__summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 26px;
  padding: 14px 16px 16px;
  border-radius: 10px;
  background: #F2F5F9;
}
.letter__summary p { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.letter__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 26px 26px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-3);
}
.letter__body p { margin: 0; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line-card);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-3);
}
.tag__dot { width: 7px; height: 7px; border-radius: 1.5px; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #EEF1F5;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
}

/* ── Photograph panels: the platform and the closing call ──────────────── */

.platform { padding: 0 0 clamp(80px, 9vw, 128px); }
.closing { padding: clamp(80px, 9vw, 128px) 0; }

.scene {
  position: relative;
  overflow: hidden;
  display: flex;
  border-radius: 20px;
}
.scene > img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scene--platform { align-items: center; min-height: 580px; background: #05080D; }
.scene--platform > img { object-position: 75% 50%; }
.scene--closing { align-items: flex-start; min-height: clamp(440px, 40vw, 560px); background: #060A11; }
.scene--closing > img { object-position: 50% 60%; }

.scene__in {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 620px;
  padding: clamp(32px, 5.5vw, 80px);
  box-sizing: border-box;
}
.scene__in--closing {
  align-items: flex-start;
  gap: 28px;
  max-width: none;
  padding: clamp(32px, 6vw, 88px);
}
.scene__eyebrow { margin: 0; font-family: var(--mono); font-size: 13px; color: #A9B4C2; }
.scene__lede { margin: 0; font-size: 17px; line-height: 1.6; color: #C3CCD8; text-wrap: pretty; }
.scene__foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; padding-top: 6px; }
.scene__foot span { font-size: 12.5px; color: #8A96A8; }

.figures { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 24px 56px; }
.figures div { display: flex; flex-direction: column; gap: 6px; }
.figures dt { order: 2; max-width: 15em; font-size: 13.5px; line-height: 1.45; color: #A9B4C2; }
.figures dd {
  order: 1;
  margin: 0;
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #FFFFFF;
}

.closing__title {
  margin: 0;
  font-family: var(--condensed);
  font-weight: 600;
  font-size: clamp(42px, 6.4vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  color: #FFFFFF;
}
.closing__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

/* ── Shortcuts ─────────────────────────────────────────────────────────── */

.keys {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(112px, 100%), 1fr));
  gap: 28px 16px;
}
.keys li { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.keys span { font-size: 15px; color: var(--ink-3); }
.keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  box-sizing: border-box;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: inset 0 -3px 0 var(--line), 0 1px 2px rgba(18, 34, 55, 0.06);
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
}

/* ── Also in ContextMail ───────────────────────────────────────────────── */

.also { padding: clamp(72px, 8vw, 120px) 0 0; }
.also .title { margin-bottom: 44px; text-wrap: wrap; }
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 44px 48px;
}
.feature {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}
.feature h3 { margin: 0; font-size: 17px; font-weight: 600; }
.feature p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--ink-3); text-wrap: pretty; }

/* ── Footer ────────────────────────────────────────────────────────────── */

.site-footer { background: var(--wash); border-top: 1px solid var(--line); }
.site-footer__in {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 40px;
  padding-bottom: 32px;
}
.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px 48px;
}
.site-footer__brand { display: flex; flex-direction: column; gap: 10px; }
.site-footer__brand p { margin: 0; font-size: 14px; color: var(--muted); }
.site-footer__brand p a { color: var(--ink); font-weight: 500; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 14px; }
.site-footer__nav a { color: var(--ink-3); text-decoration: none; }
.site-footer__nav a:hover { color: var(--ink); }

/* ── 404 ───────────────────────────────────────────────────────────────── */

.missing {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  min-height: 100vh;
  padding-top: clamp(40px, 8vw, 96px);
  padding-bottom: 64px;
}
.missing .brand { margin-bottom: clamp(32px, 8vw, 96px); }
