/* ============ 3D ASSET · 3d-asset.com — styles ============ */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=Space+Mono:wght@400;700&display=swap');

:root {
  --paper: #f2efe8;
  --ink: #14100c;
  --panel: #e7e2d8;
  --muted: #6f665b;
  --muted2: #453d34;
  --accent: oklch(0.6 0.2 32);
  --accent-lt: oklch(0.72 0.18 32);
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; max-width: 100%; background: var(--paper); overflow-x: clip; }
body { font-family: 'Bricolage Grotesque', sans-serif; color: var(--ink); min-height: 100vh; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: var(--paper); }
img { max-width: 100%; display: block; }

.hover-underline { cursor: pointer; }
.hover-underline:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-hover { transition: transform .18s ease, box-shadow .18s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: 0 22px 50px rgba(20,16,12,0.16); }
.btn { transition: background .15s ease, color .15s ease, border-color .15s ease; cursor: pointer; }

/* topbar nav active state (static, per-page) */
#site-nav a { border-bottom: 2px solid transparent; padding-bottom: 3px; }
#site-nav a.active { border-bottom-color: var(--accent); }
.cf-topbar { position: sticky; top: 0; z-index: 100; background: var(--paper); }
.brand-logo, .footer-logo { display: inline-flex; align-items: center; color: inherit; }
.brand-logo img, .footer-logo img { display: block; height: auto; }
.brand-logo img { width: clamp(152px, 16vw, 177px); }
.footer-logo img { width: min(194px, 100%); }

/* footer links (dark background) */
.foot a { color: #cfc7ba; }
.foot a.foot-link { display: block; }
.foot-link { cursor: pointer; transition: color .15s ease; }
.foot a.foot-link:hover, .foot-link:hover { color: var(--accent-lt) !important; }

/* social share menu */
.cf-share-item { transition: background .12s ease, color .12s ease; text-decoration: none; }
.cf-share-item:last-child { border-bottom: 0 !important; }
.cf-share-item:hover, .cf-share-item:focus-visible { background: var(--accent); color: var(--paper) !important; outline: none; }
.cf-share-item:hover span, .cf-share-item:focus-visible span { color: var(--paper) !important; }

/* layout grids */
.nav { display: flex; gap: 26px; flex-wrap: wrap; }
.grid3 { display: grid; grid-template-columns: repeat(3,1fr); }
.grid4 { display: grid; grid-template-columns: repeat(4,1fr); }
.grid6 { display: grid; grid-template-columns: repeat(6,1fr); }
.side { display: grid; grid-template-columns: 220px 1fr; }
.intro { display: grid; grid-template-columns: 1.5fr 1fr; gap: 44px; align-items: center; }
.packhero { display: grid; grid-template-columns: 1.5fr 1fr; }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.viewer { min-height: 520px; border-right: 2px solid var(--ink); }

/* Brown City screenshot gallery */
.pack-gallery { position: relative; overflow: hidden; background: #2d2823; isolation: isolate; }
.pack-gallery:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.pack-gallery-main { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pack-gallery::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(20,16,12,.42), transparent 22%, transparent 62%, rgba(20,16,12,.72)); }
.pack-gallery-label { position: absolute; z-index: 3; top: 18px; left: 20px; right: 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #f2efe8; font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: .1em; text-shadow: 0 1px 8px rgba(20,16,12,.8); }
.pack-gallery-label span:first-child { display: flex; align-items: center; gap: 8px; }
.pack-gallery-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(242,239,232,.22); }
.pack-gallery-arrow { position: absolute; z-index: 3; top: 50%; width: 46px; height: 46px; border: 1px solid rgba(242,239,232,.8); border-radius: 50%; background: rgba(20,16,12,.55); color: #f2efe8; font: 20px/1 'Space Mono', monospace; cursor: pointer; transform: translateY(-50%); transition: background .15s ease, transform .15s ease; }
.pack-gallery-arrow:hover, .pack-gallery-arrow:focus-visible { background: var(--accent); transform: translateY(-50%) scale(1.05); outline: none; }
.pack-gallery-prev { left: 18px; }
.pack-gallery-next { right: 18px; }
.pack-gallery-thumbs { position: absolute; z-index: 3; left: 16px; right: 16px; bottom: 16px; display: flex; gap: 7px; overflow-x: auto; padding: 3px; scrollbar-width: thin; scrollbar-color: #f2efe8 rgba(20,16,12,.45); }
.pack-gallery-thumb { flex: 0 0 68px; width: 68px; aspect-ratio: 16/9; padding: 0; overflow: hidden; border: 2px solid rgba(242,239,232,.45); background: #14100c; cursor: pointer; opacity: .78; transition: opacity .15s ease, border-color .15s ease, transform .15s ease; }
.pack-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pack-gallery-thumb:hover, .pack-gallery-thumb:focus-visible { opacity: 1; border-color: #f2efe8; outline: none; }
.pack-gallery-thumb.is-active { opacity: 1; border-color: var(--accent); transform: translateY(-2px); }

input { font-family: 'Space Mono', monospace; }
input::placeholder { color: #8a8175; }
canvas { touch-action: none; }

@media (max-width: 960px) {
  .grid3 { grid-template-columns: repeat(2,1fr); }
  .side { grid-template-columns: 1fr; }
  .intro { grid-template-columns: 1fr; gap: 26px; }
  .packhero { grid-template-columns: 1fr; }
  .viewer { border-right: none; border-bottom: 2px solid var(--ink); min-height: 380px; }
  .sidebar { border-right: none !important; border-bottom: 1px solid var(--ink); }
  .foot { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 620px) {
  .grid3 { grid-template-columns: 1fr; }
  .grid4 { grid-template-columns: repeat(2,1fr); }
  .grid6 { grid-template-columns: repeat(3,1fr); }
  .hide-sm { display: none !important; }
  .foot { grid-template-columns: 1fr; }
  .nav { gap: 16px; }
  .brand-logo img { width: 152px; }
  .home-hero { width: 100%; height: clamp(400px, 135vw, 520px); min-height: 0 !important; aspect-ratio: auto !important; }
  .home-hero > img { max-width: none; }
  .pack-gallery-thumb { flex-basis: 58px; width: 58px; }
  .pack-gallery-arrow { width: 42px; height: 42px; }
}
