/* ==========================================================================
   Cadence — Landing Page
   Paper, ink, and one scarce terracotta accent.
   ========================================================================== */

:root {
  --paper: #FBFAF7;
  --panel: #FFFFFF;
  --sidebar-tint: #F4F1EA;
  --border: #E7E2D9;
  --ink: #2A2521;
  --ink-soft: #6B625A;
  --accent: #A8562F;
  --accent-soft: rgba(168, 86, 47, 0.1);
  --accent-soft-2: rgba(168, 86, 47, 0.06);
  --danger: #B33A3A;
  --success: #1E8449;

  --font-serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --font-sans: 'Avenir Next', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;

  --shadow-soft: 0 1px 2px rgba(42, 37, 33, 0.04), 0 10px 30px -12px rgba(42, 37, 33, 0.12);
  --shadow-lift: 0 4px 10px rgba(42, 37, 33, 0.05), 0 20px 40px -16px rgba(42, 37, 33, 0.18);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1180px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, figure { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}

/* Between phone and the wrap's own 1180px cap, the gutter otherwise stays a
   flat 32px while the canvas keeps growing — proportionally that reads as
   content flush against the edges on tablets. Scale it up through that
   range, then hand back to the fixed 32px once centering takes over. */
@media (min-width: 641px) {
  .wrap { padding: 0 clamp(32px, 6vw, 64px); }
}
@media (min-width: 1180px) {
  .wrap { padding: 0 32px; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: inline-block;
}

.h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(26px, 4vw, 28px);
  line-height: 1.28;
  color: var(--ink);
  margin-bottom: 20px;
  max-width: 20ch;
}

.body-text {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink);
  max-width: 54ch;
  margin-bottom: 18px;
}

.body-text.emphasis {
  font-family: var(--font-serif);
  font-size: 17px;
  font-style: italic;
  color: var(--ink);
}

.fine-print {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 14px;
}

.inline-fine {
  font-size: 14px;
  color: var(--ink-soft);
  margin-left: 10px;
}

mark {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.05em 0.35em;
  border-radius: 3px;
  font-style: normal;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--paper);
  box-shadow: 0 1px 2px rgba(168, 86, 47, 0.15), 0 8px 20px -8px rgba(168, 86, 47, 0.45);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(168, 86, 47, 0.2), 0 14px 28px -10px rgba(168, 86, 47, 0.5);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--ink-soft);
  box-shadow: var(--shadow-soft);
}
.btn-ghost:active { transform: translateY(0); }

.btn-lg { padding: 13px 26px; font-size: 14.5px; }

.cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.cta-row.center { justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 247, 0.86);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 rgba(42,37,33,0.02), 0 12px 24px -20px rgba(42,37,33,0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}

.brand { display: flex; align-items: center; flex-shrink: 0; position: relative; z-index: 95; }
.brand-mark { height: 34px; width: auto; }

.site-nav {
  display: flex;
  gap: 28px;
  margin-right: auto;
  font-size: 14px;
  color: var(--ink-soft);
}
.site-nav a { position: relative; padding: 6px 0; transition: color 0.25s var(--ease); }
.site-nav a:hover { color: var(--ink); }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transition: right 0.3s var(--ease);
}
.site-nav a:hover::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.nav-toggle {
  display: none;
  position: relative;
  z-index: 101;
  width: 36px;
  height: 36px;
  padding: 0;
  margin-left: auto;
  color: var(--ink);
}
.nav-toggle-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s var(--ease), transform 0.35s var(--ease);
}
.nav-toggle-icon-close {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-45deg) scale(0.6);
}
.nav-toggle.is-active .nav-toggle-icon-menu {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(45deg) scale(0.6);
}
.nav-toggle.is-active .nav-toggle-icon-close {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding: 104px 32px 40px;
  background: var(--paper);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0.35s;
}
.mobile-nav a:not(.btn) {
  padding: 16px 0;
  font-family: var(--font-serif);
  font-size: 21px;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}
.mobile-nav a:last-child, .mobile-nav a:nth-last-child(2) {
  padding: 13px 22px;
  margin-top: 12px;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 15px;
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s linear 0s;
}

@media (max-width: 860px) {
  .site-nav, .header-actions { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* stagger children within a wrap when parent gets visible class applied by JS */
.reveal[data-reveal-delay="1"] { transition-delay: 0.08s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.16s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.24s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 44px 0 20px;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}

.hero-copy { text-align: left; }

.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(32px, 6vw, 40px);
  line-height: 1.18;
  color: var(--ink);
  margin-bottom: 22px;
}

.hero-line-wrap {
  color: var(--accent);
}

.hero-lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 56ch;
  margin-bottom: 28px;
}

/* Hero ASCII art panel */
.hero-visual { position: relative; z-index: 1; }

.ascii-panel {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 88%;
  margin: 0 auto;
}

.ascii-panel canvas {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .ascii-panel { aspect-ratio: 1; max-width: 560px; margin: 0 auto; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tint { background: var(--sidebar-tint); }

.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 56px;
}
.section-grid.reverse .section-copy { order: 2; }
.section-grid.reverse .section-visual { order: 1; }

@media (max-width: 900px) {
  .section-grid { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; padding-bottom: 40px; }
  .section-grid.reverse .section-copy,
  .section-grid.reverse .section-visual,
  .order-1-mobile { order: -1; }
}

.section-copy .btn { margin-top: 4px; }

/* ---------- Access gap: the "mind" diagram ---------- */
.mind-diagram {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  margin: 0 auto;
}

.mind-ripple {
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  pointer-events: none;
  animation: mind-ripple 4s var(--ease) infinite;
}
.mind-ripple-2 { animation-delay: 2s; }

@keyframes mind-ripple {
  0% { transform: scale(1); opacity: 0.32; }
  100% { transform: scale(1.6); opacity: 0; }
}

.mind-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.mind-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 0.25s var(--ease), stroke-dashoffset 0.55s var(--ease);
}
.mind-path.is-active { opacity: 0.8; }

.mind-pulse {
  fill: var(--accent);
  opacity: 0;
  filter: drop-shadow(0 0 4px rgba(168, 86, 47, 0.55));
}
.mind-pulse.is-active { opacity: 1; }

.mind-tags { position: absolute; inset: 0; }
.mind-tag {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 20px;
  white-space: nowrap;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
  animation: mind-float 5s ease-in-out infinite;
}
.mind-tag:nth-child(2n) { animation-delay: -1.4s; }
.mind-tag:nth-child(3n) { animation-delay: -2.6s; }
.mind-tag:nth-child(4n) { animation-delay: -3.7s; }

@keyframes mind-float {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -5px; }
}

.mind-tag.is-active {
  border-color: var(--accent);
  color: var(--accent);
  transform: translate(-50%, -50%) scale(1.08);
}

.mind-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  animation: mind-spark-burst 0.7s var(--ease) forwards;
}
@keyframes mind-spark-burst {
  0% { transform: translate(0, 0) scale(1); opacity: 0.9; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.3); opacity: 0; }
}

.mind-center {
  position: absolute;
  inset: 30%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mind-card {
  width: 100%;
  height: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 14%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
}
.mind-skeleton {
  display: block;
  height: 6px;
  width: 55%;
  border-radius: 4px;
  background: var(--sidebar-tint);
}

.mind-manuscript {
  font-family: var(--font-serif);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink);
}
.mind-caret {
  display: inline-block;
  width: 1.5px;
  height: 10px;
  background: var(--accent);
  margin-left: 1px;
  transform: translateY(1px);
  animation: mind-caret-blink 1s step-end infinite;
}
@keyframes mind-caret-blink { 50% { opacity: 0; } }

/* ---------- Feedback toast ---------- */
.mind-toast-slot {
  min-height: 50px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-top: 16px;
}
.mind-toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 280px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 10px;
  padding: 9px 15px;
  box-shadow: var(--shadow-soft);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.3s var(--ease);
}
.mind-toast.is-in { opacity: 1; transform: translateY(0); }
.mind-toast.is-positive { border-left-color: var(--success); }
.mind-toast.is-negative { border-left-color: var(--danger); }

.mind-toast-icon {
  display: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mind-toast-icon svg { width: 11px; height: 11px; }
.mind-toast-icon-positive { color: var(--success); background: rgba(30, 132, 73, 0.12); }
.mind-toast-icon-negative { color: var(--danger); background: rgba(179, 58, 58, 0.12); }
.mind-toast.is-positive .mind-toast-icon-positive { display: flex; }
.mind-toast.is-negative .mind-toast-icon-negative { display: flex; }

@media (max-width: 900px) {
  .mind-diagram { max-width: 300px; }
  .mind-tag { font-size: 9.5px; padding: 4px 8px; }
  .mind-manuscript { font-size: 10px; }
  .mind-toast { font-size: 11.5px; max-width: 240px; }
}

/* ---------- Feedback stack ---------- */
.feedback-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fcard {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.fcard:hover {
  transform: translateY(-4px) rotate(-0.4deg);
  box-shadow: var(--shadow-lift);
  border-color: var(--border);
}
.fcard:nth-child(even):hover { transform: translateY(-4px) rotate(0.4deg); }

.fcard-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.fcard-icon svg { width: 17px; height: 17px; }
.fcard-good .fcard-icon { background: rgba(30, 132, 73, 0.1); color: var(--success); }
.fcard-watch .fcard-icon { background: var(--accent-soft); color: var(--accent); }

.fcard-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.fcard-good .fcard-label { color: var(--success); }
.fcard-watch .fcard-label { color: var(--accent); }
.fcard-text { font-size: 14px; color: var(--ink); line-height: 1.55; }

/* ---------- Trends card ---------- */
.trends-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 24px 18px;
  box-shadow: var(--shadow-lift);
}
.trends-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.trend-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 20px;
}
.trend-chart { width: 100%; height: auto; overflow: visible; }
.grid-line { stroke: var(--border); stroke-width: 1; }
.trend-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 460;
  stroke-dashoffset: 460;
  transition: stroke-dashoffset 1.6s var(--ease);
}
.trends-card.is-visible .trend-path { stroke-dashoffset: 0; }
.trend-dot {
  fill: var(--accent);
  opacity: 0;
  transition: opacity 0.4s var(--ease) 1.4s;
}
.trends-card.is-visible .trend-dot { opacity: 1; }

.trend-legend {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 6px;
  padding: 0 2px;
}

.dimension-grid {
  display: flex;
  gap: 6px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.dimension-grid span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.trends-card.is-visible .dimension-grid span {
  background: var(--accent);
  transition: background 0.5s var(--ease);
}
.trends-card.is-visible .dimension-grid span:nth-child(3n) { background: var(--ink-soft); opacity: 0.4; }
.trends-card.is-visible .dimension-grid span {
  transition-delay: calc(var(--i, 0) * 60ms);
}
.dimension-grid span:nth-child(1) { --i: 1; }
.dimension-grid span:nth-child(2) { --i: 2; }
.dimension-grid span:nth-child(3) { --i: 3; }
.dimension-grid span:nth-child(4) { --i: 4; }
.dimension-grid span:nth-child(5) { --i: 5; }
.dimension-grid span:nth-child(6) { --i: 6; }
.dimension-grid span:nth-child(7) { --i: 7; }
.dimension-grid span:nth-child(8) { --i: 8; }
.dimension-grid span:nth-child(9) { --i: 9; }
.dimension-grid span:nth-child(10) { --i: 10; }
.dimension-grid span:nth-child(11) { --i: 11; }

/* ---------- Continuity scan card ---------- */
.scan-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.scan-beam {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--accent) 40%, var(--accent) 60%, transparent);
  opacity: 0.5;
  left: -2px;
  animation: scan-sweep 5s ease-in-out infinite;
}
@keyframes scan-sweep {
  0% { left: -2px; opacity: 0; }
  8% { opacity: 0.5; }
  48% { left: 100%; opacity: 0.5; }
  56% { opacity: 0; }
  100% { opacity: 0; left: 100%; }
}
.scan-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 8px;
  margin-bottom: 4px;
}
.scan-row:not(.is-clear) { background: var(--accent-soft-2); }
.scan-icon {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--sidebar-tint);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
}
.scan-icon svg { width: 16px; height: 16px; }
.scan-text { flex: 1; font-size: 13.5px; color: var(--ink); }
.scan-text em { font-style: normal; color: var(--ink-soft); }
.scan-flag {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 20px;
}
.scan-flag-ok {
  color: var(--success);
  background: rgba(30, 132, 73, 0.1);
}

/* ---------- Chat card ---------- */
.chat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--sidebar-tint);
}
.reader-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.reader-avatar svg { width: 18px; height: 18px; }
.chat-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.chat-meta { font-size: 11.5px; color: var(--ink-soft); }

.chat-bubbles { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.bubble {
  max-width: 82%;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px);
}
.chat-card.is-visible .bubble { animation: bubble-in 0.6s var(--ease) forwards; }
.chat-card.is-visible .bubble:nth-child(1) { animation-delay: 0.1s; }
.chat-card.is-visible .bubble:nth-child(2) { animation-delay: 0.7s; }
.chat-card.is-visible .bubble:nth-child(3) { animation-delay: 1.3s; }
.chat-card.is-visible .bubble:nth-child(4) { animation-delay: 1.9s; }
@keyframes bubble-in { to { opacity: 1; transform: translateY(0); } }

.bubble-them { align-self: flex-start; background: var(--sidebar-tint); color: var(--ink); border-bottom-left-radius: 4px; }
.bubble-me { align-self: flex-end; background: var(--accent); color: var(--paper); border-bottom-right-radius: 4px; }

/* ---------- The bet section ---------- */
.bet-section { background: var(--ink); color: var(--paper); }
.bet-inner {
  max-width: 640px;
  text-align: center;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.bet-section .eyebrow { color: var(--accent); }
.bet-section .h1 { color: var(--paper); max-width: none; }
.bet-section .body-text { color: rgba(251,250,247,0.72); max-width: 52ch; }
.bet-lede { font-size: 17px; }

.bet-nots {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 6px 0 22px;
}
.bet-nots span {
  font-size: 13px;
  font-weight: 600;
  color: rgba(251,250,247,0.85);
  border: 1px solid rgba(251,250,247,0.2);
  padding: 8px 16px;
  border-radius: 20px;
}

/* ---------- Your manuscript: lo-fi app mockup with padlock ---------- */
.cadence-mockup {
  --cm-ink-10: #EDE7DE;
  --cm-ink-20: #E3DCD1;
  --cm-ink-35: #CFC5B6;
  --cm-line: var(--border);
  --cm-panel: var(--panel);
  --cm-rust: var(--accent);

  position: relative;
  font-size: 16px;
  width: 100%;
  max-width: 33em;
  aspect-ratio: 16 / 9.5;
  background: var(--paper);
  border-radius: 0.75em;
  box-shadow: 0 1.5em 3em rgba(90, 70, 50, 0.12);
  display: grid;
  grid-template-columns: 1fr 2.6fr 1.35fr;
  overflow: hidden;
  margin: 0 auto;
}
.cadence-mockup *, .cadence-mockup *::before { box-sizing: border-box; }

.cadence-mockup .bar {
  height: 0.5em;
  border-radius: 0.25em;
  background: var(--cm-ink-20);
}

.cm-side {
  border-right: 1px solid var(--cm-line);
  padding: 1.1em 0.9em;
  display: flex;
  flex-direction: column;
  gap: 0.65em;
}
.cm-logo { display: flex; align-items: center; gap: 0.45em; margin-bottom: 0.8em; }
.cm-logo-mark { width: 1em; height: 1em; border-radius: 0.3em; background: var(--cm-rust); flex: none; }
.cm-logo .bar { width: 55%; background: var(--cm-ink-35); }

.cm-item { display: flex; align-items: center; padding: 0.45em 0.55em; border-radius: 0.4em; }
.cm-item .bar { width: 70%; }
.cm-item:nth-child(odd) .bar { width: 55%; }
.cm-item.is-active { background: var(--cm-panel); box-shadow: 0 0.1em 0.3em rgba(90, 70, 50, 0.08); }
.cm-item.is-active .bar { background: var(--cm-rust); opacity: 0.55; }

.cm-new {
  margin-top: 0.4em;
  border: 1px dashed var(--cm-ink-35);
  border-radius: 0.4em;
  padding: 0.5em;
  display: flex;
  justify-content: center;
}
.cm-new .bar { width: 45%; background: var(--cm-ink-10); }

.cm-editor { padding: 1.6em 2.2em; }
.cm-title { height: 1.1em; width: 38%; border-radius: 0.3em; background: var(--cm-ink-35); margin-bottom: 0.9em; }
.cm-subtitle { height: 0.55em; width: 24%; border-radius: 0.275em; background: var(--cm-ink-20); margin-bottom: 1.6em; }
.cm-editor p { margin: 0 0 1.2em; display: flex; flex-direction: column; gap: 0.55em; }
.cm-editor .bar { width: 100%; background: var(--cm-ink-10); }
.cm-editor p .bar:last-child { width: 62%; }
.cm-editor p:nth-child(odd) .bar:last-child { width: 78%; }

.cm-feedback {
  border-left: 1px solid var(--cm-line);
  padding: 1.1em;
  display: flex;
  flex-direction: column;
  gap: 0.75em;
}
.cm-fb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.2em; }
.cm-fb-head .bar { width: 40%; background: var(--cm-ink-35); height: 0.6em; }
.cm-fb-head .cm-pill { width: 26%; height: 1.1em; border: 1px solid var(--cm-line); border-radius: 0.55em; background: var(--cm-panel); }

.cm-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--cm-ink-10); border-radius: 0.5em; padding: 0.2em; gap: 0.2em; }
.cm-tab { height: 1.3em; border-radius: 0.4em; }
.cm-tab.is-active { background: var(--cm-panel); }

.cm-card {
  background: var(--cm-panel);
  border: 1px solid var(--cm-line);
  border-radius: 0.55em;
  padding: 0.8em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}
.cm-card .cm-card-title { width: 60%; background: var(--cm-rust); opacity: 0.45; }
.cm-card .bar { width: 100%; background: var(--cm-ink-10); }
.cm-card .bar:last-child { width: 70%; }

.cm-cta {
  margin-top: auto;
  height: 2.2em;
  border-radius: 0.5em;
  background: var(--cm-rust);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cm-cta .bar { width: 45%; background: rgba(255, 255, 255, 0.65); }

/* Padlock overlay */
.cm-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  z-index: 2;
  pointer-events: none;
}
.cm-lock-parallax {
  will-change: transform;
  transition: transform 0.8s var(--ease);
}
.cm-lock-badge {
  width: 6em;
  height: 6em;
  border-radius: 50%;
  background: var(--cm-panel);
  border: 1px solid var(--cm-line);
  box-shadow: 0 0.8em 1.6em rgba(90, 70, 50, 0.18);
  display: grid;
  place-items: center;
  animation: cm-lock-float 3.5s ease-in-out infinite;
}
.cm-lock-badge svg { width: 2.6em; height: 2.6em; stroke: var(--cm-rust); }
@keyframes cm-lock-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.35em); }
}

@media (max-width: 640px) {
  .cadence-mockup { font-size: 10px; aspect-ratio: auto; }
  .cm-side { display: none; }
  .cadence-mockup { grid-template-columns: 2.6fr 1.35fr; }
}

/* ---------- Final CTA ---------- */
.final-cta { padding: 120px 0; text-align: center; }
.final-cta-inner { max-width: 640px; margin: 0 auto; }
.final-cta-title { max-width: none; margin-bottom: 18px; }
.final-cta-lede { margin: 0 auto 28px; color: var(--ink-soft); font-size: 16px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.brand-mark-footer { height: 28px; opacity: 0.85; }
.footer-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-right: auto;
}
.footer-links { display: flex; gap: 20px; font-size: 13px; color: var(--ink-soft); }
.footer-links a:hover { color: var(--ink); }
.footer-copy {
  width: 100%;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 8px;
  order: 10;
}

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-tagline { margin-right: 0; }
}
