/* RafaBox: a shop in the Rafaverse.
   A light canvas with soft violet halos, an ink workbench, and the felt workshop films in lit frames.
   The full stop of the wordmark is a stack of clipboard cards, the Rafaverse moon on the front one. */

@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand */
  --violet: #7F3CE8;
  --violet-press: #6A2FC4;
  --violet-bright: #9251F7;
  --violet-soft: #D9CAFE;
  --violet-softer: #EFE2F9;
  --violet-wash: #F8F2FC;
  --indigo: #3D5AF1;
  --mint: #009440;
  --mint-ink: #007A35;
  --mint-wash: #E8F7EE;
  --danger: #B42318;
  --danger-wash: #FEF3F2;

  /* Ink */
  --ink: #06010F;
  --ink-800: #2E2E48;
  --ink-700: #47516B;
  --ink-500: #6B7390;
  --ink-400: #9AA1B6;

  /* Surfaces */
  --canvas: #F7F9FC;
  --surface: #FFFFFF;
  --surface-2: #FAFAFE;
  --hairline: #E2E6EE;
  --hairline-2: #E7EBF1;

  /* Halos */
  --halo-violet: #C9B8FF;
  --halo-blue: #A9C8FF;
  --halo-pink: #F1DDFB;

  /* Felt accents, kept from the workshop */
  --cream: #FAF4E6;
  --brass: #C99A55;
  --brass-soft: #F4E4C8;

  --shadow-card: 0 1px 2px rgba(6, 1, 15, 0.04), 0 1px 8px rgba(108, 119, 244, 0.16);
  --shadow-lift: 0 2px 6px rgba(6, 1, 15, 0.04), 0 24px 60px -24px rgba(108, 119, 244, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Type */
  --font-display: "Outfit", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --step--1: clamp(0.875rem, 0.85rem + 0.12vw, 0.95rem);
  --step-0: clamp(1rem, 0.97rem + 0.18vw, 1.0625rem);
  --step-1: clamp(1.15rem, 1.06rem + 0.4vw, 1.375rem);
  --step-2: clamp(1.4rem, 1.2rem + 0.9vw, 1.9rem);
  --step-3: clamp(2.1rem, 1.5rem + 2.6vw, 4rem);
  --step-4: clamp(2.9rem, 1.9rem + 4.6vw, 5.5rem);

  --gutter: max(16px, 4vw);
  --wrap: 1240px;
  --radius-frame: 16px;
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink-800);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: hidden;
}

main { overflow-x: hidden; overflow-x: clip; }

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 0.5em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); letter-spacing: -0.035em; line-height: 0.98; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); letter-spacing: -0.015em; }

p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--violet); text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--violet-wash);
  color: var(--violet-press);
  border: 1px solid var(--violet-softer);
  overflow-wrap: anywhere;
}

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
  border-radius: 6px;
}
.night :focus-visible { outline-color: var(--violet-soft); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

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

[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure { max-width: 62ch; }

/* The small mono label above a heading. */
.kicker {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
}
.night .kicker { color: var(--violet-soft); }

/* The violet full stop at the end of a heading. */
.dot { color: var(--violet-bright); }

/* ---------- Surfaces ---------- */

.page { position: relative; }

.night {
  position: relative;
  background: var(--ink);
  color: #fff;
}
.night h1, .night h2, .night h3 { color: #fff; }

.paper {
  position: relative;
  background: var(--surface);
  color: var(--ink-800);
  border-top: 1px solid var(--hairline);
}

.section { padding-block: clamp(72px, 9vw, 112px); }
.section-tight { padding-block: clamp(48px, 6vw, 80px); }

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-700);
  max-width: 58ch;
}
.night .lede { color: var(--ink-400); }

.small { font-size: var(--step--1); }
.soft { color: var(--ink-700); }
.night .soft { color: var(--ink-400); }

/* Soft colour halos behind a section. */
.halos, .page-head { position: relative; isolation: isolate; }
.halos::before, .page-head::before,
.halos::after, .page-head::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  /* Their slow drift runs on the compositor, so it never repaints the page. */
  will-change: transform;
}
.halos::before, .page-head::before {
  width: 520px; height: 520px;
  left: -180px; top: -160px;
  background: radial-gradient(closest-side, rgba(201, 184, 255, 0.75), rgba(201, 184, 255, 0));
}
.halos::after, .page-head::after {
  width: 440px; height: 440px;
  right: -160px; top: 60px;
  background: radial-gradient(closest-side, rgba(169, 200, 255, 0.7), rgba(169, 200, 255, 0));
}

/* ---------- Wordmark ---------- */

.wordmark {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.14em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  padding-block: 4px;
}
.wordmark:hover { color: var(--ink); }

/* The full stop is a stack of clipboard cards, the front one carrying the moon.
   Every few seconds a fresh copy lands on top, the stack steps back, and the oldest fades out. */
.stack-mark {
  --card: 0.36em;
  --step: 0.08em;
  --card-front: var(--violet);
  --card-mid: #B69CF6;
  --card-back: #D6C8FB;
  --beat: 12s;
  position: relative;
  display: block;
  width: calc(var(--card) + 2 * var(--step));
  height: calc(var(--card) + 2 * var(--step));
  margin-bottom: 0.08em;
  filter: drop-shadow(0 0.05em 0.07em rgba(127, 60, 232, 0.28));
}
.stack-mark i {
  position: absolute;
  left: 0; bottom: 0;
  width: var(--card);
  height: var(--card);
  border-radius: 0.095em;
  background: var(--card-front);
  transform-origin: 50% 100%;
  z-index: 4;
}
.stack-mark i::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 0.11em; height: 0.11em;
  min-width: 3px; min-height: 3px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #fff;
}
/* Resting stack: front, middle, back; the fourth card waits offstage. */
.stack-mark i:nth-child(2) { transform: translate(var(--step), calc(-1 * var(--step))); background: var(--card-mid); z-index: 3; }
.stack-mark i:nth-child(3) { transform: translate(calc(2 * var(--step)), calc(-2 * var(--step))); background: var(--card-back); z-index: 2; }
.stack-mark i:nth-child(4) { opacity: 0; z-index: 1; }
.stack-mark i:not(:first-child)::after { opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  /* Each card runs the same loop a quarter-beat apart; the delays start it on the resting stack. */
  .stack-mark i,
  .stack-mark i::after { animation: stack-card var(--beat) var(--ease) infinite; animation-delay: var(--d); }
  .stack-mark i::after { animation-name: stack-moon; }
  .stack-mark i:nth-child(1) { --d: calc(var(--beat) * -0.10); }
  .stack-mark i:nth-child(2) { --d: calc(var(--beat) * -0.35); }
  .stack-mark i:nth-child(3) { --d: calc(var(--beat) * -0.60); }
  .stack-mark i:nth-child(4) { --d: calc(var(--beat) * -0.85); }
}
@keyframes stack-card {
  /* A new copy drops in and lands with a small squash. */
  0% { transform: translate(-0.03em, -0.42em) rotate(-10deg) scale(0.92); opacity: 0; background: var(--card-front); }
  3% { opacity: 1; }
  5% { transform: translate(0, 0) scale(1.06, 0.9); }
  7%, 25% { transform: none; opacity: 1; background: var(--card-front); }
  /* Then it steps back as the next one lands... */
  29%, 50% { transform: translate(var(--step), calc(-1 * var(--step))); background: var(--card-mid); }
  54%, 75% { transform: translate(calc(2 * var(--step)), calc(-2 * var(--step))); opacity: 1; background: var(--card-back); }
  /* ...until it slips out the back. */
  79%, 100% { transform: translate(calc(3 * var(--step)), calc(-3 * var(--step))); opacity: 0; background: var(--card-back); }
  0%, 25% { z-index: 4; }
  25.1%, 50% { z-index: 3; }
  50.1%, 75% { z-index: 2; }
  75.1%, 100% { z-index: 1; }
}
@keyframes stack-moon {
  0%, 2% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
  7%, 25% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  29%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
}

/* ---------- Masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Solid, not a live backdrop blur: a sticky blur re-samples the animated halos and the
     films under it every frame, and Safari shows that as flicker. */
  background: rgba(247, 249, 252, 0.96);
  border-bottom: 1px solid var(--hairline-2);
  transform: translateZ(0);
}
.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.masthead nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.masthead nav a {
  display: inline-flex;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-700);
  text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.masthead nav a:hover { color: var(--ink); background: var(--violet-wash); }
.masthead nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline); background: var(--surface); }
.masthead nav a.nav-cta {
  margin-left: 8px;
  padding-inline: 16px;
  background: var(--ink);
  color: #fff;
}
.masthead nav a.nav-cta:hover { background: var(--violet); color: #fff; }
.masthead nav a.nav-cta[aria-current="page"] { box-shadow: none; }
@media (max-width: 820px) {
  .masthead .nav-wide { display: none; }
}
@media (max-width: 420px) {
  .masthead .nav-optional { display: none; }
  .masthead nav a { padding-inline: 10px; }
}

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

.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 13px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.28s var(--ease), color 0.28s var(--ease), transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.btn:hover {
  --btn-bg: var(--violet);
  color: var(--btn-fg);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(146, 81, 247, 0.35);
}
.btn:active { transform: translateY(0); }

.btn-quiet {
  --btn-bg: transparent;
  --btn-fg: var(--ink-800);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.btn-quiet:hover { --btn-bg: transparent; --btn-fg: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }

.btn-violet { --btn-bg: var(--violet); }
.btn-violet:hover { --btn-bg: #fff; --btn-fg: var(--ink); }

.btn-light { --btn-bg: #fff; --btn-fg: var(--ink); }
.btn-light:hover { --btn-bg: var(--violet); --btn-fg: #fff; }

/* Older names, kept so every page reads the same. */
.btn-ink { --btn-bg: var(--ink); }
.btn-cream { --btn-bg: var(--violet); }
.btn-cream:hover { --btn-bg: #fff; --btn-fg: var(--ink); }

.btn.is-soon,
.btn[aria-disabled="true"] {
  --btn-bg: transparent;
  color: inherit;
  box-shadow: none;
  border: 1.5px dashed currentColor;
  cursor: not-allowed;
  opacity: 0.8;
  transform: none;
}
.btn.is-soon:hover,
.btn[aria-disabled="true"]:hover { --btn-bg: transparent; box-shadow: none; transform: none; }

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

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.9em;
  height: 1.9em;
  padding: 0 0.45em;
  border-radius: 6px;
  background: var(--violet-wash);
  border: 1px solid var(--violet-soft);
  color: var(--violet);
  font-family: var(--font-mono);
  font-size: 0.8em;
  font-weight: 500;
}

.keys {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 18px;
  font-size: var(--step--1);
  color: var(--ink-500);
}
.keys > span { margin-left: 4px; }

/* ---------- Lit film frames ---------- */

.film {
  position: relative;
  margin: 0;
  isolation: isolate;
}
.film-pane {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-frame);
  overflow: hidden;
  background: #171236;
  box-shadow:
    0 0 0 1px rgba(6, 1, 15, 0.06),
    0 30px 80px -30px rgba(127, 60, 232, 0.55),
    0 18px 40px -24px rgba(6, 1, 15, 0.35);
}
/* The stitched inner edge, from the felt workshop. */
.film-pane::after {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: 3;
  border: 1.5px dashed rgba(250, 244, 230, 0.55);
  border-radius: 10px;
  pointer-events: none;
}
.film-pane img,
.film-pane video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.film-pane video { z-index: 1; opacity: 0; transition: opacity 0.35s ease; }
.film.is-playing .film-pane video { opacity: 1; }

.film figcaption {
  margin-top: 16px;
  font-size: var(--step--1);
  color: var(--ink-500);
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
}
.film figcaption .story { font-weight: 600; color: var(--ink-800); }
.night .film figcaption { color: var(--ink-400); }
.night .film figcaption .story { color: var(--violet-soft); }

.film-toggle {
  display: none;
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(6, 1, 15, 0.25);
}
.film-toggle:hover { background: var(--violet); color: #fff; }
.js .film-toggle { display: inline-flex; }
.film-toggle svg { width: 15px; height: 15px; fill: currentColor; }
.film-toggle .i-pause { display: none; }
.film-toggle[aria-pressed="true"] .i-play { display: none; }
.film-toggle[aria-pressed="true"] .i-pause { display: block; }

@media (prefers-reduced-motion: reduce) {
  .js .film-toggle { display: none; }
  .film-pane video { display: none; }
}

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

.hero {
  padding-block: clamp(40px, 6vw, 80px) clamp(64px, 8vw, 104px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(40px, 6vw, 64px);
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 11fr) minmax(0, 10fr); }
}
/* "A product from Rafaverse": one tidy pill with a soft gradient edge. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 5px 16px 5px 5px;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)) padding-box,
    linear-gradient(120deg, rgba(127, 60, 232, 0.45), rgba(61, 90, 241, 0.25) 50%, rgba(127, 60, 232, 0.15)) border-box;
  box-shadow: 0 8px 24px -14px rgba(127, 60, 232, 0.55);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-700);
  white-space: nowrap;
}
.badge-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px rgba(127, 60, 232, 0.12);
}
.badge .twinkle { color: var(--violet-soft); font-size: 0.8rem; line-height: 1; }
.badge-brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, var(--violet), var(--indigo));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.badge-sep { width: 1px; height: 14px; background: var(--hairline); }
.badge-soft { color: var(--ink-500); }
@media (max-width: 360px) {
  .badge { white-space: normal; font-size: 0.8rem; }
}
.live-dot {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(0, 148, 64, 0.15);
}
.hero h1 { margin-bottom: 22px; }
.hero h1 .accent { color: var(--violet); }
.hero .lede { margin-bottom: 32px; }
.hero-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: 22px;
  font-size: var(--step--1);
  color: var(--ink-500);
}

.hero-art { position: relative; }
/* Rafa stands free on the page. His film is shot on white; a soft radial mask fades the frame
   into the page, so it reads as a spotlight with no box (masks work on video in every browser,
   unlike blend modes). The film is padded square so the clipboard's widest swings stay inside the mask. */
.rafa-stage {
  position: relative;
  width: min(100%, 540px);
  margin: -4% auto 0;
  aspect-ratio: 1;
}
.rafa-glow {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(146, 81, 247, 0) 58%, rgba(146, 81, 247, 0.22) 74%, rgba(146, 81, 247, 0) 100%);
}
.rafa-film { position: absolute; inset: 0; }
.rafa-film .film-pane {
  aspect-ratio: 1;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 68%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(closest-side, #000 68%, rgba(0, 0, 0, 0) 100%);
}
.rafa-film .film-pane::after { display: none; }
.rafa-film .film-pane img,
.rafa-film .film-pane video { object-fit: cover; }
.rafa-film .film-toggle {
  right: 12%;
  bottom: 14%;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-700);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.rafa-film .film-toggle svg { width: 12px; height: 12px; }
.rafa-film .film-toggle:hover { background: var(--ink); color: #fff; box-shadow: none; }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 460px;
  margin: -4% auto 0;
  padding: 0;
  list-style: none;
  text-align: center;
}
.hero-facts li { display: grid; gap: 2px; padding: 0 10px; }
.hero-facts li + li { border-left: 1px solid var(--hairline); }
.hero-facts b {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.hero-facts i { font-style: normal; font-variant-numeric: tabular-nums; }
.hero-facts span { font-size: 0.78rem; color: var(--ink-500); line-height: 1.35; }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.stat {
  flex: 1 1 150px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-card);
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat b span { color: var(--violet-bright); }
.stat small { display: block; margin-top: 6px; font-size: 0.75rem; color: var(--ink-500); line-height: 1.4; }


/* ---------- Features: pick one, see its film ---------- */

.section-head { max-width: 680px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head h2 { margin-bottom: 16px; }
.section-head .lede { margin-bottom: 0; }

.features-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(40px, 5vw, 64px);
  align-items: start;
}
.features-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}
.feature { border-radius: 14px; transition: box-shadow 0.2s var(--ease), background-color 0.2s var(--ease); }
.feature.is-open { background: var(--surface); box-shadow: inset 0 0 0 1px var(--ink), var(--shadow-card); }
.feature h3 { margin: 0; font-size: inherit; letter-spacing: 0; }
.feature-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: 14px;
  background: none;
  font: inherit;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  pointer-events: none;
}
.js .feature-btn { pointer-events: auto; }
.feature-n {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--violet-softer);
  color: var(--ink-500);
  font-size: 0.78rem;
  font-weight: 600;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.feature-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.js .feature:not(.is-open) .feature-title { color: var(--ink-500); }
.js .feature:not(.is-open) .feature-btn:hover .feature-title { color: var(--ink); }
.feature.is-open .feature-n,
.feature-btn:hover .feature-n { background: var(--ink); color: #fff; }
.feature-body { padding: 0 16px 20px 60px; }
@media (max-width: 600px) {
  .feature-btn { gap: 12px; padding-inline: 12px; }
  .feature-body { padding-inline: 12px; }
}
.feature-body > p { color: var(--ink-700); max-width: 56ch; }
.feature-body .ticks { margin-top: 12px; }
.feature-body .film { margin-top: 24px; }

.features-panel { display: none; }
@media (min-width: 900px) {
  .features-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .js .features-panel { display: block; position: sticky; top: 96px; }
  .js .features-list .film { display: none; }
}

/* The wheel (works-wheel.js): desktop only. Phones and no-JS keep the accordion above.
   .works-wheel is a tall track; .ww-frame pins inside it while the page scroll turns the wheel. */
.works-wheel { display: none; }
@media (min-width: 900px) {
  .has-wheel .features-grid { display: none; }
  .has-wheel .works-wheel {
    --ww-frame-h: clamp(540px, 76vh, 760px);
    display: block;
    position: relative;
    height: calc(var(--ww-frame-h) + var(--ww-steps, 6) * 42vh);
  }
  .ww-frame {
    position: sticky;
    top: max(84px, calc(50vh - var(--ww-frame-h) / 2 + 32px));
    height: var(--ww-frame-h);
    overflow: hidden;
    border-radius: 28px;
    background:
      radial-gradient(60% 70% at 50% 50%, var(--violet-wash), transparent 70%),
      var(--surface);
    box-shadow: inset 0 0 0 1px var(--hairline), var(--shadow-card);
    user-select: none;
  }
}
.ww-stage {
  position: absolute;
  inset: 0;
  cursor: pointer;
  outline: none;
}
.ww-stage:focus-visible { box-shadow: inset 0 0 0 3px var(--violet); border-radius: 28px; }
.ww-wheel { position: absolute; top: 50%; left: 50%; }
.ww-card { position: absolute; backface-visibility: hidden; }
.ww-face {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 3px solid var(--surface);
  border-radius: 14px;
  background: var(--violet-softer);
  box-shadow: 0 0 0 1px rgba(6, 1, 15, 0.06), 0 18px 40px -18px rgba(6, 1, 15, 0.35);
  transition: box-shadow 0.3s var(--ease);
}
.ww-card.is-front .ww-face { box-shadow: 0 0 0 2px var(--violet), 0 30px 60px -24px rgba(127, 60, 232, 0.55); }
.ww-face img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ww-num {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: 600 0.75rem/1.4 var(--font-body);
  font-variant-numeric: tabular-nums;
}
.ww-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  pointer-events: none;
  text-align: center;
}
.ww-label-big {
  max-width: 9em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--ww-title, 32px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
}
.ww-label-hint { color: var(--ink-500); font-size: var(--step--1); }
.ww-copy {
  position: absolute;
  top: 50%;
  left: 40px;
  width: var(--ww-side, 280px);
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
}
.ww-copy p { margin: 0; }
.ww-copy-n {
  color: var(--violet);
  font: 600 var(--step--1)/1.4 var(--font-body);
  font-variant-numeric: tabular-nums;
}
.ww-copy-title {
  margin-top: 10px !important;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--ww-title, 32px);
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--ink);
  text-wrap: balance;
}
.ww-copy-body { margin-top: 14px !important; max-width: 30ch; color: var(--ink-700); }
.ww-index {
  position: absolute;
  top: 28px;
  right: 28px;
  max-width: var(--ww-side, 280px);
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: right;
  font-size: var(--ww-index, 14px);
  line-height: 1.8;
}
.ww-index-btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--ink-500);
  cursor: pointer;
  transition: color 0.2s var(--ease);
}
.ww-index-btn:hover { color: var(--ink); }
.works-wheel.is-open .ww-index-btn.is-current { color: var(--ink); font-weight: 600; }
.ww-index-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 4px; }

.contents { margin-top: clamp(40px, 5vw, 56px); }
.contents h3 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-bottom: 14px;
}
.contents ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.contents li {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-700);
}

.ticks {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  max-width: 56ch;
}
.ticks li {
  position: relative;
  padding-left: 28px;
  color: var(--ink-700);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  border: 1.5px solid var(--violet);
  background: radial-gradient(circle, var(--violet) 0 2px, transparent 2.5px);
}
.night .ticks li { color: var(--ink-400); }
.night .ticks li::before { border-color: var(--violet-soft); background: radial-gradient(circle, #fff 0 2px, transparent 2.5px); }

/* When / Then: a short chain of steps, like a workflow on the canvas, joined by a
   violet thread that flows downward. Vertical at every width, so nothing gets squeezed. */
.flow {
  position: relative;
  display: grid;
  gap: 14px;
  max-width: 400px;
  margin: 20px 0 8px;
  padding: 0;
  list-style: none;
}
.flow::before {
  content: "";
  position: absolute;
  left: 33px;
  top: 22px;
  bottom: 22px;
  width: 2px;
  background: repeating-linear-gradient(180deg, var(--violet-bright) 0 5px, transparent 5px 10px);
  background-size: 2px 10px;
}
.flow li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline), 0 6px 16px -10px rgba(61, 90, 241, 0.35);
  color: var(--ink);
  font-size: var(--step--1);
  font-weight: 500;
  line-height: 1.3;
}
.flow li b {
  position: relative;
  z-index: 1;
  flex: none;
  min-width: 46px;
  padding: 3px 0;
  border-radius: 999px;
  background: var(--violet-wash);
  box-shadow: inset 0 0 0 1px var(--violet-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  color: var(--violet);
}
.flow li:first-child b { background: var(--ink); box-shadow: none; color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .flow::before { animation: thread-flow 0.8s linear infinite; }
}
@keyframes thread-flow { to { background-position: 0 10px; } }
.recipes { margin-top: 18px; font-size: var(--step--1); color: var(--ink-500); }

/* ---------- The workbench ---------- */

.workbench {
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(80px, 9vw, 112px) clamp(64px, 8vw, 96px);
}
.workbench::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 46%;
  width: 900px;
  height: 640px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(146, 81, 247, 0.42), rgba(146, 81, 247, 0));
  pointer-events: none;
}
.bench-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
}
.bench-head > div { flex: 1 1 520px; }
.bench-head h2 { margin: 0; max-width: 16ch; }
.bench-head > p { margin: 0; max-width: 40ch; color: var(--ink-400); }

.bench-window {
  max-width: 1120px;
  margin: clamp(40px, 5vw, 56px) auto 0;
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink-800);
  box-shadow: 0 50px 120px -40px rgba(146, 81, 247, 0.65), 0 0 0 1px rgba(217, 202, 254, 0.18);
  overflow: hidden;
}
.bench-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
}
.bench-bar i { width: 12px; height: 12px; border-radius: 50%; background: #FF5F57; }
.bench-bar i:nth-child(2) { background: #FEBC2E; }
.bench-bar i:nth-child(3) { background: #28C840; }
.bench-bar span { flex: 1; text-align: center; font-size: 0.75rem; font-weight: 500; color: var(--ink-500); margin-right: 52px; }

.bench-body { display: flex; flex-wrap: wrap; min-height: 520px; }
.bench-side {
  flex: 1 1 250px;
  max-width: 100%;
  padding: 16px;
  background: var(--surface-2);
  border-right: 1px solid var(--hairline);
}
.bench-count { margin: 0 0 8px; font-size: 0.75rem; color: var(--ink-500); }
.bench-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--violet);
  font-size: 0.8rem;
  color: var(--ink-400);
}
.bench-search svg { width: 14px; height: 14px; fill: var(--ink-500); }
.bench-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.bench-group {
  margin-top: 10px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-700);
}
.bench-tool {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--hairline);
  transition: box-shadow 0.2s var(--ease);
}
.bench-tool:hover { box-shadow: inset 0 0 0 1px var(--violet-soft); }
.bench-tool[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--violet); }
.tool-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--violet-softer);
  color: var(--violet);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
}
.tool-text { display: grid; gap: 1px; min-width: 0; }
.tool-name { font-size: 0.8rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-local { font-size: 0.7rem; font-weight: 500; color: var(--mint); }
.tool-progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--violet-bright);
  transform-origin: 0 50%;
  animation: tool-progress 5.2s linear forwards;
}
.bench-window.is-paused .tool-progress { animation-play-state: paused; }
@keyframes tool-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.bench-main {
  flex: 999 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}
.bench-tool-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.bench-tool-head > div { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bench-tool-head .tool-icon { width: 36px; height: 36px; border-radius: 10px; font-size: 0.75rem; }
.bench-tool-head h3 { color: var(--ink); margin: 0; font-size: 1.25rem; letter-spacing: -0.01em; }
.bench-tool-head p { margin: 0; font-size: 0.8rem; color: var(--ink-500); }
.local-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--mint-wash);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--mint-ink);
}
.local-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }

.bench-panes { flex: 1; display: flex; flex-wrap: wrap; gap: 12px; }
.bench-pane {
  flex: 1 1 260px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
}
.bench-pane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-2);
  font-size: 0.7rem;
}
.bench-pane-head b { font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500); }
.bench-pane-head .result { color: var(--violet); }
.bench-pane-head span { color: var(--ink-400); }
.bench-pane pre,
.bench-out {
  flex: 1;
  margin: 0;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--ink-800);
  white-space: pre-wrap;
  word-break: break-all;
}
.bench-out { padding-inline: 8px; color: var(--ink); }
.bench-out span { display: block; min-height: 1.65em; padding: 0 6px; border-radius: 4px; }
.bench-out .is-add { color: var(--mint-ink); background: var(--mint-wash); }
.bench-out .is-del { color: var(--danger); background: var(--danger-wash); }
.bench-out .is-note { color: var(--ink-400); }

.bench-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.bench-meta { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--ink-700); }
.bench-meta::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--violet-bright); }
.bench-buttons { display: flex; gap: 8px; }
.bench-btn {
  min-width: 108px;
  padding: 9px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-700);
  cursor: pointer;
}
.bench-btn:hover { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.bench-btn-paste { display: inline-flex; align-items: center; justify-content: center; background: var(--violet); color: #fff; box-shadow: none; cursor: default; }

@media (max-width: 719px) {
  .bench-body { min-height: 0; }
  .bench-side { flex-basis: 100%; padding: 12px; border-right: 0; border-bottom: 1px solid var(--hairline); }
  .bench-search, .bench-group, .bench-tool .tool-local { display: none; }
  .bench-list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .bench-list::-webkit-scrollbar { display: none; }
  .bench-list > li { flex: none; }
  .bench-main { padding: 16px; }
}

.bench-caption {
  max-width: 1120px;
  margin: 20px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 0.8rem;
  color: var(--ink-400);
}
.bench-caption b { font-family: var(--font-mono); font-weight: 500; color: var(--violet-soft); }

.aside-note {
  max-width: 1120px;
  margin: clamp(32px, 4vw, 48px) auto 0;
  padding: 20px 24px;
  border-radius: 14px;
  border: 1px dashed rgba(217, 202, 254, 0.35);
  color: var(--ink-400);
  font-size: var(--step--1);
}
.aside-note strong { color: #fff; }

/* ---------- House rules (privacy) ---------- */

.rules-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
  margin-bottom: clamp(36px, 5vw, 56px);
}
@media (min-width: 900px) {
  .rules-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
}
.rules-grid .section-head { margin-bottom: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-card);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.card .kicker { margin: 0; font-size: 0.7rem; }
.card h3 { margin: 0; font-size: 1.35rem; letter-spacing: -0.01em; }
.card p { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--ink-700); }

.sends {
  margin-top: 24px;
  padding: 20px 22px;
  border-radius: 14px;
  background: var(--violet-wash);
  border: 1px solid var(--violet-softer);
  font-size: var(--step--1);
  color: var(--ink-700);
  max-width: 820px;
}
.sends strong { color: var(--ink); }
.honest { margin: 16px 0 0; font-size: 0.875rem; color: var(--ink-500); max-width: 720px; }

/* ---------- Pricing ---------- */

.pricing-head { max-width: 680px; }

.trial {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin: clamp(28px, 4vw, 40px) 0 clamp(28px, 4vw, 40px);
  padding: clamp(20px, 3vw, 28px);
  border-radius: 20px;
  background: linear-gradient(160deg, var(--violet-wash), var(--violet-softer) 60%, var(--violet-soft));
}
h2.visually-hidden + .trial { margin-top: 0; }
.trial h3 { font-size: var(--step-2); margin-bottom: 0.35em; }
.trial p { margin: 0; color: var(--ink-700); max-width: 52ch; }
.trial-still {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #171236;
  box-shadow: var(--shadow-lift);
}
.trial-still img { width: 100%; height: 100%; object-fit: cover; }
.trial-still.is-fallback img { object-fit: contain; object-position: center bottom; }
@media (min-width: 820px) {
  .trial { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
}

.tags {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tag {
  --tag-soft: var(--ink-700);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-card);
  color: var(--ink-800);
}
.tag-string { display: none; }
.tag h3 {
  margin: 0 0 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-500);
}
.tag p.price {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 2.2rem + 1.6vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.tag p.per { margin-bottom: 20px; font-size: var(--step--1); color: var(--tag-soft); }
.tag p { color: var(--tag-soft); font-size: var(--step--1); }
.tag ul { margin: 0 0 24px; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 0.95rem; color: var(--tag-soft); }
.tag ul li { position: relative; padding-left: 22px; }
.tag ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--violet);
  border-bottom: 2px solid var(--violet);
  transform: rotate(-45deg);
}
.tag .btn { margin-top: auto; width: 100%; }
.tag p.pick {
  position: absolute;
  top: 24px;
  right: 24px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
}
.tag-yearly {
  --tag-soft: var(--violet-soft);
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-lift);
}
.tag-yearly h3 { color: var(--violet-soft); }
.tag-yearly p.price { color: #fff; }
.tag-yearly ul li::before { border-color: var(--violet-soft); }
.tag-yearly .btn.is-soon { color: #fff; }

/* A round badge on the Own it card. */
.tag-still {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: #171236;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--violet-soft);
}
.tag-still img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 30%; transform: scale(1.55); transform-origin: 62% 30%; }
.tag-still.is-fallback img { transform: scale(1.5); transform-origin: 60% 40%; }

@media (max-width: 899px) {
  .tag-yearly { order: -1; }
}

.included {
  margin-top: clamp(32px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px 48px;
}
.included h3 { font-size: var(--step-1); }
.included p { color: var(--ink-700); }
@media (min-width: 900px) {
  .included { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.teams {
  padding: 24px;
  border-radius: 16px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
}
.teams h3 { font-size: var(--step-1); }
.tax-note { margin-top: 24px; font-size: var(--step--1); color: var(--ink-500); }

/* ---------- The counter (your license) ---------- */

.counter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}
@media (min-width: 900px) {
  .counter-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.chips li { padding: 8px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hairline); font-size: 0.85rem; font-weight: 500; color: var(--ink-700); background: var(--surface); }

.license-card {
  width: 100%;
  max-width: 460px;
  justify-self: end;
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-lift);
}
.license-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.code-boxes { display: flex; gap: 8px; margin: 0 0 22px; }
.code-boxes span {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}
.code-boxes span:last-child { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-softer); color: var(--ink-400); }
.license-card .steps { gap: 14px; }
.license-card .steps > li { padding-left: 48px; min-height: 34px; }
.license-card .steps > li::before { width: 32px; height: 32px; font-size: 0.95rem; box-shadow: none; }
.license-card .steps > li > strong { font-size: 1rem; }
.license-card .steps p { font-size: 0.9rem; }
.license-card .actions { margin-top: 22px; }
.license-card .btn { min-height: 44px; padding: 10px 18px; font-size: 0.9rem; }
@media (max-width: 420px) {
  .license-card { padding: 20px; }
  .code-boxes { gap: 6px; }
  .code-boxes span { height: 44px; font-size: 1.25rem; }
  .tag { padding: 26px 22px; }
}

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

.faq-section { padding-top: 0; }
.faq { max-width: 820px; margin-bottom: 28px; }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq details:first-of-type { border-top: 1px solid var(--hairline); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 4px;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    linear-gradient(var(--violet), var(--violet)) center / 11px 2px no-repeat,
    linear-gradient(var(--violet), var(--violet)) center / 2px 11px no-repeat,
    var(--violet-softer);
  transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 4px 22px; max-width: 66ch; color: var(--ink-700); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- Download band ---------- */

.download-band { padding-block: clamp(64px, 8vw, 112px) clamp(56px, 7vw, 96px); }
.band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: end;
  padding: clamp(36px, 6vw, 72px) clamp(24px, 6vw, 72px) 0;
  border-radius: 28px;
  background: var(--ink);
  color: #fff;
}
.band::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -120px;
  bottom: -220px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(146, 81, 247, 0.6), rgba(146, 81, 247, 0));
}
.band h2 { color: #fff; }
.band p { color: var(--ink-400); max-width: 46ch; }
.band .file-facts { margin-top: 16px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-400); }
.band-copy { padding-bottom: clamp(36px, 6vw, 72px); }
.band > img { width: min(300px, 70%); justify-self: center; }
@media (min-width: 820px) {
  .band { grid-template-columns: minmax(0, 1fr) auto; }
  .band > img { width: 300px; margin-right: 12px; }
}

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

.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 40px 48px;
  background: var(--canvas);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.footer-grid nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  font-weight: 500;
}
.footer-grid nav a { display: inline-flex; padding: 8px 10px; color: var(--ink-700); text-decoration: none; }
.footer-grid nav a:hover { color: var(--ink); }
.footer-small { margin: 0; font-size: 0.78rem; color: var(--ink-500); }
.footer-small .twinkle { color: var(--violet-bright); }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline-2);
}

/* ---------- Inner pages ---------- */

.page-head { padding-block: clamp(40px, 7vw, 88px) clamp(48px, 7vw, 88px); }
.page-head h1 { max-width: 18ch; font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4.4rem); }

.prose { max-width: 70ch; }
.prose h2 { font-size: var(--step-2); margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--step-1); margin-top: 1.5em; letter-spacing: -0.01em; }
.prose p, .prose li { color: var(--ink-700); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.5em; }
.prose strong { color: var(--ink); }

.draft-note {
  display: inline-block;
  margin: 0 0 24px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px dashed var(--brass);
  background: var(--brass-soft);
  color: #7A5520;
  font-weight: 600;
  font-size: var(--step--1);
}

.toc {
  margin: 0 0 40px;
  padding: 18px 22px;
  border-radius: 14px;
  background: var(--violet-wash);
  border: 1px solid var(--violet-softer);
}
.toc h2 { font-size: var(--step-0); margin-bottom: 8px; letter-spacing: 0; }
.toc ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; font-weight: 500; font-size: var(--step--1); }

/* Real sequences only: install steps, sign-in steps. */
.steps {
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 20px;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 4px 0 4px 60px;
  min-height: 44px;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 0 0 4px var(--violet-softer);
}
.steps > li > strong { display: block; color: var(--ink); font-size: var(--step-1); font-family: var(--font-display); letter-spacing: -0.01em; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--ink-700); }
.steps + p { margin-top: 28px; }

.thanks-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
@media (min-width: 900px) {
  .thanks-head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}

.card-note {
  padding: 22px 24px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-card);
}
.paper .card-note { background: var(--canvas); box-shadow: none; }
.card-note h2, .card-note h3 { font-size: var(--step-1); letter-spacing: -0.01em; margin-top: 0; }
.card-note p { color: var(--ink-700); }
.card-note p:last-child { margin-bottom: 0; }

.card-warm {
  position: relative;
  padding: 24px 26px;
  border-radius: 18px;
  background: var(--violet-wash);
  border: 1px solid var(--violet-softer);
}
.card-warm h2, .card-warm h3 { font-size: var(--step-1); letter-spacing: -0.01em; margin-top: 0; }
.card-warm p, .card-warm li { color: var(--ink-700); }
.card-warm p:last-child { margin-bottom: 0; }

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px 48px;
}
@media (min-width: 900px) {
  .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.stack > * + * { margin-top: clamp(24px, 3vw, 36px); }

.download-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}
.download-hero .app-icon { width: clamp(120px, 18vw, 200px); filter: drop-shadow(0 24px 40px rgba(127, 60, 232, 0.35)); }
@media (min-width: 820px) {
  .download-hero { grid-template-columns: auto minmax(0, 1fr); gap: 56px; }
}
.file-facts { margin-top: 18px; font-size: var(--step--1); color: var(--ink-500); }

.ownit-still {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #171236;
  box-shadow: var(--shadow-lift);
}
.ownit-still img { width: 100%; height: 100%; object-fit: cover; }

.lost {
  min-height: 70vh;
  display: grid;
  align-items: center;
}
.lost-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}
.lost-grid img { width: min(280px, 70%); }
@media (min-width: 820px) {
  .lost-grid { grid-template-columns: minmax(0, 1fr) auto; }
  .lost-grid img { width: 300px; }
}

/* ---------- Rafaverse motion ---------- */

/* Twinkles, from the logo sheet: they blink out of step. */
@keyframes rv-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.6) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(20deg); }
}
@keyframes rv-rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
@keyframes halo-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(60px, 40px) scale(1.12); }
}

/* The tool grid: four tiles make the stop, three tools and the moon, lighting in turn. */
.tool-grid {
  display: inline-grid;
  grid-template-columns: 0.165em 0.165em;
  gap: 0.058em;
  margin-left: 0.09em;
  vertical-align: 0.02em;
}
.tool-grid i {
  width: 0.165em;
  height: 0.165em;
  border-radius: 0.05em;
  background: var(--violet-soft);
}
.tool-grid i:nth-child(4) { border-radius: 50%; box-shadow: 0 0 0.16em 0.03em rgba(217, 202, 254, 0.5); }
@keyframes rv-cell {
  0%, 100% { opacity: 0.28; transform: scale(0.72); }
  12%, 30% { opacity: 1; transform: scale(1); }
  42% { opacity: 0.28; transform: scale(0.72); }
}
@keyframes rv-moon {
  0%, 100% { opacity: 0.5; transform: scale(0.85); }
  12%, 30% { opacity: 1; transform: scale(1); }
  42% { opacity: 0.5; transform: scale(0.85); }
}

/* The toolbox: ink box with a handle; every few seconds the lid lifts and a tool and the moon rise. */
.toolbox {
  position: relative;
  display: inline-block;
  width: 0.333em;
  height: 0.39em;
  margin-left: 0.1em;
  vertical-align: -0.02em;
}
.toolbox > span { position: absolute; display: block; }
.tb-tool { left: 0.058em; top: 0.142em; width: 0.036em; height: 0.095em; border-radius: 0.02em; background: var(--violet-soft); transform: rotate(-14deg); }
.tb-moon { left: 0.11em; top: 0.125em; width: 0.11em; height: 0.11em; border-radius: 50%; background: var(--violet-soft); box-shadow: 0 0 0.06em 0.015em rgba(217, 202, 254, 0.45); }
.tb-body { left: 0; bottom: 0; width: 0.333em; height: 0.208em; border-radius: 0.025em 0.025em 0.066em 0.066em; background: #fff; }
.tb-lid { left: -0.017em; bottom: 0.208em; width: 0.367em; height: 0.058em; border-radius: 0.025em; background: #fff; transform: translateY(-0.022em); }
.tb-handle { position: absolute; left: 0.108em; top: -0.067em; width: 0.15em; height: 0.085em; border: 0.025em solid #fff; border-bottom: 0; border-radius: 0.08em 0.08em 0 0; }
.tb-star { right: -0.3em; top: -0.42em; font-size: 0.25em; line-height: 1; color: var(--violet-soft); }
@keyframes tb-lift { 0%, 100% { transform: translateY(-0.022em); } 42%, 62% { transform: translateY(-0.108em); } }
@keyframes tb-rise { 0%, 100% { transform: none; } 42%, 62% { transform: translateY(-0.075em); } }
@keyframes tb-tool { 0%, 100% { transform: rotate(-14deg); } 42%, 62% { transform: translateY(-0.067em) rotate(-24deg); } }
@keyframes tb-glow { 0%, 100% { box-shadow: 0 0 0.05em 0.012em rgba(217, 202, 254, 0.4); } 42%, 62% { box-shadow: 0 0 0.12em 0.035em rgba(217, 202, 254, 0.65); } }

.band-with-film { align-items: center; padding-bottom: clamp(36px, 6vw, 72px); }
.band-with-film .band-copy { padding-bottom: 0; }
.band-film { width: 100%; max-width: 520px; justify-self: end; }
.band .film figcaption { color: var(--ink-400); }
.band .film figcaption .story { color: var(--violet-soft); }
.band-film .film-pane { box-shadow: 0 30px 80px -30px rgba(146, 81, 247, 0.7), 0 0 0 1px rgba(217, 202, 254, 0.2); }
@media (min-width: 820px) {
  .band-with-film { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
  .tb-star, .footer-small .twinkle, .badge .twinkle { display: inline-block; animation: rv-twinkle 2.6s ease-in-out infinite; }
  .tool-grid i { animation: rv-cell 3.2s var(--ease) infinite; }
  .tool-grid i:nth-child(2) { animation-delay: 0.8s; }
  .tool-grid i:nth-child(3) { animation-delay: 2.4s; }
  .tool-grid i:nth-child(4) { animation: rv-moon 3.2s var(--ease) 1.6s infinite; }
  .tb-lid { animation: tb-lift 4s var(--ease) infinite; }
  .tb-moon { animation: tb-rise 4s var(--ease) infinite, tb-glow 4s var(--ease) infinite; }
  .tb-tool { animation: tb-tool 4s var(--ease) 0.1s infinite; }
  .halos::before, .page-head::before { animation: halo-drift 18s ease-in-out infinite alternate; }
  .halos::after, .page-head::after { animation: halo-drift 22s ease-in-out -6s infinite alternate-reverse; }
  .hero-copy { animation: rv-rise 0.8s var(--ease) both; }
  .features-panel .film { animation: rv-rise 0.5s var(--ease) both; }
  .bench-out span { animation: line-in 0.35s var(--ease) both; animation-delay: calc(var(--i, 0) * 22ms); }

  /* Scroll reveals: only with JavaScript, so nothing is hidden without it. */
  .js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .cards [data-reveal]:nth-child(2), .js .tags [data-reveal]:nth-child(2) { transition-delay: 0.1s; }
  .js .cards [data-reveal]:nth-child(3), .js .tags [data-reveal]:nth-child(3) { transition-delay: 0.2s; }
}
@keyframes line-in { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

/* ---------- The screen demo: a cursor walks through one copy and paste ---------- */

.demo-section { padding-block: clamp(56px, 7vw, 96px) clamp(40px, 5vw, 64px); background: var(--surface); border-block: 1px solid var(--hairline); }
.demo-head { margin-inline: auto; text-align: center; }
.demo-head .lede { margin-inline: auto; }

.rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  margin: 0 0 clamp(24px, 3vw, 36px);
  padding: 0;
  list-style: none;
}
.rail li { display: inline-flex; align-items: center; gap: 12px; }
.rail li + li::before { content: "\2192"; color: var(--ink-400); }
@media (max-width: 600px) {
  .rail { gap: 6px; }
  .rail li + li::before { display: none; }
  .rail-step { padding: 6px 12px 6px 6px; font-size: 0.8rem; }
}
.rail-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 8px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-700);
  cursor: pointer;
  pointer-events: none;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.js .rail-step { pointer-events: auto; }
.rail-step:hover { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.rail-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--violet-softer);
  color: var(--ink-500);
  font-size: 0.72rem;
  font-weight: 600;
}
.rail-step.is-done { background: var(--violet-wash); box-shadow: inset 0 0 0 1px var(--violet-soft); color: var(--ink-800); }
.rail-step.is-done .rail-n { background: var(--violet-soft); color: var(--violet-press); }
.rail-step.is-current { background: var(--ink); box-shadow: 0 8px 24px rgba(146, 81, 247, 0.35); color: #fff; }
.rail-step.is-current .rail-n { background: var(--violet); color: #fff; }

.screen {
  container-type: inline-size;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(6px, 1vw, 12px);
  border-radius: clamp(14px, 2vw, 24px);
  background: linear-gradient(160deg, #1B1433, var(--ink));
  box-shadow: 0 50px 120px -40px rgba(146, 81, 247, 0.55), 0 0 0 1px rgba(6, 1, 15, 0.08);
}
.screen-stage {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: clamp(8px, 1.4vw, 14px);
  font-size: 10px;
  font-size: 1.6cqw;
  line-height: 1.4;
  color: var(--ink-800);
  user-select: none;
}
.screen-stage * { box-sizing: border-box; }
.screen-stage p { margin: 0; }

.sc-wall {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(40% 55% at 18% 30%, rgba(201, 184, 255, 0.95), rgba(201, 184, 255, 0) 70%),
    radial-gradient(45% 60% at 85% 75%, rgba(169, 200, 255, 0.95), rgba(169, 200, 255, 0) 70%),
    radial-gradient(35% 40% at 70% 15%, rgba(241, 221, 251, 1), rgba(241, 221, 251, 0) 70%),
    linear-gradient(160deg, #EFE2F9, #DCE6FF);
}
.sc-wall-moon {
  position: absolute;
  right: 6em;
  bottom: 4.5em;
  width: 3.2em;
  height: 3.2em;
  border-radius: 50%;
  background: var(--violet-bright);
  box-shadow: 0 0 2.4em 0.8em rgba(146, 81, 247, 0.45);
  opacity: 0.7;
}
.sc-tw { position: absolute; font-style: normal; line-height: 1; color: #fff; }
.sc-tw.t1 { left: 4%; bottom: 9%; font-size: 1.6em; }
.sc-tw.t2 { right: 3%; top: 38%; font-size: 1em; color: var(--violet); }
.sc-tw.t3 { left: 48%; bottom: 3%; font-size: 0.9em; }

.sc-menubar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 2.2em;
  padding: 0 1.2em;
  font-size: 0.72em;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
  color: var(--ink);
}
.sc-mb-left, .sc-mb-right { display: flex; align-items: center; gap: 1.4em; }
.sc-mb-dot { width: 0.9em; height: 0.9em; border-radius: 50%; background: var(--ink); }
.sc-rafa {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  padding: 0.2em 0.45em;
  border-radius: 0.4em;
  transition: background-color 0.3s var(--ease);
}
.sc-bar-icon { display: block; width: 1.25em; height: 1.25em; fill: var(--ink); }
.sc-rafa.is-pulse { animation: sc-pulse 0.9s var(--ease); }
@keyframes sc-pulse {
  0% { background: rgba(127, 60, 232, 0); box-shadow: 0 0 0 0 rgba(146, 81, 247, 0.6); }
  30% { background: rgba(127, 60, 232, 0.18); box-shadow: 0 0 0 0.5em rgba(146, 81, 247, 0); }
  100% { background: rgba(127, 60, 232, 0); box-shadow: 0 0 0 0 rgba(146, 81, 247, 0); }
}

.sc-win {
  position: absolute;
  overflow: hidden;
  border-radius: 0.9em;
  background: #fff;
  font-size: 0.78em;
  box-shadow: 0 0.2em 0.6em rgba(6, 1, 15, 0.08), 0 2em 4em -1.5em rgba(61, 90, 241, 0.35);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease), filter 0.6s var(--ease);
}
.sc-bar {
  display: flex;
  align-items: center;
  gap: 0.5em;
  height: 2.4em;
  padding: 0 1em;
  background: #F4F5F8;
  border-bottom: 1px solid var(--hairline);
}
.sc-bar i { width: 0.8em; height: 0.8em; border-radius: 50%; background: #FF5F57; }
.sc-bar i:nth-child(2) { background: #FEBC2E; }
.sc-bar i:nth-child(3) { background: #28C840; }
.sc-url {
  flex: 1;
  margin-right: 3em;
  padding: 0.25em 0.8em;
  border-radius: 0.5em;
  background: #fff;
  font-size: 0.85em;
  text-align: center;
  color: var(--ink-500);
}
.sc-web { left: 3em; top: 4.2em; width: 34.5em; z-index: 2; }
.sc-mail { left: 33.5em; top: 13em; width: 32.5em; height: 25.5em; z-index: 1; }
.sc-web-body { padding: 1.4em 1.6em 1.8em; }
.sc-product { display: flex; gap: 1.2em; align-items: center; margin-bottom: 1.4em; }
.sc-photo { width: 11em; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0.6em; }
.sc-eyebrow { font-size: 0.8em; color: var(--violet); font-weight: 600; }
.sc-title { font-family: var(--font-display); font-weight: 700; font-size: 1.6em; color: var(--ink); letter-spacing: -0.02em; }
.sc-price { font-size: 0.85em; color: var(--ink-500); margin-bottom: 0.6em !important; }
.sc-buy { display: inline-block; padding: 0.4em 1em; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.8em; font-weight: 600; }
.sc-label { margin: 0.9em 0 0.35em !important; font-size: 0.75em; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-500); }
.sc-field {
  position: relative;
  padding: 0.55em 0.8em;
  border-radius: 0.5em;
  border: 1px solid var(--hairline);
  background: var(--surface-2);
  font-size: 0.85em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-mono { font-family: var(--font-mono); }
.sc-field-text { position: relative; }
.sc-sel {
  position: absolute;
  left: 0.6em;
  right: 0.6em;
  top: 0.35em;
  bottom: 0.35em;
  border-radius: 0.2em;
  background: rgba(127, 60, 232, 0.24);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.8s cubic-bezier(0.45, 0, 0.55, 1);
}
.sc-sel.is-on { transform: scaleX(1); }

.sc-mail-fields { padding: 0.6em 1.4em; border-bottom: 1px solid var(--hairline); }
.sc-mail-fields p { display: flex; gap: 0.8em; padding: 0.3em 0; font-size: 0.9em; color: var(--ink); }
.sc-mail-fields p + p { border-top: 1px solid var(--hairline-2); }
.sc-mail-fields b { width: 4.5em; font-weight: 500; color: var(--ink-500); }
.sc-mail-body { padding: 1.2em 1.4em; font-size: 0.95em; line-height: 1.7; color: var(--ink); }
.sc-pasted {
  display: none;
  border-radius: 0.25em;
  color: var(--violet);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: background-color 1.2s var(--ease);
}
.sc-pasted.is-on { display: inline; }
.sc-pasted.is-flash { background: rgba(127, 60, 232, 0.22); transition: none; }
.sc-caret {
  display: inline-block;
  width: 0.09em;
  min-width: 1.5px;
  height: 1.1em;
  margin-left: 0.05em;
  vertical-align: -0.15em;
  background: var(--violet);
  opacity: 0;
}
.sc-mail.is-front .sc-caret { opacity: 1; animation: sc-blink 1s steps(1) infinite; }

.sc-win.is-front { z-index: 3; box-shadow: 0 0.2em 0.6em rgba(6, 1, 15, 0.1), 0 2.6em 5em -1.5em rgba(127, 60, 232, 0.5); }
.sc-win.is-back { filter: saturate(0.85) brightness(0.98); }
@keyframes sc-blink { 50% { opacity: 0; } }

/* ---------- Liquid Glass, in CSS ----------
   The demo's functional layer (menu bar, overlay, menu, notification, key HUD) is glass over
   the content layer (wallpaper and windows), as on macOS 26. Regular glass: a medium-clear
   pane that blurs, brightens and saturates what is behind it, a specular rim that catches the
   light at the top edge, a softer lower lip, and a sheen that is strongest near the corners.
   Never faded with opacity (the refraction would collapse) and never glass on glass. */
.lg {
  isolation: isolate;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(247, 249, 252, 0.24));
  -webkit-backdrop-filter: blur(18px) saturate(185%) brightness(1.05);
  backdrop-filter: blur(18px) saturate(185%) brightness(1.05);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(255, 255, 255, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    inset 0 0 1.4em rgba(255, 255, 255, 0.28),
    0 0 0 0.5px rgba(6, 1, 15, 0.14),
    0 1.6em 3.6em -1.4em rgba(6, 1, 15, 0.38);
}
/* Edge light: a bright rim that thins out along the sides, like light bending at the lip. */
.lg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 10;
  border-radius: inherit;
  padding: 1.5px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.15) 22%, rgba(255, 255, 255, 0) 45%, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 0.35) 85%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
/* Sheen across the top third of the pane. */
.lg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(120% 60% at 20% 0%, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 60%);
  pointer-events: none;
}
.lg-dark {
  background: linear-gradient(180deg, rgba(40, 32, 64, 0.62), rgba(6, 1, 15, 0.7));
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 0.8em 1.6em -0.6em rgba(6, 1, 15, 0.6);
}

/* The Quick Overlay, as the app draws it (QuickOverlayView): a Liquid Glass shelf docked to
   the bottom of the screen, 468 pt tall, 12 pt from the edges. --u is one point on a
   1470 x 956 pt Mac screen (MacBook Air 13"), so every size below is the app's own number
   and the shelf takes the same half of the screen it does on a real Mac. */
.sc-ov {
  --u: calc(100cqw / 1470);
  position: absolute;
  z-index: 5;
  left: calc(12 * var(--u));
  right: calc(12 * var(--u));
  bottom: calc(12 * var(--u));
  height: calc(468 * var(--u));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: calc(26 * var(--u));
  color: var(--ink);
  font-size: calc(12 * var(--u));
  line-height: 1.35;
  transform: translateY(calc(500 * var(--u)));
  transition: transform 0.55s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.sc-ov.is-open { transform: none; }

.ov-close { display: flex; justify-content: flex-end; padding: calc(8 * var(--u)) calc(12 * var(--u)) 0; }
.ov-chrome {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(28 * var(--u));
  height: calc(28 * var(--u));
  border-radius: calc(8 * var(--u));
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: calc(12 * var(--u));
  color: var(--ink-700);
}
.ov-bar {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
  height: calc(56 * var(--u));
  padding: 0 calc(16 * var(--u));
  white-space: nowrap;
}
.ov-logo {
  display: inline-flex;
  align-items: flex-end;
  gap: calc(3 * var(--u));
  margin: 0 calc(4 * var(--u)) 0 calc(6 * var(--u));
  font-family: var(--font-display);
  font-weight: 700;
  font-size: calc(24 * var(--u));
  letter-spacing: -0.04em;
  line-height: 1;
}
.ov-logo i { width: calc(6 * var(--u)); height: calc(6 * var(--u)); margin-bottom: calc(4 * var(--u)); border-radius: 50%; background: var(--violet); box-shadow: 0 0 calc(6 * var(--u)) rgba(127, 60, 232, 0.6); }
.ov-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: calc(9 * var(--u));
  flex: none;
  width: calc(360 * var(--u));
  height: calc(42 * var(--u));
  padding: 0 calc(14 * var(--u));
  border-radius: calc(12 * var(--u));
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--violet), 0 0 0 calc(3 * var(--u)) rgba(127, 60, 232, 0.12);
  font-size: calc(15 * var(--u));
  font-weight: 500;
  overflow: hidden;
}
.ov-search svg { flex: none; width: calc(15 * var(--u)); height: calc(15 * var(--u)); fill: var(--violet); transition: transform 0.3s var(--ease); }
.sc-ov.is-typing .ov-search svg { transform: rotate(-12deg) scale(1.12); }
.ov-caret { width: 1.5px; height: calc(17 * var(--u)); margin-left: calc(-8 * var(--u)); background: var(--violet); animation: sc-blink 1s steps(1) infinite; }
.ov-query:empty + .ov-caret { margin-left: 0; }
.ov-placeholder { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink-400); margin-left: calc(-9 * var(--u)); }
.ov-count { display: none; margin-left: auto; font-size: calc(11 * var(--u)); font-weight: 600; color: var(--ink-500); }
.sc-ov.has-query .ov-placeholder, .sc-ov.has-query .ov-kc-k { display: none; }
.sc-ov.has-query .ov-count { display: inline; }
.ov-sweep {
  position: absolute;
  left: calc(14 * var(--u));
  right: calc(14 * var(--u));
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(127, 60, 232, 0), var(--violet), rgba(127, 60, 232, 0));
  background-size: 40% 100%;
  background-repeat: no-repeat;
  opacity: 0;
}
.sc-ov.is-typing .ov-sweep { opacity: 1; animation: ov-sweep 0.9s linear infinite; }
@keyframes ov-sweep { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.ov-kc {
  display: inline-flex;
  align-items: center;
  padding: calc(2 * var(--u)) calc(6 * var(--u));
  border-radius: calc(4 * var(--u));
  background: var(--violet-wash);
  box-shadow: inset 0 0 0 1px var(--violet-soft);
  font-family: var(--font-mono);
  font-size: calc(11 * var(--u));
  font-weight: 500;
  color: var(--violet);
  line-height: 1.3;
}
.ov-kc-k { margin-left: auto; }
.ov-pill {
  padding: calc(8 * var(--u)) calc(11 * var(--u));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: calc(12 * var(--u));
  font-weight: 500;
}
.ov-pill.is-active { background: var(--violet-soft); box-shadow: inset 0 0 0 1px rgba(127, 60, 232, 0.35); color: var(--violet); font-weight: 700; }
.ov-divider { width: 1px; height: calc(22 * var(--u)); background: var(--hairline); }
.ov-facet { padding: calc(7 * var(--u)) calc(10 * var(--u)); border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hairline); background: rgba(255, 255, 255, 0.62); font-size: calc(12 * var(--u)); font-weight: 500; color: var(--ink-700); }
.ov-facet::after { content: " \25BE"; color: var(--ink-400); }
.ov-gear { margin-left: auto; }
.ov-rule { height: 1px; background: rgba(6, 1, 15, 0.08); flex: none; }

.ov-shelf {
  flex: 1;
  display: flex;
  align-items: flex-start;
  padding: calc(16 * var(--u)) calc(20 * var(--u));
  overflow: hidden;
}
.ov-card {
  position: relative;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--u));
  width: calc(252 * var(--u));
  height: calc(280 * var(--u));
  margin-right: calc(18 * var(--u));
  padding: calc(12 * var(--u));
  border-radius: calc(16 * var(--u));
  background: #F5F2FB;
  box-shadow: inset 0 0 0 1px var(--hairline), 0 1px 3px rgba(6, 1, 15, 0.05);
  overflow: hidden;
  transition: width 0.45s var(--ease), margin 0.45s var(--ease), padding 0.45s var(--ease), opacity 0.3s var(--ease), box-shadow 0.3s;
}
.ov-card.is-url { background: #EEF5FF; }
.ov-card.is-json, .ov-card.is-colour { background: #F3EEFE; }
.ov-card.is-image { background: #F1F5FA; }
.ov-card.is-selected { background: #EFE7FD; box-shadow: inset 0 0 0 1.5px var(--violet), 0 calc(8 * var(--u)) calc(24 * var(--u)) calc(-10 * var(--u)) rgba(127, 60, 232, 0.5); }
/* The card that ↵ will paste carries a travelling light. */
.ov-card.is-selected::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--edge), rgba(146, 81, 247, 0) 0deg, rgba(255, 255, 255, 0.95) 30deg, rgba(146, 81, 247, 0) 60deg, rgba(146, 81, 247, 0) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: edge-turn 3s linear infinite;
  pointer-events: none;
}
.sc-ov.is-filtered .is-filterable { width: 0; margin-right: 0; padding-left: 0; padding-right: 0; opacity: 0; box-shadow: none; }
.ov-head { display: flex; align-items: center; gap: calc(7 * var(--u)); }
.ov-tag {
  padding: calc(4 * var(--u)) calc(8 * var(--u));
  border-radius: 999px;
  font-size: calc(11 * var(--u));
  font-weight: 700;
  color: var(--ink-500);
  background: rgba(102, 110, 136, 0.1);
  white-space: nowrap;
}
.is-url .ov-tag { color: #2F6FD6; background: rgba(47, 111, 214, 0.1); }
.is-json .ov-tag { color: var(--violet); background: rgba(127, 60, 232, 0.1); }
.is-colour .ov-tag, .is-image .ov-tag { color: #5B4BD6; background: rgba(91, 75, 214, 0.1); }
.ov-head .ov-kc { margin-left: auto; }
.ov-preview {
  flex: 1;
  min-height: 0;
  padding: calc(7 * var(--u)) calc(9 * var(--u));
  border-radius: calc(8 * var(--u));
  background: rgba(255, 255, 255, 0.55);
  font-size: calc(12.5 * var(--u));
  line-height: 1.45;
  color: var(--ink);
  overflow: hidden;
  word-break: break-all;
}
.ov-preview mark { background: rgba(127, 60, 232, 0.18); color: var(--violet-press); border-radius: 2px; padding: 0 1px; }
.sc-ov:not(.has-query) .ov-preview mark { background: none; color: inherit; padding: 0; }
.ov-code { font-family: var(--font-mono); font-size: calc(11 * var(--u)); word-break: normal; }
.ov-swatch {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: calc(2 * var(--u));
  padding: calc(10 * var(--u));
  border-radius: calc(10 * var(--u));
  background: #7F3CE8;
  color: #fff;
  font-size: calc(11 * var(--u));
  font-family: var(--font-mono);
}
.ov-swatch b { font-family: var(--font-body); font-size: calc(13 * var(--u)); }
.ov-thumb { flex: 1; min-height: 0; width: 100%; object-fit: cover; border-radius: calc(8 * var(--u)); }
.ov-meta { font-size: calc(11 * var(--u)); color: var(--ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-why { display: none; color: var(--violet-press); font-weight: 600; }
.sc-ov.has-query .ov-why { display: inline; }
.ov-actions { display: flex; gap: calc(6 * var(--u)); }
.ov-btn {
  display: inline-flex;
  align-items: center;
  gap: calc(6 * var(--u));
  padding: calc(8 * var(--u)) calc(14 * var(--u));
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: calc(12 * var(--u));
  font-weight: 600;
  white-space: nowrap;
}
.ov-btn small { font-family: var(--font-mono); font-size: calc(10 * var(--u)); opacity: 0.7; }
.ov-btn.is-ink { background: var(--ink); color: #fff; box-shadow: none; }
.ov-btn.is-accent { margin-left: auto; background: var(--violet-wash); color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet-soft); }
.ov-bolt { color: var(--violet); transition: background-color 0.2s, color 0.2s; }
.sc-ov.is-menu .ov-bolt { background: var(--ink); color: #fff; box-shadow: none; }

/* ⚡ expands the card in place into clip -> result; only this card grows. */
.ov-card-face, .ov-transform { display: flex; flex-direction: column; gap: calc(8 * var(--u)); height: 100%; }
.ov-transform { display: none; gap: calc(12 * var(--u)); }
.ov-card.is-transformed { width: calc(660 * var(--u)); padding: calc(16 * var(--u)); background: #fff; }
.ov-card.is-transformed .ov-card-face { display: none; }
.ov-card.is-transformed .ov-transform { display: flex; animation: rv-fade 0.4s var(--ease) both; }
@keyframes rv-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ov-thead { display: flex; align-items: center; gap: calc(8 * var(--u)); }
.ov-tool { display: inline-flex; align-items: center; gap: calc(7 * var(--u)); font-size: calc(13 * var(--u)); font-weight: 700; }
.ov-tool i { display: inline-flex; align-items: center; justify-content: center; width: calc(24 * var(--u)); height: calc(24 * var(--u)); border-radius: calc(7 * var(--u)); background: var(--violet-soft); color: var(--violet); font-style: normal; }
.ov-tool small { font-size: calc(8 * var(--u)); color: var(--ink-500); }
.ov-done { margin-left: auto; font-family: var(--font-mono); font-size: calc(11 * var(--u)); font-weight: 600; color: var(--mint-ink); }
.ov-tbody { flex: 1; min-height: 0; display: flex; align-items: stretch; gap: calc(10 * var(--u)); }
.ov-pane {
  width: calc(200 * var(--u));
  flex: none;
  padding: calc(9 * var(--u));
  border-radius: calc(10 * var(--u));
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-family: var(--font-mono);
  font-size: calc(11 * var(--u));
  line-height: 1.5;
  word-break: break-all;
  color: var(--ink-700);
}
.ov-pane.is-result { flex: 1; width: auto; background: #fff; box-shadow: inset 0 0 0 1px var(--violet-soft); color: var(--ink); font-size: calc(12 * var(--u)); }
.ov-arrow { align-self: center; font-weight: 700; color: var(--violet); }

.ov-foot {
  display: flex;
  align-items: center;
  gap: calc(18 * var(--u));
  height: calc(46 * var(--u));
  flex: none;
  padding: 0 calc(18 * var(--u));
  font-size: calc(12 * var(--u));
  font-weight: 500;
  color: var(--ink-500);
  white-space: nowrap;
}
.ov-foot > span { display: inline-flex; align-items: center; gap: calc(6 * var(--u)); }
.ov-foot b.ov-kc { font-weight: 500; }
.ov-safe { margin-left: auto; color: #2E8F5A; }
.ov-safe svg { width: calc(12 * var(--u)); height: calc(12 * var(--u)); fill: currentColor; }

/* The ⚡ menu is a native macOS menu: opens upward from the button when the shelf is low. */
.ov-menu {
  position: absolute;
  left: calc(176 * var(--u));
  bottom: calc(138 * var(--u));
  width: calc(230 * var(--u));
  padding: calc(5 * var(--u));
  border-radius: calc(12 * var(--u));
  font-size: calc(13 * var(--u));
  visibility: hidden;
  transform: scale(0.6);
  transform-origin: 0 100%;
  transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.2), visibility 0s 0.18s;
}
.sc-ov.is-menu .ov-menu { visibility: visible; transform: none; transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2), visibility 0s; }
.ov-menu p { padding: calc(4 * var(--u)) calc(9 * var(--u)); font-size: calc(11 * var(--u)); font-weight: 600; color: var(--ink-500); }
.ov-menu-item { display: block; padding: calc(4 * var(--u)) calc(9 * var(--u)); border-radius: calc(5 * var(--u)); color: var(--ink); }
.ov-menu-item.is-hover { background: var(--violet); color: #fff; }
.ov-menu hr { margin: calc(5 * var(--u)) calc(9 * var(--u)); border: 0; border-top: 1px solid rgba(6, 1, 15, 0.12); }

/* The flying clip card still uses the small type icon. */
.sc-ic {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2em;
  height: 2.2em;
  border-radius: 0.6em;
  background: var(--violet-softer);
  color: var(--violet);
  font-weight: 700;
  font-size: 0.9em;
}

.sc-toast {
  position: absolute;
  z-index: 6;
  right: 1.2em;
  top: 2.6em;
  display: flex;
  gap: 0.7em;
  width: 19em;
  padding: 0.8em 0.9em;
  border-radius: 1.2em;
  font-size: 0.75em;
  color: var(--ink-700);
  transform: translateX(calc(100% + 2em));
  transition: transform 0.55s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.sc-toast.is-on { transform: none; }
.sc-toast b { display: block; color: var(--ink); }
.sc-shield {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4em;
  height: 2.4em;
  border-radius: 0.7em;
  background: var(--ink);
}
.sc-shield svg { width: 1.3em; height: 1.3em; fill: var(--violet-soft); }

.sc-fly {
  position: absolute;
  z-index: 7;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.3em 0.6em 0.3em 0.3em;
  border-radius: 0.6em;
  background: #fff;
  box-shadow: 0 0.8em 1.6em -0.5em rgba(127, 60, 232, 0.55), 0 0 0 1px var(--violet-soft);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}
.sc-fly > * { font-size: 0.7em; }
.sc-fly .sc-ic { width: 1.8em; height: 1.8em; }
.sc-fly.is-ok { animation: sc-fly-ok 1.1s var(--ease) forwards; }
.sc-fly.is-block { background: var(--danger-wash); color: var(--danger); box-shadow: 0 0 0 1px #FECDCA; animation: sc-fly-block 1.3s var(--ease) forwards; }
.sc-fly.is-block .sc-ic { background: #FECDCA; color: var(--danger); }
@keyframes sc-fly-ok {
  0% { opacity: 0; transform: translate(var(--fx0), var(--fy0)); }
  15% { opacity: 1; transform: translate(var(--fx0), calc(var(--fy0) - 0.8em)); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--fx1), var(--fy1)) scale(0.3); }
}
@keyframes sc-fly-block {
  0% { opacity: 0; transform: translate(var(--fx0), var(--fy0)); }
  15% { opacity: 1; transform: translate(var(--fx0), calc(var(--fy0) - 0.8em)); }
  50% { transform: translate(var(--fxm), var(--fym)); }
  58% { transform: translate(calc(var(--fxm) + 0.5em), var(--fym)); }
  66% { transform: translate(calc(var(--fxm) - 0.5em), var(--fym)); }
  74% { opacity: 1; transform: translate(calc(var(--fxm) + 0.25em), var(--fym)); }
  100% { opacity: 0; transform: translate(var(--fxm), calc(var(--fym) + 1.6em)) scale(0.85); }
}

.sc-keys {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 1.6em;
  display: flex;
  gap: 0.4em;
  transform: translateX(-50%);
}
.sc-keys span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6em;
  height: 2.6em;
  padding: 0 0.6em;
  border-radius: 0.6em;
  color: #fff;
  font-size: 1.1em;
  font-weight: 600;
  animation: sc-key 0.35s var(--ease) both;
}
.sc-keys span:nth-child(2) { animation-delay: 0.08s; }
.sc-keys span:nth-child(3) { animation-delay: 0.16s; }
@keyframes sc-key {
  0% { transform: translateY(0.6em) scale(0.6); }
  60% { transform: translateY(-0.1em) scale(1.04); }
  100% { transform: none; }
}

.sc-cursor {
  position: absolute;
  z-index: 9;
  left: 0;
  top: 0;
  width: 1.6em;
  height: 1.6em;
  transform: translate(var(--cx, 30em), var(--cy, 30em));
  transition: transform 0.75s cubic-bezier(0.65, 0, 0.25, 1);
  filter: drop-shadow(0 0.15em 0.25em rgba(6, 1, 15, 0.35));
}
.sc-cursor svg { width: 100%; height: 100%; fill: var(--ink); stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; }
.sc-cursor.is-down svg { transform: scale(0.88); transform-origin: 20% 10%; }
.sc-ripple {
  position: absolute;
  z-index: 8;
  left: 0;
  top: 0;
  width: 2.4em;
  height: 2.4em;
  margin: -1.2em 0 0 -1.2em;
  border-radius: 50%;
  border: 0.15em solid var(--violet-bright);
  opacity: 0;
  transform: translate(var(--rx, 0), var(--ry, 0)) scale(0.3);
}
.sc-ripple.is-on { animation: sc-ripple 0.6s var(--ease); }
@keyframes sc-ripple {
  0% { opacity: 1; transform: translate(var(--rx), var(--ry)) scale(0.3); }
  100% { opacity: 0; transform: translate(var(--rx), var(--ry)) scale(1.3); }
}
.sc-fade { position: absolute; inset: 0; z-index: 10; background: #F4EEFC; opacity: 0; pointer-events: none; transition: opacity 0.45s ease; }
.sc-fade.is-on { opacity: 1; }

/* The scene lives in a "world" the size of a 16:10 Mac screen. On narrow screens the stage turns
   square and a camera zooms into the world and follows the cursor, so the text stays readable. */
.sc-world {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  aspect-ratio: 16 / 10;
  transform-origin: 0 0;
  transform: translate(var(--wx, 0), var(--wy, 0)) scale(var(--wz, 1));
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.25, 1);
}
/* Phones: a few fixed shots (demo.js picks one per step) with a short glide between them. No fade
   to blank: that read as a flicker. */
@container (max-width: 640px) {
  .sc-world { transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
  .screen-stage { aspect-ratio: 1 / 1; }
  .sc-keys { font-size: 2.1em; bottom: 1.2em; }
  .sc-toast { font-size: 1.5em; right: 0.6em; top: 0.6em; width: 21em; }
}

.screen-stage.is-instant *,
.screen-stage.is-instant *::before,
.screen-stage.is-instant *::after { transition: none !important; }
.screen-stage.is-paused *,
.screen-stage.is-paused *::before { animation-play-state: paused !important; }

.screen-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: 1040px;
  margin: 18px auto 0;
}
.screen-caption { margin: 0; font-size: var(--step--1); color: var(--ink-700); min-height: 1.6em; }
.screen-toggle {
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-700);
  cursor: pointer;
}
.screen-toggle:hover { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }

/* ---------- Flare: the small motions that make it feel alive ---------- */

/* The violet thread across the masthead shows how far down the page you are. */
.masthead { transition: box-shadow 0.3s var(--ease); }
.masthead.is-scrolled { box-shadow: 0 10px 30px -18px rgba(61, 90, 241, 0.35); }
.scroll-thread {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, var(--violet), var(--indigo), var(--violet-bright));
  pointer-events: none;
}

/* "better" shimmers in Rafaverse violet and indigo. */
.hero h1 .accent {
  background: linear-gradient(90deg, var(--violet) 0%, var(--indigo) 30%, var(--violet-bright) 55%, var(--violet) 80%);
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat b i { font-style: normal; font-variant-numeric: tabular-nums; }


/* A soft glow that follows the pointer across cards. */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(146, 81, 247, 0.16), rgba(146, 81, 247, 0) 65%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}
.spot:hover::before { opacity: 1; }
.tag-yearly.spot::before { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(217, 202, 254, 0.18), rgba(217, 202, 254, 0) 65%); }

/* Raf's pick wears a turning violet edge. */
@property --edge {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.tag-yearly::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--edge), var(--violet-bright), rgba(146, 81, 247, 0) 25%, var(--indigo) 50%, rgba(61, 90, 241, 0) 75%, var(--violet-bright));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
@keyframes edge-turn { to { --edge: 360deg; } }

/* A light sweep across the solid buttons. */
.btn:not(.btn-quiet):not(.is-soon):not([aria-disabled="true"]) { overflow: hidden; isolation: isolate; }
.btn:not(.btn-quiet):not(.is-soon):not([aria-disabled="true"])::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -70%;
  width: 45%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));
  transform: skewX(-20deg);
  pointer-events: none;
}

/* Everything in the box, drifting past on a belt. */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track { display: flex; gap: 8px; width: max-content; }
.marquee-track ul { flex-wrap: nowrap; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 4px)); } }

@media (prefers-reduced-motion: no-preference) {
  .hero h1 .accent { animation: shimmer 7s linear infinite; }
  .tag-yearly::after { animation: edge-turn 6s linear infinite; }
  .btn:not(.btn-quiet):not(.is-soon):not([aria-disabled="true"])::after { transition: left 0.75s var(--ease); }
  .btn:not(.btn-quiet):not(.is-soon):not([aria-disabled="true"]):hover::after { left: 135%; }
  .marquee-track { animation: marquee 45s linear infinite; }
}
@keyframes shimmer { from { background-position: 0% 50%; } to { background-position: 260% 50%; } }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-10px) rotate(1.5deg); }
}

/* ---------- Development ribbon ----------
   Added by site.js on non-production hosts only (see environments in site.config.js).
   Clicks pass through it, so it never blocks a button underneath. */

.env-ribbon {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  background: rgba(6, 1, 15, 0.88);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
  border: 1px solid rgba(217, 202, 254, 0.28);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  pointer-events: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.env-ribbon-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 3px rgba(201, 154, 85, 0.25);
}
.env-ribbon-sep { color: var(--violet-soft); }

@media (prefers-reduced-motion: no-preference) {
  .env-ribbon-dot { animation: env-pulse 2.4s ease-in-out infinite; }
}
@keyframes env-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(201, 154, 85, 0.25); }
  50% { box-shadow: 0 0 0 5px rgba(201, 154, 85, 0.08); }
}

@media print {
  .env-ribbon { display: none; }
}

/* ---------- Account page ---------- */

.account-wrap > [data-acct="view"] { max-width: 760px; }
.acct-card {
  display: grid;
  gap: 16px;
  max-width: 460px;
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-lift);
}
.acct-card h2 { margin: 0; font-size: var(--step-2); }
.acct-card p { margin: 0; }
.field { display: grid; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--ink-700); }
.field input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--surface-2);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-softer); }
.code-input {
  font-family: var(--font-display) !important;
  font-size: 1.8rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.45em;
  text-align: center;
}
.acct-error {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--danger-wash);
  border: 1px solid #FECDCA;
  color: var(--danger);
  font-size: 0.9rem;
}
.acct-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.link-btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--violet);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.link-btn:hover { color: var(--ink); }

.acct-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.acct-bar p { margin: 0; color: var(--ink-700); }
.acct-bar .btn { min-height: 40px; padding: 8px 16px; font-size: 0.9rem; }
.acct-list { display: grid; gap: 16px; }
.lic-card {
  display: grid;
  gap: 10px;
  padding: 24px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-card);
}
.lic-card p { margin: 0; }
.lic-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.lic-head h3 { margin: 0; font-size: var(--step-1); }
.lic-state {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--mint-wash);
  color: var(--mint-ink);
  font-size: 0.78rem;
  font-weight: 700;
}
.lic-past_due .lic-state { background: #FFF4E5; color: #9A5B00; }
.lic-ending .lic-state { background: var(--violet-wash); color: var(--violet-press); }
.lic-ended .lic-state, .lic-revoked .lic-state { background: var(--canvas); color: var(--ink-500); box-shadow: inset 0 0 0 1px var(--hairline); }
.lic-past_due { border-color: #F5C77E; }
.lic-line { color: var(--ink-700); }
.lic-key { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-500); }
.lic-mac {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline-2);
}
.lic-mac:empty { display: none; }
.lic-mac .btn { min-height: 38px; padding: 7px 14px; font-size: 0.85rem; }
.lic-mac .btn.is-confirming { box-shadow: inset 0 0 0 1.5px var(--danger); color: var(--danger); }
.lic-card > .btn { justify-self: start; min-height: 42px; padding: 9px 18px; font-size: 0.9rem; }
.acct-help { margin-top: clamp(28px, 4vw, 40px); }

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

/* ---------- Coming soon (pre-launch bar, rendered by site.js when cfg.comingSoon) ---------- */

.soon-bar {
  position: relative;
  z-index: 51;
  background: var(--ink);
  color: #fff;
}
.soon-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 6px;
  margin: 0 auto;
  padding-block: 9px;
  font-size: 0.85rem;
  line-height: 1.4;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
}
.soon-bar strong { color: #fff; font-weight: 700; }
.soon-bar a { margin-left: 4px; color: var(--violet-soft); font-weight: 600; }
.soon-bar a:hover { color: #fff; }
.soon-dot {
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--violet-bright);
  box-shadow: 0 0 0 3px rgba(146, 81, 247, 0.3);
}
@media (prefers-reduced-motion: no-preference) {
  .soon-dot { animation: soon-pulse 2.4s ease-in-out infinite; }
}
@keyframes soon-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(146, 81, 247, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(146, 81, 247, 0.08); }
}
@media print { .soon-bar { display: none; } }

/* The selected feature keeps its keyboard focus ring inside the card. */
.feature-btn:focus-visible { outline-offset: -3px; border-radius: 14px; }

/* Phones: Rafa sits closer to the buttons and fills more of his spotlight. */
@media (max-width: 700px) {
  .rafa-stage { margin-top: -14%; margin-bottom: -6%; }
  .rafa-film .film-pane img, .rafa-film .film-pane video { transform: scale(1.22); }
  .hero-facts { margin-top: -2%; }
}
