/* The landing page's own styles, after styles.css, which has the colors and what every page shares. */

.hero {
  position: relative;
  padding-block: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 4rem);
  text-align: center;
}

/* Above the echoes. */
.hero > .page {
  position: relative;
}

/* Lines of a meeting that type themselves out where the pointer goes. hero.js places them, and fades and blurs the
   ones near the headline and the form so they stay easy to read. */
.echoes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.echo {
  position: absolute;
  max-width: 20rem;
  text-align: left;
  opacity: 0.55;
  animation: echo-in 300ms ease-out;
  transition: opacity 900ms ease-out;
}

.echo.before {
  text-align: right;
}

.echo.gone {
  opacity: 0;
}

.echo .who {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--graphite);
}

.echo.before .who {
  justify-content: flex-end;
}

.echo time {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.echo b {
  font-weight: 700;
  color: var(--ink);
}

.echo b::before {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-right: 0.375rem;
  border-radius: 50%;
  background: var(--dot);
  vertical-align: 0.1em;
}

.echo .said {
  margin-top: 0.125rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink);
}

/* A caret while the words arrive, blinking once they have. */
.echo .said::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 1px;
  background: var(--mark);
  vertical-align: -0.18em;
}

.echo.typed .said::after {
  animation: caret 1s step-end infinite;
}

@keyframes echo-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.hero h1 {
  max-width: 28ch;
  margin-inline: auto;
}

.hero .lede {
  max-width: 38rem;
  margin: 1.5rem auto 2rem;
  font-size: clamp(1.125rem, 2.4vw, 1.3125rem);
  color: var(--graphite);
}

.hero .facts {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--graphite);
}

.hero .window {
  display: block;
  margin-top: clamp(3rem, 7vw, 4.5rem);
}

.hero .window img {
  width: 100%;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.steps li {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  list-style: none;
}

.steps h3::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-right: 0.625rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--canvas);
  font-size: 0.875rem;
  letter-spacing: 0;
  vertical-align: 0.1em;
}

.steps p {
  color: var(--graphite);
}

.steps .frame {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  margin-bottom: 0.75rem;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}

.steps .frame picture {
  display: contents;
}

.steps .frame img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 10px;
}

/* The transcript runs off the frame's right and bottom edges, like a window behind it. */
.steps .frame.wide {
  align-items: flex-start;
  justify-content: flex-start;
  padding: 1.75rem 0 0 1.75rem;
}

.steps .frame.wide img {
  max-width: none;
  max-height: none;
  width: 190%;
  border: 1px solid var(--rule);
  border-radius: 10px 0 0 0;
  background: var(--canvas);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 2.5rem clamp(1.5rem, 4vw, 3rem);
  margin: 0;
  padding: 0;
}

.features li {
  list-style: none;
}

.features h3 {
  margin-bottom: 0.5rem;
}

.features p {
  color: var(--graphite);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.split .intro {
  margin-bottom: 0;
}

.split img {
  width: 100%;
}

.phones {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 3vw, 1.75rem);
}
.split .phones img {
  width: min(47%, 270px);
  /* The screenshots keep the iPhone's rounded corners, 96 by 96 pixels of the 970 by 2109 screen. */
  border-radius: 10.5% / 4.8%;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}
.split.flip {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.split.flip > picture {
  order: -1;
}

/* The second-brain section: dark in both appearances, like a terminal. */
.brain {
  background: #101318;
  color: #e8ebf0;
}

.brain .intro p {
  color: #9aa1ac;
}

.brain .intro code {
  color: #e8ebf0;
}

.terminal {
  margin: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid #2a2f38;
  border-radius: var(--radius);
  background: #15181e;
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.terminal .prompt {
  color: #f04e3f;
}

.terminal .out {
  color: #9aa1ac;
}

/* The hero's four numbers, each with what it counts. */
.numbers {
  padding-block: clamp(1rem, 3vw, 2rem) clamp(3.5rem, 8vw, 6rem);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
  margin-block: 0;
  padding: 0;
}

/* The numbers, the ledger, and the requirements each sit under a heavy rule. */
.stats li,
.ledger div,
.needs li {
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
}

.stats li {
  list-style: none;
  color: var(--graphite);
}

.stats strong {
  display: block;
  margin-bottom: 0.375rem;
  color: var(--ink);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stats .none {
  color: var(--mark);
}

/* A smaller line under a section's main paragraph, for its limits. */
.intro p.fine {
  font-size: 0.9375rem;
}

/* What stays, what leaves, and Meannit's own traffic, side by side. */
.ledger {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
  margin: clamp(3rem, 7vw, 5rem) 0 0;
}

.ledger div:first-child {
  border-color: var(--mark);
}

.ledger dt {
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.ledger dd {
  margin: 0.5rem 0 0;
  color: var(--graphite);
}

/* A meeting bot beside Meannit, a row for each difference. The column heads show on wide screens; on narrow ones each
   answer carries its own label. */
.versus {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.versus dl {
  margin: 0;
}

.versus .heads,
.versus dl > div {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 5fr);
}

.versus .heads span,
.versus dt,
.versus dd {
  margin: 0;
  padding: 1.125rem clamp(1rem, 2.5vw, 1.75rem);
}

.versus .heads {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--graphite);
}

.versus .heads .us {
  color: var(--mark);
}

.versus dl > div {
  border-top: 1px solid var(--rule);
}

.versus dt {
  font-weight: 700;
}

.versus dd {
  color: var(--graphite);
}

.versus .us {
  background: color-mix(in srgb, var(--mark) 7%, var(--canvas));
}

.versus dd.us {
  color: var(--ink);
  font-weight: 600;
}

.versus .who {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The other features, each with its screenshot cropped from the top left. */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  margin: 0;
  padding: 0;
}

.bento li {
  grid-column: span 2;
  list-style: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--canvas);
  overflow: hidden;
  scroll-margin-top: 1.5rem;
}

.bento li.big {
  grid-column: span 3;
}

.bento li.big img {
  width: 115%;
}

.bento picture {
  display: block;
  height: 15rem;
  padding: 1.25rem 0 0 1.25rem;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  overflow: hidden;
}

.bento img {
  width: 165%;
  max-width: none;
  border: 1px solid var(--rule);
  border-width: 1px 0 0 1px;
  border-radius: 8px 0 0 0;
  background: var(--canvas);
}

.bento h3 {
  padding: 1.25rem 1.5rem 0;
}

.bento p {
  padding: 0.5rem 1.5rem 1.5rem;
  color: var(--graphite);
}

.features.more,
.split + .features {
  margin-top: clamp(3rem, 7vw, 5rem);
}

.needs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.needs li {
  list-style: none;
}

.needs strong {
  display: block;
  font-size: 1.1875rem;
  letter-spacing: -0.015em;
}

.needs span {
  color: var(--graphite);
}

.faq {
  max-width: 46rem;
}

.faq .intro {
  margin-bottom: 2rem;
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq details:first-of-type {
  border-top: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
  font-weight: 700;
  font-size: 1.0625rem;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--graphite);
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  padding-bottom: 1.25rem;
  color: var(--graphite);
}

.closing {
  text-align: center;
}

.closing .intro {
  margin-inline: auto;
}

@media (max-width: 52rem) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .ledger {
    grid-template-columns: 1fr;
  }

  .versus .heads {
    display: none;
  }

  .versus dl > div {
    grid-template-columns: 1fr;
  }

  .versus dt {
    padding-bottom: 0;
  }

  .versus .who {
    position: static;
    display: block;
    width: auto;
    height: auto;
    clip-path: none;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--graphite);
  }

  .versus .us .who {
    color: var(--mark);
  }

  .bento li,
  .bento li.big {
    grid-column: span 6;
  }

  .steps,
  .split,
  .split.flip {
    grid-template-columns: 1fr;
  }

  .split.flip > picture {
    order: 0;
  }
}

/* The hero's two actions: Download, and the film. */
.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 1rem;
}

.play {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2.75rem;
  padding: 0 1.125rem 0 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--canvas);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 120ms ease-out;
}

.play:hover {
  border-color: color-mix(in srgb, var(--ink) 28%, transparent);
  color: var(--ink);
}

.play svg {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
}

.play circle {
  fill: var(--ink);
}

.play path {
  fill: var(--canvas);
}

.play .time {
  font-weight: 500;
  color: var(--graphite);
}

/* The film, over a dimmed page. The dialog fills the screen, so a click beside the video closes it. */
dialog.film {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(1rem, 4vw, 3rem);
  border: 0;
  background: transparent;
  place-items: center;
}

dialog.film[open] {
  display: grid;
}

dialog.film::backdrop {
  background: rgb(10 12 16 / 0.9);
  backdrop-filter: blur(6px);
}

dialog.film video {
  display: block;
  width: min(100%, 80rem, calc((100dvh - 6rem) * 16 / 9));
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background: #000;
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.5);
}

dialog.film.vertical video {
  width: min(100%, calc((100dvh - 6rem) * 9 / 16));
  aspect-ratio: 9 / 16;
}

dialog.film .close {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  cursor: pointer;
}

dialog.film .close:hover {
  background: rgb(255 255 255 / 0.2);
}

dialog.film .close svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* On a phone the two actions stack, at one width. */
@media (max-width: 30rem) {
  .cta .button,
  .cta .play {
    min-width: 15.5rem;
    justify-content: center;
  }
}
