:root {
  color-scheme: light;
  --paper: #f9f9fc;
  --ink: #30263f;
  --muted: #62596f;
  --violet: #6043b5;
  --lavender: #ece8fa;
  --green: #c8eeb1;
  --arrival-height: 100vh;
  font-family: "Trebuchet MS", "DejaVu Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--violet); outline-offset: 5px; }
.page { max-width: 1240px; margin: auto; padding: 0 48px; }
.skip-link { position: fixed; left: 20px; top: -100px; padding: 12px; background: white; z-index: 3; }
.skip-link:focus { top: 12px; }
.header { display: flex; align-items: center; justify-content: space-between; padding: 32px 0; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 22px; letter-spacing: -1px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--violet); color: white; font-size: 28px; }
nav { display: flex; gap: 28px; font-size: 14px; }
nav a { text-decoration: none; }
.hero { display: grid; grid-template-columns: 1.35fr 1fr; align-items: center; gap: 60px; padding: 64px 0 72px; }
.intro { font-size: 15px; margin: 0 0 22px; color: var(--muted); }
h1 { font-size: clamp(48px, 5.7vw, 76px); line-height: 1.06; letter-spacing: -.065em; margin: 0 0 28px; }
.description { max-width: 480px; font-size: 18px; line-height: 1.7; color: var(--muted); margin: 0 0 30px; }
.actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.button { display: inline-block; background: var(--violet); color: white; padding: 16px 22px; border-radius: 10px; text-decoration: none; font-size: 15px; font-weight: 700; }
.button:hover { background: #4e3498; }
.text-link { font-size: 14px; font-weight: 700; }
.availability { margin: 20px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); }
.example { margin: 0; padding: 28px 30px 18px; background: var(--lavender); border-radius: 24px; }
.example-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 700; }
.example-label { font-size: 11px; font-weight: 400; color: var(--muted); }
.time-chart { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.column { display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; height: 230px; }
.time-bar { display: flex; align-items: flex-start; padding: 20px 16px; border-radius: 12px 12px 4px 4px; }
.time-bar span { font-size: 44px; letter-spacing: -3px; line-height: 1; }
.time-bar small { display: block; font-size: 13px; letter-spacing: 0; margin-top: 8px; }
.creating { height: 192px; background: var(--green); }
.consuming { height: 128px; background: #b5a3df; }
.bar-label { font-size: 13px; }
.example-score { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 20px; border-top: 1px solid #d2c9e6; }
.score-label { font-size: 12px; display: block; }
.example-score strong { font-size: 50px; letter-spacing: -3px; line-height: 1.2; }
.example-score p { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 0; }
figcaption { margin-top: 14px; font-size: 10px; color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; padding: 36px 0 58px; }
h2 { font-size: 20px; letter-spacing: -.6px; line-height: 1.3; margin: 0 0 14px; }
.features p, .install-copy p { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 0; }
.install { display: grid; grid-template-columns: 1fr 1.35fr; gap: 80px; padding: 48px 0 60px; border-top: 1px solid #dedbe6; scroll-margin-top: 24px; }
.install h2 { max-width: 300px; font-size: 30px; letter-spacing: -1.3px; }
.install-copy p { margin-bottom: 20px; max-width: 330px; }
.install-steps { min-width: 0; }
pre { background: var(--lavender); margin: 0 0 20px; padding: 22px; white-space: pre-wrap; overflow-wrap: anywhere; border-radius: 8px; font-size: 12px; line-height: 1.9; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
details { border-bottom: 1px solid #dedbe6; }
summary { padding: 16px 0; cursor: pointer; font-size: 14px; font-weight: 700; }
summary span { font-weight: 400; color: var(--muted); }
details ol, details p { font-size: 13px; line-height: 1.8; color: var(--muted); }
details ol { padding-left: 22px; }
details li { padding: 4px 0; }
details code { overflow-wrap: anywhere; }
footer { border-top: 1px solid #dedbe6; padding: 26px 0 32px; display: flex; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 12px; }
footer p { margin: 0; }
footer p span { padding: 0 10px; }
footer div { display: flex; gap: 24px; }

/* The opening is a short native scroll, not a locked slideshow. */
.arrival {
  --aperture: 0px;
  --thought-opacity: 1;
  --thought-shift: 0px;
  --noise-opacity: 1;
  --noise-travel: 0px;
  --orbit-scale: 1;
}
.arrival-stage {
  position: relative;
  height: min(90vh, 800px);
  min-height: 440px;
  overflow: hidden;
  background: var(--lavender);
  display: grid;
  place-items: center;
}
.arrival-center { position: relative; z-index: 1; text-align: center; padding: 0 24px; }
.arrival-thought {
  margin: 0;
  font-size: clamp(48px, 8.6vw, 128px);
  line-height: 1.07;
  letter-spacing: -.075em;
  font-weight: 700;
}
.arrival-thought span { display: block; }
.arrival-caption { margin: 32px 0 0; font-size: clamp(20px, 2.25vw, 30px); line-height: 1.4; font-weight: 700; letter-spacing: -.7px; color: var(--ink); }
.arrival-caption span { display: inline-block; }
.attention-orbit {
  position: absolute;
  width: 86%;
  height: 66%;
  border: 1px solid #c5b9df;
  border-radius: 50%;
  transform: rotate(-18deg);
}
.distractions { position: absolute; inset: 0; pointer-events: none; }
.distractions span {
  position: absolute;
  display: grid;
  gap: 7px;
  padding: 14px 18px;
  border: 1px solid #d6ccec;
  border-radius: 16px;
  background: #ffffffd9;
  color: var(--ink);
  box-shadow: 0 8px 24px #6043b510;
  transform: rotate(var(--tilt));
}
.distractions small { font-size: 11px; line-height: 1.3; color: var(--muted); }
.distractions strong { font-size: 16px; line-height: 1.25; letter-spacing: -.4px; }
.notification-count { background: #b7355a; color: white; padding: 3px 6px; border-radius: 6px; margin-right: 4px; font-size: 10px; }
.distractions span:nth-child(1) { --tilt: -8deg; left: 12%; top: 12%; }
.distractions span:nth-child(2) { --tilt: 7deg; right: 12%; top: 16%; background: #e3f4d9; border-color: #c9dfbb; }
.distractions span:nth-child(3) { --tilt: -5deg; left: 3%; top: 49%; }
.distractions span:nth-child(4) { --tilt: 5deg; right: 3%; top: 49%; background: var(--violet); border-color: var(--violet); color: white; }
.distractions span:nth-child(4) small { color: #ece8fa; }
.distractions span:nth-child(5) { --tilt: 5deg; left: 17%; bottom: 15%; }
.distractions span:nth-child(6) { --tilt: -6deg; right: 11%; bottom: 12%; }
.has-arrival .arrival {
  height: calc(var(--arrival-height) + clamp(160px, 32vh, 300px));
  position: relative;
  z-index: 2;
  pointer-events: none;
}
.has-arrival .arrival-stage {
  position: sticky;
  top: 0;
  height: var(--arrival-height);
  min-height: 0;
  pointer-events: auto;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent var(--aperture), #000 calc(var(--aperture) + 1px));
  mask-image: radial-gradient(circle at 50% 50%, transparent var(--aperture), #000 calc(var(--aperture) + 1px));
}
.has-arrival .arrival.is-open .arrival-stage { pointer-events: none; }
.has-arrival .page { margin-top: calc(-1 * var(--arrival-height)); }
.has-arrival .arrival-center { opacity: var(--thought-opacity); }
.has-arrival .arrival-thought span:first-child { transform: translateX(calc(-1 * var(--thought-shift))); }
.has-arrival .arrival-thought span:last-child { transform: translateX(var(--thought-shift)); }
.has-arrival .attention-orbit { opacity: var(--noise-opacity); transform: rotate(-18deg) scale(var(--orbit-scale)); }
.has-arrival .distractions { opacity: var(--noise-opacity); }
.has-arrival .distractions span { transform: translate(calc(var(--x) * var(--noise-travel)), calc(var(--y) * var(--noise-travel))) rotate(var(--tilt)); }
.paper-note { max-width: 780px; padding: 0 0 16px; }
.paper-note p { margin: 0; font-size: 12px; line-height: 1.8; color: var(--muted); }
.paper-note cite { font-style: normal; }

/* Keep the alarm-like hover wiggle separate from scroll-driven transforms. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .arrival:not(.is-open) .distractions span { pointer-events: auto; }
  .distractions span:hover, .example:hover { animation: card-alarm 1.4s ease-in-out infinite; }

  @keyframes card-alarm {
    0%, 42%, 100% { rotate: 0deg; }
    6% { rotate: 4deg; }
    12% { rotate: -4deg; }
    18% { rotate: 3deg; }
    24% { rotate: -3deg; }
    30% { rotate: 2deg; }
    36% { rotate: -2deg; }
  }
}

@supports (height: 100svh) {
  :root { --arrival-height: 100svh; }
  .has-arrival .arrival { height: calc(var(--arrival-height) + clamp(160px, 32svh, 300px)); }
}

@media (prefers-reduced-motion: reduce) {
  .arrival-stage { height: min(70vh, 640px); }
  .attention-orbit, .distractions { display: none; }
}

@media (max-width: 1000px) {
  .page { padding: 0 32px; }
  .hero { gap: 32px; }
  h1 { font-size: 56px; }
  .example { padding: 24px; }
  .features { gap: 28px; }
  .install { gap: 40px; }
  .distractions span:nth-child(3), .distractions span:nth-child(4) { display: none; }
}

@media (max-width: 700px) {
  .page { padding: 0 22px; }
  .header { padding: 24px 0; }
  .arrival-thought { font-size: clamp(42px, 10vw, 68px); }
  .arrival-caption { font-size: clamp(16px, 4.6vw, 20px); margin-top: 24px; letter-spacing: -.45px; }
  .attention-orbit { width: 130%; height: 52%; }
  .distractions span { padding: 10px 14px; gap: 5px; border-radius: 12px; }
  .distractions strong { font-size: 13px; }
  .distractions small { font-size: 10px; }
  .distractions span:nth-child(1) { left: 8%; top: 14%; }
  .distractions span:nth-child(2) { right: 8%; top: 25%; }
  .distractions span:nth-child(5) { left: 8%; bottom: 22%; }
  .distractions span:nth-child(6) { right: 8%; bottom: 10%; }
  .brand { font-size: 19px; }
  nav { gap: 16px; font-size: 12px; }
  nav a:first-child { display: none; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 36px 0 20px; }
  h1 { font-size: clamp(44px, 10.5vw, 68px); }
  .description { font-size: 16px; }
  .example { max-width: 440px; width: 100%; justify-self: center; }
  .features { grid-template-columns: 1fr; gap: 28px; padding: 36px 0; }
  .features p { max-width: 480px; }
  .install { grid-template-columns: 1fr; gap: 28px; padding: 36px 0; }
  .install-copy p { max-width: 480px; }
  .install h2 { max-width: none; }
  footer { flex-direction: column; gap: 16px; }
}

@media (max-width: 700px) and (max-height: 650px) {
  .distractions span:nth-child(1) { top: 8%; }
  .distractions span:nth-child(2) { top: 22%; }
  .distractions span:nth-child(5) { bottom: 20%; }
  .distractions span:nth-child(6) { bottom: 6%; }
}

@media (max-height: 450px) {
  .distractions { display: none; }
  .arrival-stage { min-height: 0; }
  .arrival-thought { font-size: clamp(40px, 9vh, 64px); }
  .arrival-caption { margin-top: 20px; font-size: 18px; }
}
