/* Mod showcase - clean layout (WEBSITE_STYLE_GUIDE.md): neutral slate, one amber accent, 8 px spacing scale,
   body text capped at ~65ch, one display face for headings only. */
:root {
  --bg: #12171d;
  --bg-2: #171e26;
  --surface: #1c242d;
  --line: #2a3440;
  --line-2: #3a4754;
  --text: #e6eaee;
  --text-2: #b9c2cc;
  --muted: #8c97a3;
  --accent: #e2a945;
  --dev: #8fb3d9;
  --display: "Oswald", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 4px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: 0.3px; line-height: 1.15; margin: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #12171d; padding: 8px 16px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: min(1200px, 100% - 48px); margin: 0 auto; }

/* header */
.top { position: sticky; top: 0; z-index: 50; background: rgba(18, 23, 29, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: 4px; }
.top nav { display: flex; gap: 32px; font-size: 15px; font-weight: 500; }
.top nav a { color: var(--text-2); }
.top nav a:hover, .top nav a[aria-current] { color: var(--text); }

/* hero */
.hero { position: relative; min-height: min(78vh, 760px); display: flex; align-items: flex-end; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(18, 23, 29, 0.96) 0%, rgba(18, 23, 29, 0.55) 45%, rgba(18, 23, 29, 0.15) 100%); }
.hero-in { position: relative; padding: 96px 0 72px; }
.hero h1 { font-size: clamp(44px, 6.5vw, 84px); max-width: 14ch; }
.hero p { margin: 16px 0 32px; max-width: 56ch; font-size: 19px; color: var(--text-2); }
.btn { display: inline-block; background: var(--accent); color: #12171d; font-weight: 600; font-size: 15px; padding: 14px 28px; border-radius: var(--radius); }
.btn:hover { color: #12171d; background: #ecb95c; }

/* mod index */
.index { padding: 96px 0; }
.index-head { margin-bottom: 40px; }
.index-head h2, .page h1 { font-size: clamp(36px, 4vw, 52px); }
.index-head p, .page .lead { margin: 12px 0 0; color: var(--text-2); max-width: 65ch; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card, .work { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color 150ms ease-out; }
.card:hover { border-color: var(--line-2); color: var(--text); }
.card:hover h3 { color: var(--accent); }
.card-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 8px; }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.card h3, .work h3 { font-size: 24px; transition: color 150ms ease-out; }
.card p, .work p { margin: 0; color: var(--text-2); font-size: 15px; }
.work .meta { color: var(--muted); font-size: 13px; }
.num { font-family: var(--display); font-size: 14px; letter-spacing: 2px; color: var(--muted); }
.tag { font-size: 12px; font-weight: 600; letter-spacing: 0.4px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; }
.tag.dev { color: var(--dev); border-color: rgba(143, 179, 217, 0.4); }
.tag.rel { color: var(--accent); border-color: rgba(226, 169, 69, 0.4); }

/* mod page */
.mod { padding: 40px 0 96px; }
.back { display: inline-block; font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.mod-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 16px; }
.mod-head h1 { font-size: clamp(40px, 5vw, 64px); }
.lead { margin: 16px 0 32px; font-size: 19px; color: var(--text-2); max-width: 65ch; }
.gal { margin-bottom: 48px; }
.stage { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #0d1116; aspect-ratio: 16 / 9; }
.stage-btn { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.stage-media { width: 100%; height: 100%; object-fit: cover; transition: opacity 180ms ease-out; }
.stage-media.fade { opacity: 0; }
.gal-bar { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; font-size: 14px; color: var(--text-2); }
.gal-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.thumb { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: var(--bg-2); aspect-ratio: 16 / 9; overflow: hidden; cursor: pointer; opacity: 0.65; transition: opacity 120ms ease-out, border-color 120ms ease-out; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 1; }
.thumb.on { opacity: 1; border-color: var(--accent); }
.play { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: rgba(18, 23, 29, 0.8); }
.play::after { content: ""; position: absolute; left: 11px; top: 8px; border-left: 9px solid var(--text); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; margin: 0 0 64px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fact { background: var(--surface); padding: 16px 20px; }
.fact dt { font-size: 12px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.fact dd { margin: 4px 0 0; font-size: 15px; overflow-wrap: anywhere; }
.feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 56px; margin-bottom: 64px; }
.feat h2, .block h2 { font-size: 24px; margin-bottom: 12px; }
.feat p { margin: 0 0 12px; color: var(--text-2); max-width: 65ch; }
.feat ul, .plain { margin: 0; padding: 0; list-style: none; max-width: 65ch; }
.feat li, .plain li { position: relative; padding: 0 0 10px 18px; color: var(--text-2); font-size: 15px; }
.feat li::before, .plain li::before { content: ""; position: absolute; left: 0; top: 10px; width: 6px; height: 1px; background: var(--accent); }
.block { margin-bottom: 56px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface); color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: 0.6px; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
td:nth-child(3) { color: var(--text-2); }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; color: var(--text); }
.note { margin-top: 32px; padding: 16px 20px; border-left: 2px solid var(--dev); background: var(--bg-2); color: var(--text-2); font-size: 15px; max-width: 80ch; }
.page { padding: 64px 0 96px; }
.page .gal { margin-top: 8px; }
.empty { display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(135deg, var(--bg-2) 0 12px, #19212a 12px 24px); }
.empty span { color: var(--muted); font-size: 14px; letter-spacing: 0.4px; }
.small { margin: 12px 0 0; color: var(--muted); font-size: 13px; max-width: 90ch; }
.empty-line { color: var(--muted); margin: 32px 0 0; }
td strong { font-weight: 600; color: var(--text); }
.page .grid { margin-top: 40px; }

/* storage showroom (category picker inside the storage page) */
.sr-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sr-cat { background: transparent; border: 1px solid var(--line-2); color: var(--text-2); font: 500 14px var(--body); padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.sr-cat:hover { color: var(--text); }
.sr-cat[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #12171d; }
.sr-list { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 20px; }
.sr-item { background: none; border: 0; padding: 4px 0; color: var(--muted); font: 600 17px var(--display); letter-spacing: 0.3px; cursor: pointer; border-bottom: 2px solid transparent; }
.sr-item:hover { color: var(--text); }
.sr-item.on { color: var(--text); border-bottom-color: var(--accent); }
.sr-text h3 { font-size: 28px; margin-top: 8px; }
.sr-text p { margin: 4px 0 16px; color: var(--text-2); }

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(10, 13, 17, 0.96); display: flex; align-items: center; justify-content: center; padding: 56px 88px; }
.lb[hidden] { display: none; }
.lb figure { margin: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; max-height: 100%; }
.lb img, .lb video { max-height: calc(100vh - 150px); width: auto; border-radius: 3px; }
.lb figcaption { color: var(--text-2); font-size: 14px; }
.lb-close { position: absolute; top: 16px; right: 16px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); padding: 8px 16px; border-radius: var(--radius); font: 500 14px var(--body); cursor: pointer; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); font-size: 28px; line-height: 1; border-radius: var(--radius); cursor: pointer; }
.lb-nav.prev { left: 20px; }
.lb-nav.next { right: 20px; }

.foot { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: 13px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feats { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .top nav { gap: 18px; font-size: 14px; }
  .hero-in { padding: 72px 0 48px; }
  .lb { padding: 56px 8px; }
  .lb-nav { top: auto; bottom: 12px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
