/* goes.live brand site — shared stylesheet */

:root {
  --ink: #0A0F1E;
  --live: #2BD576;
  --paper: #F7F8FA;
  --slate: #8B93A7;        /* AA on ink; on paper: large/decorative only */
  --slate-deep: #666F85;   /* AA-safe muted text on paper */
  --bubble-in: #E9ECF2;
  --line: #E2E5EC;
  --grot: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--grot);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}
.footer :focus-visible { outline-color: var(--paper); }

.wrap { max-width: 1060px; margin-inline: auto; padding-inline: 1.5rem; }
.wrap-narrow { max-width: 720px; margin-inline: auto; padding-inline: 1.5rem; }
.section { padding-block: 4.5rem; }

h1, h2 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: 2.25rem; }

/* the wordmark's period carried into type */
.dot {
  display: inline-block;
  width: 0.15em;
  height: 0.15em;
  margin-left: 0.05em;
  border-radius: 50%;
  background: var(--live);
  position: relative;
}
.dot-pulse::after {
  content: "";
  position: absolute;
  inset: -0.09em;
  border-radius: 50%;
  border: 2px solid var(--live);
  opacity: 0;
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.5); opacity: 0.7; }
  70%, 100% { transform: scale(1.7); opacity: 0; }
}

/* section kicker, shaped like an incoming text */
.kicker {
  display: inline-block;
  background: var(--bubble-in);
  border-radius: 14px 14px 14px 4px;
  padding: 0.3rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 1.1rem;
}

/* ---------- nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem;
}
/* HTML wordmark: aligns glyph-flush with the page grid (the SVG masters
   carry built-in clearspace, which reads as misalignment in a layout) */
.wordmark {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
}
.nav .wordmark { font-size: 1.75rem; }
.nav-link {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--live);
  padding-bottom: 1px;
}
.nav-link:hover { border-bottom-width: 3px; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
  padding-block: 3.5rem 5rem;
}
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4rem); }
.hero-sub {
  margin: 1.5rem 0 2.25rem;
  max-width: 26em;
  font-size: 1.125rem;
}
.cta-line { margin: 0; }
.cta-number {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--live);
  text-decoration-thickness: 0.14em;
  text-underline-offset: 0.22em;
}
.cta-number:hover { text-decoration-thickness: 0.2em; }
.cta-note {
  margin: 0.6rem 0 0;
  font-size: 0.875rem;
  color: var(--slate-deep);
}

/* ---------- the signature: conversation panel ---------- */
.phone {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 18px 40px -24px rgba(10, 15, 30, 0.25);
  max-width: 330px;
  width: 100%;
  justify-self: end;
  overflow: hidden;
}
.phone-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.pt-avatar { width: 22px; height: 22px; border-radius: 6px; display: block; }
.pt-name {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
}
.pt-check { display: block; width: 13px; height: 13px; }
.thread {
  list-style: none;
  margin: 0;
  padding: 1.1rem 1rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  height: 23rem;
  position: relative; /* makes li.offsetTop thread-relative for the follow-scroll */
  overflow-y: auto;
  scrollbar-width: none; /* the script keeps it pinned to the newest message */
}
.thread::-webkit-scrollbar { display: none; }
.thread > li { animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) var(--t, 0s) both; }
.stamp {
  align-self: center;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--slate-deep);
}
.msg {
  max-width: 82%;
  padding: 0.5rem 0.8rem;
  border-radius: 18px;
  font-size: 0.875rem;
  line-height: 1.45;
}
.msg.in {
  background: var(--bubble-in);
  color: var(--ink);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
}
.msg.out {
  background: var(--live);
  color: var(--ink);
  align-self: flex-end;
  border-bottom-right-radius: 6px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* RCS quick replies: rise in, one gets tapped, the row folds away */
.thread > .chips {
  display: flex;
  gap: 0.45rem;
  align-self: flex-start;
  max-height: 3em;
  overflow: hidden;
  animation:
    rise 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) var(--t, 0s) both,
    fold-away 0.4s ease-in var(--t-away, 4.5s) forwards;
}
.chip-qr {
  border: 1.5px solid var(--live);
  border-radius: 999px;
  padding: 0.28rem 0.8rem;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}
.chip-qr.sel { animation: qr-fill 0.2s ease-out var(--t-sel, 3.9s) forwards; }
@keyframes qr-fill {
  to { background: var(--live); }
}
@keyframes fold-away {
  to {
    opacity: 0;
    max-height: 0;
    margin-top: -0.55rem;
    padding-top: 0;
    padding-bottom: 0;
  }
}

/* photo attachment bubble */
.msg.photo { padding: 0.3rem; max-width: 70%; }
.photo-img { display: block; width: 100%; height: auto; border-radius: 14px; }
.photo-cap {
  display: block;
  padding: 0.3rem 0.55rem 0.3rem;
  font-size: 0.8125rem;
}
.receipt {
  align-self: flex-end;
  font-family: var(--mono);
  font-size: 0.625rem;
  color: var(--slate-deep);
  margin-top: -0.25rem;
}

/* typing indicator: fades in, holds, collapses away before the card */
.thread > .typing {
  align-self: flex-start;
  background: var(--bubble-in);
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  padding: 0.7rem 0.9rem;
  display: flex;
  gap: 5px;
  overflow: hidden;
  animation: typing-cycle 2.3s linear var(--t, 7s) both;
}
.typing i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--slate);
  animation: blink 1s infinite;
}
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}
/* padding/margin must be pinned in the early keyframes: a property missing
   from them interpolates from 0% onward, deflating the bubble the whole time */
@keyframes typing-cycle {
  0%   { opacity: 0; transform: translateY(10px); max-height: 4em; padding-top: 0.7rem; padding-bottom: 0.7rem; margin-top: 0; }
  11%  { opacity: 1; transform: none; }
  88%  { opacity: 1; max-height: 4em; padding-top: 0.7rem; padding-bottom: 0.7rem; margin-top: 0; }
  100% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-top: -0.55rem; }
}

/* preview card inside the final incoming bubble */
.msg.card-msg { padding: 0.7rem 0.7rem 0.8rem; max-width: 92%; }
.card-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.card-row img { width: 28px; height: 28px; display: block; border-radius: 7px; }
.card-name {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.chip {
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: var(--live);
  color: var(--ink);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: auto;
}
.site-thumb {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-top: 0.55rem;
}
.card-sub {
  margin: 0.45rem 0 0;
  font-size: 0.8125rem;
  color: var(--slate-deep);
}

/* ---------- how it works ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.step-num {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--slate-deep);
  display: block;
  margin-bottom: 0.6rem;
}
.step-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.0625rem;
  margin: 0 0 0.4rem;
}
.step-body { margin: 0; font-size: 0.9375rem; }

/* ---------- pricing ---------- */
.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.plan {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem;
}
.plan-featured {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.plan-name {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.25rem;
  margin: 0 0 0.35rem;
}
.plan-price {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0 0 1.25rem;
}
.plan ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}
.plan li {
  padding-left: 1.1em;
  position: relative;
  margin-bottom: 0.55rem;
}
.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--live);
}

/* ---------- trust strip ---------- */
.trust { border-top: 1px solid var(--line); }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.trust-grid p { margin: 0; font-size: 0.9375rem; }
.trust-grid a { color: var(--ink); }

/* ---------- closing CTA: the live moment, drenched ---------- */
.cta-band {
  background: var(--live);
  color: var(--ink);
  padding-block: 4.5rem;
}
.cta-band h2 { margin-bottom: 1.5rem; }
.cta-band .dot { background: var(--ink); }
.cta-band .cta-number {
  text-decoration-color: var(--ink);
}
.cta-band .cta-note { color: rgba(10, 15, 30, 0.8); }

/* ---------- footer ---------- */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding-block: 3rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}
.footer .wordmark { font-size: 1.4rem; color: var(--paper); }
.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-left: auto;
  font-size: 0.9375rem;
}
.footer-links a { color: var(--paper); text-decoration-color: var(--live); }
.footer-fine {
  margin: 1.75rem 0 0;
  width: 100%;
  font-size: 0.8125rem;
  color: var(--slate);
}

/* ---------- prose pages (privacy, terms) ---------- */
.prose { padding-block: 2.5rem 5rem; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 0 0 1.5rem; }
.prose h2 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 2.25rem 0 0.6rem;
}
.prose p, .prose li { text-wrap: pretty; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }
.draft {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 0.8rem 1rem;
  margin: 0 0 2.5rem;
  background: #fff;
}
.muted { color: var(--slate-deep); font-size: 0.9375rem; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 3rem; padding-block: 2rem 4rem; }
  .phone { justify-self: center; }
  .steps { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .section { padding-block: 3.25rem; }
}

/* ---------- reduced motion: everything lands in final state ---------- */
@media (prefers-reduced-motion: reduce) {
  .thread > li { animation: none; opacity: 1; transform: none; }
  /* transient rows; final state is after they fold away */
  .thread > .typing, .thread > .chips { display: none; }
  .typing i, .chip-qr.sel { animation: none; }
  .dot-pulse::after { animation: none; }
}
