/* Pulse Buddy — coming-soon page.
   Layout after comolio.framer.website: one viewport, top bar, countdown,
   giant headline with floating cards, bottom bar. Brand tokens from the app. */

:root {
  --bg: #f3f1ea;          /* soft grey-paper, the Comolio f2f2f2 warmed to the brand */
  --paper: #fdfaf2;
  --ink: #0c0c0c;
  --muted: #6b6960;
  --line: #e6e2d6;
  --accent: #ffd60a;
  --good: #2a7a4f;
  --warn: #d39413;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Top bar ─────────────────────────────────────────────── */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 32px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 44px; width: auto; display: block; }
.links { display: flex; gap: 28px; }
.links a {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  padding-bottom: 2px; border-bottom: 1px solid transparent; transition: border-color .15s;
}
.links a:hover { border-color: var(--ink); }

/* ── Stage ───────────────────────────────────────────────── */
.stage {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 24px 16px 40px;
}

.count {
  position: relative; z-index: 3;
  display: flex; align-items: flex-start; gap: 16px;
  font-family: "Inter", var(--sans);
}
.count > div { display: flex; flex-direction: column; align-items: center; min-width: 60px; }
.count b { font-size: 40px; font-weight: 400; line-height: 1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.count span { margin-top: 8px; font-size: 13px; color: var(--muted); }
.count i { font-style: normal; font-size: 32px; line-height: 40px; color: var(--ink); }

/* "COMING SOON" — white type in a difference-blend layer: it reads as ink
   on the page and inverts whatever slides behind it (the marquee). */
.title {
  position: relative; z-index: 2;
  margin: 0;
  font-family: "Inter", var(--sans);
  font-size: clamp(70px, 7.9vw, 113px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: normal;
  color: #fff;
  mix-blend-mode: difference;
  white-space: nowrap;
  pointer-events: none;
}

/* Alternate glyphs, after the reference: half-height raised I, small N,
   two small raised O's in SOON. Plain "COMING SOON" for assistive tech. */
.title .g { font-style: normal; display: inline-block; line-height: 1; }
.title .g-i { font-size: 0.5em; vertical-align: top; margin: 0.16em 0.04em 0 0.02em; }
.title .g-n { font-size: 0.62em; vertical-align: baseline; margin-right: 0.02em; }
.title .g-o { font-size: 0.5em; vertical-align: top; margin: 0.12em 0 0 0; }
.title .g-o + .g-o { margin-left: -0.04em; }

/* Googly O's — a pupil sits in each raised O's counter and follows the cursor.
   The whole headline is in a difference layer, so the white pupil reads as ink. */
.title .eye { position: relative; }
.title .pupil {
  position: absolute;
  left: 50%; top: 52%;
  width: 0.26em; height: 0.26em;
  border-radius: 50%;
  background: #fff;
  translate: calc(-50% + var(--ex, 0px)) calc(-50% + var(--ey, 0px));
  transition: scale .12s ease;
}
.title .eye.is-blinking .pupil { scale: 1 0.1; }


.tag {
  position: relative; z-index: 2;
  margin-top: 8px;
  max-width: 520px;
  font-size: 18px; line-height: 1.55;
  color: var(--muted);
}
.tag em { font-style: normal; color: var(--ink); font-weight: 600; }

/* ── Waitlist ────────────────────────────────────────────── */
.wait {
  position: relative; z-index: 2;
  margin-top: 28px;
  width: 100%; max-width: 520px;
  display: flex; align-items: center;
  padding: 6px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 40px -16px rgba(20, 16, 0, 0.25);
}
.wait:focus-within { box-shadow: 0 0 0 3px rgba(255, 214, 10, 0.55), 0 10px 40px -16px rgba(20, 16, 0, 0.25); }
.wait input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 18px; font: inherit; font-size: 16px; color: var(--ink); }
.wait input::placeholder { color: #9a978d; }
.wait button {
  flex-shrink: 0; border: 0; cursor: pointer;
  padding: 14px 22px; border-radius: 999px;
  background: var(--ink); color: #fff;
  font: inherit; font-size: 15px; font-weight: 600;
  transition: background .15s, transform .15s;
}
.wait button:hover { background: #262624; transform: translateY(-1px); }
.msg { position: relative; z-index: 2; min-height: 22px; margin-top: 10px; font-size: 14px; }
.msg.success { color: var(--good); }
.msg.error { color: #b4432f; }

/* ── Marquee of tiles behind the headline ─────────────────── */
.band {
  position: relative;
  width: calc(100% + 32px);
  margin-left: -16px; margin-right: -16px;
  min-height: 320px;
  margin-top: 20px;
  display: grid; place-items: center;
}
.tiles {
  /* Taller than the band so the tiles and their shadows are never cut off
     top or bottom; only the left/right edges clip (and fade via the mask). */
  position: absolute; inset: -120px 0;
  padding-top: 120px;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.track {
  display: flex; align-items: flex-start; gap: 72px;
  width: max-content;
  padding-left: 72px;
  animation: marquee 46s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.tile {
  flex: 0 0 auto;
  width: 240px;
  padding: 16px;
  border-radius: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(20, 16, 0, 0.35), 0 2px 6px rgba(20, 16, 0, 0.05);
  text-align: left;
  font-size: 12px;
}
/* Staggered vertical offsets, like Comolio's scattered images. */
.tile--score   { margin-top: 24px; }
.tile--diff    { margin-top: 110px; width: 272px; }
.tile--fix     { margin-top: 10px; width: 292px; }
.tile--pr      { margin-top: 130px; width: 262px; }
.tile--traffic { margin-top: 0; }
.tile--index   { margin-top: 124px; width: 236px; }
.tile--result  { margin-top: 20px; width: 220px; }

.tile__hd { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.tile__hd span { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.tile__hd em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.tile__hd em.up { color: var(--good); }

/* score tile */
.tile--score { display: flex; gap: 14px; align-items: center; }
.ring {
  width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--accent) 0 calc(var(--v) * 1%), #efece2 calc(var(--v) * 1%) 100%);
  display: grid; place-items: center;
  animation: ring-fill 1.4s cubic-bezier(.2,.7,.2,1) forwards;
}
@property --v { syntax: "<number>"; inherits: false; initial-value: 0; }
@keyframes ring-fill { from { --v: 0; } to { --v: 82; } }
.ring__in { width: 64px; height: 64px; border-radius: 50%; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; line-height: 1; padding-bottom: 3px; }
.ring__in b { font-family: var(--mono); font-size: 22px; font-weight: 500; line-height: 1; }
.ring__in span { display: block; font-size: 8.5px; color: var(--muted); line-height: 1; }
.bars { list-style: none; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.bars li { display: grid; grid-template-columns: 52px 1fr; gap: 8px; align-items: center; font-size: 11px; font-weight: 600; }
.bars i { display: block; height: 6px; border-radius: 999px; background: #efece2; overflow: hidden; position: relative; }
.bars i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--ink); border-radius: 999px; }

/* fixes tile */
.fix { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.fix > div { min-width: 0; }
.fix__n { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 10px; display: grid; place-items: center; }
.fix b { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fix small { font-size: 10.5px; color: var(--muted); }
.fix__st { font-size: 9.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #efece2; color: var(--muted); white-space: nowrap; }
.fix__st--pr { background: rgba(211, 148, 19, 0.16); color: #9a6b0a; }
.fix__st--done { background: rgba(42, 122, 79, 0.14); color: var(--good); }

/* traffic tile */
.big { display: flex; align-items: baseline; gap: 6px; }
.big b { font-family: var(--mono); font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.big span { font-size: 11px; color: var(--muted); }
.spark { width: 100%; height: 64px; margin-top: 8px; display: block; overflow: visible; }

/* results tile */
.res { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; }
.res b { font-family: var(--mono); font-size: 28px; font-weight: 500; color: var(--good); letter-spacing: -0.02em; }
.res span { font-size: 11px; color: var(--muted); line-height: 1.4; }
.res--pos { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.res--pos b { font-size: 18px; }

/* ── Bottom bar ──────────────────────────────────────────── */
.bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 32px 26px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink);
}
.bottom__r a { border-bottom: 1px solid transparent; }
.bottom__r a:hover { border-color: var(--ink); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .top, .bottom { padding-left: 20px; padding-right: 20px; }
  .links { gap: 18px; }
  .band { min-height: 240px; }
  .track { gap: 40px; animation-duration: 34s; }
  .tile { width: 200px; font-size: 11px; padding: 14px; }
  .tile--fix { width: 250px; margin-top: 8px; }
  .tile--diff, .tile--pr, .tile--index { margin-top: 80px; width: 220px; }
  .tile--result { width: 200px; margin-top: 10px; }
}
@media (max-width: 520px) {
  .title { font-size: 53px; }
  .band { min-height: 200px; }
  .count { gap: 8px; }
  .count b { font-size: 28px; }
  .count i { font-size: 22px; line-height: 28px; }
  .tag { font-size: 16px; }
  .wait { flex-direction: column; border-radius: 20px; padding: 8px; }
  .wait input { width: 100%; padding: 12px 10px; }
  .wait button { width: 100%; }
  .bottom { flex-direction: column; text-align: center; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .track { animation: none; }
}

/* ── Animated bits ─────────────────────────────────────────── */
.spark__line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s ease-out .2s forwards; }
.spark__fill { opacity: 0; animation: fade-in .6s ease 1.4s forwards; }
.spark__dot  { opacity: 0; animation: fade-in .3s ease 1.7s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }

/* AI rewrite tile */
.diff__page { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.diff__before { font-size: 12px; color: var(--muted); text-decoration: line-through; text-decoration-color: #b4432f; }
.diff__after { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink); min-height: 2.6em; line-height: 1.3; }
.caret { display: inline-block; width: 2px; height: 1em; background: var(--ink); vertical-align: -0.15em; margin-left: 1px; animation: blink-caret 1s steps(1) infinite; }
@keyframes blink-caret { 50% { opacity: 0; } }
.diff__why { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--muted); }

/* GitHub PR tile */
.pr__title { font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.pr__branch { margin-top: 6px; font-family: var(--mono); font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.pr__ic { width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--muted); flex-shrink: 0; }
.pr__stats { margin-top: 8px; font-size: 11px; color: var(--muted); }
.pr__stats .plus { color: var(--good); } .pr__stats .minus { color: #b4432f; }
.pr__row { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.pr__check { font-size: 10.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.pr__check i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); animation: pulse-dot 1s ease-in-out infinite; }
.is-checked .pr__check i { background: var(--good); animation: none; }
.is-checked .pr__check { color: var(--good); }
@keyframes pulse-dot { 50% { opacity: .35; } }
.pr__merge { border: 0; border-radius: 7px; padding: 5px 10px; font: inherit; font-size: 11px; font-weight: 700; background: #efece2; color: var(--muted); transition: background .3s, color .3s; }
.is-checked .pr__merge { background: var(--good); color: #fff; }
.is-merged .pr__merge { background: #6f42c1; color: #fff; }
.is-merged .pr__merge::before { content: "Merged"; }
.is-merged .pr__merge { font-size: 0; }
.is-merged .pr__merge::before { font-size: 11px; }

/* Indexing tile */
.idx { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; margin-top: 4px; }
.idx i { display: block; aspect-ratio: 1; border-radius: 5px; background: #efece2; animation: idx-on .3s ease forwards; }
.idx i:nth-child(1) { animation-delay: .3s; } .idx i:nth-child(2) { animation-delay: .6s; }
.idx i:nth-child(3) { animation-delay: .9s; } .idx i:nth-child(4) { animation-delay: 1.2s; }
.idx i:nth-child(5) { animation-delay: 1.5s; } .idx i:nth-child(6) { animation-delay: 1.8s; }
.idx i:nth-child(7) { animation-delay: 2.1s; }
.idx i.idx__pending { animation: idx-wait 1.2s ease-in-out infinite; }
@keyframes idx-on { to { background: var(--good); } }
@keyframes idx-wait { 50% { background: #e0dccd; } }
.idx__note { margin-top: 10px; font-size: 10.5px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .ring, .spark__line, .spark__fill, .spark__dot, .idx i, .caret, .pr__check i { animation: none !important; }
  .ring { --v: 82; } .spark__line { stroke-dashoffset: 0; } .spark__fill, .spark__dot { opacity: 1; } .idx i:not(.idx__pending) { background: var(--good); }
}
