/*
  ClipReady website. Mobile first.

  Every colour, font, type size, weight, space, radius and shadow here is a
  token from ../design/tokens.css (loaded by index.html before this file).
  To change how the brand looks, change the token, not this file.

  The only plain numbers left in this file are:
    - the size of drawn things (the phone frame, the play icon, the FAQ arrow)
    - widths that belong to one component (the form, a column of the rail)
    - the breakpoints (560, 760, 1000px), which CSS cannot read from a token
*/

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font: var(--cr-weight-regular) var(--cr-text-base)/var(--cr-leading-body) var(--cr-font);
  letter-spacing: var(--cr-tracking-body);
  color: var(--cr-ink); background: var(--cr-white);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
[id] { scroll-margin-top: calc(var(--cr-header-height) + var(--cr-space-4)); }
[hidden] { display: none !important; }

.wrap { --gutter: var(--cr-gutter); width: min(100% - 2 * var(--gutter), var(--cr-container)); margin-inline: auto; }
.wrap--mid { max-width: var(--cr-container-narrow); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--cr-space-3); top: calc(-1 * var(--cr-space-24)); z-index: 20; padding: var(--cr-space-2) var(--cr-space-4); border-radius: var(--cr-radius-sm); background: var(--cr-ink); color: var(--cr-white); }
.skip:focus { top: var(--cr-space-3); }
:focus-visible { outline: var(--cr-focus-width) solid var(--cr-accent-ink); outline-offset: var(--cr-focus-width); }
.dark :focus-visible { outline-color: var(--cr-accent-on-dark); }

h1 { font-weight: var(--cr-weight-semibold); font-size: var(--cr-text-display); line-height: var(--cr-leading-display); letter-spacing: var(--cr-tracking-display); text-wrap: balance; }
h2 { font-weight: var(--cr-weight-semibold); font-size: var(--cr-text-h2); line-height: var(--cr-leading-heading); letter-spacing: var(--cr-tracking-heading); text-wrap: balance; }
h2 span { color: var(--cr-grey-2); }
h3 { font-weight: var(--cr-weight-semibold); font-size: var(--cr-text-base); line-height: var(--cr-leading-snug); }
p { text-wrap: pretty; }
/* Short lines under a heading are balanced, so no single word is left alone on the last line */
.lede, .head__sub, .close__sub, .pain__turn { text-wrap: balance; }
b, strong { font-weight: var(--cr-weight-semibold); }

/* Gradient text: for short highlights only (see design-system.md) */
.grad, .eyebrow, .count b { display: inline-block; background: var(--cr-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--cr-button-height); padding: 0 var(--cr-button-pad);
  border: 0; border-radius: var(--cr-button-radius); background: var(--cr-accent); color: var(--cr-on-accent);
  font: var(--cr-button-weight) var(--cr-text-base)/var(--cr-leading-snug) var(--cr-font); letter-spacing: var(--cr-tracking-body);
  text-decoration: none; white-space: nowrap;
  cursor: pointer; -webkit-appearance: none; appearance: none;
  transition: background-color var(--cr-duration-fast) var(--cr-ease), color var(--cr-duration-fast) var(--cr-ease), transform var(--cr-duration-fast) var(--cr-ease);
}
.btn:active { background: var(--cr-accent-hover); transform: translateY(1px); transition-duration: var(--cr-duration-press); }
/* Sending: the label stays, the width stays, and a small spinner sits beside the label.
   The padding gives up exactly the room the spinner takes, so the button does not grow. */
.btn[disabled] { background: var(--cr-accent-hover); cursor: progress; }
.signup.is-sending .btn { padding-inline: calc(var(--cr-button-pad) - (14px + var(--cr-space-2)) / 2); }
.signup.is-sending .btn::before { content: ""; flex: none; width: 14px; height: 14px; margin-right: var(--cr-space-2); border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn--small { min-height: var(--cr-button-height-sm); padding: 0 var(--cr-button-pad-sm); font-size: var(--cr-text-sm); }
.btn--line { min-height: var(--cr-button-height-md); margin-top: var(--cr-space-5); padding: var(--cr-space-2) var(--cr-space-4); border: var(--cr-border) solid var(--cr-on-dark-line); background: transparent; color: var(--cr-white); font-size: var(--cr-text-sm); white-space: normal; text-align: center; }
.btn--line:active { border-color: var(--cr-white); background: var(--cr-white); color: var(--cr-ink); }
/* Hover only where there is a pointer, so nothing stays "stuck" after a tap on a phone */
@media (hover: hover) {
  .btn:hover { background: var(--cr-accent-hover); }
  .btn--line:hover { border-color: var(--cr-white); background: var(--cr-white); color: var(--cr-ink); }
  .top__nav a:hover { color: var(--cr-accent-ink); }
}

/* ---------- Header ---------- */
.top { position: -webkit-sticky; position: sticky; top: 0; z-index: 10; border-bottom: var(--cr-border) solid var(--cr-header-line); background: var(--cr-header-bg); -webkit-backdrop-filter: var(--cr-header-blur); backdrop-filter: var(--cr-header-blur); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: var(--cr-space-4); height: var(--cr-header-height); }
.top__nav { display: none; gap: var(--cr-space-8); font-size: var(--cr-text-sm); color: var(--cr-ink-2); }
.top__nav a { text-decoration: none; }
/* The header button appears once a form's own button has left the screen, so only one filled
   button is ever in view. It keeps its place when hidden, so nothing in the header moves. */
.js .top .btn { opacity: 0; visibility: hidden; transition: opacity var(--cr-duration) var(--cr-ease), visibility var(--cr-duration) var(--cr-ease), background-color var(--cr-duration-fast) var(--cr-ease); }
.js .top.has-cta .btn { opacity: 1; visibility: visible; }
/* The wordmark */
.logo { font-family: var(--cr-wordmark-font); font-weight: var(--cr-wordmark-weight); font-size: var(--cr-wordmark-size); letter-spacing: var(--cr-wordmark-tracking); color: var(--cr-wordmark-color); text-decoration: none; }
/* The logo drawn as a picture (site/brand/logo/): the mark and the wordmark together. It is sized so its wordmark is
   exactly --cr-wordmark-size, and its short intro may draw a little outside its own box. */
.logo svg { display: block; width: auto; height: calc(var(--cr-wordmark-size) * 64 / 43); overflow: visible; }

/* ---------- Hero ---------- */
.hero { padding: var(--cr-space-10) 0 0; text-align: center; overflow: hidden; }
.eyebrow { margin-bottom: var(--cr-space-3); font-weight: var(--cr-weight-semibold); font-size: var(--cr-text-base); }
.lede { max-width: var(--cr-measure); margin: var(--cr-space-6) auto 0; font-size: var(--cr-text-lede); line-height: var(--cr-leading-lede); color: var(--cr-grey); }

/* ---------- Waitlist form ---------- */
.signup { max-width: 480px; margin: var(--cr-space-12) auto 0; }
.signup__row { display: grid; gap: var(--cr-space-3); }
.signup input[type="email"] {
  width: 100%; min-height: var(--cr-button-height); margin: 0; padding: 0 var(--cr-button-pad);
  border: var(--cr-border) solid var(--cr-line); border-radius: var(--cr-button-radius); background: var(--cr-white); color: var(--cr-ink);
  font: var(--cr-weight-regular) var(--cr-text-base)/var(--cr-leading-snug) var(--cr-font); letter-spacing: var(--cr-tracking-body);
  -webkit-appearance: none; appearance: none;
}
.signup input::placeholder { color: var(--cr-grey-2); opacity: 1; }
.signup input:focus-visible { outline: none; border-color: var(--cr-accent-ink); box-shadow: var(--cr-shadow-focus); }
/* Marked only after the visitor leaves the field with a broken address; clears as soon as it is fixed */
.signup input.is-invalid { border-color: var(--cr-error); }
.signup__note { margin-top: var(--cr-space-3); font-size: var(--cr-text-sm); color: var(--cr-grey); }
.signup__error { margin-top: var(--cr-space-3); font-size: var(--cr-text-sm); font-weight: var(--cr-weight-semibold); color: var(--cr-error); }
.signup__done { display: none; padding: var(--cr-space-4) var(--cr-space-6); border-radius: var(--cr-radius-md); background: var(--cr-tile); }
.signup__done:focus { outline: none; }
.signup.is-done .signup__row, .signup.is-done .signup__note, .signup.is-done .signup__pick, .signup.is-done .signup__error { display: none; }
.signup.is-done .signup__done { display: block; }
.signup__pick { margin-bottom: var(--cr-space-4); font-weight: var(--cr-weight-semibold); color: var(--cr-accent-ink); }

/* ---------- Phone frame (a drawing: its sizes are its own) ---------- */
.shot { position: relative; display: flex; align-items: flex-start; justify-content: center; gap: var(--cr-space-6); height: 372px; margin-top: var(--cr-space-16); overflow: hidden; }
.phone {
  --phone-width: 226px; --phone-bezel: 8px; --phone-corner: 44px; --phone-notch: 20px; --phone-notch-top: 18px;
  position: relative; flex: none; width: var(--phone-width); padding: var(--phone-bezel);
  border-radius: var(--phone-corner); background: var(--cr-ink); box-shadow: var(--cr-shadow-device);
  animation: lift var(--cr-duration-float) ease-in-out infinite alternate;
}
.phone::before { content: ""; position: absolute; left: 50%; top: var(--phone-notch-top); z-index: 2; width: 30%; height: var(--phone-notch); border-radius: var(--phone-notch); background: var(--cr-black); transform: translateX(-50%); pointer-events: none; }
.phone .reel { border-radius: calc(var(--phone-corner) - var(--phone-bezel)); }
.phone--side { --phone-width: 186px; margin-top: var(--cr-space-14); animation-delay: -3s; }

/* ---------- Reels (video) ---------- */
.reel { position: relative; aspect-ratio: 9 / 16; overflow: hidden; isolation: isolate; border-radius: var(--cr-radius-md); background: var(--cr-reel-fallback); }
.reel__video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.reel.is-empty .reel__video, .reel.is-empty .reel__toggle { display: none; }
/* The whole reel is a play and pause control. The icon shows only while it is paused. */
.reel__toggle { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: inherit; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
.reel__toggle::before { content: ""; width: 56px; height: 56px; border-radius: 50%; background: var(--cr-scrim); opacity: 0; transition: opacity var(--cr-duration) var(--cr-ease); }
.reel__toggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 0; height: 0; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent var(--cr-white); transform: translate(-38%, -50%); opacity: 0; transition: opacity var(--cr-duration) var(--cr-ease); }
.reel.is-paused .reel__toggle::before, .reel.is-paused .reel__toggle::after { opacity: 1; }

/* ---------- Sections ---------- */
.section { padding: var(--cr-space-22) 0; }
.section--grey { background: var(--cr-tile); }
.head { max-width: 900px; margin-bottom: var(--cr-space-6); }
.head__sub { max-width: var(--cr-measure); margin-top: var(--cr-space-4); font-size: var(--cr-text-lg); line-height: var(--cr-leading-lede); color: var(--cr-grey); }

.tiles { display: grid; gap: var(--cr-space-4); }
.tile { padding: var(--cr-space-8) var(--cr-space-6); border-radius: var(--cr-radius-lg); background: var(--cr-tile); }
.tile__label { margin-bottom: var(--cr-space-2); font-weight: var(--cr-weight-semibold); font-size: var(--cr-text-sm); color: var(--cr-grey); }
.tile h3 { margin-bottom: var(--cr-space-3); font-weight: var(--cr-weight-semibold); font-size: var(--cr-text-title); line-height: var(--cr-leading-title); letter-spacing: var(--cr-tracking-heading); }
.tile > p:last-child, .tile div > p:last-child { max-width: var(--cr-measure-long); color: var(--cr-grey); }
.tile--reel { display: grid; gap: var(--cr-space-6); }
.tile--reel .reel { width: min(100%, 210px); margin-inline: auto; }

.dark { background: var(--cr-black); color: var(--cr-on-dark); }
.dark .head__sub { color: var(--cr-on-dark-muted); }
.rail { display: flex; gap: var(--cr-space-4); padding: var(--cr-space-1) var(--cr-gutter) var(--cr-space-2); overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.ex { flex: 0 0 min(72vw, 280px); display: grid; align-content: start; scroll-snap-align: center; }
.count { margin-top: var(--cr-space-5); color: var(--cr-on-dark-muted); }
.count b { display: table; font-weight: var(--cr-weight-semibold); font-size: var(--cr-text-figure); line-height: var(--cr-leading-none); letter-spacing: var(--cr-tracking-display); font-variant-numeric: tabular-nums; padding-bottom: .1em; }
.ex h3 { margin-top: var(--cr-space-1); }

.times li { padding: var(--cr-space-8) 0; border-top: var(--cr-border) solid var(--cr-line); }
.times__big { font-weight: var(--cr-weight-semibold); font-size: var(--cr-text-figure-lg); line-height: var(--cr-leading-none); letter-spacing: var(--cr-tracking-display); color: var(--cr-grey-2); }
.times h3 { margin-top: var(--cr-space-3); }
.times li > p:last-child { margin-top: var(--cr-space-1); color: var(--cr-grey); }

.pain { font-weight: var(--cr-weight-semibold); font-size: var(--cr-text-statement); line-height: var(--cr-leading-title); letter-spacing: var(--cr-tracking-heading); color: var(--cr-grey-2); text-wrap: pretty; }
.pain b { font-weight: inherit; color: var(--cr-ink); }
.pain__turn { margin-top: var(--cr-space-8); font-weight: var(--cr-weight-semibold); font-size: var(--cr-text-lg); letter-spacing: var(--cr-tracking-tight); color: var(--cr-accent-ink); }

.soon { margin-top: var(--cr-space-5); }
.soon li { display: grid; gap: var(--cr-space-1); padding: var(--cr-space-4) 0; border-top: var(--cr-border) solid var(--cr-line); }
.soon b { font-weight: var(--cr-weight-semibold); }
.soon li > span:last-child { color: var(--cr-grey); }
.tag { font-weight: var(--cr-weight-semibold); font-size: var(--cr-text-sm); color: var(--cr-soon); }

.faq { border-bottom: var(--cr-border) solid var(--cr-line); }
details { border-top: var(--cr-border) solid var(--cr-line); }
summary { display: flex; align-items: center; justify-content: space-between; gap: var(--cr-space-4); min-height: var(--cr-space-16); padding: var(--cr-space-4) 0; cursor: pointer; list-style: none; font-weight: var(--cr-weight-semibold); font-size: var(--cr-text-lg); line-height: var(--cr-leading-snug); letter-spacing: var(--cr-tracking-tight); }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 11px; height: 11px; margin-right: var(--cr-space-2); border: solid var(--cr-accent-ink); border-width: 0 2px 2px 0; transform: translateY(-3px) rotate(45deg); transition: transform var(--cr-duration) var(--cr-ease); }
details[open] summary::after { transform: translateY(3px) rotate(225deg); }
details p { max-width: var(--cr-measure-long); padding: 0 var(--cr-space-8) var(--cr-space-6) 0; color: var(--cr-ink-2); }

.close { padding: var(--cr-space-28) 0 var(--cr-space-24); text-align: center; }
.close h2 { font-size: var(--cr-text-display); line-height: var(--cr-leading-display); letter-spacing: var(--cr-tracking-display); }
.close__sub { margin-top: var(--cr-space-4); font-size: var(--cr-text-lg); color: var(--cr-grey); }

.foot { padding: var(--cr-space-10) 0; background: var(--cr-tile); font-size: var(--cr-text-sm); line-height: var(--cr-leading-body); color: var(--cr-grey); }
.foot p { max-width: var(--cr-measure-long); }
.foot p + p { margin-top: var(--cr-space-3); }

/* ---------- Motion ---------- */
@keyframes lift { to { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Wider screens ---------- */
@media (min-width: 560px) {
  .signup__row { grid-template-columns: 1fr auto; gap: var(--cr-space-2); }
  .shot { height: 420px; gap: var(--cr-space-8); }
  .phone { --phone-width: 250px; }
  .phone--side { --phone-width: 206px; }
}
@media (min-width: 760px) {
  .wrap { --gutter: var(--cr-gutter-wide); }
  .tiles--3 { grid-template-columns: repeat(3, 1fr); }
  .tiles--bento { grid-template-columns: 1fr 1fr; }
  .tile--wide { grid-column: 1 / -1; }
  .tile { padding: var(--cr-space-10); }
  .tile--reel { grid-template-columns: 1fr 200px; align-items: center; gap: var(--cr-space-12); padding-block: var(--cr-space-8); }
  .soon li { grid-template-columns: 120px minmax(0, 220px) 1fr; align-items: baseline; gap: var(--cr-space-4); }
  .rail { padding-inline: var(--cr-gutter-wide); }
}
@media (min-width: 1000px) {
  .top__nav { display: flex; }
  .section { padding: var(--cr-space-38) 0; }
  .head { margin-bottom: var(--cr-space-12); }
  .hero { padding-top: var(--cr-space-16); }
  .shot { height: 540px; gap: var(--cr-space-12); margin-top: var(--cr-space-22); }
  .phone { --phone-width: 312px; --phone-bezel: 10px; --phone-corner: 56px; --phone-notch: 26px; --phone-notch-top: 22px; }
  .phone--side { --phone-width: 262px; margin-top: var(--cr-space-22); }
  .tiles { gap: var(--cr-space-5); }
  .rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--cr-space-5); width: min(100% - 2 * var(--cr-gutter-wide), var(--cr-container)); margin-inline: auto; padding: 0; overflow: visible; }
  .times { display: grid; grid-template-columns: repeat(4, 1fr); }
  .times li { padding: var(--cr-space-2) var(--cr-space-6); border-top: 0; border-left: var(--cr-border) solid var(--cr-line); }
  .times li:first-child { padding-left: 0; border-left: 0; }
  .times__big { display: flex; align-items: flex-end; min-height: 2.1em; font-size: var(--cr-text-figure-col); line-height: var(--cr-leading-display); }
  .close { padding: var(--cr-space-50) 0 var(--cr-space-38); }
}
