/* PanoStitch's website. Its colors, type and shapes are the app's own
   (web/design-system/tokens.css, dark appearance): the same system font
   stack, label and separator colors, accent blue, 10-px window radii and
   sheet shadows, so the page looks like the app it offers. */

:root {
  color-scheme: dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", Roboto, Ubuntu, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Roboto, Ubuntu, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;

  --canvas-bg: #161616;     /* behind the panorama preview */
  --content-bg: #1e1e1e;
  --window-bg: #2b2b2b;
  --fill-1: rgba(255, 255, 255, 0.06);
  --fill-2: rgba(255, 255, 255, 0.1);
  --label: rgba(255, 255, 255, 0.9);
  --label-2: rgba(255, 255, 255, 0.64);
  --label-3: rgba(255, 255, 255, 0.4);
  --separator: rgba(255, 255, 255, 0.1);
  --accent: #0a84ff;
  --accent-hover: #2690ff;
  --accent-pressed: #0071e0;
  --green: #32d74b;
  --orange: #ff9f0a;
  --yellow: #ffd60a;
  --overlay-crop: #ffff00;
  --radius-control: 6px;
  --radius-group: 10px;
  --radius-window: 12px;
  --shadow-sheet: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 0.5px rgba(255, 255, 255, 0.14);
  --page: 1120px;
  --weight-regular: 450;
  --weight-semibold: 650;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas-bg);
  color: var(--label);
  font: var(--weight-regular) 17px/1.55 var(--font);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid rgba(10, 132, 255, 0.55); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); color: var(--label); margin: 0; letter-spacing: -0.015em; }
h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; line-height: 1.15; }
h3 { font-size: 17px; font-weight: var(--weight-semibold); line-height: 1.3; }
p { margin: 0; }
.wrap { max-width: var(--page); margin: 0 auto; padding-inline: 24px; }
.muted { color: var(--label-2); }
code, .mono { font-family: var(--font-mono); font-size: 0.86em; }

/* ---------- the bar at the top: the app's unified toolbar ---------- */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: rgba(30, 30, 30, 0.82);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 0.5px solid var(--separator);
}
.topbar .wrap { display: flex; align-items: center; gap: 20px; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--label); font-weight: var(--weight-semibold); font-size: 16px; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.topbar nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.topbar nav a {
  color: var(--label-2);
  font-size: 14px;
  padding: 5px 10px;
  border-radius: var(--radius-control);
}
.topbar nav a:hover { color: var(--label); background: var(--fill-1); text-decoration: none; }
.topbar nav a.current { color: var(--label); background: var(--fill-2); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(56px, 9vw, 104px) 0;
  text-align: center;
  background:
    radial-gradient(1200px 520px at 50% -10%, rgba(10, 132, 255, 0.22), transparent 70%),
    linear-gradient(180deg, #121417 0%, var(--canvas-bg) 60%);
  overflow: hidden;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--label-2);
  padding: 4px 12px; border-radius: 999px;
  background: var(--fill-1); border: 0.5px solid var(--separator);
  margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.hero h1 {
  font-size: clamp(38px, 6.4vw, 68px);
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -0.03em;
  max-width: 14em;
  margin: 0 auto;
}
.hero h1 .wide {
  background: linear-gradient(90deg, #5ac8fa, #0a84ff 45%, #bf5af2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--label-2); max-width: 36em; margin: 20px auto 0; text-wrap: pretty; }
.cta { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: var(--weight-semibold) 17px/1 var(--font);
  color: #fff;
  background: var(--accent);
  padding: 15px 28px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(10, 132, 255, 0.35), inset 0 0.5px 0 rgba(255, 255, 255, 0.25);
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { background: var(--accent-pressed); }
.btn svg { width: 18px; height: 18px; }
.btn.disabled { background: var(--fill-2); color: var(--label-2); box-shadow: none; pointer-events: none; }
.cta .meta { font-size: 14px; color: var(--label-3); }
.cta .other { font-size: 14px; }

/* a window, as the app draws one: rounded, hairline edge, sheet shadow */
.window {
  margin: 0;
  border-radius: var(--radius-window);
  overflow: hidden;
  background: var(--content-bg);
  box-shadow: var(--shadow-sheet);
}
.hero-shot {
  margin: clamp(44px, 6vw, 72px) auto 0;
  max-width: 1100px;
  transform: translateY(0);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.hero-shot img { width: 100%; }

/* ---------- sections ---------- */
section.block { padding-block: clamp(64px, 9vw, 112px); border-top: 0.5px solid var(--separator); }
.section-head { max-width: 46em; margin-bottom: 40px; }
.section-head p { margin-top: 14px; color: var(--label-2); font-size: 18px; }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.feature {
  background: var(--content-bg);
  border: 0.5px solid var(--separator);
  border-radius: var(--radius-group);
  padding: 22px 22px 24px;
}
/* icons: Phosphor (regular), the app's set; see THIRD-PARTY-NOTICES.md */
.feature svg { width: 26px; height: 26px; color: var(--accent-hover); margin-bottom: 14px; }
.feature p { margin-top: 6px; color: var(--label-2); font-size: 15px; line-height: 1.5; }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.gallery figure { margin: 0; }
.gallery figcaption { margin-top: 14px; font-size: 15px; color: var(--label-2); }
.gallery figcaption strong { color: var(--label); font-weight: var(--weight-semibold); }
/* the Web page export: its screenshot, and what the page does below it */
.viewer { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.viewer-shot img { width: 100%; }
.viewer-points { display: grid; gap: 22px; }
.viewer-points p { margin-top: 6px; color: var(--label-2); font-size: 15px; line-height: 1.5; }

.photo-credits { margin-top: 32px; font-size: 13px; color: var(--label-3); }
.photo-credits a { color: var(--label-2); }

/* ---------- the lightbox (lightbox.js): content images open larger ---------- */
.lb-open {
  display: block; width: 100%;
  margin: 0; padding: 0; border: 0;
  background: none; color: inherit; font: inherit;
  cursor: zoom-in;
}
.lb-open:focus-visible { outline: 3px solid rgba(10, 132, 255, 0.7); outline-offset: -3px; border-radius: inherit; }
.lb-open img { width: 100%; }
html.lb-locked { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: calc(64px + env(safe-area-inset-top, 0px)) 72px calc(24px + env(safe-area-inset-bottom, 0px));
  background: rgba(10, 10, 10, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lb-stage { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; max-height: 100%; min-height: 0; }
.lb-img {
  display: block;
  max-width: 100%; max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px);
  width: auto; height: auto;
  object-fit: contain;
  border-radius: var(--radius-group);
  box-shadow: var(--shadow-sheet);
  cursor: pointer;
  background: var(--content-bg);
}
.lb-caption { max-width: 60em; text-align: center; font-size: 14px; line-height: 1.45; color: var(--label-2); cursor: default; }
.lb-count { color: var(--label); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; margin-right: 10px; }
.lb-count:empty { display: none; }
.lb-btn {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  padding: 0; border: 0.5px solid var(--separator); border-radius: 50%;
  background: rgba(43, 43, 43, 0.85); color: var(--label);
  cursor: pointer;
}
.lb-btn:hover { background: #3a3a3a; }
.lb-btn svg { width: 22px; height: 22px; fill: currentColor; }
.lb-no-ring:focus-visible { outline: none !important; }
.lb-btn:focus-visible { outline: 3px solid rgba(10, 132, 255, 0.7); outline-offset: 2px; border-radius: 50%; }
.lb-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: 16px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-btn[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .lightbox { opacity: 0; transition: opacity 0.18s ease; }
  .lightbox.open { opacity: 1; }
  .lb-open img { transition: filter 0.15s ease; }
  .lb-open:hover img { filter: brightness(1.06); }
}
@media (max-width: 760px) {
  .lightbox { padding: calc(64px + env(safe-area-inset-top, 0px)) 16px calc(84px + env(safe-area-inset-bottom, 0px)); }
  .lb-img { max-height: calc(100vh - 220px); max-height: calc(100dvh - 220px); border-radius: 8px; }
  /* the arrows sit below the image on a phone, out of its way */
  .lb-prev, .lb-next { top: auto; transform: none; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { right: calc(50% - 56px); }
}

.heritage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.heritage p + p { margin-top: 14px; }
.heritage p { color: var(--label-2); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--content-bg); border: 0.5px solid var(--separator); border-radius: var(--radius-group); padding: 18px 20px; }
.stat b { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; color: var(--label); font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.3; color: var(--label-2); }

/* ---------- downloads (generated by scripts/site-build.js) ---------- */
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.platform { background: var(--content-bg); border: 0.5px solid var(--separator); border-radius: var(--radius-group); padding: 22px; display: flex; flex-direction: column; }
.platform h3 { font-size: 20px; }
.platform .req { font-size: 14px; color: var(--label-2); margin: 4px 0 16px; }
.platform ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.platform li a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  background: var(--fill-1);
  color: var(--label);
  font-size: 15px;
}
.platform li a:hover { background: var(--fill-2); text-decoration: none; }
.platform li a .size { color: var(--label-3); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.platform li a .kind { color: var(--label-2); }
.platform .note { margin-top: 14px; font-size: 13px; line-height: 1.45; color: var(--label-3); }
.platform.pending { opacity: 0.7; }
.release-line { margin: -24px 0 28px; color: var(--label-2); font-size: 15px; }
.downloads-foot { margin-top: 22px; font-size: 14px; color: var(--label-3); }

.reqs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.reqs h3 { margin-bottom: 6px; }
.reqs p, .reqs li { color: var(--label-2); font-size: 15px; line-height: 1.4; }
.reqs li + li { margin-top: 4px; }
.reqs ul { margin: 0; padding-left: 18px; }

/* ---------- plain pages: release notes, checksums ---------- */
.page { padding-block: 56px 96px; }
.page h1 { font-size: clamp(32px, 5vw, 44px); font-weight: 700; letter-spacing: -0.025em; }
.page .intro { color: var(--label-2); margin-top: 12px; max-width: 44em; }
.release { margin-top: 44px; padding-top: 28px; border-top: 0.5px solid var(--separator); }
.release h2 { font-size: 24px; }
.release time { display: block; color: var(--label-3); font-size: 14px; margin-top: 4px; }
.release ul { margin: 16px 0 0; padding-left: 20px; color: var(--label-2); }
.release li + li { margin-top: 6px; }
.table-wrap { overflow-x: auto; margin-top: 32px; border: 0.5px solid var(--separator); border-radius: var(--radius-group); background: var(--content-bg); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 0.5px solid var(--separator); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { color: var(--label-3); font-weight: var(--weight-semibold); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
td.hash { font-family: var(--font-mono); font-size: 12.5px; color: var(--label-2); word-break: break-all; min-width: 22em; }
td.num { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--label-2); }

/* ---------- footer ---------- */
footer { border-top: 0.5px solid var(--separator); padding-block: 32px 48px; font-size: 14px; color: var(--label-3); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--label-2); }

@media (max-width: 960px) {
  .viewer { grid-template-columns: 1fr; gap: 32px; }
  .viewer-points { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px 28px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .topbar nav a.optional { display: none; }
  .heritage { grid-template-columns: 1fr; gap: 28px; }
  .hero-shot { border-radius: 8px 8px 0 0; }
  .wrap { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
