@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* Mirrors Colors.light / Colors.dark and Palette in src/constants/theme.ts. */
:root {
  color-scheme: light dark;
  --text: #000000;
  --background: #faf4f4;
  --surface: #f3e8e8;
  --rule: #ebdcdc;
  --text-secondary: #60646c;
  --accent: #ff5c82;
  --pink-deep: #e8476c;
  --heart: #f25075;
  --heart-faded: #fda0b7;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #ffffff;
    --background: #2a1a1e;
    --surface: #3a2428;
    --rule: #4a3035;
    --text-secondary: #b0b4ba;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 16px/1.6 var(--mono);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--pink-deep);
  font-weight: 500;
  letter-spacing: 1.2px;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent);
}

main {
  flex: 1;
  padding-bottom: 48px;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 0 56px;
  text-align: center;
}

.wordmark {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin: 32px 0 8px;
  color: var(--pink-deep);
  font-size: clamp(36px, 11vw, 56px);
  font-weight: 400;
  letter-spacing: 2.2px;
  line-height: 1.1;
}

.wordmark-heart {
  width: 0.66em;
  height: auto;
  margin: 0 0.04em;
  fill: var(--heart);
  /* Puts the heart's point on the baseline, as on the app's start screen. */
  transform: translateY(-0.02em);
}

.wordmark-heart rect:not(.held) {
  animation: heart-layers 2.5s infinite;
  animation-delay: calc(var(--ring) * 90ms);
}

/*
 * Holds lit for about 1.5s, then clears and rebuilds from the centre. The
 * fade (~0.32s), pause (~0.22s) and rebuild (~0.4s) are the original speeds;
 * only the hold is shorter.
 */
@keyframes heart-layers {
  0%, 62% { opacity: 1; }
  75%, 84% { opacity: 0; }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark-heart rect:not(.held) {
    animation: none;
  }
}

.tagline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 22px;
}

.lede {
  max-width: 460px;
  margin: 32px 0 0;
  color: var(--text-secondary);
}

.badge {
  display: inline-block;
  margin-top: 32px;
  padding: 10px 20px;
  border: 1.5px solid var(--pink-deep);
  border-radius: 999px;
  color: var(--pink-deep);
  font-size: 14px;
  font-weight: 500;
}


.prose {
  max-width: 680px;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
}

.prose h1 {
  margin: 24px 0 4px;
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
}

.prose h2 {
  margin: 32px 0 8px;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
}

.prose .meta {
  margin: 0 0 24px;
  color: var(--text-secondary);
  font-family: var(--mono);
  font-size: 14px;
}

.prose ul {
  padding-left: 20px;
}

.home {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 48px;
  padding: 56px 0 24px;
}

@media (min-width: 820px) {
  .home {
    grid-template-columns: 1fr 1fr;
    padding-top: 96px;
  }
}

.home-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home-intro .wordmark {
  margin-top: 0;
}

.demo {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-self: center;
  width: 100%;
  max-width: 360px;
  padding: 24px;
  border-radius: 24px;
  background: var(--surface);
}

.demo-heart svg {
  display: block;
  width: 152px;
  height: auto;
  margin: 4px auto 0;
}

.demo-heart rect {
  fill: var(--heart-faded);
  opacity: 0.35;
  transition: fill 200ms ease, opacity 200ms ease;
}

.demo-heart rect.on {
  fill: var(--heart);
  opacity: 1;
}

.demo-sides {
  display: flex;
  justify-content: space-between;
  width: 152px;
  margin: 6px auto 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.demo-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.bubble.them {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  background: var(--background);
}

.bubble.me {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: var(--pink-deep);
  color: #ffffff;
}

.demo-compose {
  display: flex;
  gap: 8px;
}

.demo-compose input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1.5px solid var(--rule);
  border-radius: 999px;
  background: var(--background);
  color: var(--text);
  /* Below 16px, iOS Safari zooms the whole page in when the field is focused. */
  font: 16px var(--mono);
}

.demo-compose input:focus {
  border-color: var(--accent);
  outline: none;
}

.demo-compose button {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--pink-deep);
  color: #ffffff;
  cursor: pointer;
}

.demo-compose button:active {
  transform: scale(0.94);
}

.demo-hint {
  margin: -4px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
}

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

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--rule);
  color: var(--text-secondary);
  font-size: 13px;
}

.footer nav {
  display: flex;
  gap: 16px;
}

.footer a {
  color: var(--text-secondary);
}
