/* Drawing with Love: brand tokens mirror apps/mobile/src/theme.ts (rose leads, plum grounds).
   Radius system: controls 12px, tiles 22px, devices and color blocks 36px. No pill buttons. */
:root {
  --bg: #ffffff;
  --band: #fdf1f5;
  --surface: #ffffff;
  --ink: #3a2e39;
  --muted: #6e5d6b;
  --rose: #e8638c;
  --rose-deep: #b3325f;
  --rose-soft: #fbe9ef;
  --line: #f0dde4;
  --plum: #3a2e39;
  --on-plum: #fff5f8;
  --on-plum-muted: #e3cfda;
  --device: #2b2129;
  --screen: #ffffff;
  --chip: #ffffff;
  --block: #b3325f;
  --on-block: #ffffff;
  --focus: #6c5ce7;
  --r-control: 12px;
  --r-tile: 22px;
  --r-device: 36px;
  --shadow: 0 24px 60px -30px rgba(122, 38, 72, 0.35);
  --shadow-soft: 0 12px 30px -18px rgba(122, 38, 72, 0.3);
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1419;
    --band: #231920;
    --surface: #2a1f27;
    --ink: #f7eef2;
    --muted: #cdb9c5;
    --rose: #f07ea0;
    --rose-deep: #ff9fbd;
    --rose-soft: #3f2432;
    --line: #3a2b35;
    --plum: #0f0b0e;
    --on-plum: #fff5f8;
    --on-plum-muted: #d8c2cf;
    --device: #0c090b;
    --screen: #fbf7f9;
    --chip: #ffffff;
    --block: #9c2a52;
    --on-block: #ffffff;
    --focus: #b3a8ff;
    --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.85);
    --shadow-soft: 0 12px 30px -18px rgba(0, 0, 0, 0.8);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--rose-deep);
  text-underline-offset: 0.18em;
}

a:focus-visible,
summary:focus-visible,
.table-scroll:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 5.2vw, 4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
}

h3 {
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

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

.wrap {
  width: min(1180px, 100% - 2.5rem);
  margin-inline: auto;
}

.narrow {
  width: min(760px, 100% - 2.5rem);
}

.center {
  text-align: center;
}

.lead {
  font-size: clamp(1.12rem, 1.7vw, 1.32rem);
  color: var(--muted);
  max-width: 34rem;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-control);
}

.skip:focus {
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  padding-top: env(safe-area-inset-top, 0px);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-height: 66px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.brand img {
  border-radius: 10px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  display: inline-block;
  padding: 0.55rem 0;
  transition: color 0.2s var(--ease);
}

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

.header-row nav {
  margin-left: auto;
}

.lang {
  color: var(--rose-deep);
  font-weight: 750;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.55rem 0;
}

.lang:hover {
  text-decoration: underline;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(60% 70% at 85% 30%, color-mix(in srgb, var(--rose) 16%, transparent), transparent 70%),
    radial-gradient(40% 50% at 10% 90%, color-mix(in srgb, var(--rose) 8%, transparent), transparent 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero h1 {
  max-width: 15ch;
}

.eyebrow {
  color: var(--rose-deep);
  font-weight: 750;
  margin-bottom: 1rem;
}

.cta {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
  margin-top: 2rem;
}

.badge {
  display: inline-block;
  line-height: 0;
  padding: 12px;
  margin: -12px;
  transition: transform 0.25s var(--ease);
}

.badge:hover {
  transform: translateY(-2px);
}

.badge:active {
  transform: translateY(1px);
}

.badge img {
  height: 54px;
  width: auto;
}

.soon {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.25rem 1.05rem 1.35rem;
  border-radius: var(--r-control);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--rose);
  box-shadow: var(--shadow-soft);
  max-width: 30rem;
}

.soon strong {
  font-size: 1.08rem;
}

.soon span {
  color: var(--muted);
}

.price-note {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 1.4rem 0 0;
  max-width: 32rem;
}

/* Demo: two phones, one stroke */
.demo {
  margin: 0;
}

.demo svg {
  display: block;
  width: 100%;
  overflow: visible;
  filter: drop-shadow(0 30px 34px rgba(90, 30, 60, 0.2));
}

.demo figcaption {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.4rem;
}

/* WCAG 2.2.2: the looping demo can be stopped without script. Stopped, it shows the finished heart. */
.demo-pause {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding-inline: 0.6rem;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
}

.demo-pause input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--rose-deep);
}

.demo-pause input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.demo:has(.demo-pause input:checked) .ink {
  animation: none;
  stroke-dashoffset: 0;
  opacity: 1;
}

.demo:has(.demo-pause input:checked) .pulse,
.demo:has(.demo-pause input:checked) .cursor {
  display: none;
}

.phone {
  fill: var(--device);
}

.screen {
  fill: var(--screen);
}

.island {
  fill: var(--device);
}

.chip {
  fill: var(--chip);
  stroke: #f0dde4;
  stroke-width: 1;
}

.chip-dot {
  fill: #2ec4b6;
}

.chip-text {
  fill: #3a2e39;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
}

.ink {
  fill: none;
  stroke: #e8638c;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 6s ease-in-out infinite;
}

.ink-remote {
  animation-name: draw-remote;
}

.cursor {
  fill: #3a2e39;
  stroke: #ffe1ea;
  stroke-width: 4;
  animation: cursor 6s linear infinite;
}

.tray circle {
  opacity: 0.9;
}

.swatch-rose {
  fill: #e8638c;
  background: #e8638c;
}

.swatch-orange {
  fill: #f2a65a;
  background: #f2a65a;
}

.swatch-violet {
  fill: #6c5ce7;
  background: #6c5ce7;
}

.swatch-teal {
  fill: #2ec4b6;
  background: #2ec4b6;
}

.swatch-plum {
  fill: #3a2e39;
  background: #3a2e39;
}

.swatch-sand {
  fill: #c9ada7;
  background: #c9ada7;
}

.wire {
  fill: none;
  stroke: var(--rose);
  stroke-opacity: 0.45;
  stroke-width: 3;
  stroke-dasharray: 2 9;
  stroke-linecap: round;
}

.pulse {
  fill: var(--rose);
}

@keyframes draw {
  0% { stroke-dashoffset: 1; opacity: 1; }
  40% { stroke-dashoffset: 0; opacity: 1; }
  85% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes draw-remote {
  0% { stroke-dashoffset: 1; opacity: 0.75; }
  4% { stroke-dashoffset: 1; opacity: 0.75; }
  44% { stroke-dashoffset: 0; opacity: 0.75; }
  48% { stroke-dashoffset: 0; opacity: 1; }
  85% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

/* The partner sees your cursor only while you draw. */
@keyframes cursor {
  0%, 3% { opacity: 0; }
  5%, 44% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Sections */
.premise,
.how,
.features,
.deal,
.honest,
.faq-section {
  padding-block: clamp(4rem, 9vw, 7.5rem);
}

/* Premise: a statement and the scenes as a message thread */
.premise {
  background: var(--band);
}

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

.premise h2 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}

.premise-copy p {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 36rem;
}

.bubbles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.bubbles li {
  max-width: 88%;
  padding: 0.95rem 1.2rem;
  border-radius: var(--r-tile) var(--r-tile) var(--r-tile) 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  font-weight: 650;
  font-size: 1.08rem;
}

.bubbles li:nth-child(2) {
  justify-self: end;
  border-radius: var(--r-tile) var(--r-tile) 6px var(--r-tile);
  background: var(--block);
  border-color: transparent;
  color: var(--on-block);
}

/* How it works: a drawn timeline beside the real invite screen */
.how-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

.timeline {
  list-style: none;
  margin: 2.4rem 0 0;
  padding: 0;
  position: relative;
  display: grid;
  gap: 2.2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 12px;
  bottom: 12px;
  border-left: 3px dashed color-mix(in srgb, var(--rose) 55%, transparent);
}

.timeline li {
  position: relative;
  padding-left: 3.2rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--bg);
  border: 4px solid var(--rose);
}

.timeline li:last-child::before {
  background: var(--rose);
}

.timeline h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  margin-bottom: 0.3rem;
}

.timeline p {
  color: var(--muted);
  margin: 0;
  max-width: 34rem;
}

.device {
  display: block;
  width: 100%;
  border-radius: var(--r-device);
  border: 9px solid var(--device);
  background: var(--screen);
  box-shadow: var(--shadow);
}

.how-shot {
  justify-self: center;
  width: min(100%, 320px);
  transform: rotate(2.5deg);
}

/* Features: bento with the real screens */
.features {
  background: var(--band);
}

.bento {
  list-style: none;
  margin: 2.4rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 1.1rem;
}

.tile {
  border-radius: var(--r-tile);
  padding: clamp(1.4rem, 2.4vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}

.tile p {
  color: var(--muted);
  margin: 0;
}

.tile h3 {
  font-size: 1.35rem;
}

.tile-live {
  grid-row: span 2;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 1.6rem;
  padding-bottom: 0;
}

.tile-live .crop {
  align-self: end;
  width: min(100%, 300px);
  margin-inline: auto;
  aspect-ratio: 330 / 430;
  overflow: hidden;
}

.tile-live .device {
  border-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.tile-saved {
  background: var(--rose-soft);
  border-color: transparent;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 15rem;
}

.tile-tools {
  background: var(--plum);
  border-color: transparent;
  color: var(--on-plum);
  display: flex;
  flex-direction: column;
}

.tile-tools p {
  color: var(--on-plum-muted);
}

.palette {
  list-style: none;
  margin: auto 0 0;
  padding: 1.4rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.palette li {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  /* The ring keeps the plum swatch visible on the plum tile (at least 3:1 against it). */
  box-shadow: 0 0 0 2px var(--on-plum-muted);
}

.tile-dates {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 1.5rem;
  align-items: start;
  padding-bottom: 0;
}

.tile-dates .crop {
  align-self: end;
  aspect-ratio: 330 / 300;
  overflow: hidden;
  margin-top: 0.4rem;
}

.tile-dates .device {
  border-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* The deal: big promises, plain terms */
.deal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.promises {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.promises li {
  color: var(--rose-deep);
}

.terms {
  margin: 0;
  display: grid;
}

.terms div {
  padding-block: 1.3rem;
  border-bottom: 1px solid var(--line);
}

.terms div:first-child {
  padding-top: 0.3rem;
}

.terms dt {
  font-weight: 750;
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.terms dd {
  margin: 0;
  color: var(--muted);
}

/* Privacy, straight */
.honest {
  background: var(--band);
}

.checks {
  list-style: none;
  padding: 0;
  margin: 2rem 0 1.8rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 3rem;
}

.checks li {
  position: relative;
  padding-left: 2.3rem;
  max-width: 36rem;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 7px;
  background: var(--rose-soft);
}

.checks li::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 0.32rem;
  width: 0.42rem;
  height: 0.75rem;
  border: solid var(--rose-deep);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.text-link {
  font-weight: 750;
}

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.faq-head {
  position: sticky;
  top: 100px;
}

.faq {
  display: grid;
  gap: 0.7rem;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.faq details:hover,
.faq details[open] {
  border-color: color-mix(in srgb, var(--rose) 45%, var(--line));
}

.faq details[open] {
  box-shadow: var(--shadow-soft);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.05rem 3.2rem 1.05rem 1.25rem;
  font-weight: 700;
  position: relative;
}

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

.faq summary::after {
  content: "+";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rose-deep);
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.25s var(--ease);
}

.faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq details p {
  padding: 0 1.25rem 1.15rem;
  margin: 0;
  color: var(--muted);
}

/* Final call: the one color block */
.final {
  padding-block: clamp(1rem, 3vw, 2rem) clamp(3rem, 6vw, 5rem);
}

.final-inner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--r-device);
  background: var(--block);
  color: var(--on-block);
  padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 6vw, 5rem);
  display: grid;
  justify-items: start;
}

.final h2 {
  font-size: clamp(2.2rem, 5.4vw, 4rem);
  max-width: 14ch;
}

.final .lead {
  color: color-mix(in srgb, var(--on-block) 88%, transparent);
  margin: 0;
}

.final .soon {
  border-left-color: var(--rose);
  color: var(--ink);
  box-shadow: none;
}

.final-mark {
  position: absolute;
  z-index: -1;
  right: -2%;
  bottom: -18%;
  width: min(46%, 440px);
  fill: none;
  stroke: #ffffff;
  stroke-opacity: 0.16;
  stroke-width: 12;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Legal pages */
.legal {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.legal h1 {
  font-size: clamp(2rem, 4.4vw, 3rem);
}

.legal h2 {
  font-size: 1.4rem;
  margin-top: 2.2rem;
}

.legal ul {
  padding-left: 1.2rem;
}

.legal li {
  margin-bottom: 0.5rem;
}

.legal .lead {
  max-width: none;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  margin-top: 1rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 720px;
  font-size: 0.93rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

thead th {
  background: var(--band);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem calc(2rem + env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-weight: 800;
}

.footer-brand img {
  border-radius: 8px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.2rem;
}

.footer-links a {
  display: inline-block;
  padding: 0.35rem 0;
}

.fine {
  font-size: 0.8rem;
  margin-top: 1.5rem;
}

/* Invite page (/j/<code>) */
.invite h1 {
  font-size: clamp(1.9rem, 4.6vw, 2.8rem);
}

.invite .lead {
  margin-inline: auto;
}

.open-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.6rem;
  border-radius: var(--r-control);
  background: #b3325f;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
  margin-block: 0.8rem 1.4rem;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.open-app:hover {
  background: #9c2a52;
}

.open-app:active {
  transform: translateY(1px);
}

.invite-code {
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
  margin-block: 0.4rem 1rem;
}

.invite .cta,
.center .cta {
  justify-items: center;
  margin-top: 1.6rem;
}

/* Layout collapse */
@media (max-width: 960px) {
  .hero-grid,
  .premise-grid,
  .how-grid,
  .deal-grid,
  .faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero h1 {
    max-width: 14ch;
  }

  .demo {
    max-width: 560px;
    margin-inline: auto;
  }

  .how-shot {
    width: min(100%, 280px);
  }

  .faq-head {
    position: static;
  }

  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tile-live {
    grid-row: auto;
    grid-column: span 2;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    grid-template-rows: auto;
    align-items: end;
  }

  .tile-live .tile-text {
    align-self: start;
  }
}

@media (max-width: 640px) {
  /* Brand and language on one row, the nav below it (wrapping on the narrowest screens); a
     multi-row header does not stay pinned. */
  .site-header {
    position: static;
  }

  .header-row nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .lang {
    margin-left: auto;
  }

  .nav {
    font-size: 0.9rem;
    gap: 0 1.1rem;
  }

  .bento {
    grid-template-columns: minmax(0, 1fr);
  }

  .tile-live,
  .tile-dates {
    grid-column: auto;
    grid-template-columns: minmax(0, 1fr);
  }

  .tile-live .crop,
  .tile-dates .crop {
    width: min(100%, 280px);
    margin-inline: auto;
  }

  .tile-saved {
    min-height: 12rem;
  }

  .checks {
    grid-template-columns: minmax(0, 1fr);
  }

  .bubbles li {
    max-width: 94%;
  }

  .final-mark {
    width: 70%;
    bottom: -10%;
    right: -18%;
  }
}

/* Motion: entrance and scroll reveals only when the reader has not asked for less. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    animation: rise 0.8s var(--ease) both;
  }

  .hero-copy > :nth-child(2) {
    animation-delay: 0.08s;
  }

  .hero-copy > :nth-child(3) {
    animation-delay: 0.16s;
  }

  .hero-copy > :nth-child(4) {
    animation-delay: 0.24s;
  }

  .demo {
    animation: rise 1s var(--ease) 0.15s both;
  }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 45%;
    }
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .ink,
  .ink-remote {
    animation: none;
    stroke-dashoffset: 0;
    opacity: 1;
  }

  .pulse,
  .cursor {
    display: none;
  }
}

/* The narrowest phones: keep the brand and the language switch on one row. */
@media (max-width: 360px) {
  .brand {
    font-size: 0.98rem;
    gap: 0.45rem;
  }

  .brand img {
    width: 30px;
    height: 30px;
  }

  .lang {
    font-size: 0.9rem;
  }
}
