/* Foyer launch site. Tokens and rules from docs/site/BRIEF.md. */

:root {
  --surface: #f6f2ec;
  --surface-raised: #fffdf9;
  --surface-sunken: #ede7de;
  --paper: #fbf7ee;
  --ink: #24211d;
  --ink-muted: #6b645a;
  --pencil: #5a6b85;
  --line: #ddd5c9;
  --accent: #2e4a3f;
  --accent-hover: #233a31;
  --accent-text: #fbf8f2;
  --accent-soft: #e5ece7;
  --focus: #b0773a;
  --strike: #9a3324;
  --status-new: #2c5a7a;
  --status-new-bg: #e2edf4;
  --status-called: #6a5320;
  --status-called-bg: #f4ead2;
  --status-appt: #2e5d3c;
  --status-appt-bg: #e0eedf;
  --status-ni: #5f5a53;
  --status-ni-bg: #ebe7e1;
  --overdue: #9a3324;
  --overdue-bg: #f8e1dc;
  --due-today: #8a5a0c;
  --due-today-bg: #fbeacb;

  --bezel: rgb(36 33 29 / 0.92);
  --clip: #8d8780;
  --clip-dark: #6f6a63;
  --shadow: 0 1px 2px rgb(52 40 26 / 0.08), 0 10px 28px rgb(52 40 26 / 0.08);
  --shadow-lift: 0 1px 2px rgb(52 40 26 / 0.1), 0 22px 48px rgb(52 40 26 / 0.14);
  --shadow-paper: 0 1px 2px rgb(52 40 26 / 0.08), 0 18px 40px rgb(52 40 26 / 0.12);
  --shadow-tablet: 0 2px 4px rgb(52 40 26 / 0.12), 0 30px 70px rgb(52 40 26 / 0.16);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-display: clamp(2.6rem, 1.6rem + 4.6vw, 5.25rem);
  --text-h2: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --text-h3: 1.375rem;
  --text-lede: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pad-x: clamp(1.25rem, 4vw, 2.5rem);
  --pad-y: clamp(4.5rem, 10vw, 8rem);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #191714;
    --surface-raised: #23201c;
    --surface-sunken: #12100e;
    --paper: #2a2620;
    --ink: #f0ebe3;
    --ink-muted: #a99f92;
    --pencil: #8e9cb3;
    --line: #3a352f;
    --accent: #8fb8a3;
    --accent-hover: #a6c8b6;
    --accent-text: #14211b;
    --accent-soft: #223029;
    --focus: #e0a866;
    --strike: #f1a091;
    --status-new: #9cc4e0;
    --status-new-bg: #1f3442;
    --status-called: #e2c784;
    --status-called-bg: #3a3020;
    --status-appt: #9fd0a9;
    --status-appt-bg: #1f3826;
    --status-ni: #b8b1a7;
    --status-ni-bg: #2e2a25;
    --overdue: #f1a091;
    --overdue-bg: #4a2019;
    --due-today: #f0c27a;
    --due-today-bg: #44321a;

    --bezel: #0d0c0a;
    --clip: #77726b;
    --clip-dark: #5a5650;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 10px 28px rgb(0 0 0 / 0.35);
    --shadow-lift: 0 1px 2px rgb(0 0 0 / 0.5), 0 22px 48px rgb(0 0 0 / 0.5);
    --shadow-paper: 0 1px 2px rgb(0 0 0 / 0.5), 0 18px 40px rgb(0 0 0 / 0.45);
    --shadow-tablet: 0 2px 4px rgb(0 0 0 / 0.5), 0 30px 70px rgb(0 0 0 / 0.6);
  }
}

/* Base */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
ol,
ul {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
}

h3 {
  font-size: var(--text-h3);
  line-height: 1.25;
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-sunken);
  border-radius: 6px;
  padding: 0.05em 0.35em;
  white-space: nowrap;
}

a {
  color: inherit;
}

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

main:focus {
  outline: none;
}

.wrap {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.5vw, 2rem);
}

section {
  padding-block: var(--pad-y);
}

.band {
  background: var(--surface-sunken);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  line-height: 1.4;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.display,
.h2,
h3,
.strike {
  text-wrap: balance;
}

.nowrap {
  white-space: nowrap;
}

.display,
.h2 {
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.display {
  font-size: var(--text-display);
}

.h2 {
  font-size: var(--text-h2);
  max-width: 18em;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.lede {
  font-size: var(--text-lede);
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: 34em;
}

.muted,
.note,
.caption {
  color: var(--ink-muted);
}

.note,
.caption {
  font-size: 0.875rem;
}

/* Drafting hairline: a dimension line from the content edge, ending in a 7 px tick. */
.dim {
  position: relative;
  height: 1px;
  background: var(--line);
  margin-bottom: var(--pad-y);
}

.dim::before,
.dim::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 1px;
  height: 7px;
  background: var(--line);
}

.dim::before {
  left: 0;
}

.dim::after {
  right: 0;
}

/* Skip link */

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  min-height: 48px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 0.5rem;
}

/* Buttons and links */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 160ms var(--ease),
    box-shadow 200ms var(--ease);
  box-shadow: var(--shadow);
}

.btn:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-lift);
}

.btn:active {
  transform: scale(0.97);
}

.btn-small {
  min-height: 48px;
  padding: 0 1.25rem;
  font-size: 0.9375rem;
}

.btn-primary {
  height: 52px;
  padding: 0 1.75rem;
  font-size: 1.0625rem;
}

.btn-big {
  height: 56px;
  padding: 0 2rem;
}

.arrow {
  display: inline-block;
  transition: transform 200ms var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.quiet-link,
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 0.25rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: transform 160ms var(--ease);
}

.nav-link {
  text-decoration: none;
  font-size: 0.9375rem;
}

.quiet-link:hover,
.nav-link:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}

.quiet-link:active,
.nav-link:active {
  transform: scale(0.97);
}

/* Logo */

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--accent);
}

.mark {
  display: block;
  flex: none;
  align-self: center;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--ink);
  /* Sits the baseline on the mark's threshold line (y = 27 of 32). */
  transform: translateY(0.32em);
}

.logo-foot .wordmark {
  transform: translateY(0.58em);
}

/* 0. Top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 64px;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 transparent;
  transition: box-shadow 200ms var(--ease);
}

.topbar.is-scrolled {
  box-shadow: 0 1px 0 var(--line);
}

.bar {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* 1. Hero */

.hero {
  padding-block: clamp(3rem, 7vw, 6rem) var(--pad-y);
}

.hero .grid {
  align-items: center;
  row-gap: 3.5rem;
}

.hero-text {
  grid-column: 1 / 8;
}

.hero h1 {
  font-size: clamp(2.6rem, 1.6rem + 4.2vw, 4.25rem);
  margin-bottom: 1.5rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin: 2.25rem 0 1rem;
}

.hero-visual {
  grid-column: 8 / 13;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: clip;
}

.sheet {
  position: absolute;
  left: 2%;
  top: 4%;
  width: 62%;
  aspect-ratio: 4 / 5;
  background: var(--paper);
  border-radius: 3px;
  box-shadow: var(--shadow-paper);
  transform: rotate(-5deg);
  animation: sheet-in 300ms ease-out both;
}

.sheet svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sheet-title {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2em;
  fill: var(--ink);
}

.sheet-head {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  fill: var(--ink-muted);
}

.rules path {
  stroke: var(--line);
  stroke-width: 1;
  fill: none;
}

.rules .cols {
  opacity: 0.6;
}

.scribbles path {
  fill: none;
  stroke: var(--pencil);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.coffee {
  fill: none;
  stroke: var(--pencil);
  stroke-width: 5;
  opacity: 0.08;
}

.clip-wire {
  fill: none;
  stroke: var(--clip-dark);
  stroke-width: 3;
  stroke-linejoin: round;
}

.clip-body {
  fill: var(--clip);
}

.clip-shine {
  fill: rgb(255 255 255 / 0.25);
}

/* Tablet frame, shared by the hero and the live embed. */
.tablet {
  background: var(--bezel);
  border-radius: 28px;
  padding: 12px;
  box-shadow: var(--shadow-tablet);
}

.screen {
  height: 100%;
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}

.tablet-hero {
  position: absolute;
  right: 4%;
  bottom: 12%;
  width: 78%;
  aspect-ratio: 4 / 3;
  container-type: inline-size;
  animation: tablet-in 700ms var(--ease) 150ms both;
}

.mini {
  font-size: 2.6cqi;
  padding: 1.6em 2em;
  line-height: 1.35;
}

.mini-eyebrow {
  font-size: 0.7em;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.mini-title {
  font-family: var(--serif);
  font-size: 2.2em;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0.15em 0 0.25em;
}

.mini-lede {
  color: var(--ink-muted);
  font-size: 0.85em;
  max-width: 30em;
  margin-bottom: 0.9em;
}

.mini-card {
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 0.9em;
  padding: 0.9em;
  display: grid;
  gap: 0.6em;
  box-shadow: var(--shadow);
}

.mini-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6em;
}

.mini-field {
  display: grid;
  gap: 0.2em;
}

.mini-label {
  font-size: 0.7em;
  font-weight: 600;
  color: var(--ink-muted);
}

.mini-input {
  display: block;
  height: 2.1em;
  line-height: 2.1em;
  padding: 0 0.6em;
  border: 1px solid var(--line);
  border-radius: 0.5em;
  background: var(--surface-raised);
  font-size: 0.9em;
}

.mini-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.mini-chip {
  font-size: 0.72em;
  font-weight: 600;
  padding: 0.35em 0.8em;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.mini-chip.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.mini-button {
  display: block;
  text-align: center;
  font-weight: 600;
  font-size: 0.85em;
  padding: 0.65em;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
}

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

@keyframes tablet-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes sheet-drift {
  from {
    transform: translateY(0) rotate(-5deg);
  }
  to {
    transform: translateY(40px) rotate(-9deg);
  }
}

@supports (animation-timeline: scroll()) {
  @media (min-width: 900px) {
    .sheet {
      animation:
        sheet-in 300ms ease-out both,
        sheet-drift linear both;
      animation-timeline: auto, scroll(root);
      animation-range: normal, 0 60vh;
    }
  }
}

/* 2. The sheet */

.strikes {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.strike {
  position: relative;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  line-height: 1.3;
  max-width: 22em;
}

.strike-line {
  position: absolute;
  height: 0.4em;
  overflow: visible;
  pointer-events: none;
}

.strike-line path {
  fill: none;
  stroke: var(--strike);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 600ms var(--ease);
}

.strike.is-struck .strike-line path {
  stroke-dashoffset: 0;
}

.fixes {
  font-size: 1.125rem;
  color: var(--ink);
}

/* 3. How it works */

.how-grid {
  position: relative;
}

.dimline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
  height: 1px;
  margin-bottom: 2.25rem;
}

.dimline::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--line);
  transform-origin: left;
}

.tick {
  position: relative;
}

.tick::before {
  content: "";
  position: absolute;
  left: 0;
  top: -3px;
  width: 1px;
  height: 7px;
  background: var(--accent);
}

.dim-label {
  position: absolute;
  top: -0.7rem;
  left: 0;
  width: calc((100% - 2 * clamp(1.5rem, 4vw, 3.5rem)) / 3);
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.4rem;
  color: var(--ink-muted);
}

.dim-label::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 4.5em);
  background: var(--surface);
  z-index: -1;
}

.dim-label {
  isolation: isolate;
}

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.step {
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

.step-num {
  font-family: var(--serif);
  font-size: 3rem;
  line-height: 1;
  color: var(--accent);
}

.step p {
  color: var(--ink-muted);
}

.step-gap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.js .how-grid .dimline::before {
  transform: scaleX(0);
  transition: transform 900ms var(--ease) 200ms;
}

.js .how-grid.is-in .dimline::before {
  transform: none;
}

.js .how-grid .step-num {
  opacity: 0;
  transition: opacity 500ms var(--ease);
  transition-delay: calc(var(--i, 0) * 120ms + 300ms);
}

.js .how-grid.is-in .step-num {
  opacity: 1;
}

/* 4. Features */

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.25rem;
}

.card {
  grid-column: span 2;
  min-width: 0;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition:
    transform 240ms var(--ease),
    box-shadow 240ms var(--ease),
    opacity 600ms var(--ease);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.card p {
  color: var(--ink-muted);
}

.card-list {
  grid-column: span 4;
  grid-row: span 2;
}

.visual {
  background: var(--surface-sunken);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.6rem;
  min-height: 9.5rem;
  display: grid;
  align-content: center;
  overflow: hidden;
}

.card-list .visual {
  flex: 1;
  align-content: center;
  padding: 1.5rem;
}

.pill,
.badge,
.chip,
.counter {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.4em 0.75em;
  white-space: nowrap;
}

.pill-new {
  color: var(--status-new);
  background: var(--status-new-bg);
}

.pill-called {
  color: var(--status-called);
  background: var(--status-called-bg);
}

.pill-appt {
  color: var(--status-appt);
  background: var(--status-appt-bg);
}

.pill-ni {
  color: var(--status-ni);
  background: var(--status-ni-bg);
}

.badge-overdue {
  color: var(--overdue);
  background: var(--overdue-bg);
}

.badge-today {
  color: var(--due-today);
  background: var(--due-today-bg);
}

.list-ui {
  display: grid;
  gap: 0.6rem;
}

.chips-scroll {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.chip {
  border: 1px solid var(--line);
  background: var(--surface-raised);
  color: var(--ink);
}

.chip b {
  color: var(--ink-muted);
}

.chip.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.chip.is-on b {
  color: inherit;
}

.search {
  border: 1px solid var(--line);
  background: var(--surface-raised);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.rowcard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  box-shadow: var(--shadow);
}

.row-main {
  display: grid;
  min-width: 0;
}

.row-name {
  font-weight: 600;
}

.row-meta {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-side {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.row-next {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* Four statuses: a dot steps from pill to pill. */
.status-ui {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.35rem;
}

.arrow-sep {
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

.step-pill {
  position: relative;
}

.step-pill::before {
  content: "";
  width: 0.45em;
  height: 0.45em;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  animation: step-on 6.4s steps(1) infinite;
}

.step-pill::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  box-shadow: 0 0 0 2px currentColor;
  opacity: 0;
  animation: step-on 6.4s steps(1) infinite;
}

.status-ui .step-pill:nth-child(3)::before,
.status-ui .step-pill:nth-child(3)::after {
  animation-delay: 1.6s;
}

.status-ui .step-pill:nth-child(5)::before,
.status-ui .step-pill:nth-child(5)::after {
  animation-delay: 3.2s;
}

.status-ui .step-pill:nth-child(7)::before,
.status-ui .step-pill:nth-child(7)::after {
  animation-delay: 4.8s;
}

@keyframes step-on {
  0% {
    opacity: 1;
  }
  25%,
  100% {
    opacity: 0;
  }
}

/* Thank-you screen with a timer bar that empties over 8 s. */
.thanks-ui {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1rem 1rem;
  text-align: center;
}

.thanks-title {
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.1;
}

.thanks-sub {
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.timer {
  width: 70%;
  height: 4px;
  margin-top: 0.6rem;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.timer-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  animation: drain 8s linear infinite;
}

@keyframes drain {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* Repeat visitor */
.repeat-ui {
  display: grid;
  gap: 0.6rem;
}

.counter {
  background: var(--surface-sunken);
  color: var(--ink-muted);
  border: 1px solid var(--line);
}

.tally {
  list-style: none;
  padding: 0 0 0 0.9rem;
  display: grid;
  gap: 0.15rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.tally li {
  position: relative;
  padding-left: 0.9rem;
}

.tally li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25em;
  width: 2px;
  height: 0.95em;
  border-radius: 1px;
  background: var(--accent);
}

/* CSV grid */
.sheet-ui {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  overflow: hidden;
  font-size: 0.6875rem;
}

.cell {
  padding: 0.4rem 0.35rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell:nth-child(4n) {
  border-right: 0;
}

.cell:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.cell.head {
  white-space: normal;
  line-height: 1.25;
  background: var(--surface-sunken);
  font-weight: 600;
  color: var(--ink-muted);
}

/* Notes */
.notes-ui {
  display: grid;
  gap: 0.6rem;
}

.note-block {
  display: grid;
  gap: 0.15rem;
  border-left: 3px solid var(--accent);
  background: var(--surface-raised);
  border-radius: 0 8px 8px 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.note-time {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.badges {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.badges li {
  font-size: 0.875rem;
  color: var(--ink-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
}

/* 5. Try it */

.try-head {
  text-align: center;
  display: grid;
  justify-items: center;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.try-head .h2 {
  margin-bottom: 1.25rem;
}

.tablet-live {
  --rise: 24px;
  width: 1024px;
  max-width: 100%;
  margin-inline: auto;
}

.tablet-live iframe {
  display: block;
  width: 100%;
  height: 676px;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
}

.try-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 2rem;
  margin-top: 1.5rem;
  text-align: center;
}

/* 6. Stays on the device */

.private .grid {
  align-items: center;
  row-gap: 3rem;
}

.private-text {
  grid-column: 1 / 7;
  display: grid;
  gap: 1.25rem;
}

.private-text .eyebrow,
.private-text .h2 {
  margin-bottom: 0;
}

.private-text p:not(.eyebrow) {
  max-width: 32em;
}

.private-visual {
  grid-column: 7 / 13;
}

.private-visual svg {
  display: block;
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
  overflow: visible;
}

.drawing rect,
.drawing path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.orbit {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 6 8;
  opacity: 0.8;
  animation: orbit 40s linear infinite;
  animation-play-state: paused;
}

.private-visual.is-in .orbit,
html:not(.js) .orbit {
  animation-play-state: running;
}

@keyframes orbit {
  to {
    stroke-dashoffset: -280;
  }
}

.cloud path {
  fill: none;
  stroke: var(--ink-muted);
  opacity: 0.45;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cloud .cross {
  stroke: var(--ink-muted);
  opacity: 1;
  stroke-width: 1.5;
}

.leaders path {
  fill: none;
  stroke: var(--ink-muted);
  stroke-width: 1;
}

.leaders circle {
  fill: var(--ink-muted);
}

.label {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  fill: var(--ink-muted);
}

/* 7. Closing */

.closing {
  text-align: center;
  padding-bottom: 0;
}

.closing .dim:last-child {
  margin: var(--pad-y) 0 0;
}

.closing-body {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
}

.mark-lg {
  color: var(--accent);
}

.closing .display {
  max-width: 14em;
}

.closing .btn {
  margin-top: 0.75rem;
}

/* 8. Footer */

.footer {
  padding-block: 0 2.5rem;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding-top: 2rem;
  position: relative;
}

.foot-text {
  font-size: 0.875rem;
  color: var(--ink-muted);
  text-align: right;
}

/* Shared reveal. The hidden start state only applies once main.js has run. */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(var(--rise, 16px));
  transition:
    opacity 600ms var(--ease),
    transform 600ms var(--ease),
    box-shadow 240ms var(--ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.js .card[data-reveal].is-in:hover {
  transform: translateY(-2px);
  transition-delay: 0s;
}

/* These sections open with a .dim hairline, so it sits on the section boundary. */

.features,
.try,
.closing {
  padding-top: 0;
}

/* Responsive */

@media (max-width: 1100px) {
  .tablet-live iframe {
    height: min(78vh, 760px);
  }
}

@media (max-width: 1023px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card {
    grid-column: span 1;
  }

  .card-list {
    grid-column: span 2;
    grid-row: auto;
  }
}

@media (max-width: 899px) {
  .wide-only {
    display: none;
  }

  .hero-text,
  .hero-visual,
  .private-text,
  .private-visual {
    grid-column: 1 / -1;
  }

  .hero-visual {
    aspect-ratio: 1 / 0.95;
    max-width: 36rem;
    width: 100%;
  }
}

@media (max-width: 639px) {
  .bento {
    grid-template-columns: minmax(0, 1fr);
  }

  .card,
  .card-list {
    grid-column: 1 / -1;
  }

  .row-meta {
    display: none;
  }

  .rowcard {
    padding: 0.65rem 0.75rem;
  }

  .list-ui .rowcard {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }

  .list-ui .row-side {
    justify-content: flex-start;
  }

  .hero-visual {
    aspect-ratio: 1 / 0.98;
  }

  .sheet {
    left: 0;
    top: 2%;
    width: 70%;
  }

  .tablet-hero {
    right: 0;
    bottom: 10%;
    width: 88%;
    aspect-ratio: auto;
    border-radius: 20px;
    padding: 8px;
  }

  .tablet-hero .screen {
    border-radius: 12px;
  }

  .mini {
    font-size: 3.6cqi;
    padding: 1.4em 1.4em;
  }

  .tablet-extra {
    display: none;
  }

  .tablet-live {
    border-radius: 20px;
    padding: 6px;
  }

  .tablet-live iframe {
    height: 640px;
    border-radius: 14px;
  }

  /* Steps stack, and the dimension line runs down the left side. */
  .dimline {
    display: none;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    position: relative;
    padding-left: 4.25rem;
  }

  .steps::before {
    content: "";
    position: absolute;
    left: 1.5rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 1px;
    background: var(--line);
    transform-origin: top;
  }

  .js .how-grid .steps::before {
    transform: scaleY(0);
    transition: transform 900ms var(--ease) 200ms;
  }

  .js .how-grid.is-in .steps::before {
    transform: none;
  }

  .step {
    position: relative;
  }

  .step-num {
    position: absolute;
    left: -4.25rem;
    top: 0;
    width: 3rem;
    text-align: center;
    font-size: 2rem;
    background: var(--surface);
    padding-block: 0.25rem;
  }

  .step-gap {
    position: static;
    width: auto;
    height: auto;
    clip-path: none;
    font-size: 0.8125rem;
    color: var(--ink-muted);
  }

  .step-gap::before {
    content: "↓ ";
  }

  .foot-text {
    text-align: left;
  }
}

@media (max-width: 599px) {
  .nav-link {
    display: none;
  }
}

/* Reduced motion: no keyframes, no scroll timeline, everything in its final state. */

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .sheet {
    transform: rotate(-5deg);
  }

  .js [data-reveal],
  .js .how-grid .step-num {
    opacity: 1;
    transform: none;
  }

  .js .how-grid .dimline::before,
  .js .how-grid .steps::before {
    transform: none;
  }

  .strike-line path {
    stroke-dashoffset: 0;
  }

  .status-ui .step-pill:first-of-type::before,
  .status-ui .step-pill:first-of-type::after {
    opacity: 1;
  }

  .timer-fill {
    transform: scaleX(0.5);
  }
}
