/* Phone demos (Meetly, The Founder Times). Tokens and iMessage styling follow maho-agents-site's
   globals.css: brand purple for sent bubbles, Liquid Glass controls. */
:root {
  --background: #ffffff;
  --foreground: #121216;
  --surface: #f6f3ff;
  --line: #e4def5;
  --hl: #d9cdff;
  --muted: #5e5e6a;
  --accent: #6a4cf0;
  --accent-ink: #ffffff;
  --imsg-sent: var(--accent);
  --imsg-gray: #e9e9eb;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(60% 50% at 80% 30%, rgb(106 76 240 / 0.14), transparent 70%),
    var(--surface);
  color: var(--foreground);
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Helvetica Neue", system-ui, sans-serif;
  overflow-x: hidden;
}

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

.stage {
  display: grid;
  grid-template-columns: minmax(0, 440px) auto;
  justify-content: center;
  align-items: center;
  gap: 72px;
  min-height: 100vh;
  padding: 40px 16px;
}

@media (width < 60rem) {
  .stage { grid-template-columns: minmax(0, 1fr); gap: 32px; justify-items: center; }
  .copy { max-width: 440px; }
  .phone-fit { order: -1; }
  .printer { display: none; }
}

/* ---------- Copy column ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 8px; margin: 0 0 14px;
  font: 500 13px "Geist Mono", ui-monospace, monospace; color: var(--muted);
}
.eyebrow img { border-radius: 50%; }

h1 {
  margin: 0;
  font: 500 clamp(30px, 4vw, 42px)/1.05 Epilogue, system-ui, sans-serif;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.hl {
  background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 88% / 100% 42%;
  padding-inline: 0.06em;
}
.lede { margin: 14px 0 24px; color: var(--muted); line-height: 1.5; text-wrap: pretty; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.steps button {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: grid; grid-template-columns: 28px 1fr; gap: 2px 10px;
  width: 100%; padding: 9px 12px; border-radius: 14px;
  transition: background-color 200ms;
}
.steps button:hover { background: rgb(106 76 240 / 0.06); }
.steps button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.steps .n {
  grid-row: span 2; align-self: start; margin-top: 1px;
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font: 500 11px "Geist Mono", monospace; color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line); background: #fff;
  transition: background-color 250ms, color 250ms, box-shadow 250ms;
}
.steps b { font-weight: 600; font-size: 15px; }
.steps small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.steps li[data-state="done"] .n { background: var(--hl); color: var(--accent); box-shadow: none; }
.steps li[data-state="now"] button { background: #fff; box-shadow: 0 6px 20px -12px rgb(40 20 120 / 0.4); }
.steps li[data-state="now"] .n { background: var(--accent); color: #fff; box-shadow: none; }

.controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  font: 500 14px inherit; font-family: inherit;
  background: #fff; color: var(--foreground); box-shadow: inset 0 0 0 1px var(--line);
  transition: scale 150ms ease-out;
}
.btn:active { scale: 0.96; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.btn svg { width: 14px; height: 14px; fill: currentColor; }
.btn .i-play { display: none; }
.is-paused .btn .i-play { display: block; }
.is-paused .btn .i-pause { display: none; }
.speed { display: inline-flex; padding: 3px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.speed button {
  border: 0; background: none; cursor: pointer; font: 500 13px "Geist Mono", monospace;
  height: 30px; padding: 0 10px; border-radius: 999px; color: var(--muted);
}
.speed button[aria-pressed="true"] { background: var(--surface); color: var(--accent); }

.hood {
  margin-top: 24px; padding: 12px 14px; border-radius: 14px;
  background: #16141f; color: #d8d3f5;
  font: 400 11.5px/1.55 "Geist Mono", ui-monospace, monospace;
  min-height: 138px;
}
.hood-title { margin: 0 0 6px; color: #8d86b3; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; }
.hood ol { list-style: none; margin: 0; padding: 0; }
.hood li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: fade 300ms ease-out both; }
.hood li::before { content: "› "; color: #8b73ff; }
.hood li:not(:last-child) { opacity: 0.55; }
.fine { margin: 12px 2px 0; font-size: 12px; color: var(--muted); }

/* ---------- Phone ---------- */
.phone-fit { position: relative; }
.phone {
  --w: 360px; --h: 760px;
  position: relative; margin: 0;
  width: var(--w); height: var(--h);
  transform-origin: top left;
  border-radius: 56px; padding: 7px;
  background: #1c1c1f;
  box-shadow:
    0 0 0 1px #3a3a40 inset,
    0 50px 90px -40px rgb(40 20 120 / 0.55),
    0 0 0 2px rgb(255 255 255 / 0.5);
}
.phone::before {
  content: ""; position: absolute; inset: 10% -80px 0; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(106 76 240 / 0.28), transparent);
  filter: blur(30px);
}

.imsg { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif; }

.screen {
  position: relative; height: 100%; overflow: hidden;
  display: flex; flex-direction: column;
  border-radius: 49px; background: #fff;
}

.status {
  position: relative; z-index: 7;
  transition: color 300ms; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  height: 54px; padding: 6px 30px 0 40px;
  font-weight: 600; font-size: 16px; letter-spacing: -0.01em;
}
.island {
  position: absolute; left: 50%; top: 11px; translate: -50% 0;
  width: 116px; height: 34px; border-radius: 20px; background: #000;
}
.sys { display: flex; gap: 6px; align-items: center; }
.sys svg { height: 12px; width: auto; fill: currentColor; }

.glass {
  background: rgb(255 255 255 / 0.72);
  backdrop-filter: blur(12px) saturate(1.6);
  -webkit-backdrop-filter: blur(12px) saturate(1.6);
  box-shadow:
    0 0 0 0.5px rgb(0 0 0 / 0.06),
    0 2px 10px rgb(0 0 0 / 0.08),
    inset 0 1px 0 rgb(255 255 255 / 0.9);
}

/* Views: one per conversation, sliding like iOS navigation. */
.views { position: relative; flex: 1; min-height: 0; }
.view {
  position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff;
  translate: 100% 0;
  transition: translate 420ms cubic-bezier(0.32, 0.72, 0, 1), opacity 420ms;
}
.view[data-pos="active"] { translate: 0 0; z-index: 2; }
.view[data-pos="left"] { translate: -28% 0; opacity: 0.4; z-index: 1; }
.view[data-pos="right"] { translate: 100% 0; z-index: 3; }

.hdr {
  flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start;
  padding: 0 14px 6px;
  background: linear-gradient(#f2f2f4, #fff);
}
.hdr .round { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
.hdr .round svg { width: 20px; height: 20px; }
.hdr .video { justify-self: end; }
.who { display: flex; flex-direction: column; align-items: center; }
.av-wrap { position: relative; }
.av { display: block; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; outline: 1px solid rgb(0 0 0 / 0.1); outline-offset: -1px; }
.av.initials {
  display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 22px;
  background: linear-gradient(#a5abb8, #858b98);
}
.badge {
  position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(#96a1c0, #6e7a9c); box-shadow: 0 0 0 2px #fff;
}
.badge svg { width: 14px; height: 14px; fill: #fff; }
.name {
  display: flex; align-items: center; gap: 4px; margin: -6px 0 0; padding: 4px 12px;
  border-radius: 999px; font-weight: 700; font-size: 15px; letter-spacing: -0.01em;
  position: relative;
}
.name svg { height: 10px; width: auto; color: var(--muted); }

.scroller { flex: 1; min-height: 0; overflow: hidden; }
.msgs { list-style: none; margin: 0; padding: 8px 16px 12px; display: flex; flex-direction: column; }
.msgs > li { display: flex; flex-direction: column; margin-top: 2px; animation: msg-in 260ms cubic-bezier(0.2, 0, 0, 1) both; }
.msgs > li.starts { margin-top: 10px; }
.msgs > li:first-child { margin-top: 0; }
.from { margin: 0 0 2px 12px; font-size: 11px; color: var(--muted); }
.delivered { margin: 2px 4px 0 0; text-align: right; font-size: 11px; font-weight: 500; color: var(--muted); }
.stamp { margin: 6px 0 2px; text-align: center; font-size: 11px; color: var(--muted); }
.stamp b { font-weight: 600; }
.note { margin: 4px auto; max-width: 85%; text-align: center; font-size: 11px; color: var(--muted); }

.imsg-in, .imsg-out {
  position: relative; z-index: 0; margin: 0;
  max-width: 78%; border-radius: 18px; padding: 7px 12px;
  font-size: 15px; line-height: 1.3; white-space: pre-line; overflow-wrap: anywhere;
}
.imsg-in { background: var(--imsg-gray); color: #000; margin-right: auto; }
.imsg-out { background: var(--imsg-sent); color: #fff; margin-left: auto; }

/* The tail: a bubble-colored corner, then a page-colored scoop. */
.imsg-tail::before, .imsg-tail::after { content: ""; position: absolute; bottom: 0; z-index: -1; height: 20px; }
.imsg-tail::before { width: 20px; }
.imsg-tail::after { width: 10px; background: #fff; }
.imsg-in.imsg-tail::before { left: -7px; background: var(--imsg-gray); border-bottom-right-radius: 16px; }
.imsg-in.imsg-tail::after { left: -10px; border-bottom-right-radius: 10px; }
.imsg-out.imsg-tail::before { right: -7px; background: var(--imsg-sent); border-bottom-left-radius: 16px; }
.imsg-out.imsg-tail::after { right: -10px; border-bottom-left-radius: 10px; }

.typing { display: inline-flex; gap: 4px; padding: 12px 14px; width: max-content; }
.typing span { width: 8px; height: 8px; border-radius: 50%; background: #8e8e93; animation: dot 900ms ease-in-out infinite; }
.typing span:nth-child(2) { animation-delay: 150ms; }
.typing span:nth-child(3) { animation-delay: 300ms; }

/* Calendar event, as Meetly shares it once booked. */
.event { display: flex; gap: 10px; align-items: center; padding: 8px; }
.event .cal {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 44px; height: 46px; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
}
.event .mon { font-size: 9px; font-weight: 700; color: #e5484d; letter-spacing: 0.04em; }
.event .day { font-size: 20px; font-weight: 500; line-height: 1; }
.event .info { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.3; }
.event .info b { font-size: 14px; font-weight: 600; }
.event .meta { color: var(--muted); font-size: 12px; }

/* Link preview for the Meet room. */
.linkcard { padding: 0; overflow: hidden; width: 230px; }
.linkcard .lc-top { display: grid; place-items: center; height: 92px; background: #f1f3f4; }
.linkcard .lc-top svg { width: 58px; height: auto; }
.linkcard .lc-body { display: flex; flex-direction: column; padding: 8px 12px 9px; font-size: 13px; line-height: 1.3; }
.linkcard b { font-weight: 600; }
.linkcard span { color: var(--muted); font-size: 12px; }

/* Composer and keyboard. */
.composer { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px 8px; background: #fff; }
.plus { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--muted); }
.field {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: center;
  min-height: 36px; padding: 7px 42px 7px 16px; border-radius: 20px; font-size: 15px; line-height: 1.3;
}
.field-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.placeholder { position: absolute; left: 16px; color: rgb(94 94 106 / 0.7); }
.caret { display: none; width: 2px; height: 19px; margin-left: 1px; border-radius: 1px; background: var(--accent); animation: blink 1s steps(1) infinite; }
.is-typing .caret { display: inline-block; }
.is-typing .placeholder, .has-text .placeholder { display: none; }
.send {
  position: absolute; right: 4px; bottom: 4px; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent);
  scale: 0; transition: scale 180ms cubic-bezier(0.3, 1.4, 0.5, 1);
}
.send svg { width: 16px; height: 16px; }
.has-text .send { scale: 1; }
.send.down { scale: 0.85; }

.kb {
  flex: none; height: 0; overflow: hidden; background: #d4d6dc;
  transition: height 320ms cubic-bezier(0.32, 0.72, 0, 1);
}
.kb-open .kb { height: 206px; }
.kb .rows { display: flex; flex-direction: column; gap: 10px; padding: 8px 3px 0; }
.kb .row { display: flex; justify-content: center; gap: 5px; }
.kb .k {
  display: grid; place-items: center; flex: 0 0 30px; height: 40px; border-radius: 6px;
  background: #fff; box-shadow: 0 1px 0 #898a8d; font-size: 20px; color: #000;
  transition: background-color 80ms, scale 80ms;
}
.kb .k.fn { flex-basis: 42px; background: #abafba; font-size: 14px; }
.kb .k.space { flex: 1 1 auto; max-width: 180px; font-size: 14px; }
.kb .k.ret { flex-basis: 84px; font-size: 14px; }
.kb .k.down { background: #abafba; scale: 0.94; }
.kb .row:nth-child(2) { padding-inline: 16px; }
.kb .row:nth-child(4) { padding-inline: 3px; }

.home-ind {
  position: absolute; left: 50%; bottom: 8px; translate: -50% 0; z-index: 8;
  width: 134px; height: 5px; border-radius: 3px; background: #000;
}
.screen > .composer, .screen > .kb { position: relative; z-index: 4; }
.screen { padding-bottom: 20px; }
.kb-open .screen, .screen.kb-open { padding-bottom: 0; }

/* Notification banner. */
.banner {
  position: absolute; z-index: 9; left: 10px; right: 10px; top: 10px;
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px;
  border-radius: 24px; background: rgb(246 246 248 / 0.86);
  backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8);
  box-shadow: 0 10px 30px -10px rgb(0 0 0 / 0.35), 0 0 0 0.5px rgb(0 0 0 / 0.08);
  translate: 0 -140%; opacity: 0;
  transition: translate 460ms cubic-bezier(0.32, 0.72, 0, 1), opacity 300ms, scale 150ms;
}
.banner.show { translate: 0 0; opacity: 1; }
.banner.down { scale: 0.97; }
.banner-icon { flex: none; width: 38px; height: 38px; border-radius: 10px; overflow: hidden; }
.banner-icon img, .banner-icon svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.banner-body { flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; }
.banner-head { display: flex; justify-content: space-between; gap: 8px; }
.banner-head b { font-weight: 600; }
.banner-head span { color: rgb(0 0 0 / 0.5); font-size: 12px; }
.banner-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* The simulated finger. */
.touch {
  position: absolute; z-index: 20; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  background: rgb(106 76 240 / 0.28); box-shadow: 0 0 0 2px rgb(106 76 240 / 0.45);
  opacity: 0; scale: 0.6; pointer-events: none;
}
.touch.tap { animation: tap 520ms ease-out both; }

.end {
  position: absolute; inset: 0; z-index: 30; display: grid; place-items: center;
  background: rgb(255 255 255 / 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity 400ms;
}
.end.show { opacity: 1; pointer-events: auto; }

/* Pause freezes CSS motion too. Jumping to a step skips it entirely. */
.is-paused .phone *, .is-paused .phone *::before { animation-play-state: paused !important; }
.instant .phone *, .instant .phone *::before, .instant .phone *::after, .instant .hood li, .instant .printer, .instant .printer * {
  transition: none !important; animation-duration: 0s !important; animation-delay: 0s !important;
}

/* PDF attachment, like the site's thread. */
.file { display: flex; align-items: center; gap: 12px; }
.file .doc {
  flex: none; display: grid; place-items: center; width: 32px; height: 40px; border-radius: 6px;
  background: #fff; font: 700 9px "Geist Mono", ui-monospace, monospace; color: #e5484d;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
}
.file .fname { display: block; font-size: 14px; font-weight: 500; }
.file .fdetail { display: block; font-size: 12px; color: var(--muted); }
.file.down { scale: 0.97; }

/* Lock screen, drawn like the site's. */
.locked .status { color: #fff; }
.lockscreen {
  position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column;
  padding: 64px 12px 36px; color: #fff;
  background:
    radial-gradient(120% 80% at 20% 0%, #b8a6ff 0%, transparent 60%),
    radial-gradient(100% 70% at 100% 100%, #2d1f7a 0%, transparent 70%),
    linear-gradient(160deg, #7b5cff, #4b33c9);
  opacity: 0; translate: 0 -100%;
  transition: translate 520ms cubic-bezier(0.32, 0.72, 0, 1), opacity 300ms;
}
.locked .lockscreen { opacity: 1; translate: 0 0; }
.ls-date { margin: 0; text-align: center; font-size: 17px; font-weight: 600; opacity: 0.9; }
.ls-time { margin: 0; text-align: center; font-size: 86px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; }
.ls-notifs { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ls-notifs li { animation: notif-in 520ms cubic-bezier(0.65, 0, 0.35, 1) both; }
.ls-card {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 22px; color: #000;
  transition: scale 150ms;
}
.ls-card.down { scale: 0.96; }
.ls-card img { flex: none; width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.ls-card .banner-body span { display: block; }
.ls-hint { margin: 14px auto 0; font-size: 12px; opacity: 0.75; }
.ls-notifs:empty + .ls-hint { visibility: hidden; }

/* PDF viewer, slid up over the thread. */
.pdf {
  position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; background: #f2f2f4;
  translate: 0 100%; transition: translate 460ms cubic-bezier(0.32, 0.72, 0, 1);
}
.pdf.show { translate: 0 0; }
.pdf-head {
  flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 58px 14px 10px; font-size: 14px; font-weight: 600; background: rgb(255 255 255 / 0.9);
  box-shadow: 0 0.5px 0 rgb(0 0 0 / 0.15);
}
.pdf-head .done { justify-self: start; padding: 6px 12px; border-radius: 999px; color: var(--accent); font-weight: 600; transition: scale 150ms; }
.pdf-head .done.down { scale: 0.92; }
.pdf-title { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-body { flex: 1; min-height: 0; overflow: hidden; padding: 14px; }
.pdf-page { background: #fff; border-radius: 2px; box-shadow: 0 6px 20px -8px rgb(0 0 0 / 0.35); }

/* A small printer beside the phone: the edition slides out of it. */
.phone-fit .printer {
  position: absolute; left: calc(100% + 28px); top: 34%; width: 190px; z-index: 2;
  opacity: 0; translate: 20px 0; transition: opacity 500ms, translate 500ms cubic-bezier(0.2, 0, 0, 1);
}
.printer.on { opacity: 1; translate: 0 0; }
/* Without room beside the phone, it sits over the phone's lower corner. */
@media (width < 84rem) {
  .phone-fit .printer { left: calc(100% - 80px); top: auto; bottom: 200px; }
}
.printer-body {
  position: relative; z-index: 2; height: 70px; border-radius: 14px 14px 10px 10px;
  background: linear-gradient(#fbfbfd, #e4e4ea); box-shadow: 0 18px 30px -18px rgb(40 20 120 / 0.5), inset 0 0 0 1px #d8d8e0;
}
.printer-body::before {
  content: ""; position: absolute; left: 22px; right: 22px; bottom: 16px; height: 6px; border-radius: 3px; background: #2a2a31;
}
.printer-body::after {
  content: ""; position: absolute; right: 16px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: #c9c9d2;
}
.printer.busy .printer-body::after { background: #34c759; animation: blink 600ms steps(1) infinite; }
.printer-sheet {
  position: absolute; left: 30px; right: 30px; top: 56px; z-index: 1; overflow: hidden;
  height: 0; transition: height 2600ms linear;
  background: #fff; box-shadow: 0 8px 18px -8px rgb(0 0 0 / 0.35);
}
.printer-sheet > * { width: 290px; transform: scale(0.448); transform-origin: top left; }
.printer.printed .printer-sheet { height: 170px; }
.printer-label { margin: 8px 0 0; text-align: center; font: 500 11px "Geist Mono", monospace; color: var(--muted); }

@keyframes notif-in { from { opacity: 0; translate: 0 30px; } to { opacity: 1; translate: 0 0; } }
@keyframes msg-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@keyframes dot { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes fade { from { opacity: 0; translate: 0 4px; } }
@keyframes tap {
  0% { opacity: 0; scale: 0.6; }
  30% { opacity: 1; scale: 1; }
  100% { opacity: 0; scale: 1.5; }
}

@media (prefers-reduced-motion: reduce) {
  .view, .banner, .kb { transition-duration: 1ms; }
}
