/* WakeLink website. The app's own palette (WakeLink/DesignSystem/Theme.swift), Apple's
   system fonts (SF Pro, SF Pro Rounded for headings, as in the app), no web fonts. */

:root {
  --bg: #090a11;
  --surface: #161827;
  --surface-raised: #1f2130;
  --stroke: rgba(255, 255, 255, 0.08);
  --accent: #ff9e42;
  --accent-hot: #ff5c6b;
  --accent-cool: #7585ff;
  --success: #4ddb8f;
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.66);
  --text-3: rgba(255, 255, 255, 0.42);
  --sunrise: linear-gradient(135deg, var(--accent), var(--accent-hot));
  --radius: 24px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent-cool); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }
.center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.muted { color: var(--text-3); }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--text-2); max-width: 36em; }
.fine { font-size: 0.85rem; color: var(--text-3); margin-top: 14px; }
.eyebrow { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.gradient-text { background: var(--sunrise); -webkit-background-clip: text; background-clip: text; color: transparent; }

.skip-link { position: absolute; left: 12px; top: -60px; background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip-link:focus { top: 12px; }

/* Header: frosted glass, like iOS. */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 10, 17, 0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--stroke);
}
.nav { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 22px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav-links a { color: var(--text-2); font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.pill {
  font-size: 0.8rem; font-weight: 600; color: var(--text-2);
  border: 1px solid var(--stroke); background: var(--surface); padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}

/* Buttons: the app's PrimaryButtonStyle. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 18px;
  background: var(--sunrise); color: #000; font-weight: 700; font-size: 1rem;
  box-shadow: 0 10px 30px -10px rgba(255, 110, 80, 0.6);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 14px 36px -10px rgba(255, 110, 80, 0.7); }
.btn:active { transform: scale(0.98); }
.btn-small { min-height: 38px; padding: 0 16px; border-radius: 12px; font-size: 0.9rem; }
.btn-ghost { background: var(--surface); color: var(--text); box-shadow: none; border: 1px solid var(--stroke); }
.btn-ghost:hover { box-shadow: none; background: var(--surface-raised); }
.btn-disabled { background: var(--surface-raised); color: var(--text-2); box-shadow: none; border: 1px solid var(--stroke); cursor: default; }
.btn-disabled:hover { transform: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Hero */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.glow { position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.38; pointer-events: none; }
.glow-a { width: 620px; height: 620px; background: var(--accent); top: -320px; left: -160px; animation: drift 18s ease-in-out infinite alternate; }
.glow-b { width: 520px; height: 520px; background: var(--accent-hot); top: -200px; right: -180px; opacity: 0.28; animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(60px, 40px) scale(1.08); } }
.hero-grid { position: relative; display: grid; gap: 56px; align-items: center; }
.hero-icon { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 26px; box-shadow: 0 18px 50px -14px rgba(255, 120, 70, 0.65); }
.hero-visual { display: flex; justify-content: center; }
/* The first screen animates in with CSS alone, so it's never hidden waiting for scripts. */
.hero-copy { animation: rise 0.9s var(--ease) both; }
.hero-visual { animation: rise 1.1s 0.15s var(--ease) both; }
@keyframes rise { from { opacity: 0.001; transform: translateY(18px); } }

/* Phone frames around the real screenshots. */
.phone {
  margin: 0; width: min(300px, 72vw); padding: 9px; border-radius: 52px;
  background: linear-gradient(160deg, #2c2f3f, #14151f);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 30px 90px -40px rgba(255, 110, 80, 0.45);
}
.phone img { border-radius: 44px; width: 100%; }
.hero .phone { width: min(320px, 74vw); }
.phone-float { animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px); } }

/* Features */
.features { padding: 40px 0 60px; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.feature { display: grid; gap: 36px; align-items: center; justify-items: center; padding: 48px 0; border-top: 1px solid var(--stroke); }
.feature-copy { max-width: 520px; }
.feature-copy p { color: var(--text-2); }
.feature-icon {
  display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--stroke); font-size: 1.6rem; margin-bottom: 18px;
}
.note { font-size: 0.92rem; color: var(--text-3) !important; border-left: 3px solid var(--accent-cool); padding-left: 12px; }

/* Control cards */
.control { padding: 80px 0; background: radial-gradient(1200px 500px at 50% 0%, rgba(117, 133, 255, 0.10), transparent 70%); }
.cards { display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 26px; transition: transform 0.3s var(--ease), border-color 0.3s; }
.card:hover { transform: translateY(-3px); border-color: rgba(255, 158, 66, 0.35); }
.card p { color: var(--text-2); margin: 0; }

/* Download */
.download { padding: 90px 0 110px; }
.download-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.download-inner img { border-radius: 26px; margin-bottom: 18px; box-shadow: 0 18px 50px -14px rgba(255, 120, 70, 0.65); }
.download-inner .lead { margin-bottom: 20px; }

/* Inner pages */
.page { padding: 64px 0 90px; min-height: 60vh; }
.page-head { margin-bottom: 36px; }
.page-head h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.panel { background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 28px; margin-bottom: 18px; }
.panel h2 { font-size: 1.5rem; }
.panel h3 { font-size: 1.05rem; margin-top: 1.2em; }
.panel ul, .panel ol { padding-left: 1.3em; color: var(--text-2); }
.panel li { margin-bottom: 0.45em; }
.panel p { color: var(--text-2); }
.panel strong { color: var(--text); }
.safety { border-color: rgba(255, 92, 107, 0.45); }
.steps li::marker { color: var(--accent); font-weight: 700; }
.faq { margin-top: 36px; }
.faq h2 { font-size: 1.5rem; }
.faq details { background: var(--surface); border: 1px solid var(--stroke); border-radius: 18px; margin-bottom: 10px; padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 1.4rem; color: var(--accent); transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-2); }
.faq details strong { color: var(--text); }
.legal { color: var(--text-2); }
.legal h2, .legal h3 { color: var(--text); margin-top: 1.6em; }

/* Footer */
.site-footer { border-top: 1px solid var(--stroke); padding: 48px 0 32px; background: #07080d; }
.footer-grid { display: grid; gap: 28px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px 24px; }
.footer-links a { color: var(--text-2); }
.footer-legal { margin-top: 32px; font-size: 0.8rem; color: var(--text-3); }
.footer-legal p { margin: 0 0 6px; }

/* Scroll-in animation: only when JavaScript is on (content is always visible without it). */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Tablet and up */
@media (min-width: 700px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr auto; align-items: start; }
}
/* Desktop */
@media (min-width: 960px) {
  .hero { padding: 96px 0 120px; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
  .feature { grid-template-columns: 1fr 1fr; justify-items: start; gap: 72px; padding: 64px 0; }
  .feature .phone { justify-self: center; }
  .feature-flip .feature-copy { order: 2; }
  .cards { grid-template-columns: repeat(3, 1fr); }
}
/* Small phones: keep the header to the essentials. */
@media (max-width: 560px) {
  .nav-links li:not(:last-child) { display: none; }
  .nav { gap: 14px; }
}

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

/* ---------------------------------------------------------------------------
   Animated feature demonstrations (coming-soon branch).
   Pure HTML and CSS: no video, no libraries. Every word on the screens is the
   Build 20 app's own text. Static by default (no JavaScript or Reduce Motion
   shows one representative frame); site.js adds .is-playing when a demo scrolls
   into view and .is-paused when it leaves.
   --------------------------------------------------------------------------- */
.demo { margin: 0; width: 100%; max-width: 560px; justify-self: center; }
.demo-stage { display: flex; align-items: center; justify-content: center; gap: 0; }
.d-col { display: flex; flex-direction: column; align-items: center; }
.d-cap { margin: 14px 0 0; font-size: 0.85rem; font-weight: 600; color: var(--text-3); letter-spacing: 0.02em; }
.d-phone {
  --pw: clamp(132px, 39vw, 214px);
  width: var(--pw); aspect-ratio: 9 / 19.5; padding: calc(var(--pw) * 0.035); border-radius: calc(var(--pw) * 0.17);
  background: linear-gradient(160deg, #34374a, #15161f 55%, #23252f);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.09), inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 34px 60px -28px rgba(0, 0, 0, 0.95), 0 24px 70px -36px rgba(255, 110, 80, 0.45);
  container-type: inline-size;
}
.d-screen {
  position: relative; height: 100%; overflow: hidden; border-radius: calc(var(--pw) * 0.14);
  background: #090a11; color: #fff; font-family: var(--font); font-size: 4.8cqw; line-height: 1.25; text-align: center;
}
.d-screen::before { content: ""; position: absolute; z-index: 9; top: 3.2cqw; left: 50%; width: 27cqw; height: 7.6cqw; transform: translateX(-50%); border-radius: 99px; background: #000; }
.d-bar { position: absolute; z-index: 8; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 4.4cqw 9cqw 0 11cqw; font-size: 4.3cqw; }
.d-bar i { width: 14cqw; height: 2.6cqw; background:
  linear-gradient(#fff 0 0) 0 100% / 1.1cqw 40% no-repeat, linear-gradient(#fff 0 0) 1.6cqw 100% / 1.1cqw 60% no-repeat,
  linear-gradient(#fff 0 0) 3.2cqw 100% / 1.1cqw 80% no-repeat, linear-gradient(#fff 0 0) 4.8cqw 100% / 1.1cqw 100% no-repeat,
  linear-gradient(#fff 0 0) 100% 50% / 6.5cqw 100% no-repeat; border-radius: 0.6cqw; opacity: 0.95; }
.d-screen svg { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }
.d-screen .d-stroke { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.d-screen .d-stroke .d-fill { fill: currentColor; stroke: none; }
.d-screen p { margin: 0; }

/* App pages */
.d-page { position: absolute; inset: 14cqw 6cqw 0; }
.d-nav { display: flex; align-items: center; justify-content: center; position: relative; height: 9cqw; font-weight: 700; font-size: 4.4cqw; }
.d-back { position: absolute; left: 0; width: 9cqw; height: 9cqw; border-radius: 50%; background: var(--surface-raised); }
.d-back::after { content: ""; position: absolute; left: 3.6cqw; top: 3.1cqw; width: 2.4cqw; height: 2.4cqw; border: solid #fff; border-width: 0 0 0.7cqw 0.7cqw; transform: rotate(45deg); }
.d-av { width: 21cqw; height: 21cqw; margin: 4cqw auto 2cqw; border-radius: 50%; display: grid; place-items: center; background: var(--sunrise); color: #000; font: 800 10cqw/1 var(--font-display); }
.d-name { font: 800 6.6cqw/1.1 var(--font-display); }
.d-handle { color: var(--accent); font-size: 4.2cqw; }
.d-sec { margin: 5cqw 0 2.4cqw !important; text-align: left; color: var(--text-2); font-weight: 700; font-size: 4.4cqw; }
.d-title { text-align: left; font: 800 8.6cqw/1.1 var(--font-display); margin: 2cqw 0 1cqw !important; }
.d-page-list { inset: 16cqw 6cqw 0; }
.d-btn { position: relative; display: grid; place-items: center; height: 12.5cqw; border-radius: 4.4cqw; background: var(--sunrise); color: #000; font-weight: 700; font-size: 4.5cqw; box-shadow: 0 2cqw 6cqw -2cqw rgba(255, 110, 80, 0.7); }
.d-btn-soft { background: var(--surface-raised); color: #fff; box-shadow: inset 0 0 0 0.3cqw var(--stroke); }
.d-btn-stop { margin-top: 3cqw; background: #ff5f5f; color: #fff; box-shadow: none; }
.d-btn-flat { width: 100%; margin: 4cqw 0 3cqw; }
.d-lbl { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 2cqw; white-space: nowrap; }
.d-ring { position: absolute; inset: -1.6cqw; border-radius: 6cqw; border: 0.6cqw solid rgba(255, 158, 66, 0.75); animation: d-pulse 1.4s ease-out infinite; }
@keyframes d-pulse { from { transform: scale(0.97); opacity: 0.9; } to { transform: scale(1.05); opacity: 0; } }
.d-status { display: grid; margin-top: 3cqw; padding: 3cqw 3.4cqw; border-radius: 4cqw; background: var(--surface); text-align: left; font-size: 3.8cqw; color: var(--text-2); }
.d-status > span { grid-area: 1 / 1; display: flex; gap: 1.8cqw; align-items: flex-start; }
.d-status-in { margin-top: 2.4cqw; padding: 0; background: none; }
.d-ok { color: var(--success); }
.d-card { margin-top: 2cqw; padding: 4cqw; border-radius: 5cqw; background: var(--surface); text-align: left; }
.d-big { font: 800 8.6cqw/1.05 var(--font-display); }
.d-sub { color: var(--text-2); font-size: 4cqw; display: inline-flex; align-items: center; gap: 1.6cqw; }
.d-small { margin-top: 2cqw !important; color: var(--text-3); font-size: 3.5cqw; }
.d-note { margin-top: 3cqw !important; color: var(--text-3); font-size: 3.5cqw; text-align: left; }
.d-row { display: flex; align-items: center; justify-content: space-between; margin: 1.4cqw 0; font-size: 4.2cqw; }
.d-row-tight { margin-top: 3cqw; font-size: 3.4cqw; }
.d-pill { position: relative; padding: 1.4cqw 3cqw; border-radius: 99px; background: var(--surface-raised); font-variant-numeric: tabular-nums; }
.d-wheel { height: 1.25em; padding-block: 0.7cqw; overflow: visible; }
.d-wheel .sc-roll { display: flex; flex-direction: column; height: 1.25em; overflow: hidden; }
.d-wheel .sc-roll span { flex: none; line-height: 1.25em; transform: translateY(-2.5em); }
.d-badge { display: inline-flex; align-items: center; gap: 1.2cqw; color: var(--success); }
.d-decline { color: var(--accent); font-weight: 600; }
.d-sheet { position: absolute; z-index: 5; inset: 12cqw 0 0; padding: 5cqw 5cqw 0; border-radius: 7cqw 7cqw 0 0; background: #12131c; box-shadow: 0 -2cqw 8cqw rgba(0, 0, 0, 0.6); opacity: 0; transform: translateY(105%); }
.d-sheet-head { position: relative; display: flex; justify-content: space-between; align-items: center; margin-bottom: 4cqw; color: var(--accent); font-size: 3.9cqw; }
.d-sheet-head b { color: #fff; font-size: 4.2cqw; }
.sc-go { position: relative; font-weight: 700; }

/* System screens: lock screen, ringing alarm, notification */
.d-lock { position: absolute; inset: 0; padding-top: 19cqw; background: radial-gradient(120% 70% at 50% 0%, #2a1d2e, #090a11 70%); }
.d-date { color: var(--text-2); font-size: 4.4cqw; font-weight: 600; }
.d-clock { font: 700 22cqw/1 var(--font-display); letter-spacing: -0.02em; }
.d-alarm { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; padding-top: 30cqw;
  background: radial-gradient(90% 55% at 50% 30%, rgba(255, 140, 70, 0.38), transparent 70%), #0b0b12; }
.d-alarm-time { position: relative; font: 700 20cqw/1 var(--font-display); }
.d-alarm-label { margin-top: 2cqw !important; font-size: 5.2cqw; font-weight: 600; }
.d-alarm-btns { position: absolute; left: 7cqw; right: 7cqw; bottom: 13cqw; display: flex; gap: 3cqw; }
.d-alarm-btns span { flex: 1; padding: 3.6cqw 0; border-radius: 99px; font-weight: 700; font-size: 4.4cqw; }
.d-snooze { background: rgba(255, 255, 255, 0.16); }
.d-stopbtn { background: var(--sunrise); color: #000; }
.d-ripple { position: absolute; top: 24cqw; left: 50%; width: 46cqw; height: 46cqw; margin-left: -23cqw; border-radius: 50%; border: 0.5cqw solid rgba(255, 158, 66, 0.55); animation: d-ripple 2s ease-out infinite; }
.d-ripple-2 { animation-delay: 1s; }
@keyframes d-ripple { from { transform: scale(0.55); opacity: 0.9; } to { transform: scale(1.5); opacity: 0; } }
.d-banner { position: absolute; z-index: 6; top: 14cqw; left: 4cqw; right: 4cqw; display: flex; gap: 2.6cqw; align-items: center; padding: 3cqw; border-radius: 5.5cqw; text-align: left; font-size: 3.7cqw;
  background: rgba(46, 48, 64, 0.9); box-shadow: 0 2cqw 8cqw rgba(0, 0, 0, 0.5); }
.d-banner > div { flex: 1; min-width: 0; }
.d-banner p { display: flex; justify-content: space-between; gap: 2cqw; }
.d-banner em { font-style: normal; color: var(--text-3); }
.d-appicon { flex: none; width: 9cqw; height: 9cqw; border-radius: 2.2cqw; background: var(--sunrise); }
.d-winked { position: absolute; inset: 0; z-index: 7; padding: 24cqw 7cqw 0; background: #090a11; display: flex; flex-direction: column; align-items: center; }
.d-wface { display: grid; place-items: center; width: 30cqw; height: 30cqw; color: var(--accent); background: radial-gradient(circle, rgba(255, 158, 66, 0.22), transparent 70%); }
.d-wface svg { width: 26cqw; height: 26cqw; }
.d-wtitle { margin: 3cqw 0 1.6cqw !important; font: 800 7.4cqw/1.1 var(--font-display); }
.d-mini { display: inline-grid; place-items: center; width: 5.4cqw; height: 5.4cqw; border-radius: 50%; background: var(--sunrise); color: #000; font-size: 3cqw; font-weight: 800; }

/* Touches and the signal between the phones */
.d-tap { position: absolute; z-index: 10; left: 72%; top: 50%; width: 11cqw; height: 11cqw; border-radius: 50%; pointer-events: none; opacity: 0;
  background: rgba(255, 255, 255, 0.55); box-shadow: 0 0 0 0.5cqw rgba(255, 255, 255, 0.35); transform: translate(-50%, -50%); }
.sc-go .d-tap, .d-wheel .d-tap { left: 50%; }
.d-banner .d-tap { left: 50%; }
.d-beam { position: relative; flex: 1 1 64px; min-width: 22px; max-width: 96px; height: 2px; margin: 0 6px 34px;
  background: repeating-linear-gradient(90deg, rgba(255, 158, 66, 0.35) 0 6px, transparent 6px 12px); }
.d-dot { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; border-radius: 50%; opacity: 0; transform: translate(-50%, -50%);
  background: var(--sunrise); box-shadow: 0 0 0 5px rgba(255, 158, 66, 0.18), 0 0 22px 6px rgba(255, 120, 70, 0.75); }
.rs-beam .d-dot { background: linear-gradient(135deg, #ff7a6b, #ff4f5e); }

/* Static frame (no JavaScript, or Reduce Motion): one representative moment per demo. */
.wn-idle, .wn-s1 { opacity: 0; }
.sc-s1 { opacity: 0; }
.wk-idle, .wk-send, .wk-banner { opacity: 0; }
.wk-btn { background: rgba(77, 219, 143, 0.16); color: var(--success); }
.rs-s2, .rs-s3, .rs-idle { opacity: 0; }

/* Playing: every part runs on its demo's shared cycle, so the four stay in step. */
.demo { --cycle: 9s; }
.demo-sched { --cycle: 12s; }
.demo-wink { --cycle: 8.5s; }
.demo-stop { --cycle: 10s; }
.demo.is-playing [class*="wn-"], .demo.is-playing [class*="sc-"], .demo.is-playing [class*="wk-"], .demo.is-playing [class*="rs-"],
.demo.is-playing .d-tap, .demo.is-playing .d-dot, .demo.is-playing .d-alarm, .demo.is-playing .d-ringer, .demo.is-playing .d-buzzer {
  animation-duration: var(--cycle); animation-iteration-count: infinite; animation-fill-mode: both; animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.demo.is-paused *, .demo.is-paused *::before, .demo.is-paused *::after { animation-play-state: paused !important; }
.demo.is-playing .d-tap { animation-name: d-tap; }
.demo.is-playing .d-dot { animation-name: d-beam; animation-timing-function: cubic-bezier(0.55, 0, 0.35, 1); }
@keyframes d-tap { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } 2.5% { opacity: 0.9; transform: translate(-50%, -50%) scale(1); }
  5% { opacity: 0.6; transform: translate(-50%, -50%) scale(0.78); } 8%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.15); } }
@keyframes d-beam { 0% { left: 0; opacity: 0; } 2% { opacity: 1; } 15% { left: 100%; opacity: 1; } 17%, 100% { left: 100%; opacity: 0; } }
@keyframes d-show { 0%, 100% { opacity: 1; } }

/* 1. Wake Now (9 s) */
.demo-wake.is-playing .wn-btn .d-tap { animation-delay: calc(var(--cycle) * 0.09); }
.demo-wake.is-playing .wn-btn { animation-name: wn-press; }
.demo-wake.is-playing .wn-idle { animation-name: wn-idle; }
.demo-wake.is-playing .wn-wait { animation-name: wn-wait; }
.demo-wake.is-playing .d-status { animation-name: wn-box; }
.demo-wake.is-playing .wn-s1 { animation-name: wn-s1; }
.demo-wake.is-playing .wn-s2 { animation-name: wn-s2; }
.demo-wake.is-playing .d-dot { animation-delay: calc(var(--cycle) * 0.18); }
.demo-wake.is-playing .d-alarm { animation-name: wn-alarm; }
.demo-wake.is-playing .d-ringer { animation-name: wn-ring; }
@keyframes wn-press { 0%, 10.5% { transform: none; } 12.5% { transform: scale(0.95); } 16%, 100% { transform: none; } }
@keyframes wn-idle { 0%, 14% { opacity: 1; } 16%, 89% { opacity: 0; } 93%, 100% { opacity: 1; } }
@keyframes wn-wait { 0%, 14% { opacity: 0; } 16%, 89% { opacity: 1; } 93%, 100% { opacity: 0; } }
@keyframes wn-box { 0%, 15% { opacity: 0; } 18%, 89% { opacity: 1; } 93%, 100% { opacity: 0; } }
@keyframes wn-s1 { 0%, 43% { opacity: 1; } 45%, 100% { opacity: 0; } }
@keyframes wn-s2 { 0%, 43% { opacity: 0; } 46%, 89% { opacity: 1; } 93%, 100% { opacity: 0; } }
@keyframes wn-alarm { 0%, 34% { opacity: 0; transform: scale(1.06); } 38%, 88% { opacity: 1; transform: none; } 93%, 100% { opacity: 0; transform: none; } }
@keyframes wn-ring { 0%{transform:rotate(0deg)} 38.0%{transform:rotate(0deg)} 38.55%{transform:rotate(-2.2deg)} 39.1%{transform:rotate(2.2deg)} 39.65%{transform:rotate(-2.2deg)} 40.2%{transform:rotate(2.2deg)} 40.75%{transform:rotate(-1.1deg)} 41.3%{transform:rotate(0deg)} 46.0%{transform:rotate(0deg)} 46.55%{transform:rotate(-2.2deg)} 47.1%{transform:rotate(2.2deg)} 47.65%{transform:rotate(-2.2deg)} 48.2%{transform:rotate(2.2deg)} 48.75%{transform:rotate(-1.1deg)} 49.3%{transform:rotate(0deg)} 54.0%{transform:rotate(0deg)} 54.55%{transform:rotate(-2.2deg)} 55.1%{transform:rotate(2.2deg)} 55.65%{transform:rotate(-2.2deg)} 56.2%{transform:rotate(2.2deg)} 56.75%{transform:rotate(-1.1deg)} 57.3%{transform:rotate(0deg)} 62.0%{transform:rotate(0deg)} 62.55%{transform:rotate(-2.2deg)} 63.1%{transform:rotate(2.2deg)} 63.65%{transform:rotate(-2.2deg)} 64.2%{transform:rotate(2.2deg)} 64.75%{transform:rotate(-1.1deg)} 65.3%{transform:rotate(0deg)} 70.0%{transform:rotate(0deg)} 70.55%{transform:rotate(-2.2deg)} 71.1%{transform:rotate(2.2deg)} 71.65%{transform:rotate(-2.2deg)} 72.2%{transform:rotate(2.2deg)} 72.75%{transform:rotate(-1.1deg)} 73.3%{transform:rotate(0deg)} 78.0%{transform:rotate(0deg)} 78.55%{transform:rotate(-2.2deg)} 79.1%{transform:rotate(2.2deg)} 79.65%{transform:rotate(-2.2deg)} 80.2%{transform:rotate(2.2deg)} 80.75%{transform:rotate(-1.1deg)} 81.3%{transform:rotate(0deg)} 100%{transform:rotate(0deg)} }

/* 2. Scheduled wake-ups (12 s) */
.demo-sched.is-playing .d-wheel .d-tap { animation-delay: calc(var(--cycle) * 0.06); }
.demo-sched.is-playing .sc-go .d-tap { animation-delay: calc(var(--cycle) * 0.25); }
.demo-sched.is-playing .sc-sheet { animation-name: sc-sheet; }
.demo-sched.is-playing .sc-roll span { animation-name: sc-roll; }
.demo-sched.is-playing .sc-s1 { animation-name: sc-s1; }
.demo-sched.is-playing .sc-s2 { animation-name: sc-s2; }
.demo-sched.is-playing .sc-up { animation-name: sc-up; }
.demo-sched.is-playing .d-dot { animation-delay: calc(var(--cycle) * 0.38); }
.demo-sched.is-playing .sc-in { animation-name: sc-in; }
@keyframes sc-sheet { 0%, 29% { opacity: 1; transform: none; } 34% { opacity: 1; transform: translateY(105%); } 35%, 93% { opacity: 0; transform: translateY(105%); }
  94% { opacity: 1; transform: translateY(105%); } 99%, 100% { opacity: 1; transform: none; } }
@keyframes sc-roll { 0%, 10% { transform: translateY(0); } 16% { transform: translateY(-1.25em); } 22%, 93% { transform: translateY(-2.5em); } 96%, 100% { transform: translateY(0); } }
@keyframes sc-up { 0%, 31% { opacity: 0; transform: translateY(3cqw); } 36%, 92% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; } }
@keyframes sc-s1 { 0%, 55% { opacity: 1; } 57%, 100% { opacity: 0; } }
@keyframes sc-s2 { 0%, 56% { opacity: 0; } 59%, 92% { opacity: 1; } 95%, 100% { opacity: 0; } }
@keyframes sc-in { 0%, 52% { opacity: 0; transform: translateY(5cqw) scale(0.97); } 56%, 92% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: none; } }

/* 3. Remote Stop (10 s) */
.demo-stop.is-playing .rs-stop .d-tap { animation-delay: calc(var(--cycle) * 0.12); }
.demo-stop.is-playing .rs-stop { animation-name: rs-stop; }
.demo-stop.is-playing .rs-waitlbl { animation-name: rs-waitlbl; }
.demo-stop.is-playing .rs-idle { animation-name: rs-idle; }
.demo-stop.is-playing .rs-s1 { animation-name: rs-s1; }
.demo-stop.is-playing .rs-s2 { animation-name: rs-s2; }
.demo-stop.is-playing .rs-s3 { animation-name: rs-s3; }
.demo-stop.is-playing .d-dot { animation-delay: calc(var(--cycle) * 0.2); }
.demo-stop.is-playing .d-alarm { animation-name: rs-alarm; }
.demo-stop.is-playing .d-ringer { animation-name: rs-ring; }
@keyframes rs-stop { 0%, 13% { opacity: 1; transform: none; } 15% { opacity: 1; transform: scale(0.95); } 18%, 43% { opacity: 0.5; transform: none; } 46%, 92% { opacity: 0; } 96%, 100% { opacity: 1; } }
@keyframes rs-waitlbl { 0%, 43% { opacity: 1; } 46%, 92% { opacity: 0; } 96%, 100% { opacity: 1; } }
@keyframes rs-idle { 0%, 43% { opacity: 0; } 46%, 92% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes rs-s1 { 0%, 15% { opacity: 1; } 17%, 94% { opacity: 0; } 97%, 100% { opacity: 1; } }
@keyframes rs-s2 { 0%, 16% { opacity: 0; } 19%, 43% { opacity: 1; } 45%, 100% { opacity: 0; } }
@keyframes rs-s3 { 0%, 44% { opacity: 0; } 47%, 92% { opacity: 1; } 95%, 100% { opacity: 0; } }
@keyframes rs-alarm { 0%, 35% { opacity: 1; transform: none; } 39%, 92% { opacity: 0; transform: scale(0.96); } 96%, 100% { opacity: 1; transform: none; } }
@keyframes rs-ring { 0%{transform:rotate(0deg)} 0.55%{transform:rotate(-2.2deg)} 1.1%{transform:rotate(2.2deg)} 1.65%{transform:rotate(-2.2deg)} 2.2%{transform:rotate(2.2deg)} 2.75%{transform:rotate(-1.1deg)} 3.3%{transform:rotate(0deg)} 7.0%{transform:rotate(0deg)} 7.55%{transform:rotate(-2.2deg)} 8.1%{transform:rotate(2.2deg)} 8.65%{transform:rotate(-2.2deg)} 9.2%{transform:rotate(2.2deg)} 9.75%{transform:rotate(-1.1deg)} 10.3%{transform:rotate(0deg)} 14.0%{transform:rotate(0deg)} 14.55%{transform:rotate(-2.2deg)} 15.1%{transform:rotate(2.2deg)} 15.65%{transform:rotate(-2.2deg)} 16.2%{transform:rotate(2.2deg)} 16.75%{transform:rotate(-1.1deg)} 17.3%{transform:rotate(0deg)} 21.0%{transform:rotate(0deg)} 21.55%{transform:rotate(-2.2deg)} 22.1%{transform:rotate(2.2deg)} 22.65%{transform:rotate(-2.2deg)} 23.2%{transform:rotate(2.2deg)} 23.75%{transform:rotate(-1.1deg)} 24.3%{transform:rotate(0deg)} 28.0%{transform:rotate(0deg)} 28.55%{transform:rotate(-2.2deg)} 29.1%{transform:rotate(2.2deg)} 29.65%{transform:rotate(-2.2deg)} 30.2%{transform:rotate(2.2deg)} 30.75%{transform:rotate(-1.1deg)} 31.3%{transform:rotate(0deg)} 100%{transform:rotate(0deg)} }

/* 4. Quick Wink (8.5 s) */
.demo-wink.is-playing .wk-btn > .d-tap { animation-delay: calc(var(--cycle) * 0.1); }
.demo-wink.is-playing .wk-banner .d-tap { animation-delay: calc(var(--cycle) * 0.54); }
.demo-wink.is-playing .wk-btn { animation-name: wk-btn; }
.demo-wink.is-playing .wk-idle { animation-name: wk-idle; }
.demo-wink.is-playing .wk-send { animation-name: wk-send; }
.demo-wink.is-playing .wk-done { animation-name: wk-done; }
.demo-wink.is-playing .d-dot { animation-delay: calc(var(--cycle) * 0.17); }
.demo-wink.is-playing .wk-banner { animation-name: wk-banner; }
.demo-wink.is-playing .wk-open { animation-name: wk-open; }
.demo-wink.is-playing .d-buzzer { animation-name: wk-buzz; }
@keyframes wk-btn { 0%, 12% { transform: none; background: var(--surface-raised); color: #fff; } 13.5% { transform: scale(0.95); } 16%, 35% { transform: none; background: var(--surface-raised); color: #fff; }
  38%, 89% { background: rgba(77, 219, 143, 0.16); color: var(--success); } 93%, 100% { background: var(--surface-raised); color: #fff; } }
@keyframes wk-idle { 0%, 14% { opacity: 1; } 16%, 90% { opacity: 0; } 94%, 100% { opacity: 1; } }
@keyframes wk-send { 0%, 14% { opacity: 0; } 16%, 35% { opacity: 1; } 37%, 100% { opacity: 0; } }
@keyframes wk-done { 0%, 36% { opacity: 0; } 38%, 90% { opacity: 1; } 94%, 100% { opacity: 0; } }
@keyframes wk-banner { 0%, 33% { opacity: 0; transform: translateY(-6cqw) scale(0.96); } 36%, 58% { opacity: 1; transform: none; } 61%, 100% { opacity: 0; transform: scale(0.98); } }
@keyframes wk-open { 0%, 58% { opacity: 0; transform: scale(0.94); } 62%, 90% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; transform: none; } }
@keyframes wk-buzz { 0%{transform:translateX(0%)} 35.5%{transform:translateX(0%)} 36.05%{transform:translateX(-1.4%)} 36.6%{transform:translateX(1.4%)} 37.15%{transform:translateX(-1.4%)} 37.7%{transform:translateX(1.4%)} 38.0%{transform:translateX(0%)} 38.25%{transform:translateX(-0.7%)} 38.55%{transform:translateX(-1.4%)} 38.8%{transform:translateX(0%)} 39.1%{transform:translateX(1.4%)} 39.65%{transform:translateX(-1.4%)} 40.2%{transform:translateX(1.4%)} 40.75%{transform:translateX(-0.7%)} 41.3%{transform:translateX(0%)} 100%{transform:translateX(0%)} }

@media (min-width: 960px) {
  .feature .demo { justify-self: center; }
}
.d-link { display: flex; align-items: center; gap: 2.6cqw; margin-top: 4cqw; padding: 3.4cqw; box-shadow: inset 0 0 0 0.3cqw var(--stroke); }
.d-link-icon { color: var(--accent); }
.d-link-icon svg { width: 6.4cqw; height: 6.4cqw; }
.d-link-text { flex: 1; display: flex; flex-direction: column; font-size: 3.6cqw; color: var(--text-2); }
.d-link-text b { color: #fff; font-size: 4.1cqw; }
.d-chev { width: 2.2cqw; height: 2.2cqw; border: solid var(--accent); border-width: 0.6cqw 0.6cqw 0 0; transform: rotate(45deg); margin-right: 1cqw; }
.d-lock .d-banner { top: 52cqw; }

/* Hero: the Wake Now demo, larger, with warm light that swells while Jordan's iPhone rings. */
.demo-hero { max-width: 600px; }
.demo-hero .d-phone { --pw: clamp(138px, 39vw, 246px); }
.demo-hero .demo-stage { position: relative; isolation: isolate; }
.demo-hero .demo-stage::before, .demo-hero .demo-stage::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%; filter: blur(60px);
}
.demo-hero .demo-stage::before { inset: 12% 8% 18%; background: radial-gradient(closest-side, rgba(255, 140, 70, 0.30), transparent); }
.demo-hero .demo-stage::after { width: 46%; height: 62%; right: 0; top: 10%; background: radial-gradient(closest-side, rgba(255, 110, 80, 0.55), transparent); opacity: 0.55; }
.demo-hero.is-playing .demo-stage::after { animation: hero-glow var(--cycle) cubic-bezier(0.4, 0, 0.2, 1) infinite both; }
@keyframes hero-glow { 0%, 34% { opacity: 0.18; transform: scale(0.9); } 42%, 86% { opacity: 0.75; transform: scale(1.05); } 93%, 100% { opacity: 0.18; transform: scale(0.9); } }
.demo-hero .d-beam { max-width: 110px; }
.demo-hero .d-dot { width: 16px; height: 16px; }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 0.95fr 1.05fr; gap: 40px; }
}

/* Demo controls: added by site.js only when the demos animate. */
.demo-controls { display: flex; justify-content: center; gap: 10px; margin-top: 16px; opacity: 0.6; transition: opacity 0.25s var(--ease); }
.demo:hover .demo-controls, .demo-controls:focus-within { opacity: 1; }
.demo-btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font: 600 0.82rem/1 var(--font); color: var(--text-2); background: var(--surface); border: 1px solid var(--stroke);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.demo-btn:hover { color: var(--text); border-color: rgba(255, 158, 66, 0.4); background: var(--surface-raised); }
.demo-btn svg { width: 14px; height: 14px; fill: currentColor; }
