/* Poof: the product performs. The page's fragments are Poof's own interface, built at true size. */
:root {
  --bg: #f2f3f5;
  --surface: #e4e6eb;
  --surface-2: #d7dae1;
  --ink: #15171c;
  --muted: #4a5163;
  --graphite: #454f66;
  --graphite-ink: #f4f5f7;
  --accent: #0a64d6;
  --accent-ink: #ffffff;
  --mac: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --face: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;

  --step-small: 0.875rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem);
  --step-head: clamp(2.25rem, 1.3rem + 3.4vw, 4.25rem);
  --step-display: clamp(7.5rem, 16vw, 15rem);

  --margin: clamp(16px, 2.2vw, 32px);
  --gap-section: clamp(120px, 14vw, 200px);
  --radius: 0;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-body)/1.5 var(--face);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.04em; line-height: 0.95; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--graphite); color: var(--graphite-ink); }

/* Bar */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 14px var(--margin);
  background: var(--bg);
  font-size: var(--step-small);
}
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: var(--step-body); letter-spacing: -0.02em; }
.wordmark img { width: 32px; height: 32px; }
.bar nav { display: flex; gap: 24px; margin-left: auto; }
.bar nav a { text-decoration: none; }
.bar nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.press {
  font: 500 var(--step-small)/1 var(--face);
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: var(--radius);
  padding: 12px 16px; cursor: pointer;
  transition: transform 120ms var(--ease), background-color 120ms;
}
.press:hover { background: #0857bb; }
.press:active { transform: scale(0.97); }
.press-poofed { display: none; }
body[data-state="poofed"] .press-ready { display: none; }
body[data-state="poofed"] .press-poofed { display: inline; }

/* Hero: the sentence split by the desktop you can poof */
.hero {
  min-height: calc(100svh - 64px);
  display: grid;
  grid-template-columns: 1fr minmax(0, 46vw) 1fr;
  grid-template-rows: 1fr auto 1fr;
  column-gap: 24px;
  padding: 24px var(--margin) 40px;
}
.hero-title { display: contents; font-size: var(--step-head); }
.hero-a, .hero-b { grid-row: 2; align-self: center; font-size: var(--step-head); font-weight: 600; letter-spacing: -0.04em; line-height: 0.95; }
.hero-a { grid-column: 1; }
.hero-b { grid-column: 3; justify-self: end; }
.hero-frame { grid-column: 2; grid-row: 2; margin: 0; }
.hero-lede { grid-column: 1 / 3; grid-row: 3; align-self: end; max-width: 38ch; }

/* The desktop: Poof's world, built in HTML */
.desk {
  --desk-bg: #8a93a6;
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--desk-bg);
  border-radius: 6px;
  overflow: hidden;
  font: 13px/1.35 var(--mac);
  color: #1d1d1f;
  container-type: inline-size;
}
.desk-menubar {
  position: absolute; inset: 0 0 auto;
  height: 28px; display: flex; align-items: center; gap: 16px;
  padding: 0 12px;
  background: rgba(246, 246, 248, 0.92);
  font-size: 13px;
}
.desk-app { font-weight: 700; }
.desk-status { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.desk-status svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i-speaker path:first-child { fill: currentColor; stroke: none; }
.i-speaker .mute { display: none; }
.i-moon { display: none; }
.desk-cloud { all: unset; cursor: pointer; display: grid; place-items: center; width: 24px; height: 22px; border-radius: 4px; }
.desk-cloud:hover { background: rgba(0, 0, 0, 0.08); }
.desk-cloud:focus-visible { outline: 2px solid var(--accent); }
.desk-cloud svg { width: 18px; height: 18px; }
body[data-state="poofed"] .desk-cloud svg { fill: currentColor; }
body[data-state="poofed"] .i-speaker .sound { display: none; }
body[data-state="poofed"] .i-speaker .mute { display: inline; }
body[data-state="poofed"] .i-moon { display: inline; fill: currentColor; stroke: none; }

.win {
  position: absolute;
  background: #fbfbfc;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(20, 24, 36, 0.28), 0 0 0 0.5px rgba(0, 0, 0, 0.18); /* taste-skill-ignore: macOS window shadow, inside the data-ui desktop */
  overflow: hidden;
  transition: opacity 260ms var(--ease), transform 320ms var(--ease);
}
.win-title { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; background: #ececef; font-size: 13px; }
.win-title i { width: 10px; height: 10px; border-radius: 50%; background: #c9cbd1; }
.win-title i:nth-child(1) { background: #ff5f57; }
.win-title i:nth-child(2) { background: #febc2e; }
.win-title i:nth-child(3) { background: #28c840; }
.win-title b { margin: 0 auto; font-weight: 600; padding-right: 40px; }
.win-mail { left: 4%; top: 12%; width: 48%; }
.mail { list-style: none; margin: 0; padding: 6px 0; }
.mail li { padding: 5px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail li:nth-child(2) { background: #dbe8fd; }
.mail b { display: block; font-weight: 600; }
.win-messages { right: 4%; top: 15%; width: 34%; padding-bottom: 10px; }
.bubble { margin: 8px 10px 0; padding: 6px 10px; background: #e9e9eb; border-radius: 14px; width: fit-content; }
.win-music { right: 6%; bottom: 7%; width: 38%; }
.music { padding: 8px 12px; }
.music b { display: block; }
.win-notes { left: 22%; top: 30%; width: 50%; z-index: 2; }
.notes { padding: 10px 14px 14px; background: #fffef8; }
.notes p + p { margin-top: 6px; }
.notes-h { font-weight: 700; }

body[data-state="poofed"] [data-hide] { opacity: 0; transform: scale(0.94); pointer-events: none; }

.hud {
  position: absolute; z-index: 5;
  top: 36px; right: 42px;
  width: max-content; max-width: 78%;
  padding: 10px 14px;
  background: rgba(250, 250, 252, 0.95);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(20, 24, 36, 0.25); /* taste-skill-ignore: the HUD's own shadow, inside data-ui */
  opacity: 0; transform: translateY(-4px);
  transition: opacity 150ms var(--ease), transform 150ms var(--ease);
  pointer-events: none;
}
.hud.is-showing { opacity: 1; transform: none; }
.hud-title { font-weight: 600; font-size: 13px; }
.hud-detail { font-size: 13px; color: #4b4f58; }

/* Keys: the one control the whole product turns on, blown up */
.keys {
  position: relative;
  min-height: 92svh;
  margin-top: var(--gap-section);
  overflow: hidden;
  background: var(--surface);
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
body[data-state="poofed"] .keys { background: var(--graphite); color: var(--graphite-ink); }
.keys-copy { position: relative; z-index: 2; padding: clamp(32px, 5vw, 72px) var(--margin) 0; max-width: 34rem; }
.keys h2 { font-size: var(--step-head); }
.keys-copy p { margin-top: 20px; }
/* The keys at poster size, anchored right of centre and cropped by the right and bottom edges. */
.keycaps {
  all: unset;
  position: absolute; right: -10vw; bottom: -0.25em;
  display: flex; gap: 0.12em;
  font: 500 var(--step-display)/1 var(--mac);
  cursor: pointer;
}
.keycaps kbd {
  display: grid; place-items: center;
  width: 1.2em; height: 1.2em;
  font: inherit;
  background: #fbfbfc; color: #1d1d1f;
  border-radius: 0.14em;
  box-shadow: 0 0.05em 0 #b9bdc6; /* taste-skill-ignore: key cap depth, inside the data-ui key caps */
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease);
}
.keycaps:hover kbd { transform: translateY(-0.01em); }
.keycaps:active kbd, .keycaps.is-pressed kbd { transform: translateY(0.04em); box-shadow: 0 0.01em 0 #b9bdc6; } /* taste-skill-ignore: key cap depth when pressed, inside data-ui */
.keycaps:focus-visible { outline: 4px solid var(--accent); outline-offset: 8px; }

/* How it works: one fragment pinned while three statements change it */
.how {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 1fr) minmax(0, 6fr);
  grid-template-rows: auto 1fr;
  padding: var(--gap-section) var(--margin) 0;
}
.how > h2 { grid-column: 1; grid-row: 1; }
.how-steps { grid-column: 1; grid-row: 2; }
.how h2 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.1; }
.how-step { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; gap: 16px; color: var(--muted); }
.how-step p { max-width: 34ch; }
.how-line { font-size: var(--step-head); font-weight: 600; letter-spacing: -0.04em; line-height: 0.95; max-width: none !important; }
.how-step.is-active { color: var(--ink); }
.how-stage {
  grid-column: 3; grid-row: 1 / 3;
  position: sticky; top: 14vh;
  align-self: start;
  height: min(520px, 72vh);
  margin-top: 10vh;
  background: var(--graphite);
}
.stage-panel { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity 260ms var(--ease); font: 13px/1.35 var(--mac); color: #1d1d1f; }
.how[data-active="poof"] .stage-poof,
.how[data-active="receipt"] .stage-receipt,
.how[data-active="back"] .stage-back { opacity: 1; }
.how:not([data-active]) .stage-poof { opacity: 1; }
.hud-static { position: static; opacity: 1; transform: none; padding: 14px 18px; }

.menu {
  list-style: none; margin: 0; padding: 5px;
  width: 300px;
  background: rgba(246, 246, 248, 0.97);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(10, 12, 20, 0.35), 0 0 0 0.5px rgba(0, 0, 0, 0.2); /* taste-skill-ignore: macOS menu shadow, inside the data-ui stage */
  font-size: 13px;
}
.menu-item { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 5px; }
.menu-item kbd { margin-left: auto; font: inherit; color: #6e717a; }
.menu-head { padding: 6px 10px 2px; font-size: 13px; font-weight: 600; color: #6e717a; }
.menu-sep { height: 1px; margin: 5px 10px; background: rgba(0, 0, 0, 0.1); } /* taste-skill-ignore: macOS menu separator, inside the data-ui stage */
.menu-app { padding-left: 10px; }
.menu-item.is-hover { background: var(--accent); color: #fff; }
.menu-item.is-off { color: #6e717a; }
.dot { width: 16px; height: 16px; border-radius: 4px; }
.dot-mail { background: #3b8cf5; }
.dot-messages { background: #34c759; }
.dot-music { background: #fa2d48; }

/* Settings: Poof's real Settings window, with notes in both margins */
.settings { padding: var(--gap-section) var(--margin) 0; }
.plate { margin: 0; }
/* One row as tall as the plate, so each note's offset lines up with the Settings row it explains. */
.plate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px minmax(0, 1fr);
  column-gap: clamp(24px, 3vw, 56px);
}
.plate-left { position: relative; text-align: right; }
.plate-row h2 { font-size: var(--step-head); }
.plate-row .plate img { width: 460px; }
.notes-left, .notes-right { list-style: none; margin: 0; padding: 0; }
.notes-left { position: absolute; inset: 0; }
.notes-right { position: relative; }
.notes-left li, .notes-right li { position: absolute; top: var(--y); max-width: 26ch; display: grid; gap: 2px; }
.notes-left li { right: 0; }
.notes-left b, .notes-right b { font-weight: 500; }
.notes-left span, .notes-right span { color: var(--muted); }

.settings-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(32px, 5vw, 96px);
  margin-top: clamp(96px, 10vw, 160px);
}
.settings-row-flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.plate-small { justify-self: center; background: var(--surface); padding: clamp(24px, 4vw, 56px); }
.settings-copy { max-width: 36rem; }
.settings-copy h3 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.1; }
.settings-copy p { margin-top: 16px; }

/* Price: one plan, the figure very large, Poof's own license window over it */
.price {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 1fr) minmax(0, 7fr);
  align-items: center;
  min-height: 80svh;
  padding: var(--gap-section) var(--margin) 0;
}
.price-copy { grid-column: 1; align-self: start; }
.price h2 { font-size: var(--step-lead); letter-spacing: -0.02em; line-height: 1.1; }
.price-copy p { margin-top: 16px; max-width: 32ch; }
.price-figure { grid-column: 3; position: relative; }
.figure { font-size: var(--step-display); font-weight: 600; line-height: 0.85; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.currency { font-size: 0.5em; vertical-align: 0.62em; margin-right: 0.04em; }
.per { font-size: var(--step-body); letter-spacing: 0; font-weight: 500; margin-left: 0.4em; }
.price-window { position: absolute; top: -0.12em; left: clamp(150px, 20vw, 300px); width: min(400px, 60%); font-size: var(--step-display); }
.included { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 6px; }

/* Questions: an accordion of filled tiles */
.faq {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  column-gap: clamp(24px, 4vw, 64px);
  padding: var(--gap-section) var(--margin);
}
.faq h2 { font-size: var(--step-head); align-self: start; }
.faq-list { display: grid; gap: 8px; }
.faq details { background: var(--surface); border-radius: var(--radius); transition: background-color 200ms var(--ease); }
.faq details[open] { background: var(--graphite); color: var(--graphite-ink); }
.faq summary {
  position: relative;
  list-style: none; cursor: pointer;
  min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 64px 0 24px; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
/* The plus: two 3px bars; opening turns the upright one flat, leaving a minus. */
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 24px; top: 50%;
  width: 16px; height: 3px; margin-top: -1.5px; background: currentColor;
  transition: transform 200ms var(--ease);
}
.faq summary::before { transform: rotate(90deg); }
.faq details[open] summary::before { transform: rotate(0deg); }
.faq summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.faq details p { padding: 0 24px 24px; max-width: 52ch; }

/* Footer: the last two rows of a board */
.foot {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
  padding: 0 10px 10px;
}
.tile { background: var(--surface); padding: 24px; min-height: 220px; text-decoration: none; }
.tile-statement { grid-column: 1 / 5; display: flex; flex-direction: column; justify-content: space-between; }
.tile-statement p:first-child { font-size: var(--step-lead); line-height: 1.15; letter-spacing: -0.02em; max-width: 24ch; }
.legal { font-size: var(--step-small); color: var(--muted); }
.tile-nav { grid-column: 5 / 7; display: flex; flex-direction: column; gap: 6px; }
.tile-nav a { text-decoration: none; width: fit-content; }
.tile-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.tile-clock { grid-column: 7 / 10; display: flex; flex-direction: column; justify-content: space-between; }
.tile-mail { grid-column: 10 / 13; display: flex; flex-direction: column; justify-content: space-between; }
.tile-mail-address { font-size: var(--step-lead); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.tile-mail:hover .tile-mail-address { text-decoration-color: var(--accent); }
.faq details p a { text-underline-offset: 3px; }
.tile-clock-bar { display: flex; align-items: center; gap: 12px; align-self: flex-start; padding: 6px 12px; background: rgba(246, 246, 248, 0.92); border-radius: 6px; font: 13px var(--mac); }
.tile-clock-bar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.tile-clock p { max-width: 26ch; }
.tile-word { grid-column: 1 / 9; min-height: 320px; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; gap: 0.15em; font-size: var(--step-display); font-weight: 600; letter-spacing: -0.05em; line-height: 1; }
.tile-word img { width: 0.9em; height: 0.9em; }
.tile-go { grid-column: 9 / 13; min-height: 320px; background: var(--accent); color: var(--accent-ink); position: relative; font-size: var(--step-lead); font-weight: 500; letter-spacing: -0.02em; }
.tile-go svg { position: absolute; right: 24px; bottom: 24px; width: 48px; height: 48px; fill: none; stroke: currentColor; stroke-width: 4; transition: transform 200ms var(--ease); }
.tile-go:hover svg { transform: translate(4px, -4px); }

/* Entrances: content is visible without script; with it, each part rises in turn. */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.tile-word img { animation: drift 6s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateY(-6%) rotate(-3deg); } }

/* Phone */
@media (max-width: 860px) {
  .bar nav a:not(:first-child) { display: none; }
  .bar nav a:first-child { font-size: 0; }
  .bar nav a:first-child::after { content: "How"; font-size: var(--step-small); }
  .hero { display: flex; flex-direction: column; gap: 20px; min-height: auto; padding-top: 24px; }
  .hero-a, .hero-b { font-size: var(--step-head); }
  .hero-a, .hero-lede { align-self: flex-start; }
  .hero-b { align-self: flex-end; }
  .hero-frame { width: 100%; }
  .desk { aspect-ratio: 4 / 3.4; }
  .win-mail { width: 62%; }
  .win-messages { width: 44%; top: 40%; }
  .win-notes { left: 10%; width: 74%; top: 36%; }
  .win-music { width: 56%; }
  .hud { right: 8px; max-width: 92%; }
  .keys { min-height: 86svh; }
  .keycaps { right: auto; left: -4vw; bottom: -0.2em; }
  .how { display: flex; flex-direction: column; }
  .how > h2 { order: -1; }
  .how-steps { order: 1; }
  /* No room to pin on a phone without covering the statements, so the panel steps through its states on its own. */
  .how-stage { position: relative; top: auto; height: 46svh; margin: 24px 0 0; }
  .how-step { min-height: 60svh; }

  .menu { width: 260px; transform: scale(0.86); }
  .settings-row, .settings-row-flip { grid-template-columns: 1fr; margin-top: 96px; }
  .settings-row-flip .plate-small { order: 2; }
  .price { display: block; min-height: auto; }
  .price-figure { margin-top: 40px; }

  .price-window { left: 46%; width: 54%; top: 0; }
  .faq { display: block; padding-bottom: 200px; }
  .faq h2 { margin-bottom: 24px; }
  .faq summary { min-height: 64px; padding: 12px 56px 12px 20px; }
  .faq summary::before, .faq summary::after { right: 20px; }
  .faq details p { padding: 0 20px 20px; }
  .foot { grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 6px 6px; }
  .tile { padding: 20px; min-height: 160px; }
  .tile-word { grid-column: 1 / -1; order: -2; min-height: 160px; }
  .tile-go { grid-column: 1 / -1; order: -1; min-height: 160px; }
  .tile-nav, .tile-clock { grid-column: span 1; }
  .tile-mail { grid-column: 1 / -1; order: -1; }
  .tile-mail-address { font-size: var(--step-body); }
  .tile-statement { grid-column: 1 / -1; }
}

/* Settings: below 1100px the margins are too narrow for notes, so they follow the window. */
@media (max-width: 1100px) {
  .plate-row { display: flex; flex-direction: column; }
  .plate-left { text-align: left; display: contents; }
  .plate-row h2 { order: -1; }
  .plate-row .plate { order: 0; margin-top: 32px; align-self: center; }
  .plate-row .plate img { width: 100%; max-width: 460px; }
  .notes-right { order: 1; }
  .notes-left { order: 2; }
  .notes-left, .notes-right { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; margin-top: 24px; text-align: left; }
  .notes-left li, .notes-right li { position: static; max-width: none; }
}

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