/* Pure (puretext.bdtech.app) — page-specific components.
   The design system itself lives in style.css (synced from the repo root). */

/* language menu — current code highlighted like selected text (a tight
   light-gray rectangle behind it, in the site's neutral palette); click
   stacks the other codes below, text starts aligned. Pure <details>, no JS. */
.lang-menu { position: relative; display: inline-block; }
.lang-chip {
  display: inline-block;
  background: var(--line); color: var(--ink);
  font-family: var(--font-mono); font-size: 0.82rem;
  padding: 2px 6px; border-radius: 3px;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
}
.lang-menu summary {
  list-style: none; cursor: pointer; padding-block: 8px;
  display: inline-block;   /* shrink-wrap so the chip starts on the menu's edge */
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover .lang-chip { background: var(--ink); color: var(--accent-ink); }
/* open list: stacked, each chip's text start aligned with the summary's */
.lang-menu ul {
  position: absolute; inset-inline-start: 0; inset-block-start: 100%;
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; z-index: 60;
}
.lang-menu ul a.lang-chip { text-decoration: none; color: var(--ink); }
.lang-menu ul a.lang-chip:hover { background: var(--ink); color: var(--accent-ink); }

/* five nav items (four anchors + the language menu) do not fit a phone
   header — drop the secondary anchors there. The page is one scroll, so no
   destination is lost. */
@media (max-width: 599px) {
  .site-nav a[href="#screenshots"], .site-nav a[href="#shared"] { display: none; }
  .wordmark .tld { display: none; }   /* "by BDTech" — the footer still says it */
}

/* app page hero: large icon above the overline, product title carrying the
   same weight as a hero h1 without stealing the page's h1 */
.product-hero-icon {
  inline-size: clamp(72px, 10vw, 96px); block-size: auto;
  border-radius: 22.5%; margin-block-end: 24px;
  outline: 1px solid rgba(29, 29, 31, 0.1); outline-offset: -1px;
}
/* icons whose artwork carries its own macOS squircle */
.product-hero-icon--shaped { border-radius: 0; outline: none; }
.product-title { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem); max-inline-size: 22ch; }

/* official App Store badge, optional coming-soon chip beside it. The
   direct-download badge is built to the same height so it renders as a peer. */
.store-badge { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.store-badge img { block-size: 52px; inline-size: auto; display: block; }
a.store-badge { transition: opacity 0.2s ease; }
a.store-badge:hover { opacity: 0.82; }

/* the line under the hero buttons — price and signing, not marketing */
.hero-fineprint {
  margin-block-start: 18px; max-inline-size: 56ch;
  font-size: 0.9rem; color: var(--ink-soft);
}

/* features: six caps sit better on three columns */
@media (min-width: 1080px) {
  .cap-grid--three { grid-template-columns: repeat(3, 1fr); }
}

/* screenshots — Mac captures, 16:10 landscape, two-up grid */
.shot-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .shot-grid { grid-template-columns: repeat(2, 1fr); } }
.shot {
  inline-size: 100%; block-size: auto;
  border: 1px solid var(--line); border-radius: var(--radius-card);
  background: var(--surface); display: block;
  transition: border-color 0.15s ease-out, transform 0.18s ease-out;
}
.shot-btn:hover .shot { border-color: var(--line-strong); transform: translateY(-2px); }

/* each screenshot is a button that opens the lightbox (see the inline script
   in _template.html). Reset button chrome WITHOUT touching opacity/transform,
   so the .reveal animation on the same element survives. */
.shot-btn {
  display: block; inline-size: 100%; padding: 0; border: 0;
  background: none; font: inherit; color: inherit; cursor: zoom-in;
  -webkit-appearance: none; appearance: none;
}
.shot-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-card); }

/* lightbox overlay (one per page, built by the inline script) */
.shot-modal {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(15, 15, 17, 0.82);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.shot-modal.is-open { display: flex; }
.shot-modal-img {
  max-inline-size: min(2560px, 92vw); max-block-size: 90vh;
  inline-size: auto; block-size: auto;
  border-radius: var(--radius-card);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  background: var(--surface);
}
.shot-modal-close {
  position: absolute;
  inset-block-start: clamp(10px, 2vw, 20px); inset-inline-end: clamp(10px, 2vw, 20px);
  inline-size: 44px; block-size: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; line-height: 1; color: #fff;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%; cursor: pointer;
  transition: background 0.15s ease-out;
}
.shot-modal-close:hover { background: rgba(255, 255, 255, 0.24); }
.shot-modal-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .shot-modal.is-open { animation: shot-modal-in 0.18s ease-out; }
  @keyframes shot-modal-in { from { opacity: 0; } to { opacity: 1; } }
}

/* footer: the ownership line under the nav */
.credits { font-size: 0.85rem; color: var(--ink-soft); margin-block-start: 12px; }
