/* ==========================================================================
   Phil — rall.digital/phil
   "The page IS a macOS desktop." Chunky toy aesthetic: Fredoka display,
   Hanken Grotesk body, ink outlines, offset shadows, warm cream + ultramarine.
   All JS-era window geometry is owned by /phil/phil.js (no transitions on
   .window transform/width/height here — ever).
   ========================================================================== */

/* ---------- Fonts (self-hosted only — CSP font-src 'self') ---------- */
@font-face {
  font-family: "Fredoka";
  src: url("/fonts/fredoka-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("/fonts/fredoka-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  --paper:  #FAF3E7;
  --cream:  #FFFBF2;
  --ink:    #20190E;
  --ink-soft: #6E6353;
  --blue:   #3261CD;
  --blue-hi:#5B8EEF;
  --blue-deep:#22418F;
  --sun:    #FFC53D;
  --coral:  #FF6450;
  --mac-red:#FF5F57; --mac-yellow:#FEBC2E; --mac-green:#28C840;

  --milk: #FFF8EA;                 /* near-white for copy on blue */
  --shadow-ink: rgba(32, 25, 14, .16);
  --display: "Fredoka", "Hanken Grotesk", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --wallpaper: linear-gradient(215deg, var(--blue-hi) 0%, var(--blue) 52%, var(--blue-deep) 100%);

  /* grain + watermark, reused everywhere (img-src data: is CSP-allowed) */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  --elephant: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='5.1 7 89.7 89.7'%3E%3Cpath d='m86.918 36.426c-7.7969-12.559-19.488-17.465-33.801-17.328-1.0078 0-1.8828-0.066406-2.7539-0.73828-5.0391-3.8984-10.82-5.1758-16.938-4.1016-10.016 1.6797-16.535 7.7305-20.164 17.074 0.003906 0.015625-0.003907 0.035157 0 0.054688-0.011719-0.011719 0-0.023438-0.011719-0.035157-0.47266 1.332-1.0391 2.6406-1.3984 4.0039-3.043 11.598-3.6602 23.465-3.6562 35.371 0 4.1172 0.70703 8.1953 3.2422 11.676 0.027344 0.050781 0.046875 0.10156 0.074219 0.15234 0.875 1.3438 2.0156 2.4219 3.3594 3.2266 3.2266 1.9492 5.7812 1.2773 7.6641-2.082 0.53906-1.0078 1.0078-2.0156 1.4102-3.0234 0.80469-2.0156 0.60547-2.6211-1.2773-3.6953-1.2773-0.67188-1.8164-1.6797-2.082-3.0234-0.53906-2.6875-0.13281-5.2422 0.40234-7.7969 0.73828-3.4258 1.9492-6.6523 4.1016-9.4102 0.60547-0.80469 1.0078-0.94141 1.6133 0.066406 0.73828 1.2109 1.4805 2.6211 2.5547 3.4961 1.8164 1.4805 1.8828 3.3594 1.8828 5.3789 0.066406 3.4531-0.12109 6.9688 0.19531 10.422v0.15234c0.003906 2.2969-0.015626 4.5938 0.027343 6.8906 0.027344 1.3828-0.22266 2.8047 0.44531 4.125 0.003906-0.003906 0.003906-0.011719 0.003906-0.015625 0.26953 0.67188 0.60547 1.2773 1.2773 1.6133 0.066406 0.03125 0.14062 0.03125 0.20703 0.058594-0.0625-0.015625-0.12891-0.015625-0.19531-0.03125 0.61328 0.66797 1.418 0.83203 2.2734 0.83203 3.4609 0 6.9258-0.003906 10.387-0.003906 0.77734 0 1.4727-0.20703 2.0273-0.76953 0.027344-0.011719 0.058594-0.011719 0.085938-0.023438 1.2773-0.875 1.6797-2.2852 1.6797-3.6289 0.13281-4.2344 0.67187-8.4688 1.4102-12.637 0.066406-0.46484 0.011718-0.85938 0.66016-0.93359 5.457 0.875 10.934 0.95312 16.418 0.37109 1.2109-0.12891 1.4531 0.24219 1.4531 1.3906 0 4.1523-0.16797 8.3086 0.30469 12.449 0.28125 2.457 1.625 3.7578 4.0469 3.7969 3.2539 0.054688 6.5117 0.042969 9.7617-0.019531 1.8945-0.035157 3.3398-1.2617 3.6758-3.0469 0.20703-1.0977 0.33594-2.2227 0.37109-3.3398 0.20703-6.8984 1.2266-13.684 2.918-20.363 2.3711-9.3633 1.4023-18.234-3.6562-26.559 0 0 0.003906 0 0 0.003906zm-57.391 18.16c-1.8828-2.957-3.4961-3.8984-6.8555-0.53906-0.67188 0.67188-1.2773 1.3438-1.6797 2.2852-1.9492 3.0234-3.1602 6.5195-3.6289 10.082-0.73828 4.9062-1.6133 10.016 3.0938 13.777-0.26953 0.40234-0.53906 0.80469-0.80469 1.2109-1.2109 2.2188-1.7461 2.3516-3.832 0.875-1.2109-0.94141-1.7461-2.2852-2.6211-3.4297-0.67188-2.2188-1.2773-4.5039-1.3438-6.8555-0.20312-7.3945 0.13281-14.785 1.0078-22.113 0.875-7.5938 2.082-15.125 5.9141-21.914 3.2266-5.043 7.6641-8.4688 13.512-9.9492 10.082-2.418 21.172 3.1602 22.852 14.453 1.2109 8.0664-2.6211 16.332-9.6797 19.895-1.2109 0.60547-2.4219 0.94141-3.6953 1.1406-2.418 0.40234-3.4297-0.13281-4.7031-2.2852-0.20312-0.33594-0.40234-0.60547-0.67188-0.94141-0.60547-0.73828-1.3438-1.2109-2.2852-0.73828-1.1445 0.60547-0.94141 1.6797-0.67188 2.5547 0.94141 3.2266 4.5039 5.4453 8 5.043 7.3945-0.94141 12.031-5.2422 15.191-11.695-0.042969-0.19141 0.058594-0.34375 0.085938-0.51953 0.0625-0.43359 0.24219-0.83594 0.42578-1.2344 0.027343-0.089844 0.058593-0.16797 0.09375-0.26172 0-0.066406 0.066406-0.13281 0.13281-0.26953 0.066407-0.13281 0.066407-0.26953 0.13281-0.46875 2.082-5.7812 1.8164-11.426-1.0078-17.074-0.066406-0.066406-0.066406-0.066406-0.066406-0.13281-0.20312-0.33594-0.46875-0.73828-0.53906-1.2109-0.26953-0.46875-0.53906-0.94141-0.94141-1.6133 2.6211-0.20312 5.043 0.20312 7.4609 0.73828 9.4102 2.0156 16.871 6.9922 21.914 15.391 3.9648 7.2578 4.9727 14.922 3.0234 22.922-1.3438 5.3086-2.4883 10.688-2.8242 16.133-0.20312 2.418-0.33594 4.8398-0.40234 7.2578-0.066406 0.94141-0.46875 1.2109-1.4102 1.2109-2.4883-0.066406-5.043-0.13281-7.5938 0-1.6133 0.13281-1.9492-0.53906-1.9492-2.0156-0.066406-4.5039-0.20312-9.0078-0.26953-13.441-0.066406-1.8828-0.73828-2.5547-2.6211-2.418-1.7461 0.066406-3.5625 0.26953-5.3086 0.33594-4.6367 0.13281-9.207 0.066407-13.777-0.67188-2.2852-0.33594-2.8242 0.13281-3.293 2.418-0.13281 0.46875-0.20312 0.875-0.33594 1.3438-0.94141 4.5039-1.2109 9.1406-1.6133 13.777-0.066406 0.875-0.73828 0.60547-1.2109 0.60547-2.5547 0.066406-5.043 0-7.5938 0-2.2852 0-2.2852 0-2.3516-2.3516-0.13281-7.4609 0.26953-14.855-0.33594-22.316-0.066407-0.73828 0.066406-1.4805-0.67188-1.9492-1.832-1.3398-3.0391-3.2227-4.25-5.0391zm39.609 17.32c0.035156 0.011719 0.089843 0 0.11328 0.023438 0.011719 0.003906 0.011719 0.015624 0.023438 0.023437-0.035157-0.023437-0.097657-0.027344-0.13672-0.046875zm0.33984 0.24609c0.011719 0.015625 0.035157 0.035156 0.046876 0.046875 0.015624 0.027343 0.003906 0.078125 0.015624 0.10938-0.027343-0.046875-0.039062-0.11719-0.0625-0.15625zm-36.789-36.051c0 1.6133-1.4102 3.0234-2.957 3.0234-1.6133 0-2.957-1.4102-2.957-3.0234 0-1.5469 1.4102-3.0234 2.957-3.0234 1.543 0 3.0234 1.4805 2.957 3.0234z'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* one quiet film of grain over everything — paper never reads flat */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: var(--noise) repeat;
  background-size: 180px 180px;
  opacity: .055;
  mix-blend-mode: multiply;
}
::selection { background: var(--sun); color: var(--ink); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.stage :focus-visible,
.install :focus-visible { outline-color: var(--sun); }
/* the scroll cue is a sibling of .stage but visually sits ON the blue
   wallpaper — a blue ring there is an invisible focus indicator */
.scroll-cue:focus-visible { outline-color: var(--sun); }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.glyph { display: block; fill: currentColor; }

h1, h2, h3 { font-family: var(--display); }

/* ==========================================================================
   MENU BAR (site nav = the desktop's menu bar)
   ========================================================================== */
.menubar {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 6px 16px;
  background: var(--cream);
  border-bottom: 2px solid var(--ink);
}
.mb-left, .mb-right { display: flex; align-items: center; gap: 13px; min-width: 0; }
.mb-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font: 600 19px/1 var(--display);
  letter-spacing: .01em;
}
.mb-brand .glyph { width: 21px; height: 21px; }
.mb-item { font: 500 13px/1 var(--body); color: var(--ink-soft); white-space: nowrap; }
.mb-status {
  padding: 5px 11px;
  border: 2px solid rgba(32, 25, 14, .15);
  border-radius: 999px;
  background: var(--paper);
}
.mb-status output { font: inherit; color: inherit; }
.mb-counter {
  font: 600 12px/1 var(--display);
  color: var(--ink);
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 5px 10px;
  box-shadow: 2px 3px 0 var(--shadow-ink);
}
.mb-download {
  font: 600 13px/1 var(--display);
  color: var(--ink);
  text-decoration: none;
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  box-shadow: 2px 3px 0 rgba(32, 25, 14, .25);
  transition: transform .1s ease, box-shadow .1s ease;
}
.mb-download:hover { transform: translate(-1px, -1px); box-shadow: 3px 4px 0 rgba(32, 25, 14, .25); }
.mb-download:active { transform: translate(1px, 2px); box-shadow: 0 1px 0 rgba(32, 25, 14, .25); }
.mb-clock { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.mb-elephant { display: inline-flex; width: 20px; height: 20px; color: var(--ink); }
.mb-elephant .glyph { width: 100%; height: 100%; }

/* elephant reactions — JS toggles these classes */
#mbElephant.boing { animation: boing .6s cubic-bezier(.28, 1.8, .35, 1); }
@keyframes boing {
  0%   { transform: translateY(0)   scale(1, 1); }
  30%  { transform: translateY(-7px) scale(.92, 1.12); }
  55%  { transform: translateY(1px)  scale(1.12, .88); }
  78%  { transform: translateY(-2px) scale(.98, 1.04); }
  100% { transform: none; }
}
#mbElephant.nod { animation: nod .7s ease-in-out; transform-origin: 50% 85%; }
@keyframes nod {
  0%   { transform: rotate(0); }
  35%  { transform: rotate(14deg); }
  65%  { transform: rotate(-5deg); }
  100% { transform: rotate(0); }
}

/* ==========================================================================
   HERO — the desktop
   ========================================================================== */
.desktop {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 92vh;
  min-height: 100svh;
  background: var(--paper);
}

.stage {
  position: relative;
  isolation: isolate;
  flex: 1;
  min-height: 480px;
  margin: 14px 16px 18px;
  border: 2px solid var(--ink);
  border-radius: 20px;
  overflow: hidden;
  background: var(--wallpaper);
  box-shadow: 10px 12px 0 rgba(32, 25, 14, .14);
}
/* giant elephant watermark, painted on the wallpaper, clipped by the stage */
.stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -7%;
  bottom: -14%;
  width: clamp(380px, 58vmin, 840px);
  aspect-ratio: 1 / 1;
  background: var(--milk);
  opacity: .08;
  transform: rotate(-9deg);
  -webkit-mask: var(--elephant) center / contain no-repeat;
  mask: var(--elephant) center / contain no-repeat;
  pointer-events: none;
}

/* ----- hero copy, painted on the wallpaper ----- */
.wallpaper-copy {
  max-width: 720px;
  padding: clamp(30px, 5vw, 64px) clamp(24px, 4.5vw, 60px);
}
.eyebrow {
  margin: 0 0 14px;
  font: 600 clamp(13px, 1.2vw, 15px)/1 var(--display);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--milk);
  text-shadow: 0 1px 0 rgba(18, 32, 76, .55);
}
.wallpaper-copy h1 {
  margin: 0;
  /* 76px cap: "Stop maximizing" must stay one line inside the 600px content
     box at every desktop width (96px wrapped it to 4 ragged lines ≥1190px) */
  font: 700 clamp(42px, 6.2vw, 76px)/1.02 var(--display);
  letter-spacing: -.015em;
  color: var(--milk);
  text-shadow: 0 .055em 0 rgba(18, 32, 76, .55);
}
.sub {
  margin: 22px 0 0;
  max-width: 34em;
  font: 500 clamp(17px, 1.55vw, 20px)/1.6 var(--body);
  color: var(--milk);
}
.hint {
  display: inline-block;
  margin: 26px 0 0;
  font: 600 clamp(16px, 1.45vw, 19px)/1.3 var(--display);
  color: var(--sun);
  transform: rotate(-2deg);
}
html:not(.js) .hint { display: none; }

/* ----- snap-zone ghost ----- */
.zone-ghost {
  position: absolute;
  z-index: 1;
  top: 12px;
  bottom: 12px;
  left: 12px;
  width: calc(50% - 18px);
  border: 3px dashed rgba(255, 251, 242, .85);
  border-radius: 14px;
  background: rgba(255, 251, 242, .13);
  opacity: 0;
  transform: scale(.985);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
}
.zone-ghost.right { left: auto; right: 12px; }
.zone-ghost.show { display: block; opacity: 1; transform: none; }

/* ==========================================================================
   WINDOWS — charming cartoon chrome
   ========================================================================== */
.window {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 13px;
  box-shadow: 8px 10px 0 rgba(32, 25, 14, .18);
  /* NO transition on transform/width/height — JS animates via rAF */
}
html.js .window {
  top: 0;
  left: 0;
  width: 46%;            /* placeholder until the engine boots */
  height: 54%;
  z-index: 2;
  will-change: transform;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
html.js .window:active { cursor: grabbing; }
.window:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

.titlebar {
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: #FFF4DD;
  border-bottom: 2px solid var(--ink);
  border-radius: 11px 11px 0 0;
}
.lights { display: inline-flex; gap: 6px; }
.l {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(32, 25, 14, .85);
}
.l.r { background: var(--mac-red); }
.l.y { background: var(--mac-yellow); }
.l.g { background: var(--mac-green); }
.title {
  font: 600 14px/1 var(--display);
  color: var(--ink);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* settle ring — conic progress driven by --p (0→1) set from JS each frame */
.settle {
  justify-self: end;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: conic-gradient(var(--blue) calc(var(--p, 0) * 360deg), rgba(32, 25, 14, .13) 0);
  -webkit-mask: radial-gradient(closest-side, transparent 50%, #000 53%);
  mask: radial-gradient(closest-side, transparent 50%, #000 53%);
}

/* ----- skeleton content (decorative) ----- */
.content {
  position: relative;
  flex: 1;
  overflow: hidden;
  padding: 14px;
  border-radius: 0 0 11px 11px;
}
.sk { display: block; border-radius: 7px; }
.sk.bar { height: 12px; border-radius: 999px; background: #E8DCC4; margin-bottom: 12px; }
.w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; }
.w55 { width: 55%; } .w60 { width: 60%; } .w70 { width: 70%; } .w75 { width: 75%; }
.w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; }

/* pastel tints */
.t-sun   { background: #FFE7B0; }
.t-blue  { background: #DCE6FF; }
.t-coral { background: #FFDCD4; }
.t-plain { background: #F4EAD6; }

/* Plans: a tiny kanban */
.c-plans .cols { display: flex; gap: 10px; height: calc(100% - 24px); }
.c-plans .col { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.c-plans .card {
  position: relative;
  flex: none;
  height: 38px;
  border: 2px solid rgba(32, 25, 14, .14);
}
.c-plans .card.tall { height: 60px; }
.c-plans .card::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  width: 56%;
  height: 6px;
  border-radius: 999px;
  background: rgba(32, 25, 14, .18);
}
.c-plans .card.tall::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(32, 25, 14, .15);
}

/* Notes: lines of prose, one marker-highlighted */
.c-notes { display: flex; flex-direction: column; gap: 11px; }
.sk.line { height: 10px; border-radius: 999px; background: #E8DCC4; flex: none; }
.sk.line.bold { height: 13px; background: #D9C9A6; }
.sk.line.mark { background: #FFDE8C; box-shadow: 0 0 0 2px #FFDE8C; }

/* Inbox: avatar rows, one unread */
.c-mail { display: flex; flex-direction: column; gap: 13px; }
.rowm { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rowm .av {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(32, 25, 14, .2);
}
.rowm .tx { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rowm.unread::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

/* ----- badge ("pixel-perfect ✓" / "snapped — left alone") ----- */
.badge {
  position: absolute;
  z-index: 3;
  top: -13px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  font: 600 13px/1 var(--display);
  color: var(--ink);
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 6px 11px;
  box-shadow: 3px 4px 0 rgba(32, 25, 14, .22);
  transform: rotate(2deg);
  white-space: nowrap;
  pointer-events: none;
}
.badge:not([hidden]) { animation: badge-pop .5s cubic-bezier(.25, 1.6, .4, 1) both; }
/* the display rules above are author declarations and would otherwise defeat
   the UA's [hidden] { display: none } — JS drives both via the hidden attr.
   (The no-JS reveals below out-specify this via their #win IDs on purpose.) */
.badge[hidden],
.hint[hidden] { display: none; }
@keyframes badge-pop {
  0%   { transform: scale(.3) rotate(-8deg); opacity: 0; }
  70%  { transform: scale(1.12) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(2deg); opacity: 1; }
}

/* ----- no-JS static scene: one "maximized", one half-snapped, one loose ----- */
html:not(.js) .window .settle { display: none; }
html:not(.js) #win1 { right: 14px; bottom: 14px; width: 54%; height: 62%; z-index: 3; }
html:not(.js) #win2 { left: 14px; bottom: 14px; width: calc(46% - 34px); height: 48%; z-index: 2; }
html:not(.js) #win3 { right: 9%; top: 7%; width: 30%; height: 30%; transform: rotate(2deg); z-index: 1; }
html:not(.js) #win1 .badge,
html:not(.js) #win2 .badge { display: inline-flex; animation: none; }
html:not(.js) #win1 .badge::after { content: "pixel-perfect ✓"; }
html:not(.js) #win2 .badge::after { content: "snapped — left alone"; }

/* ==========================================================================
   HERO CTA + SCROLL CUE
   ========================================================================== */
.hero-cta {
  position: absolute;
  z-index: 60;
  left: 36px;
  bottom: 46px;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 8px 10px 0 rgba(32, 25, 14, .2);
  transform: rotate(-1.2deg);
}
.hero-cta .meta { margin: 11px 2px 0; }
.meta { font: 500 13.5px/1.5 var(--body); color: var(--ink-soft); }

.scroll-cue {
  position: absolute;
  z-index: 60;
  left: 50%;
  bottom: 30px;
  margin-left: -23px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--ink);
  box-shadow: 3px 4px 0 rgba(32, 25, 14, .25);
  color: var(--ink);
  font-size: 18px;
  text-decoration: none;
  animation: cue-bob 2.4s ease-in-out infinite;
}
.scroll-cue:hover { background: var(--sun); }
.scroll-cue:active { transform: translate(1px, 2px); box-shadow: 1px 1px 0 rgba(32, 25, 14, .25); }
@keyframes cue-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(7px); }
}

/* ==========================================================================
   BUTTONS — chunky, pressable
   ========================================================================== */
.btn {
  display: inline-block;
  font: 600 19px/1 var(--display);
  letter-spacing: .01em;
  color: var(--ink);
  text-decoration: none;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 17px 28px;
  box-shadow: 6px 7px 0 rgba(32, 25, 14, .22);
  transition: transform .12s ease, box-shadow .12s ease;
  cursor: pointer;
}
.btn:hover { transform: translate(-1px, -2px); box-shadow: 8px 10px 0 rgba(32, 25, 14, .24); }
.btn:active { transform: translate(3px, 4px); box-shadow: 1px 1px 0 rgba(32, 25, 14, .28); }
.btn-primary { background: var(--sun); }

/* ==========================================================================
   FEATURES
   ========================================================================== */
.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 6vw, 76px) clamp(32px, 5vw, 64px);
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(72px, 10vw, 128px) 0 clamp(56px, 7vw, 88px);
}
.feature h2 {
  margin: 18px 0 8px;
  font: 600 clamp(22px, 2.4vw, 28px)/1.2 var(--display);
  color: var(--ink);
}
.feature p { margin: 0; max-width: 46ch; font-size: 16.5px; color: var(--ink-soft); }

/* ----- mini demo screens (pure CSS, loop 5.5–6s) ----- */
.mini {
  position: relative;
  width: min(100%, 320px);
  height: 190px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  background: var(--wallpaper);
  box-shadow: 6px 7px 0 rgba(32, 25, 14, .14);
}
/* pause every mini until its .feature is .inview (JS adds the class) */
html.js .feature:not(.inview) .mini i,
html.js .feature:not(.inview) .mini b,
html.js .feature:not(.inview) .mini span { animation-play-state: paused; }

.m-bar {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto 0;
  height: 22px;
  background: var(--cream);
  border-bottom: 2px solid var(--ink);
}
.m-bar::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(32, 25, 14, .35);
  box-shadow: 10px 0 0 rgba(32, 25, 14, .22), 20px 0 0 rgba(32, 25, 14, .14);
}
.m-phil {
  position: absolute;
  z-index: 3;
  top: 4px;
  right: 8px;
  width: 14px;
  height: 14px;
  background: var(--ink);
  -webkit-mask: var(--elephant) center / contain no-repeat;
  mask: var(--elephant) center / contain no-repeat;
  transform-origin: 50% 90%;
}
.m-win {
  position: absolute;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 8px;
}
.m-win::before {                 /* tiny titlebar */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 9px;
  background: #FFF0D6;
  border-bottom: 1.5px solid rgba(32, 25, 14, .55);
  border-radius: 6px 6px 0 0;
}
.m-win::after {                  /* skeleton lines */
  content: "";
  position: absolute;
  left: 12%;
  right: 28%;
  top: 32%;
  bottom: 22%;
  background: repeating-linear-gradient(to bottom, #E7DAC0 0 4px, transparent 4px 13px);
  border-radius: 2px;
}

/* 1 — mini-snap: window slides into the right-half zone, stamp, approving tip */
.mini-snap .m-zone {
  position: absolute;
  left: 53%;
  top: 19%;
  width: 42%;
  height: 74%;
  border: 2px dashed rgba(255, 251, 242, .85);
  border-radius: 8px;
  background: rgba(255, 251, 242, .14);
  opacity: 0;
  animation: ms-zone 6s ease-in-out infinite;
}
.mini-snap .m-win {
  left: 6%;
  top: 34%;
  width: 40%;
  height: 44%;
  animation: ms-win 6s ease-in-out infinite;
}
.m-stamp {
  position: absolute;
  z-index: 4;
  left: 56%;
  top: 46%;
  font: 600 11px/1 var(--display);
  color: var(--ink);
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 5px 9px;
  box-shadow: 2px 3px 0 rgba(18, 32, 76, .45);
  transform: scale(0) rotate(-8deg);
  animation: ms-stamp 6s cubic-bezier(.25, 1.5, .4, 1) infinite;
}
.mini-snap .m-phil { animation: ms-phil 6s ease-in-out infinite; }
@keyframes ms-win {
  0%, 14%  { left: 6%;  top: 34%; width: 40%; height: 44%; }
  32%      { left: 34%; top: 28%; width: 40%; height: 44%; }
  46%, 84% { left: 53%; top: 19%; width: 42%; height: 74%; }
  100%     { left: 6%;  top: 34%; width: 40%; height: 44%; }
}
@keyframes ms-zone {
  0%, 18%  { opacity: 0; }
  30%, 62% { opacity: 1; }
  74%, 100%{ opacity: 0; }
}
@keyframes ms-stamp {
  0%, 50%  { transform: scale(0) rotate(-8deg); }
  58%, 86% { transform: scale(1) rotate(-5deg); }
  94%, 100%{ transform: scale(0) rotate(-8deg); }
}
@keyframes ms-phil {
  0%, 48%  { transform: rotate(0); }
  56%, 80% { transform: rotate(-14deg); }
  90%, 100%{ transform: rotate(0); }
}

/* 2 — mini-drift: maximized window gets bumped, sliver of wallpaper, snap back, ✓ */
.mini-drift .m-win {
  left: 4%;
  right: 4%;
  top: 18%;
  bottom: 7%;
  animation: md-drift 5.5s ease-in-out infinite;
}
.m-spark {
  position: absolute;
  z-index: 4;
  right: 12%;
  top: 32%;
  font: 700 24px/1 var(--display);
  color: var(--sun);
  text-shadow: 2px 2px 0 rgba(32, 25, 14, .75);
  transform: scale(0);
  opacity: 0;
  animation: md-spark 5.5s cubic-bezier(.25, 1.6, .4, 1) infinite;
}
@keyframes md-drift {
  0%, 16%   { transform: translate(0, 0); }
  24%, 52%  { transform: translate(8%, 9%); }
  64%, 100% { transform: translate(0, 0); }
}
@keyframes md-spark {
  0%, 60%   { transform: scale(0); opacity: 0; }
  68%, 86%  { transform: scale(1); opacity: 1; }
  96%, 100% { transform: scale(0); opacity: 0; }
}

/* 3 — mini-displays: two screens, both windows glide to fill at once */
.mini-displays .m-screen {
  position: absolute;
  top: 20%;
  bottom: 8%;
  width: 44%;
  border: 2px solid var(--ink);
  border-radius: 9px;
  overflow: hidden;
  background: linear-gradient(215deg, var(--blue-hi), var(--blue-deep));
  display: block;
}
.mini-displays .s1 { left: 4%; }
.mini-displays .s2 { right: 4%; }
.mini-displays .m-screen .m-win { border-width: 1.5px; }
.mini-displays .m-screen .m-win::before { height: 6px; }
.mini-displays .s1 .m-win { left: 10%; top: 30%; width: 55%; height: 45%; animation: md1 6s ease-in-out infinite; }
.mini-displays .s2 .m-win { left: 32%; top: 16%; width: 52%; height: 50%; animation: md2 6s ease-in-out infinite; }
@keyframes md1 {
  0%, 20%  { left: 10%; top: 30%; width: 55%; height: 45%; }
  42%, 82% { left: 5%;  top: 8%;  width: 90%; height: 84%; }
  100%     { left: 10%; top: 30%; width: 55%; height: 45%; }
}
@keyframes md2 {
  0%, 20%  { left: 32%; top: 16%; width: 52%; height: 50%; }
  42%, 82% { left: 5%;  top: 8%;  width: 90%; height: 84%; }
  100%     { left: 32%; top: 16%; width: 52%; height: 50%; }
}

/* 4 — mini-menu: static cartoon of Phil's real menu */
.mini-menu {
  height: auto;
  min-height: 190px;
  padding: 32px 12px 12px;
  display: flex;
  justify-content: flex-end;
}
.menu-mock {
  width: min(100%, 244px);
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 8px 0;
  box-shadow: 5px 6px 0 rgba(18, 32, 76, .4);
  font: 500 11.5px/1.55 var(--body);
  color: var(--ink);
  text-align: left;
}
.mi { margin: 0; padding: 3px 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mi.dim { color: var(--ink-soft); }
.mi.small { font-size: 10px; line-height: 1.35; white-space: normal; }
.mi kbd { float: right; font: inherit; color: var(--ink-soft); }
.mi .chk { margin-left: 5px; }
.mi .more { float: right; color: var(--ink-soft); }
.msep { border: 0; border-top: 1.5px solid rgba(32, 25, 14, .15); margin: 5px 9px; }
.sliderrow { display: flex; align-items: center; gap: 8px; padding-left: 26px; }
.sliderrow .trk {
  position: relative;
  flex: 1;
  max-width: 72px;
  height: 3px;
  border-radius: 999px;
  background: rgba(32, 25, 14, .25);
}
.sliderrow .thumb {
  position: absolute;
  left: 60%;
  top: 50%;
  width: 9px;
  height: 9px;
  transform: translate(-50%, -50%);
  background: var(--cream);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}
.sliderrow .val { color: var(--ink-soft); font-size: 10.5px; }

/* ==========================================================================
   HOW IT WORKS
   ========================================================================== */
.how {
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 clamp(72px, 9vw, 112px);
}
.how h2 {
  margin: 0 0 30px;
  font: 700 clamp(30px, 3.6vw, 44px)/1.1 var(--display);
  letter-spacing: -.01em;
  color: var(--ink);
}
.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 28px);
  margin: 0;
  padding: 0;
}
.steps li {
  counter-increment: step;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 24px 22px 26px;
  box-shadow: 8px 10px 0 rgba(32, 25, 14, .13);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--sun);
  border: 2px solid var(--ink);
  box-shadow: 3px 4px 0 rgba(32, 25, 14, .18);
  font: 700 21px/1 var(--display);
  color: var(--ink);
}
.steps h3 { margin: 0 0 8px; font: 600 19px/1.3 var(--display); color: var(--ink); }
.steps p { margin: 0; font-size: 15.5px; color: var(--ink-soft); }

/* ==========================================================================
   INSTALL — big blue closing card
   ========================================================================== */
.install {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(1060px, calc(100% - 48px));
  margin: 0 auto clamp(84px, 10vw, 132px);
  padding: clamp(46px, 6vw, 78px) 24px;
  border: 2px solid var(--ink);
  border-radius: 26px;
  background: var(--wallpaper);
  box-shadow: 12px 14px 0 var(--shadow-ink);
  text-align: center;
  color: var(--milk);
}
.install::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -6%;
  bottom: -20%;
  width: clamp(240px, 42%, 440px);
  aspect-ratio: 1 / 1;
  background: var(--milk);
  opacity: .09;
  transform: rotate(-9deg);
  -webkit-mask: var(--elephant) center / contain no-repeat;
  mask: var(--elephant) center / contain no-repeat;
  pointer-events: none;
}
.appicon {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  border-radius: 24px;
  background: linear-gradient(160deg, var(--blue-hi), var(--blue));
  border: 2px solid var(--ink);
  box-shadow: 5px 6px 0 rgba(18, 32, 76, .45), inset 0 2px 0 rgba(255, 255, 255, .28);
}
.appicon svg { width: 62%; height: 62%; fill: #fff; }
.install h2 {
  margin: 0 0 28px;
  font: 700 clamp(30px, 4vw, 46px)/1.1 var(--display);
  letter-spacing: -.01em;
  text-shadow: 0 .055em 0 rgba(18, 32, 76, .55);
}
.install .meta { margin: 14px 0 0; color: var(--milk); font-size: 14.5px; }
.brew {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  max-width: 600px;
  margin: 30px auto 0;
}
.brew code {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  background: #16264F;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 13px 16px;
  font: 500 14px/1.5 ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  color: #FFF3D6;
  white-space: nowrap;
  overflow-x: auto;
}
.copy {
  font: 600 14px/1 var(--display);
  color: var(--ink);
  background: var(--sun);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 10px 18px;
  min-width: 92px;
  box-shadow: 3px 4px 0 rgba(18, 32, 76, .45);
  transition: transform .1s ease, box-shadow .1s ease;
  cursor: pointer;
}
.copy:hover { transform: translate(-1px, -1px); box-shadow: 4px 5px 0 rgba(18, 32, 76, .45); }
.copy:active { transform: translate(2px, 3px); box-shadow: 0 1px 0 rgba(18, 32, 76, .45); }
.trust { margin: 22px 0 0; font: 600 16px/1.4 var(--display); letter-spacing: .01em; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background: var(--ink);
  color: rgba(255, 248, 234, .78);
  text-align: center;
  padding: 48px 24px 58px;
  font-size: 14px;
  line-height: 1.9;
}
footer p { margin: 0; }
footer a { color: var(--sun); }
.foot-glyph { width: 30px; height: 30px; margin: 0 auto 14px; color: var(--sun); }

/* ==========================================================================
   SCROLL REVEALS (gated behind html.js — fully visible without JS)
   ========================================================================== */
html.js [data-reveal] { opacity: 0; transform: translateY(26px); }
html.js [data-reveal].inview {
  opacity: 1;
  transform: none;
  transition: opacity .65s ease, transform .65s cubic-bezier(.2, .9, .25, 1.15);
}
html.js .features .feature:nth-child(2).inview { transition-delay: .08s; }
html.js .features .feature:nth-child(3).inview { transition-delay: .16s; }
html.js .features .feature:nth-child(4).inview { transition-delay: .24s; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .hero-cta { left: 26px; bottom: 34px; }
}

@media (max-width: 719px) {
  .menubar { padding: 6px 12px; gap: 10px; min-height: 44px; }
  .mb-left, .mb-right { gap: 9px; }
  .mb-status { display: none; }

  .stage { margin: 10px 10px 12px; min-height: 430px; border-radius: 16px; }
  .stage::after { width: clamp(280px, 90vmin, 460px); right: -16%; bottom: -10%; }
  .wallpaper-copy { padding: 26px 20px; }
  .sub { font-size: 16.5px; }

  #win3 { display: none; }

  /* no-JS scene, phone edition */
  html:not(.js) #win1 { left: 10px; right: 10px; bottom: 12px; width: auto; height: 38%; }
  html:not(.js) #win2 { left: 10px; bottom: calc(38% + 26px); width: 58%; height: 24%; }

  .hero-cta {
    position: static;
    transform: none;
    margin: 0 10px 12px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 5px 6px 0 rgba(32, 25, 14, .2);
  }
  .hero-cta .btn { display: block; }
  .scroll-cue { display: none; }

  .features { grid-template-columns: 1fr; gap: 52px; width: calc(100% - 44px); }
  .feature { text-align: center; }
  .feature p { margin: 0 auto; }
  .mini { margin: 0 auto; }
  .mini-menu { justify-content: center; }

  .steps { grid-template-columns: 1fr; }

  .brew { flex-direction: column; }
  .brew code { width: 100%; }
  .copy { width: 100%; padding: 12px 18px; }
}

@media (max-width: 380px) {
  .mb-clock { display: none; }
}

/* ==========================================================================
   REDUCED MOTION — calm everything; minis show their most informative frame
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue { animation: none; }
  #mbElephant.boing, #mbElephant.nod { animation: none; }
  .badge:not([hidden]) { animation: none; }
  .zone-ghost { transition: none; }
  .btn, .copy, .mb-download { transition: none; }

  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }

  .mini i, .mini b, .mini span,
  .mini i::before, .mini i::after { animation: none !important; }
  /* final frames */
  .mini-snap .m-win { left: 53%; top: 19%; width: 42%; height: 74%; }
  .mini-snap .m-zone { opacity: 1; }
  .mini-snap .m-stamp, .m-stamp { transform: scale(1) rotate(-5deg); }
  .mini-snap .m-phil { transform: rotate(-14deg); }
  .mini-drift .m-spark, .m-spark { transform: scale(1); opacity: 1; }
  .mini-displays .s1 .m-win,
  .mini-displays .s2 .m-win { left: 5%; top: 8%; width: 90%; height: 84%; }
}
