/* Mailroom's site. Dark, product-first: the app does the talking, one accent from the app
   icon, Apple's own typeface on a Mac, and nothing loaded from anywhere else. */

:root {
  --bg: #07080d;
  --surface: #0f1119;
  --surface-2: #151826;
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.14);
  --text: #f3f4f8;
  --muted: #a1a6bb;
  --faint: #6e7389;
  --accent: #f5a524;
  --accent-rgb: 245 165 36;
  --accent-hover: #ffb43f;
  --accent-text: #f7b443;
  --accent-ink: #1a1204;
  --glow: rgb(245 165 36 / 0.16);

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --radius: 14px;
  --page: 1160px;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-text);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}

.page {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---- Header ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(7 8 13 / 0.72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header .page {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 28px;
  height: 28px;
}
.nav {
  display: flex;
  gap: 28px;
  margin-inline: auto;
  font-size: 14px;
}
.nav a {
  color: var(--muted);
}
.nav a:hover {
  color: var(--text);
  text-decoration: none;
}
/* On narrow screens the sections move into a Menu, which needs no script. */
.menu {
  display: none;
  position: relative;
}
.menu summary {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding-inline: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  list-style: none;
  cursor: pointer;
}
.menu summary::-webkit-details-marker {
  display: none;
}
.menu nav {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  display: grid;
  min-width: 200px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.5);
}
.menu nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
}
.menu nav a:hover {
  background: var(--surface-2);
  text-decoration: none;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding-inline: 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.button:hover {
  text-decoration: none;
}
.button svg {
  width: 17px;
  height: 17px;
  flex: none;
}
.button.primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.08) inset,
    0 8px 30px -8px var(--glow);
}
.button.primary:hover {
  background: var(--accent-hover);
}
.button.secondary {
  color: var(--text);
  border: 1px solid var(--line-strong);
  background: rgb(255 255 255 / 0.02);
}
.button.secondary:hover {
  border-color: rgb(255 255 255 / 0.24);
  background: rgb(255 255 255 / 0.05);
}
.button.small {
  height: 34px;
  padding-inline: 14px;
  font-size: 14px;
  border-radius: 8px;
}
.button.dark {
  background: var(--bg);
  color: var(--text);
}
.button.dark:hover {
  background: #1b1d27;
}

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

/* The headline on the left; what it is and the download on the right. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 32px 64px;
  align-items: end;
  padding-block: 96px 48px;
}
.hero h1 {
  margin: 0;
  max-width: none;
  font-size: clamp(44px, 6.6vw, 84px);
  line-height: 1;
  letter-spacing: -0.04em;
}
.hero h1 .soft {
  margin-top: 0.18em;
  font-size: 0.74em;
  letter-spacing: -0.035em;
}
.hero .lede {
  margin: 0;
  font-size: 18px;
}
.hero .actions {
  justify-content: flex-start;
  margin-top: 28px;
}
.hero .fine {
  margin: 14px 0 0;
}
h1 {
  margin: 28px auto 20px;
  max-width: 20ch;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h1 .soft,
h2 .soft {
  color: var(--accent-text);
}
h1 .soft {
  display: block;
}
.lede {
  margin: 0 auto;
  max-width: 34em;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}
.fine {
  margin-top: 16px;
  color: var(--faint);
  font-size: 13px;
}

/* ---- The app, in its window ---- */

.window {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: #1e1e1e;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 0.6),
    0 40px 120px -40px rgb(0 0 0 / 0.9),
    0 0 120px -30px var(--glow);
}
.window .bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding-inline: 14px;
  background: #2a2a2d;
  border-bottom: 1px solid rgb(0 0 0 / 0.5);
}
.window .bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}
.window .bar span:nth-child(2) {
  background: #febc2e;
}
.window .bar span:nth-child(3) {
  background: #28c840;
}
/* Screenshots behind tabs. The tabs are radio buttons, kept for the keyboard and screen readers,
   with their labels drawn as the tabs. */
.shot-pick {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.shot-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.shot-tabs label {
  padding: 6px 16px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.shot-tabs label:hover {
  color: var(--text);
}
#shot-mail:checked ~ .shot-tabs [for='shot-mail'],
#shot-calendar:checked ~ .shot-tabs [for='shot-calendar'],
#shot-translate:checked ~ .shot-tabs [for='shot-translate'] {
  background: var(--surface-2);
  color: var(--text);
}
#shot-mail:focus-visible ~ .shot-tabs [for='shot-mail'],
#shot-calendar:focus-visible ~ .shot-tabs [for='shot-calendar'],
#shot-translate:focus-visible ~ .shot-tabs [for='shot-translate'] {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}
.showcase .shot {
  display: none;
}
#shot-mail:checked ~ .window .shot-mail,
#shot-calendar:checked ~ .window .shot-calendar,
#shot-translate:checked ~ .window .shot-translate {
  display: block;
}

/* ---- Sections ---- */

section {
  padding-block: 96px 0;
  scroll-margin-top: 40px;
}
code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--text);
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
}
h2 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head.flush {
  margin-bottom: 0;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

/* Three things that matter most, between thin rules. */
#features {
  padding-top: 64px;
}
.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}
.pillars > div {
  padding: 32px;
}
.pillars > div:first-child {
  padding-left: 0;
}
.pillars > div:last-child {
  padding-right: 0;
}
.pillars > div + div {
  border-left: 1px solid var(--line);
}
.pillars p,
.details p,
.feature-copy p {
  margin: 0;
  color: var(--muted);
}

/* Feature rows: words on one side, the app on the other. */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: center;
}
.feature.flip .feature-copy {
  order: 2;
}
.feature-copy ul {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.feature-copy li {
  position: relative;
  padding-left: 28px;
  color: var(--muted);
}
.feature-copy li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--accent-text) 0 3px, transparent 3.5px),
    rgb(var(--accent-rgb) / 0.16);
}

/* Two features side by side, words only: their screenshots are in the tabs above. */
.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
}
.duo h2 .soft {
  display: block;
}

/* Everything else, in a grid of thin rules. */
.details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.details > div {
  padding: 28px 32px 30px 0;
  border-bottom: 1px solid var(--line);
}
.details > div:not(:nth-child(3n + 1)) {
  padding-left: 32px;
  border-left: 1px solid var(--line);
}
.details p {
  font-size: 16px;
}

/* Privacy: plain facts, side by side. */
.privacy-band {
  padding: 56px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(500px 240px at 0% 0%, rgb(var(--accent-rgb) / 0.08), transparent 70%),
    var(--surface);
}
.privacy-band .facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 48px;
  margin-top: 40px;
}
.privacy-band .facts p {
  margin: 0;
  color: var(--muted);
}
.privacy-band .more {
  margin-top: 36px;
  font-size: 15px;
}

/* FAQ: the heading on the left, the questions on the right. */
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
  gap: 24px 64px;
  align-items: start;
}
.faq-aside {
  margin: 0;
  color: var(--muted);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq details:first-child {
  border-top: 1px solid var(--line);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  color: var(--faint);
  font-weight: 400;
  font-size: 22px;
  line-height: 1;
}
.faq details[open] summary::after {
  content: '–';
}
.faq details p {
  margin: -6px 0 22px;
  color: var(--muted);
}

/* Last call, the one block in the brand colour. */
.closing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  margin-top: 96px;
  padding: 48px 56px;
  border-radius: 20px;
  background: var(--accent);
  color: var(--accent-ink);
}
.closing h2 {
  margin: 0 0 8px;
}
.closing p {
  margin: 0;
  max-width: 32em;
  color: #4a3208;
  font-size: 18px;
}

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

.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 14px;
}
.site-footer .page {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 32px 48px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.site-footer a {
  color: var(--muted);
}
.site-footer .brand {
  font-size: 15px;
}

/* ---- Long documents (privacy, terms) ---- */

.doc {
  max-width: 760px;
  margin-inline: auto;
  padding-block: 72px 0;
}
.doc h1 {
  margin: 0 0 8px;
  max-width: none;
  font-size: clamp(36px, 5vw, 52px);
  text-align: left;
}
.doc .updated {
  margin: 0 0 40px;
  color: var(--faint);
  font-size: 14px;
}
.doc .summary {
  margin: 0 0 48px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}
.doc .summary strong {
  color: var(--text);
}
.doc h2 {
  margin: 48px 0 12px;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.doc h3 {
  margin: 28px 0 8px;
}
.doc p,
.doc li {
  color: #c9ccd9;
}
.doc ul {
  padding-left: 22px;
}
.doc li + li {
  margin-top: 8px;
}
.doc .caps {
  font-size: 15px;
  letter-spacing: 0.01em;
}
.doc code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--text);
}

/* Download page */
.download {
  text-align: center;
  padding-block: 96px 0;
}
.download-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 8px;
}
.download h1 {
  margin-top: 8px;
}
.download .steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 56px auto 0;
  max-width: 900px;
  padding: 0;
  list-style: none;
  counter-reset: step;
  text-align: left;
}
.download .steps li {
  counter-increment: step;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
}
.download .steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: rgb(var(--accent-rgb) / 0.14);
  color: var(--accent-text);
  font-weight: 600;
  font-size: 14px;
}
.notice {
  max-width: 560px;
  margin: 32px auto 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
}

/* ---- Narrow screens ---- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 72px 40px;
  }
  .hero-side {
    max-width: 34em;
  }
  .feature,
  .feature.flip,
  .duo,
  .faq-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .duo {
    gap: 0;
  }
  .feature.flip .feature-copy {
    order: 0;
  }
  .details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .details > div,
  .details > div:not(:nth-child(3n + 1)) {
    padding: 24px 24px 26px 0;
    border-left: 0;
  }
  .details > div:nth-child(2n) {
    padding-left: 24px;
    border-left: 1px solid var(--line);
  }
  .pillars {
    grid-template-columns: minmax(0, 1fr);
  }
  .pillars > div,
  .pillars > div:first-child,
  .pillars > div:last-child {
    padding: 24px 0;
  }
  .pillars > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .closing {
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 32px;
  }
}
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .nav {
    display: none;
  }
  .menu {
    display: block;
  }
  .site-header .page {
    gap: 12px;
  }
  .site-header .button {
    margin-left: auto;
  }
  .hero {
    padding-block: 48px 32px;
  }
  .lede,
  .hero .lede {
    font-size: 17px;
  }
  .details {
    grid-template-columns: minmax(0, 1fr);
  }
  .details > div,
  .details > div:nth-child(2n) {
    padding: 22px 0;
    border-left: 0;
  }
  .privacy-band .facts,
  .download .steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .privacy-band {
    padding: 32px 24px;
  }
  section {
    padding-block: 72px 0;
  }
  .window .bar {
    height: 24px;
  }
  .window .bar span {
    width: 9px;
    height: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .button {
    transition: none;
  }
}

/* ---- Changelog ---- */

.release {
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.release h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 0 0 14px;
}
.release time {
  color: var(--faint);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
}
.release li strong {
  color: var(--text);
  font-weight: 600;
}
