/* meannit.com. Colors are the brand's (design/brand/README.md); the app's canvas and sidebar values come from
   mac/Sources/Meannit/Theme.swift. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/fonts/plus-jakarta-sans.woff") format("woff");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --canvas: #ffffff;
  --paper: #f4f6f9;
  --ink: #1d2430;
  --graphite: #5e6673;
  --rule: #e2e6ec;
  --cinnabar: #d2302a;
  --mark: #d2302a;
  --field: #ffffff;
  --shadow: 0 1px 2px rgb(29 36 48 / 0.06), 0 24px 64px -12px rgb(29 36 48 / 0.22);
  /* The app's speaker colors: slate for the user, then five more. */
  --speaker-me: #56627a;
  --speaker-1: #3e6db5;
  --speaker-2: #2a8a82;
  --speaker-3: #b8862b;
  --speaker-4: #8c4f88;
  --speaker-5: #6c7d33;
  --radius: 12px;
  --page: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #15181e;
    --paper: #1a1e25;
    --ink: #e8ebf0;
    --graphite: #9aa1ac;
    --rule: #2a2f38;
    --mark: #f04e3f;
    --field: #15181e;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 24px 64px -12px rgb(0 0 0 / 0.6);
    --speaker-me: #95a3bf;
    --speaker-1: #8aaee6;
    --speaker-2: #6cc3ba;
    --speaker-3: #e2b566;
    --speaker-4: #c892c3;
    --speaker-5: #afc172;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "Plus Jakarta Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
}

h2 {
  font-size: clamp(1.875rem, 4.5vw, 2.75rem);
}

h3 {
  font-size: 1.1875rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--mark);
}

:focus-visible {
  outline: 2px solid var(--cinnabar);
  outline-offset: 2px;
}

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

kbd {
  font: inherit;
}

code,
pre {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

p code {
  font-size: 0.9em;
}

.page {
  width: min(100% - 2 * var(--gutter), var(--page));
  margin-inline: auto;
}

.quiet {
  color: var(--graphite);
}

/* Header and footer */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}

.lockup {
  display: block;
  height: 24px;
  width: auto;
}

.top nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  font-size: 0.9375rem;
  font-weight: 600;
}

.top nav a:not(.button) {
  text-decoration: none;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 3rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--graphite);
}

.foot .lockup {
  height: 18px;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 10px;
  background: var(--cinnabar);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: filter 120ms ease-out;
}

.button:hover {
  color: #fff;
  filter: brightness(1.08);
}

.button.small {
  min-height: 2.25rem;
  padding-inline: 0.875rem;
  font-size: 0.875rem;
}

/* Sections */

section {
  padding-block: clamp(4rem, 10vw, 7.5rem);
}

.tinted {
  background: var(--paper);
}

.intro {
  max-width: 40rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.intro p {
  margin-top: 1rem;
  font-size: 1.1875rem;
  color: var(--graphite);
}

.shot {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--canvas);
}

.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: 22ch;
  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%;
}

/* 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;
}

.ledger {
  display: grid;
  gap: 0;
  margin: 2rem 0 0;
  border-top: 1px solid var(--rule);
}

.ledger div {
  padding-block: 1.125rem;
  border-bottom: 1px solid var(--rule);
}

.ledger dt {
  font-weight: 700;
}

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

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

.needs li {
  list-style: none;
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
}

.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;
}

/* Text pages: privacy, the brand kit, 404 */

.prose {
  max-width: 42rem;
  padding-block: clamp(3rem, 8vw, 5rem);
}

.prose.wide {
  max-width: 60rem;
}

.prose h1 {
  font-size: clamp(2.25rem, 6vw, 3.25rem);
}

.prose h2 {
  margin-top: 3rem;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.prose p,
.prose ul {
  margin-top: 1rem;
}

.prose li + li {
  margin-top: 0.375rem;
}

.prose .dated {
  margin-top: 0.75rem;
  color: var(--graphite);
}

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

.kit li {
  list-style: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.prose .kit li + li {
  margin-top: 0;
}

.kit .swatch {
  display: grid;
  place-items: center;
  height: 8rem;
  padding: 1.5rem;
  background: #f4f6f9;
}

.kit .swatch.dark {
  background: #15181e;
}

/* The swatch's height less its padding. */
.kit .swatch img {
  width: 100%;
  height: 5rem;
  object-fit: contain;
}

.kit .label {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
}

.colors .chip {
  height: 5rem;
}

.colors .label {
  flex-direction: column;
  gap: 0.125rem;
}

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

  .top nav .wide-only {
    display: none;
  }
}
