/*
  Playable FX shared site stylesheet
  Updated: Home, Games gallery, Sandbox archive, and Collaboratory assignments.
  Responsive/mobile behavior is integrated here. Do not load legacy mobile.css.
*/

:root {
  --ink: #101114;
  --deep: #08090b;
  --paper: #f4f1ed;
  --muted: #a7a7a7;
  --orange: #f26722;
  --line: rgb(255 255 255 / 22%);
  --content: min(72rem, calc(100vw - 2.5rem));
  --display: "Archivo", Arial, sans-serif;
  --body: "Montserrat", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--deep); }
body { margin: 0; background: var(--deep); color: var(--paper); font-family: var(--body); font-size: 16px; line-height: 1.65; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

.skip-link { position: fixed; z-index: 99; top: .75rem; left: .75rem; padding: .7rem 1rem; background: var(--paper); color: var(--ink); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

/* Shared header and navigation */
.site-header { position: fixed; z-index: 30; top: 0; left: 0; display: flex; align-items: center; gap: 1.5rem; width: 100%; min-height: 5.35rem; padding: .75rem clamp(1rem, 3vw, 2.75rem); border-bottom: 1px solid rgb(255 255 255 / 12%); background: rgb(8 9 11 / 85%); backdrop-filter: blur(12px); }
.brand { display: block; width: clamp(15.5rem, 22vw, 20rem); }
.brand img { width: 100%; }
.primary-nav { display: flex; align-items: center; justify-content: flex-end; gap: clamp(.85rem, 1.9vw, 2.2rem); margin-left: auto; }
.primary-nav a { position: relative; padding: .55rem 0; color: rgb(255 255 255 / 84%); font-family: var(--display); font-size: clamp(.78rem, 1.15vw, 1rem); font-weight: 500; line-height: 1; text-decoration: none; }
.primary-nav a::after { position: absolute; right: 0; bottom: .1rem; left: 0; height: 1px; background: var(--orange); content: ""; opacity: 0; transform: scaleX(.4); transform-origin: left center; transition: opacity .18s ease, transform .18s ease; }
.primary-nav a:hover, .primary-nav a:focus-visible, .primary-nav a.is-current { color: var(--orange); }
.primary-nav a:hover::after, .primary-nav a:focus-visible::after, .primary-nav a.is-current::after { opacity: 1; transform: scaleX(1); }

.nav-toggle { display: none; min-width: 44px; min-height: 44px; margin-left: auto; padding: .5rem; border: 0; background: transparent; color: var(--paper); cursor: pointer; }
.nav-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-toggle__icon, .nav-toggle__icon::before, .nav-toggle__icon::after { display: block; width: 1.7rem; height: 1px; background: var(--paper); content: ""; transition: transform .18s ease, background-color .18s ease; }
.nav-toggle__icon { position: relative; }
.nav-toggle__icon::before { position: absolute; top: -.48rem; }
.nav-toggle__icon::after { position: absolute; top: .48rem; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { transform: translateY(.48rem) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { transform: translateY(-.48rem) rotate(-45deg); }

/* Shared image-led page sections */
.panel { position: relative; display: grid; min-height: max(36rem, 80vh); isolation: isolate; overflow: clip; background-color: var(--ink); background-position: center; background-repeat: no-repeat; background-size: cover; }
.panel__veil { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgb(5 6 8 / 90%) 0%, rgb(5 6 8 / 62%) 48%, rgb(5 6 8 / 24%) 100%); }
.panel__content { align-self: center; width: var(--content); margin: 0 auto; padding: 7.75rem 0 4.5rem; }
.eyebrow { margin: 0 0 1rem; color: var(--orange); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

h1, h2, h3 { margin: 0; color: #fff; font-family: var(--display); line-height: .96; text-wrap: balance; }
h1 { max-width: 12ch; font-size: clamp(3.3rem, 8vw, 7.4rem); font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
h2 { max-width: 15ch; font-size: clamp(2.3rem, 5.6vw, 4.8rem); font-weight: 700; }
.lede { max-width: 48rem; margin: 1.7rem 0 0; color: rgb(255 255 255 / 92%); font-family: var(--display); font-size: clamp(1.05rem, 1.85vw, 1.35rem); line-height: 1.52; }
.body-copy { max-width: 50rem; margin: 1.5rem 0 0; color: rgb(255 255 255 / 90%); }
.copy-grid { display: grid; gap: 1.4rem 3rem; max-width: 66rem; margin-top: 2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.copy-grid p { max-width: 42rem; margin: 0; color: rgb(255 255 255 / 90%); }

/* Shared orange-outline calls to action */
.button,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin-top: 2rem;
  padding: .9rem 1.1rem;
  border: 1px solid var(--orange);
  background: rgb(9 10 13 / 25%);
  color: #fff;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.button:hover,
.button:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  background: var(--orange);
  color: #151515;
  transform: translateY(-2px);
}

/* Shared cards, downloads, and feature lists */
.card-grid { display: grid; gap: 1.25rem; max-width: 72rem; margin-top: 2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.asset-card { display: grid; gap: 1.25rem; min-height: 17rem; padding: 1.25rem; border: 1px solid var(--line); background: rgb(8 9 11 / 58%); grid-template-columns: minmax(9rem, 16rem) minmax(0, 1fr); }
.asset-card__thumb { align-self: start; width: 100%; border: 1px solid rgb(255 255 255 / 20%); }
.asset-card h3 { margin-top: .5rem; font-size: clamp(1.35rem, 2.5vw, 2rem); }
.asset-card p { margin: .8rem 0 0; color: rgb(255 255 255 / 82%); font-size: .92rem; }
.tag { color: var(--orange); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.asset-links { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 1rem; }
.asset-links a { color: var(--orange); font-size: .74rem; font-weight: 700; text-decoration: none; text-transform: uppercase; }
.asset-links a:hover, .asset-links a:focus-visible { color: #fff; }

.feature-list { display: grid; gap: 0; max-width: 62rem; margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.feature-list li { display: grid; gap: .6rem 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--line); grid-template-columns: minmax(12rem, .8fr) minmax(0, 2fr); }
.feature-list strong { color: #fff; font-family: var(--display); font-size: 1.15rem; }
.feature-list span { color: rgb(255 255 255 / 82%); }
.notice { max-width: 64rem; margin: 2rem 0 0; padding: 1rem 1.15rem; border-left: 2px solid var(--orange); background: rgb(8 9 11 / 45%); color: rgb(255 255 255 / 82%); font-size: .9rem; }

/* Footer */
.site-footer { padding: 2.5rem max(1.25rem, calc((100vw - 72rem) / 2)); background: #08090b; color: #9a9a9a; font-size: .72rem; line-height: 1.55; }
.site-footer p { max-width: 88ch; margin: 0; }
.site-footer p + p { margin-top: .8rem; }

/* Home */
.page-home .panel--hero { min-height: 100svh; background-image: url("../images/smallwheels_bg1.jpg"); }
.page-home .panel--projects { background-image: url("../images/blender-rig_bg1.jpg"); }
.page-home .panel--tools { background-image: url("../images/screenshots/screenshot_rocket1.jpg"); }

/* Fun + Games */
.page-games .panel--hero { min-height: 100svh; background-image: url("../images/screenshots/screenshot_kart.jpg"); }
.page-games .panel--story { background-image: url("../images/smallwheels_bg1.jpg"); }
.page-games .panel--features { background-image: url("../images/screenshots/screenshot_smallwheels-alpha_21.jpg"); }

/* Full-width image-backed section behind the restored Small Wheels screenshot cards. */
.page-games .game-gallery {
  position: relative;
  isolation: isolate;
  width: 100%;
  padding: clamp(3.5rem, 7vw, 6.5rem) 0;
  background-color: var(--deep);
  background-image:
    linear-gradient(90deg, rgb(8 9 11 / 94%) 0%, rgb(8 9 11 / 82%) 52%, rgb(8 9 11 / 68%) 100%),
    url("../images/screenshots/screenshot_smallwheels-alpha_20.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Visual + FX */
.page-vfx .panel--hero { min-height: 100svh; background-image: url("../images/blender-rig_bg1.jpg"); }
.page-vfx .panel--services { background-image: url("../images/glassshot-vfx_bg1.jpg"); }
.page-vfx .panel--assets { background-image: url("../images/screenshots/screenshot_cgexplosion1.jpg"); }

/* Sandbox */
.page-sandbox .panel--hero { min-height: 76svh; background-image: url("../images/screenshots/screenshot_rocket1.jpg"); }
.page-sandbox .sandbox-archive { position: relative; isolation: isolate; width: 100%; padding: clamp(3.5rem, 7vw, 6.5rem) 0; overflow: hidden; background-color: var(--deep); background-image: linear-gradient(90deg, rgb(8 9 11 / 95%) 0%, rgb(8 9 11 / 86%) 52%, rgb(8 9 11 / 72%) 100%), url("../images/screenshots/screenshot_toyblocks_1.jpg"); background-position: center; background-repeat: no-repeat; background-size: cover; }
.page-sandbox .sandbox-archive__content { width: var(--content); margin: 0 auto; }

/* Collaboratory */
.page-collaboratory .panel--hero { min-height: 100svh; background-image: url("../images/toyblockcharacter_bg1.jpg"); }
.page-collaboratory .panel--statement { min-height: 42rem; background-image: url("../images/dino-park_bg1.jpg"); }
.page-collaboratory .panel--active { background-image: url("../images/colonial-maneuvers_bg1.jpg"); }
.page-collaboratory .panel--participate { min-height: 38rem; background-image: url("../images/davinci-dp_bg1.jpg"); }
.project-deck { max-width: 44rem; margin: 1.2rem 0 1rem; color: #fff; font-family: var(--display); font-size: clamp(1.2rem, 2.4vw, 1.8rem); line-height: 1.32; }
.project-meta { display: flex; flex-wrap: wrap; gap: .65rem 1.25rem; max-width: 52rem; margin-top: 2rem; color: rgb(255 255 255 / 72%); font-size: .67rem; font-weight: 700; letter-spacing: .1em; }
.project-meta span { padding-bottom: .25rem; border-bottom: 1px solid var(--line); }

@media (min-width: 48rem) and (hover: hover) {
  .panel { background-attachment: fixed; }
  .page-games .game-gallery { background-attachment: fixed; }
  .page-sandbox .sandbox-archive { background-attachment: fixed; }
}

@media (max-width: 56rem) {
  .site-header { min-height: 4.75rem; }
  .brand { width: min(15rem, 66vw); }
  .nav-toggle { display: grid; place-items: center; }
  .primary-nav { position: fixed; top: 4.75rem; right: 0; left: 0; display: grid; gap: 0; padding: .75rem 1.25rem 1.25rem; border-bottom: 1px solid rgb(255 255 255 / 12%); background: rgb(8 9 11 / 97%); opacity: 0; pointer-events: none; transform: translateY(-.8rem); transition: opacity .18s ease, transform .18s ease; }
  .primary-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .primary-nav a { padding: .9rem 0; border-bottom: 1px solid rgb(255 255 255 / 12%); font-size: 1rem; }
  .primary-nav a:last-child { border-bottom: 0; }
  .primary-nav a::after { display: none; }
  .panel { min-height: 37rem; background-attachment: scroll; }
  .panel__veil { background: linear-gradient(180deg, rgb(5 6 8 / 57%), rgb(5 6 8 / 91%) 74%); }
  .panel__content { padding-top: 6.9rem; padding-bottom: 3.35rem; }
  .copy-grid, .card-grid { grid-template-columns: 1fr; }
  .asset-card { grid-template-columns: 1fr; }
  .asset-card__thumb { max-width: 20rem; }
  .feature-list li { grid-template-columns: 1fr; }
  .project-meta { gap: .65rem .9rem; }
  h1 { font-size: clamp(3rem, 14vw, 5.2rem); }
  h2 { max-width: 11ch; }
  .page-games .game-gallery { background-attachment: scroll; }
  .page-sandbox .sandbox-archive { background-attachment: scroll; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
