/* YouShouldMeet website. Black words on white (white on black in dark mode), one typeface, nothing else.
   Sizes follow the viewport so the finished page fits one screen from 1280×720 up; phones scroll. */

:root {
  --bg: #ffffff;
  --fg: #000000;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --text: clamp(12px, min(0.95vw, 1.7vh), 14px);
  --gutter: clamp(16px, 4vw, 64px);
  --col-gap: clamp(24px, 3.4vw, 60px);
  --pill-h: clamp(32px, min(2.5vw, 4.8vh), 40px);
  /* "YouShouldMeet" follows the pill: the cap height of its "H" (0.705em in SF Pro, held for other fonts by font-size-adjust)
     is --hub-scale of the pill height, and the "H" is centred on the pill. */
  --cap-height: 0.705;
  --hub-scale: 0.8;
  --hub: calc(var(--pill-h) * var(--hub-scale) / var(--cap-height));
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --fg: #ffffff;
  }
}

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

html {
  background: var(--bg);
  color: var(--fg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* The block (headline row + columns) sits in the middle of the screen; when it is taller than the screen it starts at
   the top and the page scrolls (margin: auto centres only while there is room). It is as wide as the columns (or the
   screen, if they need more), and the headline row starts at its left edge, in line with the first column. The
   columns set that width from the start, so "YouShouldMeet" starts where it ends up, at the left; only its height changes. */
.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 6vh, 72px) var(--gutter);
}
.block {
  margin: auto;
  width: fit-content;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(28px, 6.5vh, 72px);
}

/* Headline row: "YouShouldMeet" at the left, then the pill to its right; the "H" is centred vertically on the pill. The row is
   as tall as the pill from the start, so when the pill appears neither "YouShouldMeet" nor the columns move. */
.row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: var(--pill-h);
  gap: clamp(16px, calc(var(--hub) * 0.26), 34px);
  max-width: 100%;
}
.word {
  margin: 0;
  font-size: var(--hub);
  font-size-adjust: cap-height 0.705;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  /* At line-height 1 the cap top is about 0.175em below the box top and the baseline 0.12em above its bottom. These
     margins trim the box to the cap height, so centring the box centres the "H" itself. "YouShouldMeet" has no descenders,
     so nothing is clipped. */
  margin: -0.175em 0 -0.12em;
  white-space: nowrap;
}

/* The pill: "Try it out" → email field with a send arrow → "Check your inbox". Same box throughout; its width animates. */
.cta {
  position: relative;
  flex: none;
  height: var(--pill-h);
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  overflow: hidden;
  transition: width 0.46s var(--ease), background-color 0.4s ease, color 0.4s ease;
}
.cta:has(.try:focus-visible),
.cta:has(.send:focus-visible) {
  overflow: visible;
}
.try {
  display: flex;
  align-items: center;
  gap: 0.3em;
  height: 100%;
  padding: 0 calc(var(--pill-h) * 0.4) 0 calc(var(--pill-h) * 0.48);
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: 500 max(14px, var(--text)) / 1 var(--font);
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.try[hidden] {
  display: none;
}
/* The arrow after "Try it out"; it nudges right on hover. */
.try .arrow {
  flex: none;
  width: 1.05em;
  height: 1.05em;
  transition: transform 0.2s var(--ease);
}
.try:hover .arrow {
  transform: translateX(2px);
}
.cta:has(.try:hover) {
  background: color-mix(in srgb, var(--fg) 80%, var(--bg));
}
.try:active {
  transform: scale(0.97);
}
.try:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 4px;
}

.ask {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 4px 0 calc(var(--pill-h) * 0.48);
  gap: 8px;
}
.ask[hidden] {
  display: none;
}
.field {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  caret-color: currentColor;
  font: 300 max(16px, var(--text)) / 1 var(--font);
  letter-spacing: -0.01em;
  outline: none;
}
.field::placeholder {
  color: inherit;
  opacity: 0.55;
}
/* Phones: the email text is drawn at 14px. iOS zooms into a focused field whose text is under 16px, so the field
   keeps 16px and is scaled to 0.875; its layout box is 1/0.875 times as wide (the negative margin), so the drawn field
   still ends at the send button. 100% - pill height is the room the field gets next to the button. */
@media (max-width: 699px) {
  .field {
    transform: scale(0.875);
    transform-origin: left center;
    margin-right: calc((100% - var(--pill-h)) * (1 - 1 / 0.875));
  }
}
.send {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(var(--pill-h) - 8px);
  height: calc(var(--pill-h) - 8px);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.2s ease;
}
.send svg {
  width: 62%;
  height: 62%;
}
.send:active {
  transform: scale(0.92);
}
.send:focus-visible {
  outline: 2px solid var(--bg);
  outline-offset: 2px;
}
.ask[aria-busy="true"] .send {
  opacity: 0.45;
  cursor: progress;
}
.ask.is-entering > * {
  animation: fade-in 0.32s 0.12s ease both;
}

/* "Check your inbox" stands on the baseline of "YouShouldMeet". The "H" is --hub-scale of the pill tall and centred on it, so
   its baseline is (1 - --hub-scale) / 2 pill heights above the pill's bottom; the text sits on that line, its box
   trimmed to end at its own baseline. */
.done {
  margin: 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 0 2px calc(var(--pill-h) * (1 - var(--hub-scale)) / 2);
  font: 500 max(14px, var(--text)) / 1 var(--font);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.done[hidden] {
  display: none;
}
.done-text {
  text-box: trim-both cap alphabetic;
}
/* Browsers without text-box: at line-height 1 the baseline is about 0.12em above the box's bottom (as for "YouShouldMeet"). */
@supports not (text-box: trim-both cap alphabetic) {
  .done-text {
    margin-bottom: -0.12em;
  }
}
.cta.is-done {
  overflow: visible; /* the text's descenders ("y") may reach below the pill's edge */
  background: transparent;
  color: var(--fg);
}

/* One quiet line under the row for errors; absolutely placed so the layout never jumps. */
.note {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  margin: 0;
  text-align: left;
  font-size: max(14px, calc(var(--text) * 0.85));
  line-height: 1.3;
}
.note:empty {
  display: none;
}

/* Columns of words: always all four side by side, at every width. Short-word columns are as wide as their longest
   word; sentence columns share the rest. */
.cols {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: var(--col-gap);
  width: 100%;
  font-size: var(--text);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
/* Before the intro shows them, the columns are laid out but take no height (and the block has no gap), so they already
   set the block's width while "YouShouldMeet" sits alone in the middle of the screen. Their own display rule (flex, or grid on
   phones) beats the browser's [hidden] rule. */
.cols[hidden] {
  height: 0;
  overflow: hidden;
  visibility: hidden;
}
.block:has(> .cols[hidden]) {
  gap: 0;
}
/* site.js groups the short-word columns in a .stack; it adds no box, so its columns are ordinary flex items. */
.stack {
  display: contents;
}
.col {
  min-width: 0;
}
.col.words {
  flex: none;
}
/* Each sentence column starts as wide as its longest line and gives up width, in proportion, only when the row is
   too wide for the screen; so the columns differ in width the way their text does. */
.col.lines {
  flex: 0 1 auto;
}
.col h2 {
  margin: 0 0 0.75em;
  font-size: 1em;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.col li {
  margin: 0 0 0.5em;
  text-wrap: pretty;
}
.col li:last-child {
  margin-bottom: 0;
}

/* Fill-in: a slight rise and fade, one item at a time (site.js adds .on). */
.js .col h2,
.js .col li {
  opacity: 0;
  transform: translateY(0.4em);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.js .col h2.on,
.js .col li.on {
  opacity: 1;
  transform: none;
}

/* Phones: "YouShouldMeet" at the top and the columns in a 2×2 grid below it, filled column by column: the word lists on the
   left (Connect, then Features), the two sentence columns on the right. The word column is only as wide as its
   longest word, so the sentences get the rest of the width and mostly fit on one line. Smaller text and a wider side
   margin. The intro is the same as on desktop: "YouShouldMeet" waits at the left, halfway down, and once the columns are shown
   the block moves to the top, so site.js's glide carries "YouShouldMeet" straight up to there. The page scrolls. */
@media (max-width: 699px) {
  :root {
    --pill-h: clamp(22px, 6.4vw, 28px);
    --text: clamp(11px, 3vw, 12px);
    --gutter: clamp(20px, 6vw, 36px);
    --col-gap: clamp(20px, 6vw, 32px);
  }
  .block:has(> .cols:not([hidden])) {
    margin: 0 auto auto;
  }
  .cols {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    grid-template-rows: auto auto;
    grid-auto-flow: column;
    gap: 2.4em var(--col-gap);
  }
  .col {
    overflow-wrap: break-word;
  }
}

/* Text pages (privacy.html, terms.html, support.html): one readable column, same type and colours as the home page. */
.legal {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(32px, 8vh, 96px) var(--gutter) clamp(64px, 12vh, 128px);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.005em;
}
.legal-home {
  color: inherit;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.legal h1 {
  margin: 1.1em 0 0.2em;
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.legal-date {
  margin: 0 0 2.4em;
  opacity: 0.55;
}
.legal h2 {
  margin: 2.2em 0 0.5em;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.legal p,
.legal ul {
  margin: 0 0 1em;
}
.legal ul {
  padding-left: 1.2em;
}
.legal li {
  margin: 0 0 0.4em;
}
.legal a {
  color: inherit;
  text-underline-offset: 0.2em;
}
.legal h3 {
  margin: 1.6em 0 0.3em;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.legal ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 1.4em;
  margin-top: 3.2em;
  padding-top: 1.2em;
  border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  font-size: 14px;
}
.legal-nav a {
  text-decoration: none;
  opacity: 0.6;
}
.legal-nav a:hover,
.legal-nav a:focus-visible {
  opacity: 1;
}

/* Home page footer: three quiet links pinned to the bottom of the page, inside the stage's bottom padding, so the
   one-screen layout and the intro do not move. */
body {
  position: relative;
}
.foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 1.4em;
  padding: 0 var(--gutter) clamp(8px, 2vh, 20px);
  font-size: var(--text);
}
.foot a {
  color: inherit;
  text-decoration: none;
  opacity: 0.5;
}
.foot a:hover,
.foot a:focus-visible {
  opacity: 1;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta,
  .try,
  .try .arrow,
  .send,
  .js .col h2,
  .js .col li {
    transition: none;
  }
  .ask.is-entering > * {
    animation: none;
  }
}
