/* Homepage. Loaded after styles.css. */

.m-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.m-display {
  margin: 0;
  color: var(--ink);
  font: 600 clamp(40px, 6.4vw, 68px) / 1.05 var(--display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.m-heading {
  margin: 0;
  color: var(--ink);
  font: 600 clamp(26px, 3.2vw, 36px) / 1.2 var(--display);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.m-hero {
  padding: 128px 0 0;
}
.m-hero .m-wrap {
  max-width: 1040px;
}
.m-hero .m-display,
.m-hero .m-lede,
.m-hero .m-cta {
  animation: m-rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.m-hero .m-lede {
  animation-delay: 80ms;
}
.m-hero .m-cta {
  animation-delay: 140ms;
}
@keyframes m-rise {
  from {
    opacity: 0;
    translate: 0 12px;
  }
}
.m-lede,
.m-section p,
.m-get p,
.m-questions details p {
  max-width: 52ch;
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.5;
}
.m-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 24px;
}
.m-note {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.m-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--page);
  font: 500 16px/1 var(--text);
  text-decoration: none;
}
.m-button:hover {
  background: var(--accent-ink);
  color: var(--page);
  translate: 0 -1px;
}
.m-button:active {
  translate: 0 1px;
}
.m-button .glyph {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.os-win {
  display: none;
}
html[data-os='windows'] .os-mac {
  display: none;
}
html[data-os='windows'] .os-win {
  display: inline-flex;
}

/* The page's sample: one solid indigo band, one enlarged inbox. No grain or gradient. */
.m-band {
  margin-top: 64px;
  padding: 48px 24px;
  background: #d9367f;
}
.inbox {
  max-width: 880px;
  margin: 0 auto;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}
.inbox figcaption {
  margin: 0;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 500 14px/1 var(--system);
  text-align: center;
}
.mail {
  list-style: none;
  margin: 0;
  padding: 8px 0 10px;
}
.mail li {
  display: grid;
  grid-template-columns: 14px minmax(7.5em, 11em) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0 10px;
  padding: 13px 14px;
  border-radius: 8px;
  color: var(--ink-2);
  font: 16px/1.35 var(--system);
}
.mail li.selected {
  background: var(--tint);
  box-shadow: inset 0 0 0 1px var(--tint-strong);
}
.mail .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
}
.mail li.unread .dot {
  background: var(--accent);
}
.mail .who,
.mail .what {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mail .who {
  color: var(--ink);
}
.mail li.unread .who,
.mail li.unread .what {
  font-weight: 600;
}
.mail time {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.m-section {
  padding-top: 96px;
}
.m-solid {
  margin-top: 96px;
  padding: 64px 24px;
  background: #d9367f;
  color: #fff;
}
.m-desks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 32px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: stretch;
}
/* Each desk shares the heading, description and specimen rows, even when a title wraps. */
.m-desks > div {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
}
.m-solid .m-heading {
  color: #fff;
  font-size: clamp(22px, 2.2vw, 28px);
}
.m-solid .m-desks > div > p {
  max-width: 36ch;
  margin: 0;
  color: rgb(255 255 255 / 88%);
  font-size: 15px;
  line-height: 1.45;
}
.mail li {
  transition: background 200ms, box-shadow 200ms;
}
.mail li.leaving {
  animation: mail-leave 280ms ease-in forwards;
}
@keyframes mail-leave {
  to {
    opacity: 0;
    translate: 28px 0;
  }
}
.shortcuts dt {
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 200ms, color 200ms;
}
.shortcuts .cap {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--cap);
  color: var(--cap-ink);
  box-shadow: 0 2px 0 var(--cap-side);
  font: 500 14px/1 var(--system);
  letter-spacing: 0.02em;
  white-space: nowrap;
  translate: 0 -1px;
  transition: translate 160ms ease-out, box-shadow 160ms ease-out, background 160ms ease-out, color 160ms ease-out;
  user-select: none;
}
.shortcuts .cap.wide {
  padding: 0 10px;
}
.shortcuts dt.live .cap {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 0 #3a2f9e;
  translate: 0 1px;
}
html.motion .reveal {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 700ms cubic-bezier(0.2, 0.7, 0.2, 1), translate 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
html.motion .reveal.shown {
  opacity: 1;
  translate: 0 0;
}
.shortcuts {
  display: grid;
  grid-template-columns: 9.5em minmax(0, 1fr);
  gap: 8px 24px;
  max-width: 36em;
  margin: 20px 0 0;
}
.shortcuts dt,
.shortcuts dd {
  margin: 0;
}
.shortcuts dt {
  color: var(--ink);
  font: 500 16px/1.4 var(--system);
}
.shortcuts dd {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.4;
}
.features {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 48px;
  margin: 32px 0 0;
  padding: 0;
}
.features h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font: 500 22px/1.15 var(--display);
}
.features p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}
.m-get img {
  width: 88px;
  height: 88px;
  margin-bottom: 8px;
}
.m-faq {
  padding-bottom: 96px;
}
.m-questions {
  margin-top: 36px;
  border-bottom: 1px solid var(--line);
}
.m-questions details {
  border-top: 1px solid var(--line);
}
.m-questions summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 22px 0;
  color: var(--ink);
  font: 500 17px/1.4 var(--text);
  list-style: none;
  cursor: pointer;
}
.m-questions summary::-webkit-details-marker {
  display: none;
}
.m-questions summary::marker {
  content: '';
}
.m-questions summary:hover span {
  color: var(--muted);
}
.faq-mark {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  transition: rotate 360ms cubic-bezier(0.2, 0, 0, 1), scale 120ms cubic-bezier(0.2, 0, 0, 1);
}
.m-questions details[open] .faq-mark {
  rotate: 45deg;
}
.m-questions summary:active .faq-mark {
  scale: 0.82;
}
.m-questions details p {
  max-width: 52ch;
  margin: 0;
  padding: 2px 36px 32px 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}
/* Same open and close as FitLink’s accordion: 280ms out, 180ms back, on cubic-bezier(0.2, 0, 0, 1). */
.m-questions details,
.m-questions details::details-content {
  interpolate-size: allow-keywords;
}
.m-questions details::details-content {
  block-size: 0;
  overflow: clip;
  opacity: 0;
  transition:
    block-size 180ms cubic-bezier(0.2, 0, 0, 1),
    opacity 180ms cubic-bezier(0.2, 0, 0, 1),
    content-visibility 180ms allow-discrete;
}
.m-questions details[open]::details-content {
  block-size: auto;
  opacity: 1;
  transition:
    block-size 280ms cubic-bezier(0.2, 0, 0, 1),
    opacity 280ms cubic-bezier(0.2, 0, 0, 1),
    content-visibility 280ms allow-discrete;
}
@keyframes faq-settle {
  from {
    translate: 0 -6px;
    filter: blur(3px);
  }
}
.m-questions details[open] p {
  animation: faq-settle 280ms cubic-bezier(0.2, 0, 0, 1);
}

/* In-app desks restored from the homepage on main (home.js specimens), without keycaps or the flight engraving. */
.desk {
  margin-top: 8px;
  align-self: start;
}
.ask,
.sort-card,
.compose {
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / 8%);
}
.ask {
  padding: 16px;
  font: 14px/1.45 var(--system);
}
.ask-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.ask-q {
  width: fit-content;
  max-width: 92%;
  margin: 0 0 12px auto;
  padding: 8px 12px;
  border-radius: 14px 14px 4px 14px;
  background: var(--tint-strong);
}
.ask-a p {
  min-height: 72px;
  margin: 0;
}
.cite {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  margin: 0 2px;
  padding: 0 4px;
  border-radius: 6px;
  background: var(--tint-strong);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 500;
  vertical-align: 1px;
  opacity: 0;
  scale: 0.6;
  transition: opacity 200ms, scale 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cite.on {
  opacity: 1;
  scale: 1;
}
.ask-card {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  opacity: 0;
  translate: 0 10px;
  transition: opacity 300ms, translate 400ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ask-card.on {
  opacity: 1;
  translate: 0 0;
}
.ask-card-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.ask-card-top b {
  color: var(--ink);
  font-size: 13px;
}
.ask-card p {
  margin: 6px 0 10px;
  color: var(--ink-2);
}
.ask-card-actions {
  display: flex;
  gap: 6px;
}
.m-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 9px;
  background: var(--hover);
  color: var(--ink);
  font: 600 13px/1 var(--system);
}
.m-chip.primary {
  background: var(--accent);
  color: #fff;
}
.m-chip.light {
  background: rgb(255 255 255 / 16%);
  color: #fff;
}
.m-chip.pressed {
  translate: 0 1px;
}
.sort-card {
  padding: 16px 16px 12px;
  font: 14px/1.4 var(--system);
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font: 600 13px/1 var(--system);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 10px;
  color: var(--muted);
  transition: background 200ms, color 200ms;
}
.tab b {
  min-width: 16px;
  padding: 2px 4px;
  border-radius: 6px;
  background: var(--kbd-bg);
  color: var(--kbd-ink);
  font-size: 11px;
  text-align: center;
  transition: background 200ms, color 200ms, scale 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tab.on {
  background: var(--tint);
  color: var(--accent-ink);
}
.tab.bump b {
  background: var(--accent);
  color: #fff;
  scale: 1.2;
}
.rows {
  display: grid;
  gap: 2px;
  margin-top: 8px;
}
.srow {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 8px;
  padding: 10px 8px;
  border-radius: 12px;
  transition: opacity 360ms, translate 420ms cubic-bezier(0.2, 0.7, 0.2, 1), background 200ms;
}
.srow b {
  color: var(--ink);
}
.srow span {
  overflow: hidden;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.srow.lit {
  background: var(--tint);
}
.srow.gone {
  opacity: 0;
  translate: 48px 0;
}
.compose {
  padding: 4px 16px 16px;
  font: 14px/1.45 var(--system);
}
.compose-line {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.compose-line span {
  width: 54px;
  color: var(--muted);
}
.compose p {
  margin: 12px 0 0;
  color: var(--ink-2);
}
.sending {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 16px auto 0;
  padding: 10px 12px 10px 14px;
  border-radius: 14px;
  background: var(--toast);
  color: var(--toast-ink);
  font: 600 14px/1 var(--system);
  box-shadow: 0 16px 32px -18px rgb(60 10 35 / 70%);
  transition: background 300ms;
}
.sending b {
  display: inline-block;
  min-width: 1.2em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ring {
  width: 22px;
  height: 22px;
  rotate: -90deg;
}
.ring circle {
  fill: none;
  stroke: rgb(255 255 255 / 18%);
  stroke-width: 3.5;
}
.ring .left {
  stroke: var(--toast-accent);
  stroke-dasharray: 94.25;
  stroke-dashoffset: 0;
  stroke-linecap: round;
}
.sending.undone {
  background: var(--accent);
}

/* Section dots. One per homepage section, fixed on the side. */
.section-rail {
  position: fixed;
  z-index: 40;
  top: 50%;
  right: 18px;
  translate: 0 -50%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.section-rail a {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  text-decoration: none;
}
.section-rail a::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--muted);
  transition: background 160ms, box-shadow 160ms, scale 160ms;
}
.section-rail a[aria-current='true']::before {
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--surface);
  scale: 1.2;
}
.section-rail a:hover::before,
.section-rail a:focus-visible::before {
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.section-rail a[aria-current='true']:hover::before,
.section-rail a[aria-current='true']:focus-visible::before {
  box-shadow: 0 0 0 2px var(--surface);
}
.section-rail span {
  position: absolute;
  right: calc(100% + 6px);
  top: 50%;
  translate: 6px -50%;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: 500 13px/1 var(--text);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms, translate 160ms;
}
.section-rail a:hover span,
.section-rail a:focus-visible span {
  opacity: 1;
  translate: 0 -50%;
}

@media (max-width: 960px) {
  .m-desks {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .m-desks > div {
    grid-template-rows: auto auto auto;
    grid-row: auto;
    gap: 8px;
  }
  .section-rail {
    right: 8px;
  }
}
@media (max-width: 720px) {
  .section-rail {
    display: none;
  }
}

@media (max-width: 640px) {
  .m-wrap {
    padding: 0 20px;
  }
  .m-hero {
    padding-top: 120px;
  }
  .mail li {
    grid-template-columns: 14px minmax(0, 1fr) auto;
    grid-template-areas:
      "dot who time"
      "dot what time";
    row-gap: 2px;
  }
  .mail .dot { grid-area: dot; }
  .mail .who { grid-area: who; }
  .mail .what { grid-area: what; }
  .mail time { grid-area: time; align-self: start; }
  .m-band {
    margin-top: 56px;
    padding: 32px 16px;
  }
  .m-desks {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  .m-solid .m-desks > div > p {
    max-width: 52ch;
  }
  .srow {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .features {
    grid-template-columns: minmax(0, 1fr);
  }
  .shortcuts {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .shortcuts dt {
    margin-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .m-hero .m-display,
  .m-hero .m-lede,
  .m-hero .m-cta {
    animation: none;
  }
  .m-button:hover,
  .m-button:active {
    translate: none;
  }
  .m-questions details::details-content,
  .m-questions details[open]::details-content {
    transition: none;
  }
  .m-questions details[open] p {
    animation: none;
  }
  .section-rail a::before,
  .section-rail span,
  .faq-mark {
    transition: none;
  }
}
