/* Allo 1.1.1 (SIL OFL 1.1, https://allo.joshpuckett.me) */
@font-face {
  font-family: "Allo";
  src: url("fonts/AlloVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --text: #0a0a0a;
  --muted: #6b6b6b;
  --line: #e8e8e8;
  --panel: #f5f5f5;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Allo", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* Header */
.site-header { padding: 28px 0; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}
.wordmark .landing-mark {
  height: 22px;
}

/* Title block */
.title { padding: 56px 0 8px; }
.eyebrow {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}
h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 52px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.lede { margin: 20px 0 0; font-size: 19px; color: var(--muted); }
.lede strong { color: var(--text); font-weight: 500; }

/* Summary panel */
.summary {
  margin: 40px 0 8px;
  padding: 24px 28px;
  background: var(--panel);
  border-radius: 16px;
}
.summary h2 { margin: 0 0 12px; font-size: 15px; letter-spacing: -0.01em; }
.summary ul { margin: 0; padding: 0; list-style: none; }
.summary li { position: relative; padding-left: 22px; margin: 6px 0; }
.summary li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text);
}

/* Sections */
section { padding: 36px 0 4px; }
section + section { border-top: 1px solid var(--line); }
section h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
p { margin: 0 0 18px; }
ul.list { margin: 0 0 18px; padding-left: 20px; }
ul.list li { margin: 6px 0; }

a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* "Tap to copy" tooltip on email links (set up by copy.js) */
a[data-tip] { position: relative; }
a[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
/* The arrow under the tooltip, pointing down at the link */
a[data-tip]::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  transform: translate(-50%, 4px);
  border: 5px solid transparent;
  border-bottom-width: 0;
  border-top-color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
a[data-tip]:hover::after,
a[data-tip]:focus-visible::after,
a[data-tip].is-copied::after,
a[data-tip]:hover::before,
a[data-tip]:focus-visible::before,
a[data-tip].is-copied::before {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (prefers-reduced-motion: reduce) {
  a[data-tip]::after,
  a[data-tip]::before { transition: none; }
}

/* Footer */
.site-footer {
  margin-top: 56px;
  padding: 28px 0 56px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.site-footer a { color: var(--muted); margin-right: 20px; }

/* Home page: large serif typography on pure white */
body.landing-page {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  overflow-x: clip; /* the full-bleed chip strip is 100vw wide */
}

.landing-shell {
  min-height: 100vh;
  min-height: 100svh;
  max-width: 920px;
  margin: 0 auto;
  padding:
    clamp(24px, 3.5vw, 44px)
    clamp(20px, 4vw, 56px)
    calc(clamp(24px, 3.5vw, 40px) + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.landing-header {
  display: flex;
  align-items: center;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.landing-mark {
  height: 30px;
  width: auto;
  display: block;
}

.landing-main {
  margin: auto 0;
  padding: clamp(40px, 6vh, 72px) 0;
}

.landing-copy {
  margin: 0;
  font-size: clamp(34px, 6.4vw, 64px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.015em;
  text-align: left;
  color: var(--text);
  text-wrap: pretty;
}
.landing-lead {
  white-space: nowrap;
}
.landing-tail {
  display: block;
  max-width: 22ch;
  text-wrap: balance;
}

/* Second line: an endless strip of memory chips, set at the headline size.
   home.js duplicates the chips and drives interactive scrolling + physics. */
.memory-strip {
  /* Full bleed: run edge to edge of the window, past the page padding. */
  position: relative;
  display: block;
  width: 100vw;
  margin: 0.22em 0 0.22em calc(50% - 50vw);
  overflow-x: clip;
  overflow-y: visible;
  text-align: left;
  white-space: nowrap;
  --fade: clamp(24px, 6vw, 120px);
}
.memory-strip::before,
.memory-strip::after {
  content: "";
  position: absolute;
  top: -0.25em;
  bottom: -0.25em;
  width: var(--fade);
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease;
}
.memory-strip::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}
.memory-strip::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), transparent);
}
.memory-strip.is-interactive {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.memory-strip.is-interactive .memory-track {
  animation: none;
  will-change: transform;
}
.memory-strip.is-empty .memory-track {
  visibility: hidden;
  pointer-events: none;
}
.memory-strip.is-pulling::before,
.memory-strip.is-pulling::after,
.memory-strip.is-empty::before,
.memory-strip.is-empty::after {
  opacity: 0;
}
@media (hover: hover) and (pointer: fine) {
  .memory-strip.is-interactive { cursor: grab; }
  .memory-strip.is-dragging,
  .memory-strip.is-pulling { cursor: grabbing; }
  .memory-strip.is-empty { cursor: pointer; }
}
.memory-track {
  display: inline-flex;
  width: max-content;
  animation: memory-strip var(--strip-duration, 120s) linear infinite;
}
.memory-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  flex: none;
  margin-right: 0.3em;
  padding: 0.24em 0.75em 0.28em;
  /* home.js clips each chip to a squircle; this is the no-JS fallback. */
  border-radius: 0.5em;
  background: var(--chip-bg, var(--panel));
  color: var(--chip-text, var(--text));
  will-change: transform;
}
.memory-chip.is-grabbed {
  position: relative;
  z-index: 3;
}
.physics-stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  overflow: hidden;
}
.physics-chip {
  position: fixed;
  left: 0;
  top: 0;
  margin: 0;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  transform-origin: center center;
}
@media (hover: hover) and (pointer: fine) {
  .physics-chip { cursor: grab; }
  .physics-chip.is-held { cursor: grabbing; }
}
.memory-emoji {
  font-size: 0.86em;
  line-height: 1;
}
/* Each chip gets a bold colour that matches its emoji. There are 10 chips,
   so 10n+k keeps the colours the same in the duplicated copy. */
.memory-chip:nth-child(10n+1)  { --chip-bg: #ff7eb0; --chip-text: #5c0028; } /* birthday */
.memory-chip:nth-child(10n+2)  { --chip-bg: #7aa6ff; --chip-text: #071f66; } /* new job */
.memory-chip:nth-child(10n+3)  { --chip-bg: #4fd9c0; --chip-text: #033d36; } /* coffee */
.memory-chip:nth-child(10n+4)  { --chip-bg: #ffd23f; --chip-text: #4d3600; } /* partner */
.memory-chip:nth-child(10n+5)  { --chip-bg: #5fd0f2; --chip-text: #033a4d; } /* travel */
.memory-chip:nth-child(10n+6)  { --chip-bg: #5fd982; --chip-text: #053d1a; } /* coriander */
.memory-chip:nth-child(10n+7)  { --chip-bg: #ffa95c; --chip-text: #6b2600; } /* puppy */
.memory-chip:nth-child(10n+8)  { --chip-bg: #ff7d72; --chip-text: #5c0a04; } /* restaurant */
.memory-chip:nth-child(10n+9)  { --chip-bg: #b096ff; --chip-text: #22086b; } /* exams */
.memory-chip:nth-child(10n+10) { --chip-bg: #c2ef5a; --chip-text: #2b3d00; } /* marathon */
@keyframes memory-strip {
  to { transform: translateX(-50%); }
}

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

.landing-cta {
  margin-top: clamp(28px, 3.5vw, 44px);
}

.tf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28em;
  max-width: 100%;
  padding: 0.24em 0.75em 0.28em;
  border-radius: 0.5em;
  background: var(--text);
  color: var(--bg);
  font-size: clamp(34px, 6.4vw, 64px);
  font-weight: 800;
  letter-spacing: -0.015em;
  text-decoration: none;
  line-height: 1.16;
  white-space: nowrap;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.tf-button:hover {
  opacity: 0.86;
}
.tf-button:active {
  transform: scale(0.985);
}
.tf-button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}
/* The Apple logo is the U+F8FF character, which only Apple's system fonts draw.
   copy.js removes it on other platforms, where it would show as an empty box. */
.tf-apple {
  font-family: -apple-system, "SF Pro Display", system-ui, sans-serif;
  font-size: 0.86em;
  line-height: 1;
  transform: translateY(-0.04em);
}
.tf-button[aria-disabled="true"] { opacity: 0.22; cursor: not-allowed; user-select: none; }
.tf-button[aria-disabled="true"]:hover { opacity: 0.22; }
.tf-button[aria-disabled="true"]:active { transform: none; }

.landing-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
.landing-footer-links {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}
.landing-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.landing-footer a:hover,
.landing-footer a:focus-visible {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.landing-footer .author-tag {
  display: inline-flex;
  align-items: center;
  margin: 0 4px;
  padding: 5px 12px 6px;
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.landing-footer a.author-tag:hover,
.landing-footer a.author-tag:focus-visible {
  background: #e6e6e6;
  text-decoration: none;
}
.landing-footer a.author-tag:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  .tf-button,
  .landing-footer a { transition: none; }
  .memory-track { animation: none; }
  .memory-strip { overflow-x: auto; scrollbar-width: none; }
  .memory-strip::-webkit-scrollbar { display: none; }
}

@media (max-width: 640px) {
  .landing-copy,
  .tf-button {
    font-size: clamp(34px, 8.2vw, 48px);
    line-height: 1.16;
    letter-spacing: -0.015em;
  }
  .landing-lead {
    white-space: normal;
  }
  .landing-tail {
    max-width: none;
  }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .title { padding: 32px 0 32px; }
  .summary { padding: 20px; }
}
