/* Copyright (c) 2026 Moiz Saeed (Bubble Laboratories). All rights reserved.
   SPDX-License-Identifier: LicenseRef-Folio-1.0 (Folio License 1.0, see LICENSE) */
/* The empty state, dressed as a front door. Folio's own idiom: paper, the serif,
   restraint. Nothing here is visible once a document is open. */

.try-wrap {
  max-width: 30rem;
  margin: 1.25rem auto 0;
  text-align: center;
}

.try-lede {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  margin: 0 0 0.35rem;
}

.try-sub,
.try-or,
.try-foot {
  font-family: var(--sans, -apple-system, system-ui, sans-serif);
  color: color-mix(in srgb, var(--ink) 52%, transparent);
  margin: 0;
}

.try-sub { font-size: 0.82rem; line-height: 1.5; }
.try-or  { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 1.6rem 0 0.6rem; }
.try-foot { font-size: 0.75rem; line-height: 1.6; margin-top: 2rem; }   /* 12px: the legible-size floor */

.try-open {
  display: inline-block;
  margin-top: 1.1rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  font-family: var(--sans, -apple-system, system-ui, sans-serif);
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.try-open:hover {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
  border-color: color-mix(in srgb, var(--ink) 32%, transparent);
}

.try-samples {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.try-samples > li::before { content: none; }   /* the reader's own list dash */
.try-samples > li { margin: 0; padding: 0; }

.try-sample {
  display: inline-block;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0.45rem 0;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease;
}
.try-sample:hover { border-bottom-color: color-mix(in srgb, var(--ink) 35%, transparent); }

/* the whole page is a drop target, so say so while something is over it */
body.drag-over #empty { outline: 2px dashed color-mix(in srgb, var(--ink) 25%, transparent); outline-offset: -18px; }

/* The app's own buttons (Open…, Welcome Guide) call the Mac; on the web the
   front door above does both, so they would only say the same thing twice. */
#empty .empty-actions { display: none; }

/* a phone: keep the small print off the screen's edge */
.try-wrap { padding: 0 1.25rem; box-sizing: border-box; }

/* Once a document is open: the controls the Mac's toolbar and menus stand for.
   Top left, inside the outline's own top margin, and above the outline, so
   Contents can close what it opened. */
.try-bar {
  position: fixed;
  top: calc(10px + var(--folio-chrome-top, 0px));
  left: 10px;
  z-index: 57;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: var(--hud-bg);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid var(--hairline-soft);
  opacity: 0.55;
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.try-bar.away { transform: translateY(calc(-100% - 16px)); }
.try-bar:hover, .try-bar:focus-within, body.outline-open .try-bar { opacity: 1; }
body.is-empty .try-bar { display: none; }
@media print { .try-bar { display: none; } }

.try-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.try-btn:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); }
.try-btn:focus-visible { outline: 2px solid var(--scrub-blue); outline-offset: 1px; }
.try-btn[aria-pressed="true"] { color: var(--scrub-blue); }

/* a finger: full-size targets (44 px, Apple's and WCAG's floor), and always
   legible — there is no hover to wake them */
@media (pointer: coarse) {
  .try-bar { opacity: 1; }
  .try-btn { width: 44px; height: 44px; }
  .try-open { padding: 0.8rem 1.4rem; min-height: 44px; }
  .try-sample { padding: 0.7rem 0.4rem; min-height: 44px; }
}
/* the outline's first row starts below the bar, not under it */
#outline { padding-top: 4.5rem; }
/* the find bar spans a phone's width, over the bar; Find is what it is for */
@media (max-width: 480px) { body.finding .try-bar { display: none; } }

/* On a phone the bar sits over the document's first lines (measured: the
   front-matter card and the title, at every width up to 600px, where the
   reader's own phone layout begins). Give the document a band of its own
   below it: the bar is 40px tall at 10px from the top, plus any chrome the
   page reserves above it. Wider than that, the column clears the bar. */
@media (max-width: 600px) {
  body:not(.is-empty) #stage { padding-top: calc(48px + var(--folio-chrome-top, 0px)); }
}
