/* Rimshot — getrimshot.com */

/* ---------- Tokens ---------- */

:root {
  /* iOS system red, matching the app. Separate fills per theme, plus
     darker "ink" variants that keep accent text readable. */
  --accent-l: #ff383c;
  --accent-d: #ff4245;
  --ink-l: #d41c24;
  --ink-d: #ff4245;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1120px;
  --gutter: 24px;
  --nav-h: 60px;
  --r-card: 26px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --accent: var(--accent-d);
  --accent-ink: var(--ink-d);
  --bg: #000;
  --surface: #1c1c1e;
  --fill: rgba(118, 118, 128, .24);
  --fill-strong: rgba(118, 118, 128, .5);
  --beat: rgba(118, 118, 128, .32);
  --beat-done: rgba(118, 118, 128, .6);
  --text: #fff;
  --text-2: rgba(235, 235, 245, .64);
  --text-3: rgba(235, 235, 245, .34);
  --sep: rgba(84, 84, 88, .62);
  --nav-bg: rgba(0, 0, 0, .72);
  --seg-thumb: #636366;
  --frame-edge: #3a3a3c;
  --phone-shadow: 0 0 0 1px rgba(255, 255, 255, .04);
}

:root[data-theme="light"] {
  color-scheme: light;
  --accent: var(--accent-l);
  --accent-ink: var(--ink-l);
  --bg: #f2f2f7;
  --surface: #fff;
  --fill: rgba(118, 118, 128, .12);
  --fill-strong: rgba(118, 118, 128, .36);
  --beat: rgba(118, 118, 128, .2);
  --beat-done: rgba(118, 118, 128, .5);
  --text: #000;
  --text-2: rgba(60, 60, 67, .68);
  --text-3: rgba(60, 60, 67, .32);
  --sep: rgba(60, 60, 67, .16);
  --nav-bg: rgba(242, 242, 247, .8);
  --seg-thumb: #fff;
  --frame-edge: #c9ccd2;
  --phone-shadow: 0 50px 90px -40px rgba(0, 0, 0, .38);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.47 var(--font);
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}

img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
}
.skip:focus { top: 12px; }

.dot { color: var(--accent); }

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

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 .5px 0 transparent;
  transition: box-shadow .2s, background-color .3s var(--ease);
}
.nav.is-scrolled { box-shadow: 0 .5px 0 var(--sep); }

.nav .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -.025em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
/* The icon's black tile would vanish into the dark page; a hairline keeps its shape. */
:root[data-theme="dark"] .brand img { box-shadow: 0 0 0 1px rgba(255, 255, 255, .16); }

.nav-links {
  display: flex;
  gap: 26px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}
.nav-links a {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  transition: color .15s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-actions { margin-left: auto; }
}

/* ---------- Segmented control ---------- */

.seg {
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 2px;
  border-radius: 999px;
  background: var(--fill);
}
.seg::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc(50% - 2px);
  border-radius: 999px;
  background: var(--seg-thumb);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 1px 1px rgba(0, 0, 0, .04);
  transition: transform .3s var(--ease), background-color .3s var(--ease);
}
:root[data-theme="dark"] .seg-theme::before { transform: translateX(100%); }

.seg button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 30px;
  min-width: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--text);
  font: 500 14px/1 var(--font);
  cursor: pointer;
}
.seg button svg { width: 17px; height: 17px; }
.seg button[aria-pressed="false"] { color: var(--text-2); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 58px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  font: 700 19px/1 var(--font);
  letter-spacing: -.015em;
  cursor: pointer;
  transition: transform .15s var(--ease), filter .15s, background-color .3s var(--ease);
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; flex: none; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: var(--fill); color: var(--text); }
.btn-small { height: 36px; padding: 0 16px; font-size: 15px; font-weight: 600; white-space: nowrap; }

/* ---------- Pulse (beat indicator) ---------- */

.pulse {
  display: flex;
  align-items: center;
  gap: 5px;
}
.pulse i {
  width: 26px;
  height: 12px;
  border-radius: 4px;
  background: var(--fill-strong);
}
.pulse span {
  margin-left: 10px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: no-preference) {
  .pulse i {
    animation: pulse 2s step-end infinite;
    animation-delay: calc(var(--i) * .5s);
  }
  .pulse i:nth-child(1) { --i: 0; }
  .pulse i:nth-child(2) { --i: 1; }
  .pulse i:nth-child(3) { --i: 2; }
  .pulse i:nth-child(4) { --i: 3; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse i:first-child { background: var(--accent); }
}

@keyframes pulse {
  0% { background: var(--accent); }
  25% { background: var(--fill-strong); }
}

/* ---------- Phone frame ---------- */

.phone {
  --pw: 320px;
  width: var(--pw);
  max-width: 100%;
  padding: calc(var(--pw) * .03);
  border: calc(var(--pw) * .011) solid var(--frame-edge);
  border-radius: calc(var(--pw) * .168);
  background: #050505;
  box-shadow: var(--phone-shadow);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.screen {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 1206 / 2622;
  overflow: hidden;
  border-radius: calc(var(--pw) * .142);
  background: var(--surface);
}

.screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* site.js sets src for the current theme only. */
.screen img:not([src]) { visibility: hidden; }

.island {
  position: absolute;
  top: 3.3cqw;
  left: 50%;
  width: 31.6cqw;
  height: 9.5cqw;
  transform: translateX(-50%);
  border-radius: 99px;
  background: #000;
}

.placeholder {
  position: absolute;
  inset: 0;
  display: none;
  place-content: center;
  gap: 3cqw;
  padding: 8cqw;
  text-align: center;
  color: var(--text-3);
}
.screen.is-missing .placeholder { display: grid; }
.placeholder strong {
  color: var(--text-2);
  font-size: 7cqw;
  letter-spacing: -.02em;
}
.placeholder code {
  font: 4.2cqw/1.6 var(--mono);
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(32px, 5vw, 48px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 48px;
  align-items: center;
}

.hero h1 {
  margin-top: 28px;
  font-size: clamp(3.6rem, 10.5vw, 8.4rem);
  line-height: .92;
  font-weight: 800;
  letter-spacing: -.055em;
}

.lede {
  max-width: 30em;
  margin-top: 28px;
  color: var(--text-2);
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.45;
  letter-spacing: -.016em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 36px;
}
.cta-meta {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
}
.cta-row + .cta-meta { margin-top: 16px; }

/* Android visitors see the Android beta first. data-platform is set in each page's <head>. */
:root[data-platform="android"] .cta-row [data-store="android"] { order: -1; background: var(--accent); color: #fff; }
:root[data-platform="android"] .cta-row [data-store="ios"] { background: var(--fill); color: var(--text); }

.hero-phone {
  display: flex;
  justify-content: center;
  margin: 0;
}
/* The whole phone fits under the nav on short laptop screens.
   A phone frame is about 2.08 times as tall as it is wide. */
.hero-phone .phone {
  --pw: clamp(280px, calc((100svh - var(--nav-h) - 96px) / 2.08), 340px);
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-phone .phone { --pw: min(300px, calc(100vw - 2 * var(--gutter))); }
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(96px, 13vw, 168px) 0;
  scroll-margin-top: var(--nav-h);
}
.section + .section { padding-top: 0; }

.eyebrow {
  margin-bottom: 16px;
  color: var(--accent-ink);
  font-size: 17px;
  font-weight: 600;
}

.section h2 {
  font-size: clamp(2.7rem, 6.4vw, 5.1rem);
  line-height: .98;
  font-weight: 800;
  letter-spacing: -.05em;
}

.body {
  max-width: 32em;
  margin-top: 24px;
  color: var(--text-2);
  font-size: clamp(17px, 1.55vw, 20px);
  line-height: 1.5;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 104px);
  align-items: center;
}
.split > .phone { justify-self: center; }

@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .split > .phone { --pw: min(280px, calc(100vw - 2 * var(--gutter))); order: 2; }
}

/* ---------- Grouped list (iOS inset style) ---------- */

.list-head {
  margin: 0 20px 8px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
}
.list-foot {
  margin: 10px 20px 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.4;
}
.list-head:not(:first-child) { margin-top: 28px; }

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--r-card);
  background: var(--surface);
  transition: background-color .3s var(--ease);
}

.list > li,
.list > .row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 14px 22px;
}
.list > li + li::before,
.list > .row + .row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 0;
  height: 1px;
  background: var(--sep);
  transform: scaleY(.6);
}

.list .k { font-weight: 500; }
.list .v {
  color: var(--text-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.section .list { margin-top: 36px; }
.split .list { margin-top: 0; }
.stack > .list:first-child, .stack > .list-head:first-child + .list { margin-top: 0; }
.copy .list { margin-top: 36px; }
.copy .try-head { margin-top: 40px; }
.copy .try-head + .list { margin-top: 0; }

/* ---------- Show demo ---------- */

.show-split { margin-bottom: clamp(64px, 8vw, 104px); }

.demo {
  padding: clamp(20px, 3vw, 32px);
  border-radius: calc(var(--r-card) + 6px);
  background: var(--surface);
  transition: background-color .3s var(--ease);
}

.demo-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.demo-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.025em;
}
.demo-sub {
  margin-top: 4px;
  color: var(--text-2);
  font-size: 16px;
}
.demo .btn { min-width: 150px; }

.readouts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}
.tile {
  padding: 12px 16px 13px;
  border-radius: 16px;
  background: var(--fill);
}
.tile span {
  display: block;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}
.tile strong {
  display: block;
  margin-top: 2px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.timeline {
  display: flex;
  gap: 18px;
  margin-top: 28px;
}
.tl-group {
  flex: var(--dur) 1 0;
  min-width: 0;
}
.tl-label {
  display: flex;
  gap: 8px;
  margin: 0 2px 10px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.tl-label strong { color: var(--text); font-weight: 700; }
.tl-measures { display: flex; gap: 6px; }
.tl-measure {
  display: flex;
  flex: 1;
  gap: 3px;
  padding: 5px;
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px var(--sep);
  transition: box-shadow .15s;
}
.tl-measure.is-now { box-shadow: inset 0 0 0 2px var(--accent); }
.tl-beat {
  flex: 1;
  height: 34px;
  border-radius: 7px;
  background: var(--beat);
}
.tl-beat.is-done { background: var(--beat-done); }
.tl-beat.is-now { background: var(--accent); }

@media (max-width: 760px) {
  .readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline { flex-direction: column; gap: 22px; }
  .demo .btn { width: 100%; }
  .tl-beat { height: 30px; }
}

/* ---------- Settings panel ---------- */

.swatches {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.swatch {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--c);
  cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .15s;
}
:root[data-theme="light"] .swatch { --c: var(--c-l); }
:root[data-theme="dark"] .swatch { --c: var(--c-d); }
.swatch:hover { transform: scale(1.1); }
.swatch[aria-checked="true"] {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c);
}

@media (max-width: 359px) {
  .list > .row-accent { flex-direction: column; align-items: flex-start; }
  .row-accent .swatches { justify-content: flex-start; }
}

/* ---------- FAQ ---------- */

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.faq-grid > div:first-child {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
}

.faq details { position: relative; }
.faq details + details::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 0;
  height: 1px;
  background: var(--sep);
  transform: scaleY(.6);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 16px 22px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--text-3);
  transition: transform .25s var(--ease);
}
.faq details[open] summary svg { transform: rotate(90deg); }
.faq details p {
  padding: 0 22px 20px;
  margin-top: -4px;
  color: var(--text-2);
}

@media (max-width: 880px) {
  .faq-grid { grid-template-columns: 1fr; }
  .faq-grid > div:first-child { position: static; }
}

/* ---------- Closing CTA ---------- */

.closer {
  text-align: center;
}
.closer .pulse { justify-content: center; }
.closer .pulse span { display: none; }
.closer h2 { margin-top: 28px; }
.closer .cta-row { justify-content: center; }

/* ---------- Footer ---------- */

.footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--sep);
  color: var(--text-2);
  font-size: 14px;
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.footer .brand { font-size: 16px; }
.footer .brand img { width: 24px; height: 24px; border-radius: 6px; }
.footer-left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer nav a { color: var(--text-2); }
.footer nav a:hover { color: var(--text); }
.footer .credit {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--text-3);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .15s, text-decoration-color .15s;
}
.footer .credit:hover { color: var(--text); text-decoration-color: currentColor; }

/* ---------- Document pages (privacy, support) ---------- */

.doc {
  max-width: 720px;
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(80px, 10vw, 128px);
}
.doc h1 {
  font-size: clamp(3rem, 8vw, 5.4rem);
  line-height: .95;
  font-weight: 800;
  letter-spacing: -.055em;
}
.doc .meta {
  margin-top: 16px;
  color: var(--text-2);
  font-size: 15px;
}
.doc .lede { margin-top: 24px; }
.doc h2 {
  margin-top: 48px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.025em;
}
.doc p, .doc ul { margin-top: 12px; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc .list, .doc .faq { margin-top: 20px; }

.callout {
  margin-top: 36px;
  padding: 24px 26px;
  border-radius: var(--r-card);
  background: var(--surface);
}
.callout strong { display: block; font-size: 19px; letter-spacing: -.02em; }
.callout p { margin-top: 6px; color: var(--text-2); }

.contact-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
  padding: 24px 26px;
  border-radius: var(--r-card);
  background: var(--surface);
}
.contact-card span { display: block; color: var(--text-2); font-size: 15px; font-weight: 500; }
.contact-card strong { font-size: clamp(19px, 3vw, 24px); letter-spacing: -.025em; }

/* ---------- Android beta steps ---------- */

.steps {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.doc .steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 20px;
  margin: 0;
  padding: 22px 26px;
  border-radius: var(--r-card);
  background: var(--surface);
  transition: background-color .3s var(--ease);
}
.doc .steps li + li { margin-top: 12px; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.doc .steps h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.02em;
}
.doc .steps p {
  margin-top: 4px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.4;
}
.doc .steps p strong { color: var(--text); font-weight: 600; }
.doc .steps-note {
  margin-top: 16px;
  padding: 0 26px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.4;
}
.doc .steps-note strong { color: var(--text); font-weight: 600; }

@media (max-width: 560px) {
  .doc .steps li { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .steps li::before { margin-top: -4px; }
  .steps .btn { grid-column: 1 / -1; height: 44px; }
}

/* ---------- 404 ---------- */

.missed {
  min-height: calc(100vh - var(--nav-h) - 120px);
  display: grid;
  place-content: center;
  text-align: center;
  padding: 80px 0;
}
.missed .pulse { justify-content: center; }
.missed .pulse span { display: none; }
.missed h1 { margin-top: 28px; }
.missed .cta-row { justify-content: center; }
.closer .cta-meta { display: block; margin-top: 16px; }
.missed-title {
  font-size: clamp(3rem, 9vw, 6.4rem);
  line-height: .95;
  font-weight: 800;
  letter-spacing: -.055em;
}
.missed .lede { margin-left: auto; margin-right: auto; }
/* One beat drops out of the bar. */
.pulse-missed i:nth-child(3) {
  animation: none;
  background: none;
  box-shadow: inset 0 0 0 1.5px var(--fill-strong);
}
