/* Arriving, and folding away.
 *
 * The hiding class is added by reveal.js, never declared here on the bare attribute — so an
 * element is only ever hidden by something that is definitely running and will definitely
 * un-hide it. Content invisible because a script failed is the worst failure this file could
 * have, and it is the one that never gets reported.
 */

[data-reveal].rv-armed {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s var(--e-out), transform .55s var(--e-out);
}
[data-reveal].rv-armed [data-reveal-child] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s var(--e-out), transform .5s var(--e-out);
}
[data-reveal].rv-in,
[data-reveal].rv-in [data-reveal-child] { opacity: 1; transform: none; }

/* ── the disclosure ──────────────────────────────────────────────────────── */
button.more {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: var(--s3, 12px);
  padding: 8px 14px 8px 15px;
  background: transparent;
  border: 1px solid var(--line2); border-radius: 999px;
  color: var(--muted); font-family: var(--fs); font-size: 13px;
  cursor: pointer;
}
button.more:hover { color: var(--txt); border-color: var(--faint); }
button.more:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* The mark is a chevron drawn from two rules rather than a glyph, so it can rotate about its
   own centre — a character rotates about its line box and wobbles. */
.more-mark {
  position: relative; width: 9px; height: 9px; flex: none;
  transition: transform .28s var(--e-out);
}
.more-mark::before, .more-mark::after {
  content: ''; position: absolute; top: 50%; width: 6px; height: 1.5px;
  background: currentColor; border-radius: 1px;
}
.more-mark::before { left: 0; transform: rotate(45deg); transform-origin: left center; }
.more-mark::after { right: 0; transform: rotate(-45deg); transform-origin: right center; }
button.more[aria-expanded="true"] { color: var(--txt); border-color: var(--green2); }
button.more[aria-expanded="true"] .more-mark { transform: rotate(180deg); }

.more-body {
  overflow: hidden;
  height: 0;
  transition: height .34s var(--e-in-out), opacity .28s var(--e-out);
  opacity: 0;
  /* The rule down the edge is what makes the opened block read as an aside rather than as the
     page having grown — it belongs to the control that opened it. */
  border-left: 2px solid var(--green2);
  padding-left: var(--s4, 16px);
  margin-top: var(--s3, 12px);
}
.more-body.is-open { opacity: 1; }
/* The content slides up into place behind the height, so opening is one movement rather than a
   box growing and then filling. */
.more-body > * { transform: translateY(-6px); transition: transform .34s var(--e-out); }
.more-body.is-open > * { transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal].rv-armed, [data-reveal].rv-armed [data-reveal-child] {
    opacity: 1; transform: none; transition: none;
  }
  .more-body, .more-body > *, .more-mark { transition: none; }
}

/* ── windows ─────────────────────────────────────────────────────────────
   Native <dialog>. The backdrop, the inert background, Escape and focus returning to the
   opener all come from showModal() — nothing here re-implements any of it. */
.dlg {
  border: 1px solid var(--line2); border-radius: var(--radius-m, 12px);
  background: var(--surface, #0d1211); color: var(--txt);
  padding: 0; max-width: 720px; width: calc(100% - 32px);
  /* Bounded, and scrolling inside rather than growing past the screen.
     The longest of these measured 766px against an 812px phone — it fitted, and on a shorter
     one the bottom of the window would have been below the viewport with no way to reach it,
     because a <dialog> in the top layer does not scroll the page behind it. Found by checking
     at 375px after reading that most pricing-page traffic is mobile; every check before that
     had been at desktop width. */
  max-height: min(84vh, 720px); overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8);
}
.dlg::backdrop { background: rgba(0,0,0,.62); backdrop-filter: blur(3px); }
/* Roomier than it was. At 26px the content ran to the edges and the whole window read as
   cramped — which is what the screenshot showed, and cramped is not a thing to be on the
   screen where somebody decides whether to wait for a product. */
.dlg-in { position: relative; padding: 34px 36px 32px; }
@media (max-width: 640px) { .dlg-in { padding: 26px 22px 24px; } }
.dlg-x {
  position: absolute; top: 10px; right: 12px;
  background: none; border: 1px solid var(--line2); color: var(--faint);
  font-size: 20px; line-height: 1; cursor: pointer; border-radius: 8px;
  /* A real target rather than a glyph: 36px square is the smallest thing a thumb finds
     reliably, and this is the only way out of a modal on a phone besides the backdrop. */
  width: 36px; height: 36px; display: grid; place-items: center;
}
.dlg-x:hover { color: var(--txt); }
.dlg-x:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.dlg-body h3 { margin: 0 0 16px; font-family: var(--fd); font-size: 27px; line-height: 1.15;
  letter-spacing: -.01em; padding-right: 40px; }
.dlg-body p { margin: 0 0 15px; color: var(--muted); line-height: 1.72; font-size: 15.5px; }
.dlg-body p:last-child { margin-bottom: 0; }
.dlg-body ol { margin: 0; padding-left: 22px; color: var(--muted); font-size: 15.5px; line-height: 1.72; }
.dlg-body li { margin-bottom: 12px; }
.dlg-body b { color: var(--txt); }

/* Opening is a movement, not an appearance — the same reason the disclosure animates. */
@media (prefers-reduced-motion: no-preference) {
  .dlg[open] { animation: dlg-in .22s var(--e-out); }
  .dlg[open]::backdrop { animation: dlg-fade .22s var(--e-out); }
}
@keyframes dlg-in { from { opacity: 0; transform: translateY(10px) scale(.99); } }
@keyframes dlg-fade { from { opacity: 0; } }

/* The control that opens one reads as a link in prose, not as another button competing with
   the call to action. */
.dlg-open {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--green); font: inherit;
  text-decoration: underline; text-underline-offset: 3px;
}
.dlg-open:hover { color: var(--txt); }
.dlg-open:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
