/* Public content pages: /faq, /scenes, /scenes/{slug}, /product-photography, /product-photography/{slug}.
   Hand CSS, not Tailwind: classes used only here would not be in the compiled dist bundle.
   Same dark palette as how-it-works (the site is dark-only). */

:root {
  --pub-bg: #0a0a0f;
  --pub-card: #0f0f1a;
  --pub-raised: #12121f;
  --pub-line: rgba(255, 255, 255, 0.07);
  --pub-text: #e7e7f0;
  --pub-muted: #9a9ab8;
  --pub-faint: #64648a;
  --pub-accent: #7c3aed;
  --pub-accent-soft: #a78bfa;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.pub-page {
  margin: 0;
  background: var(--pub-bg);
  color: var(--pub-text);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
.pub-page img { max-width: 100%; display: block; }
.pub-page a { color: var(--pub-accent-soft); }
.pub-page h1, .pub-page h2, .pub-page h3 { font-family: 'Syne', sans-serif; line-height: 1.2; margin: 0; color: var(--pub-text); }
.pub-page h1 { font-size: clamp(2rem, 5vw, 3rem); }
.pub-page h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.pub-page h3 { font-size: 1.1rem; }

/* ---- Nav ---- */
.pub-nav { position: sticky; top: 0; z-index: 10; background: rgba(10, 10, 15, 0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--pub-line); }
.pub-nav-inner { max-width: 1140px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pub-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--pub-text) !important; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.15rem; }
.pub-links { display: flex; gap: 4px; margin-left: auto; }
.pub-links a { color: var(--pub-muted); text-decoration: none; font-size: 0.92rem; font-weight: 500; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.pub-links a:hover, .pub-links a[aria-current="page"] { color: var(--pub-text); background: rgba(255, 255, 255, 0.05); }
@media (max-width: 1060px) {
  .pub-nav-inner { gap: 8px 12px; }
  .pub-nav-inner > .pub-btn { margin-left: auto; }
  .pub-links { order: 3; width: 100%; margin: 0 -16px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
  .pub-links::-webkit-scrollbar { display: none; }
}

/* ---- Buttons ---- */
.pub-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--pub-accent); color: #fff !important; font-weight: 600; text-decoration: none; border-radius: 10px; padding: 12px 20px; transition: filter .15s; white-space: nowrap; }
.pub-btn:hover { filter: brightness(1.1); }
.pub-btn-sm { padding: 8px 14px; font-size: 0.9rem; }
.pub-btn-ghost { background: transparent; border: 1px solid rgba(255, 255, 255, 0.15); }

/* ---- Layout ---- */
.pub-main { max-width: 1140px; margin: 0 auto; padding: 40px 16px 72px; }
.pub-narrow { max-width: 760px; }
.pub-hero { margin-bottom: 40px; }
.pub-hero p.pub-lead { font-size: 1.15rem; color: var(--pub-muted); max-width: 680px; margin: 16px 0 0; }
.pub-crumbs { font-size: 0.85rem; color: var(--pub-faint); margin-bottom: 18px; }
.pub-crumbs a { color: var(--pub-faint); text-decoration: none; }
.pub-crumbs a:hover { color: var(--pub-text); }
.pub-section { margin-top: 56px; }
.pub-section > h2 { margin-bottom: 18px; }
.pub-muted { color: var(--pub-muted); }
.pub-prose p { margin: 0 0 1em; color: #cfcfe6; }
.pub-chip { display: inline-block; font-size: 12px; font-weight: 600; color: var(--pub-accent-soft); background: rgba(124, 58, 237, 0.10); border: 1px solid rgba(124, 58, 237, 0.30); border-radius: 999px; padding: 3px 10px; margin: 0 6px 6px 0; }
.pub-card { background: var(--pub-card); border: 1px solid var(--pub-line); border-radius: 16px; }
.pub-cta { margin-top: 64px; padding: 32px 24px; text-align: center; background: radial-gradient(ellipse at 50% 0%, rgba(124, 58, 237, 0.18), transparent 70%), var(--pub-card); }
.pub-cta p { color: var(--pub-muted); margin: 10px auto 20px; max-width: 520px; }

/* ---- FAQ ---- */
.pub-faq-group { margin-top: 40px; }
.pub-faq-group > h2 { font-size: 1.25rem; margin-bottom: 12px; color: var(--pub-accent-soft); }
.pub-faq details { border-bottom: 1px solid var(--pub-line); }
.pub-faq summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; position: relative; font-weight: 600; font-size: 1.05rem; }
.pub-faq summary::-webkit-details-marker { display: none; }
.pub-faq summary::after { content: '+'; position: absolute; right: 4px; top: 14px; font-size: 1.4rem; color: var(--pub-accent-soft); }
.pub-faq details[open] summary::after { content: '\2212'; }
.pub-faq .pub-answer { padding: 0 0 18px; color: #cfcfe6; }
.pub-faq .pub-answer p { margin: 0; }

/* ---- Tile grid (scenes index, related scenes) ---- */
.pub-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .pub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .pub-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pub-tile { display: block; text-decoration: none; color: inherit !important; }
.pub-tile-img { aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--pub-raised); border: 1px solid var(--pub-line); }
.pub-tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.pub-tile:hover .pub-tile-img img { transform: scale(1.04); }
.pub-tile h3 { margin-top: 10px; font-family: 'DM Sans', sans-serif; font-size: 0.98rem; font-weight: 600; }
.pub-tile p { margin: 2px 0 0; font-size: 0.85rem; color: var(--pub-muted); line-height: 1.4; }

/* ---- Detail pages ---- */
.pub-split { display: grid; gap: 32px; }
@media (min-width: 900px) { .pub-split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
.pub-figure { margin: 0; border-radius: 16px; overflow: hidden; background: var(--pub-raised); border: 1px solid var(--pub-line); }
.pub-figure img { width: 100%; height: auto; }
.pub-facts { list-style: none; padding: 0; margin: 20px 0 24px; display: grid; gap: 10px; }
.pub-facts li { display: flex; gap: 10px; font-size: 0.95rem; color: #cfcfe6; }
.pub-facts b { color: var(--pub-text); min-width: 7.5rem; font-weight: 600; }
.pub-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Use cases ---- */
.pub-sets { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.pub-set { padding: 18px; min-width: 0; }
.pub-set h3 { margin-bottom: 12px; }
/* One batch per row: every tile the same height, its width from its format, so the set reads as one
   shoot. Scrolls inside itself on a phone, never the page. */
.pub-set-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.pub-set-row figure { margin: 0; flex: 0 0 auto; }
.pub-set-row figcaption { font-size: 11px; color: var(--pub-faint); margin-top: 4px; }
.pub-set-row img, .pub-set-row video { height: 240px; width: auto; object-fit: cover; border-radius: 10px; background: var(--pub-raised); display: block; }
@media (max-width: 719px) { .pub-set-row img, .pub-set-row video { height: 180px; } }
.pub-set-row .ar-product { aspect-ratio: 3 / 4; }
.pub-set-row .ar-1-1 { aspect-ratio: 1 / 1; }
.pub-set-row .ar-9-16 { aspect-ratio: 9 / 16; }
.pub-set-row .ar-16-9 { aspect-ratio: 16 / 9; }
.pub-usecase-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.pub-usecase-card { display: block; padding: 0; overflow: hidden; text-decoration: none; color: inherit !important; }
.pub-usecase-card .pub-tile-img { border: 0; border-radius: 0; aspect-ratio: 4 / 5; }
.pub-usecase-card div.pub-pad { padding: 14px 16px 18px; }
.pub-usecase-card p { color: var(--pub-muted); font-size: 0.9rem; margin: 4px 0 0; }
.pub-list { padding-left: 1.2em; color: #cfcfe6; }
.pub-list li { margin-bottom: 8px; }

/* ---- Gallery ---- */
.gal-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: -12px 0 24px; }
.gal-chip { cursor: pointer; font: inherit; font-size: 13px; margin: 0; padding: 6px 14px; }
.gal-chip[aria-pressed="true"] { background: var(--pub-accent); border-color: var(--pub-accent); color: #fff; }
.gal-card { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; width: 100%; font: inherit; }
.gal-card:focus-visible { outline: 2px solid var(--pub-accent-soft); outline-offset: 4px; border-radius: 12px; }
.gal-name { display: block; margin-top: 10px; font-weight: 600; font-size: 0.98rem; }
.gal-scene { display: block; font-size: 0.85rem; color: var(--pub-muted); }
.gal-modal { position: fixed; inset: 0; z-index: 50; background: rgba(5, 5, 10, 0.82); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gal-modal[hidden] { display: none; }
.gal-panel { width: min(1100px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 18px; }
.gal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.gal-head h2 { font-size: 1.2rem; }
.gal-head h2 .pub-muted { font-family: 'DM Sans', sans-serif; font-weight: 400; font-size: 0.95rem; }
.gal-x { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--pub-line); background: var(--pub-raised); color: var(--pub-text); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.gal-links { margin: 14px 0 0; font-size: 0.9rem; }

/* ---- Comparisons ---- */
.cmp-checked { font-size: 0.85rem; color: var(--pub-faint); margin: 12px 0 0; }
.cmp-wrap { overflow-x: auto; border: 1px solid var(--pub-line); border-radius: 16px; background: var(--pub-card); }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.cmp-table th, .cmp-table td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--pub-line); color: #cfcfe6; }
.cmp-table tr:last-child th, .cmp-table tr:last-child td { border-bottom: 0; }
.cmp-table thead th { color: var(--pub-text); font-family: 'Syne', sans-serif; font-size: 1rem; background: var(--pub-raised); }
.cmp-table tbody th { color: var(--pub-text); font-weight: 600; width: 16%; min-width: 120px; }
.cmp-table td:nth-child(2) { background: rgba(124, 58, 237, 0.06); }
.cmp-wide { min-width: 980px; }
.cmp-table:not(.cmp-wide) td { min-width: 200px; }
.cmp-src { font-size: 0.75rem; color: var(--pub-faint) !important; white-space: nowrap; }
.cmp-choose { display: grid; gap: 16px; }
@media (min-width: 800px) { .cmp-choose { grid-template-columns: 1fr 1fr; } }
.cmp-choose .pub-card { padding: 20px; }
.cmp-choose h2 { font-size: 1.2rem; margin-bottom: 8px; }
.cmp-sources { font-size: 0.85rem; word-break: break-all; }
