/* Ritmo — ritmodigital.uk
   Palette and rhythm taken straight from the app. */
:root {
  --navy: #243B53;
  --navy-deep: #1B2D40;
  --blue: #3B82F6;
  --coral: #F9736A;
  --bg: #F7F9FB;
  --ink: #102A43;
  --muted: #4A5B70;
  --mist: #E6EEF6;
  --line: #C9D3DD;
  --white: #ffffff;
  --maxw: 1080px;
  --display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--display); color: var(--navy); line-height: 1.08; letter-spacing: -0.02em; margin: 0; }

.eyebrow {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 18px;
}

/* ---------- Nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0;
}
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--white); letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; display: block; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: rgba(255,255,255,0.82); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--white); text-decoration: none; }
.nav-links .nav-cta {
  background: var(--white); color: var(--navy); padding: 9px 18px; border-radius: 999px; font-weight: 600;
}
.nav-links .nav-cta:hover { background: var(--mist); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(165deg, #2B445E 0%, var(--navy) 45%, var(--navy-deep) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.hero-inner { padding: 40px 0 92px; }
.hero h1 {
  color: var(--white);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 5rem);
  margin: 26px 0 0;
  max-width: 16ch;
}
.hero h1 .accent-slow { color: #8FB7F5; }
.hero h1 .accent-fast { color: #FF9A92; }
.hero p.lede {
  color: rgba(255,255,255,0.84);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  max-width: 52ch;
  margin: 24px 0 0;
}
.hero-cta { margin-top: 34px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-meta { color: rgba(255,255,255,0.6); font-size: 0.9rem; }

/* Play button */
.play-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--white); color: var(--navy);
  padding: 14px 26px 14px 22px; border-radius: 999px;
  font-weight: 600; font-size: 1.05rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
  transition: transform .15s ease, box-shadow .15s ease;
}
.play-btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 14px 36px rgba(0,0,0,0.28); }
.play-btn svg { width: 20px; height: 22px; display: block; }
.play-btn .label-small { display: block; font-size: 0.72rem; font-weight: 500; color: var(--muted); line-height: 1; margin-bottom: 3px; }
.play-btn .label-big { display: block; font-size: 1.02rem; font-weight: 700; line-height: 1; }

/* ---------- Cadence signature ---------- */
.cadence {
  margin-top: 64px;
  position: relative;
}
.cadence-label { display: flex; justify-content: space-between; color: rgba(255,255,255,0.55); font-size: 0.78rem; letter-spacing: 0.04em; margin-bottom: 10px; }
.cadence-track {
  display: flex; align-items: flex-end; gap: 10px;
  height: 132px;
  position: relative;
}
.seg {
  flex: 1; border-radius: 16px 16px 10px 10px;
  padding: 14px 16px; display: flex; flex-direction: column; justify-content: flex-start;
  color: var(--white); position: relative; overflow: hidden;
  transform-origin: bottom;
  animation: rise .7s cubic-bezier(.2,.8,.2,1) both;
}
.seg .tag { font-weight: 600; font-size: 0.72rem; letter-spacing: 0.12em; opacity: 0.95; }
.seg .dur { font-family: var(--display); font-weight: 700; font-size: 1.05rem; margin-top: 2px; }
.seg.slow { height: 64%; background: linear-gradient(180deg, #5C97F8, var(--blue)); }
.seg.fast { height: 100%; background: linear-gradient(180deg, #FF8C84, var(--coral)); }
.seg:nth-child(1) { animation-delay: .05s; }
.seg:nth-child(2) { animation-delay: .15s; }
.seg:nth-child(3) { animation-delay: .25s; }
.seg:nth-child(4) { animation-delay: .35s; }
.seg:nth-child(5) { animation-delay: .45s; }
.seg:nth-child(6) { animation-delay: .55s; }
@keyframes rise { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }

.playhead {
  position: absolute; top: -6px; bottom: -6px; width: 2px;
  background: rgba(255,255,255,0.9); border-radius: 2px;
  box-shadow: 0 0 12px rgba(255,255,255,0.7);
  left: 0;
  animation: sweep 14s linear 1s infinite;
}
.playhead::after {
  content: ""; position: absolute; top: -5px; left: -4px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--white); box-shadow: 0 0 12px rgba(255,255,255,0.8);
}
@keyframes sweep { 0% { left: 0; } 100% { left: 100%; } }

/* ---------- Sections ---------- */
section.block { padding: 88px 0; }
.block h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 700; max-width: 18ch; }
.block .body-lg { font-size: 1.12rem; color: var(--muted); max-width: 56ch; margin: 20px 0 0; }
.block.alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Benefits */
.benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 48px; }
.benefit {
  background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px;
}
.block.alt .benefit { background: var(--bg); }
.benefit .tick { width: 38px; height: 8px; border-radius: 6px; margin-bottom: 18px; }
.benefit:nth-child(odd) .tick { background: var(--blue); }
.benefit:nth-child(even) .tick { background: var(--coral); }
.benefit h3 { font-size: 1.25rem; font-weight: 700; }
.benefit p { margin: 10px 0 0; color: var(--muted); font-size: 1rem; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 52px; }
.step .num {
  font-family: var(--display); font-weight: 800; font-size: 2.4rem; color: var(--navy);
  line-height: 1; display: inline-block;
}
.step .num span { color: var(--coral); }
.step h3 { font-size: 1.2rem; font-weight: 700; margin-top: 14px; }
.step p { margin: 8px 0 0; color: var(--muted); font-size: 1rem; }

/* CTA band */
.cta-band { background: linear-gradient(150deg, var(--navy), var(--navy-deep)); color: var(--white); text-align: center; }
.cta-band h2 { color: var(--white); font-size: clamp(1.9rem, 4vw, 3rem); margin: 0 auto; max-width: 20ch; }
.cta-band .hero-cta { justify-content: center; margin-top: 32px; }

/* ---------- Footer ---------- */
footer { background: var(--navy-deep); color: rgba(255,255,255,0.7); padding: 56px 0 40px; }
.foot-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; }
.foot-brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 800; font-size: 1.2rem; color: var(--white); }
.foot-brand img { width: 28px; height: 28px; }
.foot-tagline { color: rgba(255,255,255,0.55); font-size: 0.95rem; margin-top: 10px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 12px 30px; }
.foot-links a { color: rgba(255,255,255,0.78); font-size: 0.95rem; }
.foot-links a:hover { color: var(--white); }
.foot-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.12); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; font-size: 0.84rem; color: rgba(255,255,255,0.5); }
.disclaimer { max-width: 60ch; }

/* ---------- Legal / prose pages ---------- */
.legal-head { background: linear-gradient(160deg, #2B445E, var(--navy-deep)); color: var(--white); }
.legal-head .nav-links a { color: rgba(255,255,255,0.82); }
.legal-head-inner { padding: 30px 0 56px; }
.legal-head h1 { color: var(--white); font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; margin-top: 22px; }
.legal-head .updated { color: rgba(255,255,255,0.6); margin-top: 12px; font-size: 0.95rem; }
.prose { max-width: 760px; margin: 0 auto; padding: 64px 24px 90px; }
.prose h2 { font-size: 1.5rem; font-weight: 700; margin: 44px 0 12px; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 22px; }
.prose .card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; margin: 20px 0; }
.prose code { background: var(--mist); padding: 2px 7px; border-radius: 6px; font-size: 0.9em; }
.prose .note { color: var(--muted); font-size: 0.95rem; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-links { gap: 16px; }
  .nav-links .hide-mobile { display: none; }
  .benefits { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 34px; }
  .cadence-track { height: 110px; }
  .seg { padding: 11px 12px; }
  .seg .dur { font-size: 0.95rem; }
  section.block { padding: 64px 0; }
  .foot-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .seg { animation: none; }
  .playhead { display: none; }
}
