/* Cadence landing page. Colours, radii, type, motion and components come from cadence.css (the app's design system);
   this file is the page layout, the loud opening screen and the wave that quiets it. */

html { background: var(--backdrop); scroll-behavior: smooth; }
html.loud { background: #1b0f12; overscroll-behavior: none; }
body { margin: 0; }
.cd-stage.site { overflow: visible; overflow-x: clip; }
.site a { color: inherit; text-decoration: none; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); box-sizing: border-box; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.site .skip { position: absolute; left: 12px; top: -80px; z-index: 40; padding: 12px 18px; border-radius: var(--radius-pill); background: var(--ink); color: var(--backdrop); font-weight: 600; }
.site .skip:focus { top: 12px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 48px; font: 700 18px/1 var(--font-display); letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 1px var(--glass-edge); }
.site .big { min-height: 56px; padding: 0 28px; font-size: 16px; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.meta { margin: 14px 0 0; font: 500 13px/18px var(--font-text); }

/* ---------------- hero ---------------- */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.noise { display: none; }
.quiet { display: flex; flex-direction: column; position: relative; min-height: 100vh; min-height: 100svh; background: var(--backdrop); color: var(--ink); overflow: hidden; }
.quiet > .wrap { position: relative; z-index: 2; }
.glows { position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(closest-side, var(--glow-1), transparent) 100% 0 / 60% 70% no-repeat,
  radial-gradient(closest-side, var(--glow-2), transparent) 50% 115% / 70% 60% no-repeat,
  radial-gradient(closest-side, var(--glow-3), transparent) 0 40% / 55% 60% no-repeat; }
.mid { flex: 1; display: flex; align-items: center; justify-content: center; gap: clamp(24px, 6vw, 96px); padding: 24px clamp(18px, 5vw, 48px) 56px; position: relative; z-index: 2; box-sizing: border-box; }
.copy { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.copy h1, .copy h2 { margin: 0; max-width: 11ch; font: 800 clamp(52px, 8.6vw, 128px)/.92 var(--font-display); letter-spacing: -.04em; text-wrap: balance; }
.quiet .copy h2 { font-size: clamp(44px, 6.4vw, 96px); }
.copy > p { margin: 22px 0 28px; max-width: 38ch; font: 500 18px/1.55 var(--font-text); }
.today { flex: none; }
@media (min-width: 700px) {
  .quiet .copy { align-items: flex-start; text-align: left; }
  .quiet .cta { justify-content: flex-start; }
}
@media (max-width: 699px) { .quiet .mid { flex-direction: column; justify-content: flex-start; gap: 32px; } }

/* with scripting, the page opens as one loud screen, exactly the height of the window.
   The rest of the site only exists once the noise has been turned down (.open), so there is nothing to scroll to. */
.js .noise { display: flex; flex-direction: column; position: relative; height: 100vh; height: 100dvh; overflow: hidden auto; background: #1b0f12; color: #fff4ee; transition: background-color .35s; }
.js #hero:not(.open) ~ main, .js #hero:not(.open) ~ footer { display: none; }
.js .hero:not(.calm) .quiet { position: absolute; top: 0; left: 0; width: 100%; min-height: 100%; z-index: 3; visibility: hidden; }
.js .hero.waving .quiet { visibility: visible; will-change: clip-path; contain: paint; }
.js .hero.waving .noise { pointer-events: none; overflow: hidden; }
.js .hero.calm .noise { display: none; }
.js .hero:not(.open) .quiet .cd-glass { -webkit-backdrop-filter: none; backdrop-filter: none; } /* no live blur while things move */
.noise > .wrap { position: relative; z-index: 2; }
.site .noise .bar .cd-btn { background: rgba(255, 244, 238, .1); border: 1px solid rgba(255, 244, 238, .45); color: #fff4ee; box-shadow: none; }
.noise .mid { pointer-events: none; }
.noise .copy > * { pointer-events: auto; }
.noise .mid::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; translate: -50% -50%; width: min(940px, 108%); height: min(600px, 86%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(27, 15, 18, .96) 48%, rgba(27, 15, 18, .78) 70%, transparent); }
.noise h1, .noise .copy > p { text-shadow: 0 1px 18px rgba(27, 15, 18, .95); }
.noise .copy > p.alerts { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 8px 16px; border-radius: 99px; border: 1px solid rgba(255, 110, 100, .6); background: rgba(120, 12, 10, .6); font: 650 13px/18px var(--font-text); font-variant-numeric: tabular-nums; text-shadow: none; }
.alerts i { width: 10px; height: 10px; border-radius: 50%; background: #ff4b3e; }
.noise .copy > p.hint { margin: 14px 0 0; font-size: 13px; line-height: 18px; opacity: .85; }

/* the way out: cream with a red switch, large, with a halo that breathes on the shared clock */
.spot { position: relative; margin: 10px 0 6px; }
.site .switch { display: inline-flex; align-items: center; gap: 18px; min-height: 88px; padding: 0 40px 0 14px; border-radius: 99px; background: #fff4ee; color: #1b0f12; font: 800 clamp(23px, 2.4vw, 28px)/1 var(--font-display); letter-spacing: -.01em; white-space: nowrap;
  box-shadow: 0 0 0 8px rgba(255, 244, 238, .26), 0 0 0 18px rgba(255, 244, 238, .1), 0 0 70px 12px rgba(255, 244, 238, .3), 0 18px 40px rgba(0, 0, 0, .5); transition: box-shadow .45s var(--ease-in-out), scale .2s var(--ease-out); }
.site .tick .switch { box-shadow: 0 0 0 14px rgba(255, 244, 238, .22), 0 0 0 32px rgba(255, 244, 238, .06), 0 0 96px 24px rgba(255, 244, 238, .4), 0 18px 40px rgba(0, 0, 0, .5); }
.site .switch:hover { scale: 1.06; }
.site .switch:focus-visible { outline: 3px solid #fff; outline-offset: 20px; }
.switch i { width: 90px; height: 60px; border-radius: 99px; background: #d93a2b; position: relative; flex: none; }
.switch i::after { content: ""; position: absolute; width: 48px; height: 48px; left: 6px; top: 6px; border-radius: 50%; background: #fff; transition: translate .22s var(--settle); }
.switch:hover i::after { translate: 6px 0; }
.site .switch.is-on { scale: .96; }
.site .switch.is-on i::after { translate: 30px 0; }
.tap { position: absolute; left: calc(100% + 40px); top: -14px; width: 150px; text-align: left; font: 700 30px/.95 'Caveat', cursive; color: #ffe9df; text-shadow: 0 0 12px #1b0f12, 0 0 4px #1b0f12; rotate: -4deg; pointer-events: none; }
.tap svg { display: block; width: 76px; height: 44px; margin: 4px 0 0 -34px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
@media (max-width: 899px) {
  .spot { margin-bottom: 64px; }
  .tap { left: 50%; top: calc(100% + 22px); translate: -50% 0; width: max-content; text-align: center; font-size: 26px; }
  .tap svg { display: none; }
  .tap::before { content: "↑ "; }
}

/* the noise itself */
.pile { position: absolute; inset: 0; z-index: 1; overflow: hidden; contain: strict; }
.pop { position: absolute; width: 300px; border-radius: 18px; background: #fdfbfb; color: #17090b; box-shadow: 0 16px 36px rgba(0, 0, 0, .55); font: 500 13px/18px var(--font-text); rotate: var(--r); cursor: pointer; user-select: none; animation: pop .4s var(--ease-settle) var(--d, 0s) both; }
@keyframes pop { from { opacity: 0; scale: .5; } }
.waving .pop { animation: none; box-shadow: none; }
[data-tier="low"] .pop { box-shadow: none; }
.pop b { display: block; font-size: 14px; }
.pop .ic { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--c); display: grid; place-items: center; color: #fff; font: 800 17px/1 var(--font-display); }
.pop em { position: absolute; top: -9px; right: -9px; min-width: 26px; height: 26px; padding: 0 4px; box-sizing: border-box; border-radius: 99px; background: #e0291a; color: #fff; box-shadow: 0 0 0 2px #fff; font: 700 12px/26px var(--font-text); font-style: normal; text-align: center; }
.ping { display: flex; gap: 12px; padding: 14px 16px; }
.dlg { width: 268px; padding: 20px 18px 14px; text-align: center; border: 3px solid transparent; box-shadow: 0 26px 60px rgba(0, 0, 0, .65); }
.pop.dlg .ic { margin: 0 auto 10px; width: 46px; height: 46px; border-radius: 50%; font-size: 22px; }
.pop.dlg b { font: 750 19px/23px var(--font-display); margin-bottom: 4px; }
.dlg .x { position: absolute; top: 8px; right: 12px; font: 500 18px/1 var(--font-text); color: #7a6a6c; }
.dlg .btns { display: grid; gap: 6px; margin-top: 12px; }
.dlg .btns span { display: block; padding: 10px; border-radius: 12px; background: var(--c); color: #fff; font-weight: 700; }
.dlg .btns span + span { padding: 2px; background: none; color: #7a6a6c; font-weight: 500; font-size: 12px; }
.ban { width: 340px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 12px; background: #c81e14; color: #fff; font: 800 14px/18px var(--font-text); letter-spacing: .04em; border: 2px solid #ff8a80; }
.ban.warn { background: #ffd43b; color: #231a00; border-color: #fff1b0; }
.ban time { font-variant-numeric: tabular-nums; font-size: 17px; }
.bub { width: 64px; height: 64px; border-radius: 50%; background: #e0291a; color: #fff; display: grid; place-items: center; font: 800 21px/1 var(--font-display); box-shadow: 0 0 0 4px rgba(255, 255, 255, .9), 0 12px 28px rgba(0, 0, 0, .5); }
@media (max-width: 760px) { .pop { width: 228px; } .dlg { width: 216px; padding: 14px; } .ban { width: 260px; font-size: 12px; } .ban time { font-size: 14px; } .bub { width: 50px; height: 50px; font-size: 17px; } }
/* every blink shares one clock (.tick, once a second), so flashes never add up past the safe limit */
.js .noise.tick { background-color: #35090d; }
.tick .ban { background: #ff3b2f; border-color: #fff; }
.tick .ban.warn { background: #fff3a3; border-color: #ffc400; }
.tick .dlg { border-color: #ff3b2f; }
.tick .pop em { background: #fff; color: #c81e14; box-shadow: 0 0 0 2px #e0291a; }
.tick .bub { scale: 1.14; }
.tick .alerts i { opacity: .2; }
.fx { position: absolute; top: 0; left: 0; z-index: 6; pointer-events: none; }
/* the wave front: one soft ring, drawn once and then only scaled */
.ring { position: absolute; z-index: 5; width: 600px; height: 600px; border-radius: 50%; pointer-events: none; opacity: 0; will-change: transform, opacity;
  background: radial-gradient(closest-side, transparent 90%, rgba(169, 217, 143, .3) 94%, rgba(234, 223, 140, .65) 97%, rgba(255, 255, 255, .95) 99%, transparent 100%); }

/* ---- the loud screen must fit any window, because it cannot be scrolled ---- */
.noise .bar { flex: none; padding-top: clamp(8px, 2vh, 18px); }
.noise .mid { padding-top: 8px; padding-bottom: clamp(12px, 4vh, 56px); }
.noise h1 { font-size: clamp(34px, min(8.6vw, 13vh), 128px); }
.noise .copy > p { margin: clamp(10px, 2.4vh, 22px) 0 clamp(14px, 3vh, 28px); }
.noise .copy > p.alerts { margin: 0 0 clamp(8px, 2vh, 18px); }
.noise .spot { margin-top: 4px; }
.site .noise .switch { min-height: clamp(64px, 11vh, 88px); }
@media (max-width: 899px) { .noise .spot { margin-bottom: clamp(44px, 7vh, 64px); } }
@media (max-height: 700px) { .noise .copy > p.hint { display: none; } }
@media (max-height: 540px) {
  .noise .copy > p:not(.alerts):not(.hint) { display: none; }
  .noise .tap { display: none; }
  .noise .spot { margin: 16px 0 0; }
}
@media (max-height: 420px) { .noise .copy > p.alerts { display: none; } .noise h1 { max-width: none; } }

/* ---------------- the app's Today screen ---------------- */
.phone { --s: 1; zoom: var(--s); width: 340px; height: 696px; border-radius: 50px; padding: 9px; box-sizing: border-box; background: #14181f; box-shadow: 0 40px 70px -28px rgba(20, 24, 31, .45), 0 0 0 1px var(--glass-edge); text-align: left; }
.screen { position: relative; width: 100%; height: 100%; border-radius: 42px; overflow: hidden; isolation: isolate; background: var(--backdrop); padding: 42px 15px 0; box-sizing: border-box; color: var(--ink); }
.screen::before { content: ""; position: absolute; inset: -60px; z-index: -1; background:
  radial-gradient(closest-side, var(--glow-1), transparent) 100% 0 / 70% 50% no-repeat,
  radial-gradient(closest-side, var(--glow-2), transparent) 20% 100% / 80% 50% no-repeat,
  radial-gradient(closest-side, var(--glow-3), transparent) 0 45% / 70% 40% no-repeat; }
.cam { position: absolute; top: 13px; left: 50%; translate: -50% 0; width: 11px; height: 11px; border-radius: 50%; background: #14181f; }
.screen .date { display: block; font: 600 13px/18px var(--font-text); }
.screen .title { display: block; margin: 0 0 12px; font: 700 30px/34px var(--font-display); letter-spacing: -.02em; }
.screen .cd-nextup { margin-top: 14px; padding: 16px; }
.screen .cd-row { min-height: 64px; gap: 14px; padding: 10px 14px; }
.screen .cd-section { margin-top: 16px; }
.screen .tabs { position: absolute; left: 12px; right: 12px; bottom: 12px; }
.screen .tabs span.t { display: grid; justify-items: center; font: 600 12px/14px var(--font-text); color: var(--ink-muted); }
.screen .cd-add { margin: auto; }

/* ---------------- sections ---------------- */
.sec { position: relative; isolation: isolate; padding: clamp(80px, 11vw, 144px) 0 0; }
.sec > .cd-glow { width: 40vw; height: 36vw; max-height: 420px; opacity: .55; }
.eyebrow { margin: 0 0 14px; font: 650 12px/16px var(--font-text); letter-spacing: .08em; text-transform: uppercase; }
.sec h2 { margin: 0; max-width: 16ch; font: 750 clamp(40px, 5.6vw, 80px)/.98 var(--font-display); letter-spacing: -.035em; text-wrap: balance; }
.lede { margin: 20px 0 0; max-width: 44ch; font: 450 18px/1.55 var(--font-text); }

.never ul { margin: 40px 0 0; padding: 0; list-style: none; }
.never li { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 20px 0; border-top: 1px solid var(--hairline); }
.never s { font: 750 clamp(34px, 5.6vw, 76px)/1 var(--font-display); letter-spacing: -.03em; text-decoration-thickness: .07em; text-decoration-color: var(--accent); }
.never li span { max-width: 30ch; text-align: right; font: 450 15px/22px var(--font-text); }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.tile { display: flex; flex-direction: column; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-sheet); }
.tile h3 { margin: 0; font: 700 28px/32px var(--font-display); letter-spacing: -.02em; }
.tile > p { margin: 8px 0 22px; font: 450 16px/24px var(--font-text); color: var(--ink-muted); }
.demo { margin-top: auto; display: grid; gap: 10px; align-content: end; min-height: 214px; }
.demo .cd-progress { margin: 0; }
.site .demo input { width: 100%; min-height: 52px; box-sizing: border-box; padding: 0 16px; border-radius: var(--radius-control); border: 1.5px solid var(--control-edge); background: var(--surface-solid-raised); color: var(--ink); font: 500 16px/22px var(--font-text); }
.demo form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.demo .cd-row { min-height: 64px; }
.toastrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; padding: 4px 8px 4px 20px; border-radius: var(--radius-pill); font: 600 14px/20px var(--font-text); }
.toastrow[hidden] { display: none; }
.paper { padding: 20px; font: 400 16px/26px var(--font-text); }
.paper b { display: block; margin-bottom: 8px; font: 650 22px/28px var(--font-display); }
.paper span { display: flex; align-items: center; gap: 10px; }
.paper span i { width: 18px; height: 18px; border-radius: 6px; border: 2px solid var(--control-edge); }
.paper span.ok i { background: var(--accent); border-color: var(--accent); }
.paper span.ok em { font-style: normal; color: var(--ink-muted); text-decoration: line-through; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.counts { display: flex; gap: 40px; margin: 32px 0 0; }
.counts b { display: block; font: 800 clamp(56px, 6vw, 88px)/1 var(--font-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.counts span { font: 600 13px/18px var(--font-text); }
.say { min-height: 24px; margin: 14px 0 0; font: 500 15px/22px var(--font-text); }
.proof { margin: 24px 0 0; padding: 18px 20px; max-width: 46ch; }
.proof b { display: block; margin-bottom: 6px; font: 650 18px/24px var(--font-display); }
.proof span { display: block; font: 450 14px/20px var(--font-text); color: var(--ink-muted); }
.site .proof a { text-decoration: underline; }
.board { width: 100%; max-width: 520px; justify-self: end; user-select: none; }
.heads, .dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: clamp(6px, 1.1vw, 14px); }
.heads { margin-bottom: 10px; text-align: center; font: 650 12px/16px var(--font-text); }
.site .dots button { aspect-ratio: 1; min-width: 0; border-radius: 50%; background: var(--accent); position: relative; touch-action: none; transition: background-color .35s, box-shadow .35s, scale .45s var(--ease-settle); }
.site .dots button:hover:enabled { scale: 1.08; }
.site .dots button[data-s="m"] { background: var(--accent-soft); box-shadow: inset 0 0 0 5px var(--accent); }
.site .dots button[data-s="r"] { background: transparent; box-shadow: inset 0 0 0 5px var(--rest); }
.site .dots button[data-s="x"] { background: transparent; }
.site .dots button[data-s="x"]::after { content: ""; position: absolute; inset: 37%; border-radius: 50%; background: var(--control-edge); }
.site .dots button[data-s="t"] { background: transparent; border: 3px dashed var(--control-edge); }
.site .dots button[data-s="f"] { background: var(--track); opacity: .55; cursor: default; }
.brush { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.site .brush button { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: var(--radius-pill); border: 1px solid var(--control-edge); font: 600 13px/1 var(--font-text); }
.site .brush button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

.pals { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.site .pals button { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px 0 12px; border-radius: var(--radius-pill); font: 600 14px/1 var(--font-text); }
.pals i { width: 24px; height: 24px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px var(--control-edge); }
.site .pals button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; margin: 40px 0 0; padding: 0; }
.facts div { padding: 22px 0; border-top: 1px solid var(--hairline); }
.facts dt { font: 650 18px/24px var(--font-display); }
.facts dd { margin: 6px 0 0; font: 450 15px/23px var(--font-text); }

.get { text-align: center; padding-bottom: 96px; }
.get h2, .get .lede { margin-left: auto; margin-right: auto; }
.get h2 { max-width: 12ch; }
.get .cta { margin-top: 32px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 56px 0 0; padding: 0; list-style: none; text-align: left; }
.steps li { padding: 22px; font: 450 16px/24px var(--font-text); }
.steps b { display: block; margin-bottom: 8px; font: 700 32px/36px var(--font-display); }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--hairline); font: 500 14px/20px var(--font-text); }
.site .foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site .foot nav a { display: inline-flex; align-items: center; min-height: 48px; text-decoration: underline; }

/* the bar that follows once the opening screen has scrolled away */
.dock { position: fixed; z-index: 30; top: 12px; left: 50%; translate: -50% calc(-100% - 20px); width: min(760px, calc(100% - 24px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; box-sizing: border-box; padding: 8px 8px 8px 16px; border-radius: var(--radius-pill); visibility: hidden; transition: translate .36s var(--ease-out), visibility 0s .36s; }
.dock.on { translate: -50% 0; visibility: visible; transition: translate .36s var(--ease-out); }

@media (max-width: 860px) {
  .tiles, .split, .steps { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { justify-self: stretch; }
  .never li { flex-direction: column; gap: 6px; }
  .never li span { text-align: left; }
}
@media (max-width: 560px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .demo form { grid-template-columns: minmax(0, 1fr); }
  .board { width: calc(100% + 16px); margin: 0 -8px; max-width: none; } /* keeps every day a 48px target */
  .heads, .dots { gap: 2px; }
}

/* nothing moves or blinks for visitors who ask for less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pop { animation: none; }
  .js .noise, .site .switch, .switch i::after, .dock, .dock.on, .site .dots button { transition: none; }
}
