/* Styles for the prerendered (static, no-JS) pages: motion, category, gallery, recipes, transitions, styles, docs, 404.
   Same design tokens as the React app (src/styles.css). */
:root {
  --bg: #07080b;
  --bg-1: #0b0d11;
  --bg-2: #101319;
  --bg-3: #161a22;
  --line: rgba(242, 238, 230, 0.08);
  --line-2: rgba(242, 238, 230, 0.14);
  --text: #f2eee6;
  --muted: rgba(242, 238, 230, 0.68);
  --faint: rgba(242, 238, 230, 0.46);
  --gold: #e9c27a;
  --gold-2: #f3d9a4;
  --gold-dim: rgba(233, 194, 122, 0.14);
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --r: 14px;
  --r-s: 10px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1180px;
  color-scheme: dark;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 76px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--gold-2);
  text-decoration-color: rgba(243, 217, 164, 0.35);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--text);
}
a:focus-visible,
summary:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}
code,
pre {
  font-family: var(--mono);
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--gold);
  color: #17120a;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus {
  left: 8px;
}
.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- header / footer */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 8, 11, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 60px;
  flex-wrap: wrap;
  padding-top: 6px;
  padding-bottom: 6px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.brand em {
  font-family: var(--serif);
  font-size: 1.18em;
  color: var(--gold);
}
.site-nav {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 7px 12px;
  border-radius: 999px;
}
.site-nav a:hover,
.site-nav a[aria-current] {
  color: var(--text);
  background: rgba(242, 238, 230, 0.07);
}
.star-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
}
.star-link:hover {
  border-color: rgba(233, 194, 122, 0.55);
  background: var(--gold-dim);
}
.star-link .n {
  color: var(--gold);
  padding-left: 8px;
  border-left: 1px solid var(--line-2);
  font-variant-numeric: tabular-nums;
}
.star-link .n:empty {
  display: none;
}
.site-foot {
  margin-top: 96px;
  border-top: 1px solid var(--line);
  background: var(--bg-1);
  padding: 44px 0 36px;
  color: var(--muted);
  font-size: 14px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}
.site-foot h2 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 10px;
}
.site-foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-foot li a {
  display: inline-block;
  padding: 3px 0;
  color: var(--muted);
  text-decoration: none;
}
.site-foot li a:hover {
  color: var(--text);
}
.legal {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--faint);
}

/* ---- type */
main {
  padding-top: 28px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 12px;
}
h1 {
  font-weight: 600;
  font-size: clamp(32px, 4.6vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin: 0 0 16px;
  max-width: 20em;
}
h2 {
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 14px;
}
h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}
.lead {
  font-size: clamp(17px, 1.5vw, 20px);
  color: rgba(242, 238, 230, 0.86);
  max-width: 760px;
  margin: 0 0 14px;
}
.muted {
  color: var(--muted);
}
.dim {
  color: var(--faint);
}
section.block {
  margin-top: 56px;
}
p code,
li code,
dd code,
td code {
  font-size: 0.86em;
  background: rgba(242, 238, 230, 0.07);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--text);
  word-break: break-word;
}

/* ---- breadcrumbs, buttons, chips */
.crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
  font-size: 13px;
  color: var(--faint);
}
.crumbs li + li::before {
  content: '/';
  margin-right: 6px;
  opacity: 0.6;
}
.crumbs a {
  color: var(--muted);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--text);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}
.btn-gold {
  background: var(--gold);
  color: #17120a;
  box-shadow: 0 10px 40px -14px rgba(233, 194, 122, 0.6);
}
.btn-gold:hover {
  background: var(--gold-2);
  color: #17120a;
}
.btn-ghost {
  border-color: var(--line-2);
  background: rgba(242, 238, 230, 0.03);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: rgba(242, 238, 230, 0.32);
  background: rgba(242, 238, 230, 0.07);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
.tags li,
.chip {
  font-size: 12.5px;
  padding: 3px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  text-decoration: none;
  background: rgba(242, 238, 230, 0.03);
}
a.chip:hover {
  color: var(--text);
  border-color: rgba(233, 194, 122, 0.5);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

/* ---- motion preview strip */
.strip {
  margin: 28px 0 0;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-2);
}
.strip img {
  width: 100%;
  height: auto;
}
.strip figcaption {
  padding: 8px 14px;
  font-size: 12.5px;
  color: var(--faint);
  border-top: 1px solid var(--line);
}
.strip.missing {
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

/* ---- facts */
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 28px;
  margin: 0;
  max-width: 820px;
}
.facts dt {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 3px;
}
.facts dd {
  margin: 0;
}

/* ---- code */
.snippet {
  margin: 0 0 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-s);
  background: var(--bg-1);
  overflow: hidden;
}
.snippet-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px 6px 14px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}
.snippet-bar button {
  font: inherit;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 2px 10px;
  cursor: pointer;
}
.snippet-bar button:hover {
  color: var(--text);
  border-color: rgba(233, 194, 122, 0.5);
}
.snippet pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
  tab-size: 2;
}

/* ---- tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-2);
  border-radius: var(--r-s);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
}
th {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--faint);
  background: var(--bg-1);
}
tr:last-child td {
  border-bottom: 0;
}
td:first-child {
  white-space: nowrap;
}

/* ---- card grids */
.grid {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-1);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover {
  border-color: rgba(233, 194, 122, 0.45);
  transform: translateY(-2px);
  color: var(--text);
}
.thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-2);
  position: relative;
}
/* the gallery jpg is a 3-frame strip: show the middle frame */
.thumb img {
  position: absolute;
  top: 0;
  left: -100%;
  width: 300%;
  max-width: none;
  height: 100%;
  object-fit: cover;
}
.thumb.single img {
  left: 0;
  width: 100%;
}
.thumb .ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}
.card-body {
  padding: 12px 14px 14px;
}
.card-body p {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-body code {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--faint);
}
.list-cards {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.swatches {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}
.swatches i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
}
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.note-box {
  margin-top: 40px;
  padding: 18px 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  background: var(--bg-1);
  max-width: 820px;
}
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--bg-1);
  padding: 0 18px;
  margin-bottom: 10px;
  max-width: 820px;
}
.faq summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 500;
}
.faq p {
  margin: 0 0 14px;
  color: var(--muted);
}
.prose {
  max-width: 760px;
  color: var(--muted);
}
.prose h2 {
  color: var(--text);
  margin-top: 36px;
}

@media (max-width: 760px) {
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
  .facts {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .facts dd {
    margin-bottom: 10px;
  }
  .site-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .site-nav a {
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
}
