:root {
  --ink: #0e2142;
  --muted: #5d6c84;
  --paper: #fcfcfc;
  --line: #e2e8f1;
  --blue: #0a84ff;
  --soft: #eaf3ff;
  --gray-bubble: #e9e9eb;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Segoe UI", Inter, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(820px 520px at 88% -6%, #0a84ff16, transparent 62%),
    radial-gradient(720px 500px at -12% 42%, #5e5ce610, transparent 60%);
}
a {
  color: inherit;
  text-decoration: none;
}
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1072px, calc(100% - 32px));
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 20px;
  background: #ffffffd6;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid #e2e8f1cc;
  border-radius: 999px;
  box-shadow: 0 10px 34px #0e214216;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.5px;
}
.brand svg {
  width: 30px;
  height: 30px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.nav-links a:hover {
  color: var(--ink);
}
.pill {
  display: inline-block;
  background: linear-gradient(180deg, #3da2ff, #0a84ff);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 11px 22px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px #0a84ff44;
}
.pill.big {
  font-size: 17px;
  padding: 16px 34px;
}
.pill.ghost {
  background: #fff;
  color: var(--blue);
  border: 1px solid var(--line);
}
.pill.ghost:hover {
  box-shadow: 0 8px 24px #0e214218;
}

h1 {
  font-size: clamp(44px, 6.2vw, 78px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 0 0 22px;
}
h1 em,
h2 em {
  font-style: normal;
  background: linear-gradient(118deg, #0a84ff 20%, #5e5ce6 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- the opening story: You text. → It books. ---------- */
.story {
  position: relative;
}
.story-pin {
  position: relative;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  overflow: hidden;
  padding-top: 40px;
}
h1.story-h {
  position: relative;
  width: 100%;
  height: 1.08em;
  margin: 0;
  font-size: clamp(54px, 10vw, 112px);
  line-height: 1;
  letter-spacing: -0.05em;
  text-align: center;
  transform: translateY(23svh) scale(1.14);
  transition: transform 0.75s cubic-bezier(0.25, 1.1, 0.35, 1);
}
.story.s1 .story-h {
  transform: none;
}
.sh {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.25, 1.1, 0.35, 1);
}
.sh-1 {
  opacity: 1;
  transform: none;
}
.story.s4 .sh-1 {
  opacity: 0;
  transform: translateY(-18px);
}
.story.s4 .sh-2 {
  opacity: 1;
  transform: none;
}
.story .sh-2.sh-out {
  opacity: 0;
  transform: translateY(-18px);
}
.story-phone {
  transform: translateY(108%);
  opacity: 0;
  transition: transform 0.85s cubic-bezier(0.25, 1.08, 0.35, 1),
    opacity 0.5s ease;
}
.story.s1 .story-phone {
  transform: none;
  opacity: 1;
}
.st {
  opacity: 0;
  transform: translateY(14px) scale(0.85);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.34, 1.3, 0.5, 1);
}
.st-out {
  transform-origin: bottom right;
}
.st-typing,
.st-in {
  transform-origin: bottom left;
}
.story.s1 .st-out {
  opacity: 1;
  transform: none;
}
.story.s2 .st-typing {
  opacity: 1;
  transform: none;
}
.story.s3 .st-typing {
  display: none;
}
.story.s3 .st-in {
  opacity: 1;
  transform: none;
}
.story.s4:not(.live) .pt-notif {
  transform: none;
}
.pt-book {
  margin-top: 10px;
  background: #0e2142;
  color: #fff;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 14px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s ease 0.55s,
    transform 0.5s cubic-bezier(0.34, 1.3, 0.5, 1) 0.55s;
}
.story.s4:not(.live) .pt-book {
  opacity: 1;
  transform: none;
}
.story.live .pt-book {
  display: none;
}
/* once the showcase loop owns the phone, the notif follows .show again */
.story.cycle:not(.live) .pt-notif {
  transform: translateY(-140%);
}
.story.cycle:not(.live) .pt-notif.show {
  transform: none;
}
.story.cycle:not(.live) .pt-book {
  opacity: 0;
  transform: translateY(8px);
}
.story.cycle:not(.live) .pt-notif.show .pt-book {
  opacity: 1;
  transform: none;
}
.story .compose-bar {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease 0.35s;
}
.story.s3 .compose-bar,
.story.live .compose-bar {
  opacity: 1;
  pointer-events: auto;
}
.chat-day {
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  color: #8a97ab;
  margin-bottom: 2px;
}
.chev {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-38%);
}
.avatar.c0 {
  background: linear-gradient(180deg, #a9b2c0, #8e99a9);
}

@media (max-height: 760px) {
  .story.s1 .story-phone {
    transform: scale(0.84);
    transform-origin: top center;
  }
  .story-pin {
    gap: 14px;
  }
}

/* the brand slide: Blue texts for your AI. */
.story-cta .brand-big {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 28px;
}
.story-cta .brand-big svg {
  width: 36px;
  height: 36px;
}
.story-cta h2 {
  font-size: clamp(44px, 7vw, 76px);
  margin-bottom: 34px;
}
@media (prefers-reduced-motion: reduce) {
  .story {
    height: auto;
  }
  .story-pin {
    position: static;
    height: auto;
    padding: 130px 0 70px;
  }
  .story-h,
  .sh,
  .story-phone,
  .st,
  .pt-book,
  .story .compose-bar {
    transition: none;
  }
}

/* ---------- phone ---------- */
.phone {
  width: 330px;
  margin: 0 auto;
  background: #0b0d12;
  border-radius: 48px;
  padding: 12px;
  box-shadow: 0 44px 110px #0e214238;
}
.screen {
  background: #fff;
  border-radius: 38px;
  overflow: hidden;
  padding-bottom: 26px;
  position: relative;
}
.pt-notif {
  position: absolute;
  top: 12px;
  left: 10px;
  right: 10px;
  background: #ffffffF2;
  backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 11px 14px;
  box-shadow: 0 10px 34px #0e214233;
  transform: translateY(-140%);
  transition: transform 0.45s cubic-bezier(0.3, 1.2, 0.4, 1);
}
.pt-notif.show {
  transform: none;
}
.pt-notif-top {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #6b7a92;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.pt-mini {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 5px;
  color: #fff;
  font-size: 8.5px;
  font-weight: 800;
  background: #0a84ff;
}
.pt-when {
  margin-left: auto;
  text-transform: none;
  font-weight: 500;
}
.pt-notif-body {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.2px;
}
.statusbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px 4px;
}
.sb-time {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.sb-ics {
  fill: #0b0d12;
}
.notch {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  width: 96px;
  height: 26px;
  background: #0b0d12;
  border-radius: 999px;
}
.msg-head {
  position: relative;
  text-align: center;
  padding: 10px 0 12px;
  border-bottom: 1px solid #f0f2f6;
}
.msg-head .avatar {
  width: 44px;
  height: 44px;
  margin: 0 auto 5px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
}
.avatar.c1 { background: #0a84ff; }
.avatar.c2 { background: #af52de; }
.avatar.c3 { background: #ff2d55; }
.avatar.c4 { background: #5856d6; }
.avatar.c5 { background: #ff9500; }
.ph-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.msgs {
  padding: 18px 14px 6px;
  display: grid;
  gap: 9px;
  align-content: start;
  height: 322px;
  overflow: hidden;
  transition: opacity 0.4s ease;
}
.msgs.fade-out {
  opacity: 0;
}
.msgs .b,
.msgs .typing {
  animation: pop 0.3s ease;
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.85);
  }
}
.sent-label {
  font-size: 10px;
  color: #8a97ab;
  justify-self: end;
  margin-top: -3px;
}
.b {
  font-size: 14.5px;
  line-height: 1.45;
  padding: 10px 14px;
  max-width: 82%;
  width: fit-content;
  white-space: pre-line;
}
.b.in {
  background: var(--gray-bubble);
  color: #111318;
  border-radius: 18px 18px 18px 5px;
}
.b.out {
  background: linear-gradient(180deg, #3da2ff, #0a84ff);
  color: #fff;
  border-radius: 18px 18px 5px 18px;
  justify-self: end;
}
.typing {
  display: inline-flex;
  gap: 4px;
  padding: 13px 15px;
  background: var(--gray-bubble);
  border-radius: 18px 18px 18px 5px;
  width: fit-content;
}
.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa2ad;
  animation: blink 1.3s infinite;
}
.typing i:nth-child(2) {
  animation-delay: 0.18s;
}
.typing i:nth-child(3) {
  animation-delay: 0.36s;
}
@keyframes blink {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

/* ---------- sections ---------- */
section {
  padding: 90px 0;
  scroll-margin-top: 90px;
}
.center {
  text-align: center;
}
h2 {
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.045em;
  margin: 0 0 16px;
}
.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 40px;
}
.lead b {
  color: var(--ink);
}

/* the power behind it: one field of sand, many agents */
.power-stage {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  height: 0;
  transition: height 0.5s ease;
}
.power-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}
.power-names {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  margin: 28px 0 0;
}
.power-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--ink);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.power-name .chip-ic {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  transition: filter 0.45s ease;
}
.power-names.cycling .power-name {
  opacity: 0.4;
}
.power-names.cycling .power-name .chip-ic {
  filter: grayscale(1);
}
.power-names.cycling .power-name.on {
  opacity: 1;
  transform: translateY(-2px);
}
.power-names.cycling .power-name.on .chip-ic {
  filter: none;
}
.power-name small {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

/* works with */
.chip-ic {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.ic-grok { background: #000; }
.ic-hark { background: #0e2142; }
.ic-muse { background: #ff2d55; }
.ic-dots { background: #10a37f; letter-spacing: 1px; }
.pt-mini.pt-img,
.chip-ic.chip-img,
.partner-logo.logo-img {
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}
.pt-mini.pt-cover,
.chip-ic.chip-cover,
.partner-logo.logo-cover {
  background: #000;
  overflow: hidden;
}
.pt-mini img,
.chip-ic img,
.partner-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pt-mini.pt-img img,
.chip-ic.chip-img img,
.partner-logo.logo-img img {
  object-fit: contain;
  padding: 8%;
  box-sizing: border-box;
}
.dev-note {
  margin-top: 34px;
  font-size: 14px;
  color: var(--muted);
}
.dev-note a {
  color: var(--blue);
  font-weight: 700;
}

/* manifesto: every screen becomes one — pinned so the merge plays out
   over two viewports of scroll, no matter how fast the thumb moves */
section.manifesto.center {
  display: block;
  min-height: 170svh;
  padding: 0;
  background: #141414;
  overflow: clip;
}
.m-pin {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.manifesto .wrap {
  position: relative;
  width: 100%;
}
.manifesto h2 {
  color: #fff;
  font-size: clamp(38px, 6vw, 72px);
}
.merge {
  position: relative;
  height: 190px;
  margin-bottom: 30px;
}
.merge-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  transform: scale(0);
  will-change: transform;
}
.merge-core svg {
  width: 100%;
  height: 100%;
  display: block;
}
.scr {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 92px;
  height: 64px;
  margin: -32px 0 0 -46px;
  background: #1d1d1d;
  border: 1px solid #323232;
  border-radius: 10px;
  padding: 8px 10px;
  box-sizing: border-box;
  will-change: transform, opacity;
}
.scr-k {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #8a8a8a;
}
.scr i {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: #2d2d2d;
  margin-top: 6px;
}
.scr i.b2 {
  width: 62%;
}

/* final */
.final {
  padding: 110px 0 120px;
}
.availability {
  margin-top: 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.final h2 {
  font-size: clamp(40px, 6vw, 72px);
}
.final .lead {
  margin-bottom: 36px;
}

footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 44px;
}
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.foot .brand {
  font-size: 17px;
}
.foot .brand svg {
  width: 24px;
  height: 24px;
}
.foot-links {
  display: flex;
  gap: 22px;
  font-weight: 600;
}
.foot-links a:hover {
  color: var(--ink);
}

/* reveal animation */
.fade {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .fade {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .typing i {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 900px) {
  section {
    padding: 64px 0;
  }
  .nav-links .hide-m {
    display: none;
  }
  .nav {
    top: 10px;
    padding: 8px 10px 8px 16px;
  }
  .phone {
    width: 300px;
  }
}

/* ambient sand field sits behind everything */
#sand-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ---------- the page is alive ---------- */
.compose-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 2px;
}
.compose-bar input {
  flex: 1;
  border: 1px solid #d8dee9;
  border-radius: 999px;
  padding: 9px 15px;
  font: inherit;
  font-size: 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.compose-bar input:focus {
  border-color: #0a84ff;
}
.compose-bar button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #3da2ff, #0a84ff);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.compose-bar button:active {
  transform: scale(0.92);
}
/* showcase loop: headlines may run two lines — stack them, never clip */
.story.cycle .story-h {
  height: auto;
  min-height: 2.16em;
  display: grid;
  align-items: center;
  font-size: clamp(40px, 7.4vw, 84px);
}
.story.cycle .sh {
  position: static;
  grid-area: 1 / 1;
}

/* the brand slide: sand type you can touch */
.story-cta .cta-mark {
  width: 54px;
  height: 54px;
  margin-bottom: 30px;
  animation: mark-bob 5.2s ease-in-out infinite;
}
@keyframes mark-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}
.story-cta h2 {
  font-size: clamp(56px, 11.5vw, 148px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  margin-bottom: 18px;
}
.cta-hint {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a3a3a3;
  margin: 0 0 38px;
}

/* tactile type: the brand headline is soft material (touchtype.js) */
.tt {
  display: inline-block;
  will-change: transform;
}
.tt-blue {
  color: var(--blue);
}



/* ---------- SKIN: editorial monochrome, one blue (match the app) ---------- */
:root {
  --ink: #141414;
  --muted: #8a8a8a;
  --line: #e8e8e8;
}
body::before {
  background: none;
}
h1 em,
h2 em {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: #0a84ff;
}
h1,
h2 {
  letter-spacing: -0.05em;
  color: var(--ink);
}
.nav {
  border-color: var(--line);
  box-shadow: 0 0 0 1px #0000000a, 0 1px 3px #0000000f;
}
.pill {
  background: #0a84ff;
  box-shadow: none;
}
.pill:hover {
  box-shadow: 0 4px 16px #0a84ff33;
}
.pill.ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.eyebrow {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
footer {
  border-color: var(--line);
}

/* ---------- the day spine (clock HUD; the thread is the line now) ---------- */
#day-hud {
  position: fixed;
  left: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.hud-face {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #141414;
}
.hud-cap {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a3a3a3;
}
.fade {
  transform: translateY(26px) scale(0.99);
  transition: opacity 0.65s ease, transform 0.8s cubic-bezier(0.25, 1.25, 0.35, 1);
}
@media (max-width: 760px) {
  #day-hud {
    left: 2px;
  }
  #day-hud .hud-cap {
    display: none;
  }
}

/* ---------- FLUID: one thread, words that rise ---------- */
body {
  position: relative;
}
#pt-thread {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
}
#pt-thread .thread-ghost {
  fill: none;
  stroke: #ececec;
  stroke-width: 1.5;
}
#pt-thread .thread-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.6;
}

/* ---------- bubbles like the real Messages app ---------- */
.b {
  position: relative;
}
.b.in {
  border-radius: 18px;
}
.b.out {
  border-radius: 18px;
}
.b.in::after,
.b.out::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 12px;
  height: 16px;
  pointer-events: none;
}
.b.in::after {
  left: -5.5px;
  background: var(--gray-bubble);
  -webkit-mask: radial-gradient(12px 13px at 0 0, #0000 98%, #000 100%);
  mask: radial-gradient(12px 13px at 0 0, #0000 98%, #000 100%);
}
.b.out::after {
  right: -5.5px;
  background: #0a84ff;
  -webkit-mask: radial-gradient(12px 13px at 100% 0, #0000 98%, #000 100%);
  mask: radial-gradient(12px 13px at 100% 0, #0000 98%, #000 100%);
}
.typing::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -5.5px;
  width: 12px;
  height: 16px;
  background: var(--gray-bubble);
  -webkit-mask: radial-gradient(12px 13px at 0 0, #0000 98%, #000 100%);
  mask: radial-gradient(12px 13px at 0 0, #0000 98%, #000 100%);
}
.typing {
  position: relative;
}
.msgs .b,
.msgs .typing {
  animation: pop 0.42s cubic-bezier(0.34, 1.3, 0.5, 1);
}
.msgs .b.in {
  transform-origin: bottom left;
}
.msgs .b.out {
  transform-origin: bottom right;
}
@media (prefers-reduced-motion: reduce) {
  .msgs .b,
  .msgs .typing {
    animation: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fade {
    transition: none;
  }
}

/* scroll like a deck, not a page */
html {
  scroll-snap-type: y proximity;
}
section.center {
  scroll-snap-align: start;
}
section.center {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-margin-top: 0;
}
section.center .wrap {
  width: 100%;
}
@media (max-width: 760px) {
  section.center {
    min-height: auto;
  }
  html {
    scroll-snap-type: none;
  }
}

/* ---------- MOBILE: the iPhone is the native habitat ---------- */
* {
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  overflow-x: clip;
}
html {
  -webkit-text-size-adjust: 100%;
}
a,
button,
summary,
input {
  touch-action: manipulation;
}
.pill:active,
.dock-cta:active {
  transform: scale(0.96);
}
.compose-bar button:active {
  transform: scale(0.9);
}

/* the day dock: live clock + the only button that matters (phone only) */
#day-dock {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 55;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 9px 9px 9px 18px;
  background: #ffffffe6;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 0 0 1px #0000000a, 0 14px 44px #0e214226;
  transform: translateY(150%);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.3, 1.1, 0.4, 1),
    opacity 0.4s ease;
}
#day-dock.on {
  transform: none;
  opacity: 1;
}
.dock-left {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.dock-face {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  white-space: nowrap;
}
.dock-cap {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a3a3a3;
  white-space: nowrap;
}
.dock-cta {
  margin-left: auto;
  flex-shrink: 0;
  background: #0a84ff;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  padding: 12px 20px;
  transition: transform 0.15s ease;
}

@media (max-width: 760px) {
  .wrap {
    padding: 0 20px;
  }
  section {
    padding: 74px 0;
  }
  h1 {
    font-size: clamp(40px, 11.5vw, 54px);
  }
  h2 {
    font-size: clamp(30px, 8.8vw, 40px);
  }
  .lead {
    font-size: 16.5px;
  }
  .nav {
    top: max(10px, env(safe-area-inset-top, 0px));
  }
  .phone {
    width: min(320px, calc(100vw - 64px));
    border-radius: 44px;
  }
  .screen {
    border-radius: 34px;
  }
  .msgs {
    height: 284px;
  }
  h1.story-h {
    font-size: clamp(52px, 15vw, 76px);
  }
  .compose-bar {
    padding: 10px 10px 4px;
  }
  .compose-bar input {
    font-size: 16px; /* exactly 16 — iOS won't zoom the page on focus */
    padding: 10px 16px;
  }
  .compose-bar button {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
  .pt-notif {
    top: 8px;
  }

  .story.cycle .story-h {
    font-size: clamp(34px, 9.5vw, 58px);
  }
  .story-cta h2 {
    font-size: clamp(46px, 13.5vw, 64px);
  }

  .power-names {
    gap: 18px;
  }
  .power-name {
    font-size: 14px;
  }
  .final {
    padding: 90px 0 40px;
  }
  footer {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  #day-hud {
    display: none;
  }
  #day-dock {
    display: flex;
  }

}
@media (prefers-reduced-motion: reduce) {
  #day-dock {
    transition: none;
  }
}

/* ---------- Text me: blue sand rises, nothing left but your number ---------- */
button.pill {
  font: inherit;
  font-weight: 700;
  border: 0;
  cursor: pointer;
}
.tm-sheet {
  position: fixed;
  inset: 0;
  z-index: 95;
}
.tm-sheet[hidden] {
  display: none;
}
.tm-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #2f97ff 0%, #0a84ff 42%, #0557c9 100%);
  transform: translateY(103%);
  transition: transform 0.7s cubic-bezier(0.3, 1, 0.3, 1);
}
.tm-sheet.on::before {
  transform: none;
}
#tm-sand {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.tm-x {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: 16px;
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.4s ease 0.45s;
}
.tm-sheet.on .tm-x {
  opacity: 0.75;
}
.tm-form,
.tm-done {
  position: absolute;
  left: 50%;
  top: 34%;
  width: min(560px, 88vw);
  text-align: center;
  transform: translate(-50%, 0);
}
.tm-form {
  opacity: 0;
  transform: translate(-50%, 30px);
  transition: opacity 0.5s ease 0.3s,
    transform 0.65s cubic-bezier(0.25, 1.1, 0.35, 1) 0.3s;
}
.tm-sheet.on .tm-form {
  opacity: 1;
  transform: translate(-50%, 0);
}
.tm-form[hidden],
.tm-done[hidden] {
  display: none;
}
#tm-phone {
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1.5px solid #ffffff54;
  border-radius: 0;
  color: #fff;
  font: inherit;
  font-size: clamp(32px, 8vw, 56px);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
  padding: 0 0 14px;
  outline: none;
  caret-color: #fff;
  transition: border-color 0.35s ease;
}
#tm-phone:focus {
  border-color: #ffffffd9;
}
#tm-phone::placeholder {
  color: #ffffff66;
  font-weight: 500;
}
.tm-go {
  margin-top: 40px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: #0a84ff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.55);
  transition: opacity 0.35s ease,
    transform 0.5s cubic-bezier(0.34, 1.45, 0.5, 1);
}
.tm-sheet.ready .tm-go {
  opacity: 1;
  transform: none;
}
.tm-err {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffffb8;
  margin: 24px 0 0;
}
.tm-done {
  color: #fff;
  font-size: clamp(30px, 7vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
}
@keyframes tm-shake {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  20% {
    transform: translate(calc(-50% - 11px), 0);
  }
  45% {
    transform: translate(calc(-50% + 9px), 0);
  }
  70% {
    transform: translate(calc(-50% - 5px), 0);
  }
}
.tm-form.shake {
  animation: tm-shake 0.5s ease;
}
html.tm-lock,
html.tm-lock body {
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .tm-sheet::before,
  .tm-form,
  .tm-x,
  .tm-go {
    transition: none;
  }
}
