/* AXON landing page (plans/landing-page.md).
 *
 * The system is the Dala reference; the brand supplies the colours and the
 * mark. Pure black as material, with a field of the brand's chevrons behind
 * the page (a shape per screen) and film grain over it. White type at weight
 * 400 for every headline, never bold: hierarchy by scale and tracking. 18 px
 * body at weight 200. Cyan on the eyebrows, the pill, the system markers and
 * the field; nothing else is coloured. No borders, no shadows on surfaces,
 * no card fills: the only tinted surfaces are the product's own artifacts
 * (the bubbles, the cita in the Agenda, the chips of the settings). 24 px
 * radii. 1280 px max width. A 6 px spacing scale. Mobile first.
 *
 * This file belongs to index.html only. The legal pages and the 404 keep
 * site.css, which Meta's crawler reads during App Review.
 */

/* ── Type faces (self-hosted, latin subset, scripts/fetch-brand-fonts.mjs) ── */
@font-face {
  font-family: 'Poppins';
  font-weight: 200;
  font-display: swap;
  src: url('./fonts/poppins-200.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/poppins-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-weight: 500;
  font-display: swap;
  src: url('./fonts/poppins-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/poppins-600.woff2') format('woff2');
}
/* Kontora Semibold, the brand's display face. Licensed files only; and the
   "never bold" rule of this page decides whether it is used at all.
@font-face {
  font-family: 'Kontora';
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/kontora-600.woff2') format('woff2');
}
*/
@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 500;
  font-display: swap;
  src: url('./fonts/mono-500.woff2') format('woff2');
}
/* A system face adjusted to Poppins's metrics, shown only while Poppins
   loads, so the swap does not change line breaks or heights (no layout
   shift on a slow connection). Invisible once the real face is in. */
@font-face {
  font-family: 'Poppins Fallback';
  src: local('Arial');
  size-adjust: 112.16%;
  ascent-override: 92.33%;
  descent-override: 30.78%;
  line-gap-override: 8.98%;
}

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --void: #000000;
  --white: #ffffff;
  --silver: #bdbdbd;
  --ash: #9a9a9a;

  --signal: #00d0ce;
  --signal-hover: #2fe0de;
  --graphite: #1f2d44;
  --night: #0d131c;
  --patient: #141414;

  --font-display: 'Poppins', 'Poppins Fallback', -apple-system, system-ui, 'Segoe UI', sans-serif;
  --font-body: 'Poppins', 'Poppins Fallback', -apple-system, system-ui, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --s-6: 6px;
  --s-12: 12px;
  --s-18: 18px;
  --s-24: 24px;
  --s-30: 30px;
  --s-36: 36px;
  --s-60: 60px;
  --s-96: 96px;
  --s-120: 120px;

  --fs-display: clamp(42px, 2rem + 4.4vw, 92px);
  --fs-h: clamp(34px, 1.6rem + 2.2vw, 56px);
  --fs-sub: clamp(24px, 1.2rem + 1.2vw, 36px);
  --fs-xs: clamp(22px, 1.2rem + 0.5vw, 27px);
  --fs-body: 18px;
  --fs-nav: 14px;
  --fs-caption: 12px;

  --r-24: 24px;
  --r-pill: 9999px;

  --maxw: 1280px;
  --pad: clamp(20px, 5vw, 48px);
  --measure: 640px;
  --header-h: 84px;

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--void);
}

body {
  margin: 0;
  background: var(--void);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 200;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

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

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

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

ul,
ol {
  padding: 0;
}

/* Layers: the field under everything, the grain over everything. */
.field-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: screen;
}

main,
.site-foot,
.nav-mobile {
  position: relative;
  z-index: 1;
}

html:not(.js) .field-canvas,
html:not(.js) .grain,
.motion-off .field-canvas,
.motion-off .grain {
  display: none;
}

/* ── Type ────────────────────────────────────────────────────────────────── */
h1,
h2,
h3,
.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.04;
}

.display {
  font-size: var(--fs-display);
  letter-spacing: -0.045em;
}

h2 {
  font-size: var(--fs-h);
  letter-spacing: -0.035em;
}

.h-sm {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-xs);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.lede {
  font-size: var(--fs-body);
  font-weight: 200;
  max-width: var(--measure);
}

.muted {
  color: var(--silver);
}

.caption {
  font-size: var(--fs-caption);
  line-height: 1.5;
  color: var(--ash);
}

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-caption);
  letter-spacing: 0.04em;
  color: var(--ash);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-nav);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--signal);
}

.punch {
  font-family: var(--font-display);
  font-size: var(--fs-sub);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.micro,
.support {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ash);
}

strong {
  font-weight: 400;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--pad);
}

/* ── The one filled control ──────────────────────────────────────────────── */
.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  background: var(--signal);
  color: var(--night);
  font-family: var(--font-display);
  font-size: var(--fs-nav);
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 0 rgba(0, 208, 206, 0);
  transition:
    background-color 0.18s ease,
    box-shadow 0.3s ease,
    transform 0.3s var(--ease-out);
}

.pill::after {
  content: '';
  width: 7px;
  height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease-out);
}

.pill:hover {
  background: var(--signal-hover);
  box-shadow: 0 0 36px rgba(0, 208, 206, 0.35);
  transform: translateY(-1px);
}

.pill:hover::after {
  transform: translateX(3px) rotate(45deg);
}

main .pill {
  box-shadow: 0 0 44px rgba(0, 208, 206, 0.22);
}

.ghost {
  position: relative;
  color: var(--ash);
  font-family: var(--font-display);
  font-size: var(--fs-nav);
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.18s ease;
}

.ghost::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.ghost:hover,
.ghost[aria-current] {
  color: var(--white);
}

.ghost:hover::after,
.ghost[aria-current]::after {
  transform: scaleX(1);
}

/* ── Header: fixed, transparent, the blur appears once you scroll ────────── */
.header-blur {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 128px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  mask-image: linear-gradient(to bottom, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.is-scrolled .header-blur {
  opacity: 1;
}

.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding-block: var(--s-24);
  transition:
    padding 0.3s var(--ease-out),
    opacity 0.4s ease;
}

.is-scrolled .site-head {
  padding-block: 14px;
}

.is-intro .site-head {
  opacity: 0;
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-24);
}

/* Tap targets of 44 px without moving a pixel: padding paid back by margin. */
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 15px 0;
  margin: -15px 0;
}

.brand-mark {
  width: auto;
  height: 15px;
  flex: none;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--s-30);
}

.nav-desktop .ghost {
  padding: 12px 0;
  margin: -12px 0;
}

.nav-desktop .ghost::after {
  bottom: 6px;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: var(--r-pill);
  color: var(--white);
  cursor: pointer;
}

.nav-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
}
.nav-bars i {
  position: absolute;
  left: 0;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform 0.25s var(--ease-out),
    top 0.25s var(--ease-out);
}
.nav-bars i:first-child {
  top: 2px;
}
.nav-bars i:last-child {
  top: 8.5px;
}
[aria-expanded='true'] .nav-bars i:first-child {
  top: 5.25px;
  transform: rotate(45deg);
}
[aria-expanded='true'] .nav-bars i:last-child {
  top: 5.25px;
  transform: rotate(-45deg);
}

.nav-mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
  padding: calc(var(--header-h) + var(--s-12)) var(--pad) var(--s-30);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nav-mobile[hidden] {
  display: none;
}
.nav-mobile .ghost {
  padding: var(--s-12) 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.nav-mobile .ghost::after {
  display: none;
}
.nav-mobile .pill {
  align-self: flex-start;
  margin-top: var(--s-12);
}

/* ── Screens ─────────────────────────────────────────────────────────────── */
.screen {
  position: relative;
  padding-block: var(--s-96);
  scroll-margin-top: calc(var(--header-h) + var(--s-12));
}

.screen > .wrap > * + * {
  margin-top: var(--s-36);
}

.copy {
  max-width: var(--measure);
}

.wrap.copy {
  max-width: var(--maxw);
}

.wrap.copy > * {
  max-width: var(--measure);
}

.copy > * + * {
  margin-top: var(--s-18);
}

.copy > h2 + .lede,
.copy > h2 + .lines,
.copy > h2 + .rules,
.copy > h2 + .checks {
  margin-top: var(--s-24);
}

.copy > .punch,
.copy > .h-sm,
.copy > .fit-no {
  margin-top: var(--s-30);
}

.copy > .eyebrow + h2 {
  margin-top: var(--s-18);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + var(--s-36));
  padding-bottom: var(--s-60);
}

.hero-copy {
  position: relative;
  max-width: 1040px;
}

.hero-copy > * + * {
  margin-top: var(--s-24);
}

.hero-copy > .eyebrow + .display {
  margin-top: var(--s-18);
}

.hero-copy > .display + .lede {
  margin-top: var(--s-30);
}

/* The hero's paragraph is longer than the page's measure since the
   2026-10-20 revision; it keeps six lines or so on a desktop. */
.hero-copy > .lede {
  max-width: 46rem;
}

/* The slogan closes the paragraph in the signal colour and bold (600, a
   loaded face; no italic face is shipped, so none is asked for). */
.lede .slogan {
  color: var(--signal);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-12) var(--s-18);
}

.hero-copy > .hero-actions + .support {
  margin-top: var(--s-18);
}

.hero-art-static {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  display: none;
}

html:not(.js) .hero-art-static,
.motion-off .hero-art-static {
  display: block;
}

/* ── Two columns ─────────────────────────────────────────────────────────── */
.split {
  display: grid;
  gap: var(--s-36);
}

/* ── Recognition: the unread stack, alive ────────────────────────────────── */
.unread-head {
  display: flex;
  align-items: baseline;
  gap: var(--s-12);
  padding-left: var(--s-24);
  margin-bottom: var(--s-18);
}

.unread-num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 2rem + 2vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.unread-num.is-tick {
  animation: tick 0.5s var(--ease-out);
}

@keyframes tick {
  0% {
    transform: translateY(-6px);
    color: var(--signal);
  }
  100% {
    transform: none;
    color: var(--white);
  }
}

.unread {
  position: relative;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-18);
  max-width: 480px;
}

.unread li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px var(--s-12);
  padding-left: var(--s-24);
  transition:
    opacity 0.42s ease,
    transform 0.5s var(--ease-out);
}

.unread li.is-new {
  opacity: 0;
  transform: translateY(-14px);
  transition: none;
}

/* The row that leaves: a clone out of the flow, so the list keeps its height. */
.unread li.is-ghost {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

.unread li.is-out {
  opacity: 0;
  transform: translateY(8px);
}

.unread li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 10px rgba(0, 208, 206, 0.7);
}

.unread .n {
  font-weight: 400;
  color: var(--white);
}

.unread .t {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ash);
  padding-top: 0.3em;
}

/* One line per preview, as a notification shows it, so every row has the
   same height and a new arrival never changes the list's height. */
.unread .s {
  grid-column: 1 / -1;
  font-size: 16px;
  color: var(--silver);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── The thread: the product's own artifact, frameless on black ──────────── */
.thread {
  position: relative;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-18);
}

.step {
  display: grid;
  gap: var(--s-6);
}

.day {
  display: flex;
  justify-content: center;
  padding-block: var(--s-6);
}

.day span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ash);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: #0e0e0e;
}

.msg {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 560px;
}

.msg.out {
  align-self: flex-end;
  align-items: flex-end;
}

.msg.in {
  align-self: flex-start;
  align-items: flex-start;
}

.bubble {
  max-width: 100%;
  padding: 14px 18px;
  border-radius: var(--r-24);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--white);
}

.msg.in .bubble {
  background: var(--patient);
  border-bottom-left-radius: 8px;
}

.msg.out .bubble {
  background: var(--graphite);
  border-bottom-right-radius: 8px;
}

.who {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: var(--s-6);
  padding-inline: var(--s-6);
}

.typing {
  position: absolute;
  right: 0;
  bottom: 0;
  display: none;
  align-items: center;
  gap: 5px;
  padding: 16px 18px;
  border-radius: var(--r-24);
  border-bottom-right-radius: 8px;
  background: var(--graphite);
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  animation: typing 1s infinite ease-in-out;
}
.typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.typing i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.js .step.is-typing .typing {
  display: inline-flex;
}

.js .step.is-typing .bubble,
.js .step.is-typing .who,
.js .step.is-typing .sys {
  opacity: 0;
}

.sys {
  position: relative;
  padding-left: var(--s-18);
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--ash);
}

.sys::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 8px rgba(0, 208, 206, 0.8);
}

.step .msg.out + .sys {
  justify-self: end;
  text-align: right;
  padding-left: 0;
  padding-right: var(--s-18);
}

.step .msg.out + .sys::before {
  left: auto;
  right: 2px;
}

.thread-sm .bubble {
  font-size: 15px;
}

.thread-sm .msg {
  max-width: 480px;
}

.after-thread {
  margin-top: var(--s-36);
}

.after-thread > p + p {
  margin-top: var(--s-24);
}

/* ── The demo: the thread beside the Agenda ──────────────────────────────── */
.demo-grid {
  display: grid;
  gap: var(--s-24);
  align-items: start;
}

.demo-grid .thread {
  max-width: 520px;
}

.demo-grid .msg {
  max-width: 100%;
}

.agenda {
  --slot-h: 46px;
}

.agenda-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-12);
  flex-wrap: wrap;
}

.agenda-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
}

.agenda-day {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--white);
}

.agenda-empty {
  display: none;
}

.slots {
  list-style: none;
  display: grid;
  gap: 2px;
  margin-top: var(--s-18);
}

.slot {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  min-height: var(--slot-h);
  overflow: hidden;
}

.slot-t {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ash);
}

.slot-line {
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
  transition:
    background-color 0.5s ease,
    height 0.5s ease;
}

.cita {
  position: absolute;
  left: 48px;
  right: 0;
  top: 4px;
  bottom: 4px;
  display: flex;
  align-items: center;
  gap: var(--s-12);
  padding: 0 14px;
  border-radius: 14px;
  background: var(--graphite);
  color: var(--white);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(6px) scale(0.985);
  transition:
    opacity 0.45s ease,
    transform 0.55s var(--ease-out);
  pointer-events: none;
}

.cita .cita-name,
.cita .kind {
  white-space: nowrap;
}

.cita .kind {
  color: var(--silver);
  font-weight: 200;
  font-size: 13px;
}

.chip {
  display: none;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: var(--r-pill);
  background: rgba(0, 208, 206, 0.14);
  color: var(--signal);
}

.agenda .log {
  list-style: none;
  display: grid;
  gap: var(--s-6);
  margin-top: var(--s-24);
}

.agenda .log li {
  position: relative;
  padding-left: var(--s-18);
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--ash);
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.5s ease,
    transform 0.6s var(--ease-out);
}

.agenda .log li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 8px rgba(0, 208, 206, 0.8);
}

.agenda[data-state='2'] .slot.offer .slot-line {
  height: 2px;
  background: rgba(0, 208, 206, 0.55);
}

.agenda[data-state='3'] .cita-a,
.agenda[data-state='4'] .cita-a,
.agenda[data-state='5'] .cita-a,
.agenda[data-state='6'] .cita-b,
html:not(.js) .agenda .cita-b {
  opacity: 1;
  transform: none;
}

.agenda[data-state='3'] .chip-apartada,
.agenda[data-state='4'] .chip-confirmada,
.agenda[data-state='5'] .chip-recordatorio,
.agenda[data-state='6'] .chip-reagendada,
html:not(.js) .agenda .chip-reagendada {
  display: inline-block;
}

.agenda[data-state='1'] .log li:nth-child(-n + 1),
.agenda[data-state='2'] .log li:nth-child(-n + 2),
.agenda[data-state='3'] .log li:nth-child(-n + 3),
.agenda[data-state='4'] .log li:nth-child(-n + 4),
.agenda[data-state='5'] .log li:nth-child(-n + 5),
.agenda[data-state='6'] .log li:nth-child(-n + 6),
html:not(.js) .agenda .log li {
  opacity: 1;
  transform: none;
}

/* ── Rules (Control) ─────────────────────────────────────────────────────── */
.rules {
  list-style: none;
  counter-reset: rule;
  display: grid;
  gap: var(--s-24);
}

.rules li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: var(--s-12);
  counter-increment: rule;
}

.rules li::before {
  content: counter(rule, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--signal);
  padding-top: 0.3em;
}

.inset {
  padding-top: var(--s-12);
}

/* ── The settings: the product's controls, shown ─────────────────────────── */
.settings {
  display: grid;
  gap: var(--s-18);
  max-width: 560px;
}

.setting {
  display: grid;
  gap: var(--s-6);
}

.setting dt {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ash);
}

.setting dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-6);
  font-size: 15px;
  font-weight: 400;
  color: var(--white);
}

.seg {
  display: inline-flex;
  gap: 4px;
}

.opt {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--patient);
  color: var(--silver);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    box-shadow 0.35s ease;
}

.opt.is-on {
  background: rgba(0, 208, 206, 0.14);
  color: var(--signal);
  box-shadow: 0 0 14px rgba(0, 208, 206, 0.18);
}

.setting .val {
  padding: 6px 0;
}

/* ── Lines: plain sentences with an index; the verb in white, the rest in silver */
.lines {
  list-style: none;
  counter-reset: line;
  display: grid;
  gap: var(--s-18);
}

.lines li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: var(--s-12);
  counter-increment: line;
  color: var(--silver);
}

.lines li::before {
  content: counter(line, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ash);
  padding-top: 0.3em;
}

.lines strong {
  color: var(--white);
}

/* ── The hub: the modules around the sphere ──────────────────────────────── */
.hub {
  list-style: none;
  display: grid;
  gap: var(--s-18);
}

/* The centre column the sphere is drawn in; measured by landing.js. */
.hub-core {
  display: none;
}

.mod {
  position: relative;
  display: grid;
  gap: 2px;
}

.mod-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--white);
}

.mod-line {
  font-size: 14px;
  line-height: 1.45;
  color: var(--silver);
}

/* ── The self-check ──────────────────────────────────────────────────────── */
.checks {
  display: grid;
  gap: var(--s-6);
  max-width: 540px;
}

.check {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: var(--s-12);
  align-items: start;
  width: 100%;
  padding: var(--s-12) 0;
  background: none;
  border: 0;
  text-align: left;
  color: var(--silver);
  font: inherit;
  font-size: var(--fs-body);
  font-weight: 200;
  line-height: 1.5;
  cursor: pointer;
  transition: color 0.3s ease;
}

.check .box {
  position: relative;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--patient);
  transition:
    background-color 0.35s ease,
    box-shadow 0.35s ease;
}

.check .box::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-top: 1.5px solid rgba(255, 255, 255, 0.45);
  border-right: 1.5px solid rgba(255, 255, 255, 0.45);
  transform: rotate(45deg);
  transition: border-color 0.35s ease;
}

.check:hover {
  color: var(--white);
}

.check[aria-pressed='true'] {
  color: var(--white);
}

.check[aria-pressed='true'] .box {
  background: var(--signal);
  box-shadow: 0 0 18px rgba(0, 208, 206, 0.55);
}

.check[aria-pressed='true'] .box::after {
  border-color: var(--night);
}

/* Without JavaScript the statements read as a list. */
html:not(.js) .check {
  cursor: default;
}

.fit-go {
  margin-top: var(--s-24);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.6s ease,
    transform 0.7s var(--ease-out);
  pointer-events: none;
}

.fit-go.is-on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.fit-go > .hero-actions {
  margin-top: var(--s-18);
}

.fit-no {
  color: var(--white);
}

/* ── Closing: the mark forms on the right (above the copy on a phone) ─────── */
.closing {
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-top: 46svh;
}

.closing .display {
  font-size: clamp(38px, 1.8rem + 3.4vw, 72px);
  max-width: 14ch;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-foot {
  padding-block: var(--s-36) var(--s-36);
}

.foot-top {
  display: flex;
  flex-direction: column;
  gap: var(--s-24);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-18) var(--s-24);
  font-size: 14px;
  color: var(--ash);
}

.foot-links a {
  display: inline-block;
  padding: 12px 0;
  margin: -12px 0;
  text-decoration: none;
  transition: color 0.18s ease;
}

.foot-links a:hover {
  color: var(--white);
}

/* ── Motion: behind .js only, so a page without JavaScript is already there ─ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s ease,
    transform 0.8s var(--ease-out);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.js .step[data-reveal] {
  transition: none;
  opacity: 1;
  transform: none;
}
.js .step[data-reveal] .msg,
.js .step[data-reveal] .sys {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.5s ease,
    transform 0.6s var(--ease-out);
}
.js .step[data-reveal].is-typing .msg {
  opacity: 1;
  transform: none;
}
.js .step[data-reveal].is-in .msg,
.js .step[data-reveal].is-in .sys {
  opacity: 1;
  transform: none;
}
.js .step[data-reveal].is-in .sys {
  transition-delay: 0.25s;
}

.js .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding: 0.08em 0 0.14em;
  margin: -0.08em 0 -0.14em;
}
.js .wi {
  display: inline-block;
  transform: translateY(125%);
  transition: transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 45ms);
}
.js .is-in .wi {
  transform: none;
}

/* ── Up to 879 px: the formation takes the top of the screen, the copy
      follows; the Agenda is a strip stuck to the bottom of the viewport ──── */
@media (max-width: 879px) {
  .header-blur {
    height: 96px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0));
  }
  .formation-top {
    padding-top: 54svh;
  }
  .formation-bottom {
    padding-bottom: 28svh;
  }
  .agenda {
    position: sticky;
    bottom: var(--s-12);
    z-index: 2;
    margin-top: var(--s-24);
    padding: 12px 16px 14px;
    border-radius: 20px;
    background: rgba(8, 8, 8, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .agenda-day {
    font-size: 16px;
  }
  .cita .kind {
    display: none;
  }
  .agenda-empty {
    display: block;
    margin-top: var(--s-6);
  }
  .agenda[data-state='3'] .agenda-empty,
  .agenda[data-state='4'] .agenda-empty,
  .agenda[data-state='5'] .agenda-empty,
  .agenda[data-state='6'] .agenda-empty,
  html:not(.js) .agenda .agenda-empty {
    display: none;
  }
  .slots {
    margin-top: var(--s-6);
  }
  .slot {
    display: none;
  }
  .agenda[data-state='3'] .slot-a,
  .agenda[data-state='4'] .slot-a,
  .agenda[data-state='5'] .slot-a,
  .agenda[data-state='6'] .slot-b,
  html:not(.js) .agenda .slot-b {
    display: grid;
  }
  .agenda .log {
    margin-top: var(--s-6);
  }
  .agenda .log li {
    display: none;
  }
  .agenda[data-state='1'] .log li:nth-child(1),
  .agenda[data-state='2'] .log li:nth-child(2),
  .agenda[data-state='3'] .log li:nth-child(3),
  .agenda[data-state='4'] .log li:nth-child(4),
  .agenda[data-state='5'] .log li:nth-child(5),
  .agenda[data-state='6'] .log li:nth-child(6),
  html:not(.js) .agenda .log li:last-child {
    display: block;
  }
  /* The hub on a phone: the sphere above, the modules as a list. */
  .hub-sticky > .copy + .hub {
    margin-top: var(--s-36);
  }
}

/* ── From 880 px: the header links, two columns, the reference's rhythm ──── */
@media (min-width: 880px) {
  .nav-desktop {
    display: flex;
  }
  .nav-toggle,
  .nav-mobile {
    display: none;
  }
  .screen {
    padding-block: var(--s-120);
  }
  .hero {
    padding-top: calc(var(--header-h) + var(--s-60));
  }
  .screen.right .wrap.copy > * {
    margin-left: auto;
  }
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--s-60);
    align-items: center;
  }
  .split > .inset {
    padding-top: 0;
  }
  .split > .unread-wrap {
    justify-self: end;
    width: 100%;
    max-width: 480px;
  }
  .split > .settings {
    justify-self: end;
    width: 100%;
  }
  .setting {
    grid-template-columns: 168px minmax(0, 1fr);
    align-items: center;
    gap: var(--s-12);
  }
  .demo-grid {
    grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
    gap: var(--s-96);
  }
  .agenda {
    position: sticky;
    top: calc(var(--header-h) + var(--s-24));
    max-width: 440px;
  }
  .thread-sm .step .sys,
  .thread-sm .step .msg.out + .sys {
    justify-self: end;
    text-align: right;
    padding-left: 0;
    padding-right: var(--s-18);
  }
  /* The hub screen: tall, with its content stuck in the middle of the
     viewport while it scrolls through, so the modules stay aligned with the
     sphere the field draws behind the centre column. */
  .hub-screen {
    min-height: 150svh;
    padding-block: 0;
  }
  .hub-sticky {
    position: sticky;
    top: 0;
    height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
    gap: var(--s-60);
    align-items: center;
  }
  .hub-sticky > .copy + .hub {
    margin-top: 0;
  }
  .hub {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-rows: repeat(4, minmax(0, 1fr));
    grid-auto-flow: column;
    column-gap: 0;
    row-gap: var(--s-24);
    height: 72svh;
    align-items: center;
  }
  /* The first four modules fill the left column, the rest the right one,
     and the centre column is the sphere's. */
  .hub-core {
    display: block;
    grid-column: 2;
    grid-row: 1 / -1;
  }
  .mod:nth-child(-n + 5) {
    grid-column: 1;
    text-align: right;
    padding-right: var(--s-36);
  }
  .mod:nth-child(n + 6) {
    grid-column: 3;
    padding-left: var(--s-36);
  }
  .mod::after {
    content: '';
    position: absolute;
    top: 14px;
    width: var(--s-24);
    height: 1px;
    background: rgba(255, 255, 255, 0.16);
  }
  .mod:nth-child(-n + 5)::after {
    right: 0;
  }
  .mod:nth-child(n + 6)::after {
    left: 0;
  }
  .closing {
    align-items: center;
    padding-top: var(--s-120);
  }
  .closing .wrap.copy > * {
    max-width: 560px;
  }
  .closing .display {
    max-width: 12ch;
  }
  .foot-top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ── Reduced motion: no transitions; the canvases yield ──────────────────── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js [data-reveal],
  .js .step[data-reveal] .msg,
  .js .step[data-reveal] .sys,
  .js .wi,
  .cita,
  .agenda .log li,
  .unread li,
  .opt,
  .fit-go,
  .check .box {
    transition: none;
  }
  .js [data-reveal],
  .js .step[data-reveal] .msg,
  .js .step[data-reveal] .sys,
  .js .wi {
    opacity: 1;
    transform: none;
  }
  .pill,
  .pill::after,
  .ghost,
  .ghost::after,
  .nav-bars i,
  .site-head,
  .header-blur,
  .slot-line {
    transition: none;
  }
  .typing i {
    animation: none;
  }
  .unread-num.is-tick {
    animation: none;
  }
}
