/* realityDebug() — app pages.
 *
 * Standalone documents, not part of the single-surface flow in index.html:
 * the App Store needs real, linkable URLs for a privacy policy and support
 * page, so these are ordinary scrolling pages. Same tokens and typeface as
 * css/site.css so they read as the same site. */

@font-face {
  /* Fallback for platforms without system Helvetica Neue. */
  font-family: 'Helvetica';
  src: url('../fonts/helvetica.ttf') format('truetype');
  font-weight: normal;
  font-display: swap;
}

:root {
  --overlay-bg: #1b1b1b;
  --menu-text: #e9e9de;
  --dim: #a5a29a;
  --rule: #34332f;
  --accent: #dfddd1;
  --font: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;
  --measure: 660px;

  /* The main surface's curves (css/site.css), so a page moves as a pane does. */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-entrance: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--overlay-bg);
  color: var(--menu-text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding: 48px 24px 120px;
}

.wrap { max-width: var(--measure); margin: 0 auto; }

/* ------------------------------------------------------ page transitions */

/* These are documents of their own, so going from one to the next is a page
   load, and was a hard cut. They now move the way panes do on the main
   surface (css/site.css, .pane): what you leave slides up and out, and what
   you arrive at rises from below.

   The arrival is an animation on the page's one column (.guide is a guide's,
   apps/guide.css), run as the page loads. The departure is app.js's: it
   holds a link to another of the site's pages for a moment and marks the
   document, and the column goes in that time. Every ground on the way is the
   same dark, so only the words are seen to move.

   Cross-document view transitions would do both without script, and were
   tried first (2026-10-11). In headless Chrome 154 the picture of the page
   being left came up blank white from about the fourth hop in one tab, which
   on this ground is a white flash, so they are not used. */
@keyframes page-in {
  from { opacity: 0; transform: translateY(30px); }
}

.wrap,
.guide { animation: page-in 0.5s var(--ease-smooth) backwards; }

/* The time here is LEAVE in app.js. The entrance is switched off first, as
   an animation still running would hold the column where it is. */
html.is-leaving .wrap,
html.is-leaving .guide {
  animation: none;
  opacity: 0;
  transform: translateY(-30px);
  transition: opacity 0.22s ease, transform 0.22s var(--ease-smooth);
}

/* Back to the main site. The trailing dot matches the menu's typography. */
.back-home {
  display: inline-block;
  margin-bottom: 56px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.3s ease;
}

.back-home:hover { color: var(--menu-text); }

/* ------------------------------------------------------------ app header */

.app-head {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 14px;
}

.app-icon {
  width: 88px;
  height: 88px;
  flex: none;
  border-radius: 20px;
  background: #0f0f0f;
  object-fit: cover;
}

h1 {
  font-weight: 900;
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--dim);
  font-size: clamp(16px, 2.4vw, 19px);
  margin-bottom: 40px;
}

/* Store badges / primary links. */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 56px;
}

.cta {
  display: inline-block;
  padding: 13px 26px;
  border: 1px solid var(--menu-text);
  border-radius: 2px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--menu-text);
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.cta:hover { background: var(--menu-text); color: var(--overlay-bg); }

.cta.secondary { border-color: var(--rule); color: var(--dim); }
.cta.secondary:hover { background: none; border-color: var(--menu-text); color: var(--menu-text); }

/* An app that is finished but not yet on sale. A dead link to #STORE_URL is
   worse than no link, and hiding the row entirely loses the one thing a
   visitor came to find out — whether they can have it yet. Deliberately not an
   <a>: there is nowhere to go, so it must not look or behave like a button. */
.cta.is-pending {
  border-style: dashed;
  border-color: var(--rule);
  color: var(--dim);
  cursor: default;
}

/* ----------------------------------------------------------- screenshots */

/* A horizontal strip rather than a grid: phone screenshots are tall, and a
   grid of them inside a 660px measure would push the written page far down.
   Snapping gives it the feel of paging through a store listing. */
.shots { margin-bottom: 56px; }

/* Explicit, so the attribute still wins if .shots ever gains a display rule —
   the section ships hidden and app.js reveals it once it has images. */
.shots[hidden] { display: none; }

.shots h2 { margin-top: 0; }

.shots-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* Room for the lift on hover, so it isn't clipped by the scroll box. */
  padding: 4px 0 8px;
}

.shots-strip::-webkit-scrollbar { display: none; }

.shot {
  flex: none;
  scroll-snap-align: start;
  max-width: 78%;          /* the next frame stays in view as a scroll cue */
}

.shot img {
  display: block;
  height: 420px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: #0f0f0f;
  /* Each frame fades up as its picture arrives (app.js marks it), where it
     used to appear all at once part-way through the page's own entrance. */
  opacity: 0;
  transition: opacity 0.5s ease, border-color 0.3s ease, transform 0.3s ease;
}

.shot img.is-loaded { opacity: 1; }

.shot img:hover {
  border-color: #55534c;
  transform: translateY(-3px);
}

/* Each frame is a button that opens the screenshot larger (app.js). */
.shot-open {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 12px;
  cursor: zoom-in;
  color: inherit;
  font: inherit;
}

.shot-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------------------------------------------------------- the viewer */

/* The screenshot over the page, as large as the window allows. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Room on every side for the controls, so none sits on the picture. */
  padding: 80px 80px;
  /* Opaque: at 92% the page's paragraphs read through underneath (Dom,
     2026-09-15). */
  background: #0b0b0a;
  cursor: zoom-out;
  /* Fades over the page and back off it. app.js adds .is-open a moment after
     taking [hidden] off, and puts [hidden] back once the fade out is done;
     the time here is FADE there. Until it is open it takes no clicks, so the
     page underneath is usable again the moment it starts to go. */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  /* Sideways is app.js's, for swiping through the screenshots. Up and down
     and pinching stay the browser's, so a screenshot can still be zoomed. */
  touch-action: pan-y pinch-zoom;
}

.lightbox.is-open { opacity: 1; pointer-events: auto; }

.lightbox[hidden] { display: none; }

html.lightbox-open { overflow: hidden; }

.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: #0f0f0f;
  /* Settles into place as the viewer opens, and eases back as it closes. */
  transform: scale(0.96);
  transition: opacity 0.18s ease, transform 0.45s var(--ease-entrance);
}

.lightbox.is-open .lightbox-img { transform: none; }

/* Between two screenshots, and while the first is still arriving: the
   picture is faded out, and comes back as the next one (SWAP in app.js,
   which also slides it off to one side and the next on from the other). */
.lightbox-img.is-changing { opacity: 0; }

.lightbox-close,
.lightbox-step {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: rgba(27, 27, 27, 0.85);
  color: var(--menu-text);
  font-family: var(--font);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.lightbox-close:hover,
.lightbox-step:hover { border-color: var(--menu-text); background: #262521; }

.lightbox-close:focus-visible,
.lightbox-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.lightbox-close { top: 16px; right: 16px; font-size: 26px; }

/* The arrows only mean something with more than one screenshot. */
.lightbox-step { display: none; top: 50%; transform: translateY(-50%); }
.lightbox.has-several .lightbox-step { display: block; }
.lightbox-previous { left: 16px; }
.lightbox-next { right: 16px; }

@media (max-width: 560px) {
  .lightbox { padding: 64px 12px; }
  .lightbox-step { top: auto; bottom: 12px; transform: none; }
}

/* Optional — add a <figcaption> to a .shot to label the screen. */
.shot figcaption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--dim);
}

/* Landscape captures (macOS, CarPlay) in a strip sized for portrait phones:
   shorter, so a 16:10 window doesn't run off the side of the page. */
.shots-strip.is-landscape .shot img,
.shot img.is-wide { height: 300px; }

/* A strip with both shapes lines its frames up on their middles. */
.shots-strip { align-items: center; }

@media (max-width: 560px) {
  .shot img { height: 340px; }
  .shots-strip.is-landscape .shot img,
  .shot img.is-wide { height: 200px; }
}

/* ------------------------------------------------------------ long form */

h2 {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 44px 0 14px;
}

h3 {
  font-weight: 700;
  font-size: 16px;
  margin: 28px 0 8px;
}

p, ul, ol { margin-bottom: 16px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 7px; }

a { color: var(--menu-text); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: #fff; }

strong { font-weight: 700; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: #262521;
  padding: 1px 5px;
  border-radius: 2px;
}

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 56px 0;
}

.updated {
  color: var(--dim);
  font-size: 13px;
  letter-spacing: 0.04em;
  margin-bottom: 44px;
}

.footer {
  margin-top: 72px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--dim);
}

.footer a { color: var(--dim); }
.footer a:hover { color: var(--menu-text); }

/* --------------------------------------------------------- support form */

/* Support goes through the site's contact handler, not a published address
   (Dom, 2026-10-09). Underlined fields, as the main page's email pane has. */
.support-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 28px 0 44px;
}

.sf-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 6px;
}

.sf-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  color: var(--menu-text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  padding: 8px 0;
  outline: none;
}

.sf-input:focus { border-bottom-color: var(--menu-text); }

textarea.sf-input { resize: vertical; min-height: 132px; }

/* .cta is drawn for links; a button needs its own face taken off first. */
.support-form .cta {
  align-self: flex-start;
  background: none;
  font-family: var(--font);
  cursor: pointer;
}

.support-form .cta:hover { background: var(--menu-text); }
.support-form .cta[disabled] { opacity: 0.4; pointer-events: none; }

.sf-status {
  min-height: 1.6em;
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--dim);
}

.sf-status.is-error { color: #ff6b5e; }

/* Placeholders you must replace before publishing. Deliberately loud —
   if one of these ships to the App Store it should be impossible to miss. */
/* Short tokens (DATE, LEGAL_NAME) have no spaces and won't break anyway;
   the long instructional ones must wrap inside the measure, so no nowrap. */
.todo {
  background: #4a3a12;
  color: #ffd479;
  padding: 1px 6px;
  border-radius: 2px;
  font-weight: 700;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.notice {
  border: 1px solid #6b5518;
  background: #2a2312;
  color: #ffd479;
  padding: 16px 18px;
  border-radius: 3px;
  font-size: 14px;
  margin-bottom: 40px;
}

.notice strong { display: block; margin-bottom: 4px; }

@media (max-width: 560px) {
  body { padding: 32px 20px 80px; }
  .app-head { gap: 16px; }
  .app-icon { width: 66px; height: 66px; border-radius: 15px; }
  .back-home { margin-bottom: 36px; }
}

/* As css/site.css does. app.js doesn't hold a link back either, so a page
   is left and arrived at with no wait. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
  }
}
