/* ==========================================================================
   TsuPasai / zuPasha site stylesheet
   Palette:
   Vanta Purple, Obsidian Black, Charcoal Grey, Ashen Silver,
   with Verdant Green and Auric Ember as sparing accents.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Work+Sans:wght@300;400;500;600&display=swap');

:root {
  /* colour */
  --bg: #0b0a10;
  --bg-raised: #15131c;
  --bg-raised-2: #1c1925;
  --line: #2a2632;
  --ink: #cfc9d9;
  --ink-dim: #8c879a;
  --ink-bright: #f3f0fa;
  --vanta: #8a67c2;
  --vanta-dim: #4f3c70;
  --verdant: #5d9173;
  --ember: #c1703f;
  --crimson: #93434a;

  /* type */
  --display: 'Cormorant Garamond', serif;
  --body: 'Work Sans', system-ui, sans-serif;

  /* layout */
  --max: 1120px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: var(--ink-bright);
  text-decoration: none;
}

::selection { background: var(--vanta-dim); color: var(--ink-bright); }

:focus-visible {
  outline: 2px solid var(--vanta);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink-bright);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; color: var(--ink); }

.eyebrow {
  font-family: var(--body);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--vanta);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 0.9em;
}

.eyebrow::before {
  content: '';
  width: 9px;
  height: 9px;
  background: var(--vanta);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ----------------------------- header / nav ----------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 10, 16, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--display);
  font-size: 1.3rem;
  color: var(--ink-bright);
  letter-spacing: 0.01em;
}

.brand-text span {
  display: block;
  font-family: var(--body);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 1px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 42px;
  height: 38px;
  position: relative;
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1px;
  background: var(--ink-bright);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span { top: 50%; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }

.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

.main-nav ul {
  display: flex;
  gap: 2.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--ink-bright);
  border-color: var(--vanta);
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-raised);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.is-open { max-height: 420px; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--gap) 1.2rem;
  }
  .main-nav a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
  }
}

/* ========== BOOKS PAGE – HERO BACKGROUND ========== */
.page-books .hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../images/portfolio/illustration/bahamut_vs_lunarkos_wip.webp');
  background-size: 40%;
  background-position: right;
  background-repeat: no-repeat;
  opacity: 0.75;
  z-index: 0;
}

/* ensure hero text and existing gradient remain above */
.page-books .hero .wrap {
  position: relative;
  z-index: 1;
}

/* --------------------------------- hero --------------------------------- */

.hero {
  position: relative;
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 5rem);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::after {
  content: '';
  position: absolute;
  inset: -20% -10% auto auto;
  width: 60vw;
  height: 60vw;
  max-width: 720px;
  max-height: 720px;
  background: radial-gradient(circle, var(--vanta-dim) 0%, transparent 70%);
  opacity: 0.35;
  pointer-events: none;
}

.hero .wrap { position: relative; z-index: 1; }

.hero-tagline {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-dim);
  font-size: 1.05rem;
  max-width: 38ch;
  margin-top: 1.1rem;
}

.hero-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  margin: 1.6rem 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.hero-roles span:not(:last-child)::after {
  content: '/';
  margin-left: 1.1rem;
  color: var(--line);
}

/* -------------------------------- sections ------------------------------- */

section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
section + section { border-top: 1px solid var(--line); }

/* ----------------------------- commission status -------------------------- */

#commission-status { border-top: none; padding: 0; }
#commission-status + .hero { border-top: none; }

.status-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.4rem;
  margin: 1.6rem 0 0;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
}

.status-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-banner.is-open .status-dot {
  background: var(--verdant);
  box-shadow: 0 0 0 4px rgba(93, 145, 115, 0.22);
}

.status-banner.is-closed .status-dot {
  background: var(--crimson);
  box-shadow: 0 0 0 4px rgba(147, 67, 74, 0.22);
}

.status-message { margin: 0; color: var(--ink); font-size: 0.92rem; }
.status-message strong { color: var(--ink-bright); }

.status-banner .when-open,
.status-banner .when-closed { display: none; }

.status-banner.is-open .when-open,
.status-banner.is-closed .when-closed { display: inline; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.2rem;
}

.section-head .lead { max-width: 60ch; color: var(--ink-dim); }

.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.6rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover { border-color: var(--vanta-dim); transform: translateY(-2px); }

.card h3 { margin-bottom: 0.2rem; }
.card .meta {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--vanta);
  margin-bottom: 0.7rem;
  display: block;
}

.card-subtitle {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-dim);
  font-size: 0.95rem;
  margin: 0 0 0.8rem;
  display: block;
}

.card-figure {
  aspect-ratio: 4 / 3;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
}

.placeholder-art {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
}

.screenshot-art {
  width: 100%;
  height: 100%;
  display: block;
}

/* ========== SCREENSHOT GALLERY (game.html) & FEATURED (portfolio) ========== */
.gallery-scroll-wrapper {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 0 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--vanta-dim) var(--bg-raised);
}

.gallery-scroll-wrapper::-webkit-scrollbar {
  height: 6px;
}
.gallery-scroll-wrapper::-webkit-scrollbar-track {
  background: var(--bg-raised);
  border-radius: 3px;
}
.gallery-scroll-wrapper::-webkit-scrollbar-thumb {
  background: var(--vanta-dim);
  border-radius: 3px;
}

.gallery-item {
  flex: 0 0 auto;
  width: 260px;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-raised);
  display: flex;
  flex-direction: column;
}

.gallery-item:hover {
  border-color: var(--vanta);
  transform: scale(1.02);
}

.gallery-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.gallery-item-caption {
  font-size: 0.78rem;
  color: var(--ink-dim);
  padding: 0.6rem 0.8rem;
  margin: 0;
  border-top: 1px solid var(--line);
  background: var(--bg-raised-2);
}

/* featured gallery – top crop for character images */
.gallery-item img.thumb-top {
  object-position: top;
}


/* ========== PORTFOLIO FOLDERS ========== */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.folder-card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.folder-card:hover {
  border-color: var(--vanta);
  transform: translateY(-3px);
}

.folder-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.folder-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.folder-card h3 {
  font-size: 1.1rem;
  margin: 0.2rem 0 0;
}

.folder-count {
  font-size: 0.75rem;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
}

.folder-content {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.folder-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.2rem;
}

.folder-image-item {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.folder-image-item:hover {
  border-color: var(--vanta);
  transform: scale(1.02);
}

.folder-image-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.folder-image-caption {
  font-size: 0.78rem;
  color: var(--ink-dim);
  padding: 0.5rem 0.7rem;
  margin: 0;
  border-top: 1px solid var(--line);
  background: var(--bg-raised-2);
}

/* thumbnails for character categories – show the top (head) */
.folder-image-item img.thumb-top {
  object-position: top;
}

/* ========== LIGHTBOX ========== */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  width: 90vw;
  height: 85vh;
  max-width: 90vw;
  max-height: 85vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  cursor: grab;
}
.lightbox-img-wrap:active {
  cursor: grabbing;
}

/* Image – top-left origin, sized by intrinsic dimensions */
.lightbox-img-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  user-select: none;
  -webkit-user-drag: none;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
}
.lightbox-img-wrap img.pixelated {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.lightbox-caption {
  color: var(--ink-bright);
  font-family: var(--body);
  font-size: 0.95rem;
  margin-top: 0.8rem;
  text-align: center;
  opacity: 0.8;
  max-width: 80%;
}
.lightbox-counter {
  position: absolute;
  bottom: 1.2rem;
  right: 1.5rem;
  color: var(--ink-dim);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}
.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--ink-bright);
  font-size: 2.4rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s ease;
  z-index: 10;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-bright);
  font-size: 1.8rem;
  cursor: pointer;
  transition: background 0.15s ease;
  z-index: 10;
}
.lightbox-nav:hover { background: var(--vanta-dim); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-reset {
  position: absolute;
  bottom: 5rem;
  right: 1.5rem;
  background: rgba(0,0,0,0.6);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: var(--ink-bright);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  z-index: 10;
}
.lightbox-reset:hover { background: var(--vanta-dim); }

@media (max-width: 600px) {
  .lightbox-nav { width: 36px; height: 36px; font-size: 1.2rem; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
  .lightbox-close { top: 0.8rem; right: 1rem; font-size: 2rem; }
  .lightbox-reset { width: 32px; height: 32px; font-size: 1rem; bottom: 4rem; right: 1rem; }
}

/* ========== LOAD MORE BUTTON ========== */
.load-more-btn {
  display: block;
  width: 100%;
  padding: 0.8rem 1.5rem;
  margin-top: 1.2rem;
  background: var(--bg-raised-2);
  border: 1px solid var(--vanta-dim);
  border-radius: 4px;
  color: var(--ink-bright);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: center;
}
.load-more-btn:hover {
  background: var(--vanta-dim);
}

/* ========== SCROLL BUTTONS (floating) – repositioned ========== */
.scroll-btn {
  position: fixed;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-raised-2);
  border: 1px solid var(--line);
  color: var(--ink-bright);
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 500;
  transition: opacity 0.2s ease, transform 0.15s ease;
  user-select: none;
  opacity: 0.6;
}
.scroll-btn:hover {
  opacity: 1;
  transform: scale(1.05);
  background: var(--vanta-dim);
}

/* Top button – high up on the right */
#scroll-top {
  top: 7rem;
  bottom: auto;
  right: 1.5rem;
}

/* Bottom button – down on the left (avoids FAB) */
#scroll-bottom {
  right: 1.5rem;
  bottom: 1.5rem;
}

/* FAB stays at bottom‑right, no overlap */
.category-fab {
  bottom: 6rem;
  right: 1.5rem;
}

@media (max-width: 600px) {
  .scroll-btn {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
  #scroll-top {
    top: 5.5rem;
    right: 0.8rem;
  }
  #scroll-bottom {
    bottom: 1rem;
    right: 0.8rem;
    
  }
  .category-fab {
    bottom: 5rem;
    right: 0.8rem;
  }
  .fab-toggle {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
}

/* ========== VIDEO ITEMS IN FOLDERS ========== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.video-item {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.video-item:hover {
  border-color: var(--vanta);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-caption {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-bright);
  padding: 0.6rem 0.8rem 0.2rem;
  margin: 0;
}

.video-description {
  font-size: 0.8rem;
  color: var(--ink-dim);
  padding: 0 0.8rem 0.6rem;
  margin: 0;
}

/* --------------------------------- button -------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.78em 1.5em;
  border: 1px solid var(--vanta);
  border-radius: 3px;
  color: var(--ink-bright);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.btn:hover { background: var(--vanta); }

.btn-solid {
  background: var(--vanta);
}
.btn-solid:hover { background: #9a78d1; }

.btn-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.6rem; }

/* -------------------------------- divider -------------------------------- */

.v-divider {
  width: 14px;
  height: 14px;
  margin: 0 auto;
  background: var(--vanta-dim);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

/* -------------------------------- doctrine -------------------------------- */

.doctrine-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.4rem;
}

.doctrine-list li {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 1rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}

.doctrine-list li:last-child { border-bottom: none; padding-bottom: 0; }

.doctrine-list .num {
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--vanta);
}

.doctrine-list h3 { margin-bottom: 0.3rem; font-size: 1.1rem; }
.doctrine-list p { color: var(--ink-dim); margin: 0; font-size: 0.95rem; }

/* --------------------------------- footer -------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.4rem 0;
  color: var(--ink-dim);
  font-size: 0.85rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer a { color: var(--ink-dim); }
.site-footer a:hover { color: var(--ink-bright); }

.footer-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* ----------------------------- footer updates ---------------------------- */

.wrap.footer-updates {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.4rem;
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.footer-updates-text h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--ink-bright);
  margin: 0 0 0.6rem;
}

.footer-updates-text > p { margin: 0 0 0.9rem; color: var(--ink-dim); font-size: 0.9rem; }

.footer-updates-list {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-updates-list li {
  font-size: 0.85rem;
  color: var(--ink-dim);
}

.footer-updates-list strong { color: var(--ink-bright); font-weight: 500; }

.footer-updates-note {
  font-size: 0.8rem;
  color: var(--ink-dim);
  font-style: italic;
  margin: 0;
  max-width: 52ch;
}

.footer-subscribe {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.4rem;
}

.footer-subscribe-label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--vanta);
  margin: 0 0 0.9rem;
}

.footer-subscribe .form-field { margin-bottom: 0.9rem; }
.footer-subscribe .btn { width: 100%; justify-content: center; }
.footer-subscribe .form-note { text-align: center; margin: 0.7rem 0 0; font-size: 0.78rem; }

.wrap.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 760px) {
  .wrap.footer-updates { grid-template-columns: 1fr; }

  .wrap.footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

/* --------------------------------- forms --------------------------------- */

.form-field { margin-bottom: 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }

.form-field label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.form-field input,
.form-field select,
.form-field textarea {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink-bright);
  font-family: var(--body);
  font-size: 0.95rem;
  padding: 0.7em 0.9em;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--vanta);
}

.form-note {
  font-size: 0.82rem;
  color: var(--ink-dim);
  margin-top: 0.8rem;
}

/* ----------------------------- pricing table ----------------------------- */

.price-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.price-card {
  border: 1px solid var(--line);
  background: var(--bg-raised);
  padding: 1.8rem;
  border-radius: 4px;
}

.price-card .amount {
  font-family: var(--display);
  font-size: 2rem;
  color: var(--ink-bright);
  margin: 0.3rem 0 0.6rem;
}

.price-card .amount span { font-size: 0.95rem; color: var(--ink-dim); }

/* ------------------------------ process steps ----------------------------- */

.process-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.process-step {
  flex: 1 1 140px;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 1rem;
  text-align: center;
  background: var(--bg-raised);
}

.process-step .num {
  display: block;
  font-family: var(--display);
  color: var(--vanta);
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

/* -------------------------------- utility -------------------------------- */

.text-dim { color: var(--ink-dim); }
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.tag-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3em 0.85em;
}

.filter-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5em 1.1em;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.filter-btn:hover { color: var(--ink-bright); }
.filter-btn.is-active {
  color: var(--ink-bright);
  border-color: var(--vanta);
  background: var(--vanta-dim);
}

/* ========== BOOK SHOWCASE (books.html) ========== */

.book-showcase {
  display: flex;
  flex-direction: column;
}

.book-row {
  display: flex;
  align-items: center;
  gap: var(--gap);
  padding: clamp(2rem, 5vw, 3rem) 0;
}

.book-row + .book-row { border-top: 1px solid var(--line); }

.book-row--reverse { flex-direction: row-reverse; }

.book-row-figure {
  flex: 0 0 clamp(200px, 30%, 320px);
}

.book-cover {
  aspect-ratio: 3 / 4;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.book-row-body {
  flex: 1 1 auto;
  min-width: 0;
}

.book-row-body .meta-line {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-dim);
  margin: -0.4rem 0 1rem;
}

@media (max-width: 760px) {
  .book-row,
  .book-row--reverse {
    flex-direction: column;
    align-items: stretch;
  }
  .book-row-figure {
    flex: 0 0 auto;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
}

/* ========== RESPONSIVE TWEAKS ========== */

/* Home page featured grid */
.featured-grid {
  display: flex;
  align-items: center;
  gap: var(--gap);
}
.featured-text {
  flex: 1.1;
}
.featured-image {
  flex: 1;
}
.featured-image img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* Game page overview grid */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

/* Game page character scroll – mobile only */
.character-scroll {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}

/* Contact page grid – stack on mobile */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Portfolio folder grid – becomes horizontal scroll on mobile */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.2rem;
}

/* ===== Floating category FAB (portfolio) ===== */
.category-fab {
  position: fixed;
  bottom: 6rem;
  right: 1.5rem;
  z-index: 600;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.fab-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--vanta);
  border: none;
  color: var(--ink-bright);
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab-toggle:hover {
  transform: scale(1.05);
}
.fab-toggle .fab-icon {
  line-height: 1;
}

.fab-menu {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  max-height: 70vh;
  overflow-y: auto;
}
.fab-menu.is-open {
  display: flex;
}

.fab-menu button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-raised-2);
  border: 1px solid var(--line);
  color: var(--ink-bright);
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab-menu button:hover,
.fab-menu button:active {
  background: var(--vanta-dim);
}

/* ===== Mobile overrides ===== */
@media (max-width: 760px) {
  /* Home: stack featured */
  .featured-grid {
    flex-direction: column;
  }
  .featured-image {
    order: -1;
  }

  /* Game: overview stack */
  .overview-grid {
    grid-template-columns: 1fr;
  }

  /* Game: characters scroll horizontally */
  .character-scroll {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
  }
  .character-scroll .card {
    flex: 0 0 80%;
    scroll-snap-align: start;
    min-width: 240px;
  }
  .character-scroll .card:last-child {
    margin-right: 0.5rem;
  }

  /* Contact: cards stack */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Portfolio: folder buttons as horizontal scroll */
  .folder-grid {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .folder-grid .folder-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 0.6rem 1.2rem;
    min-width: 120px;
    border-radius: 999px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    text-align: center;
    transition: background 0.15s ease;
    cursor: pointer;
  }
  .folder-grid .folder-card:hover {
    background: var(--vanta-dim);
  }
  .folder-grid .folder-card .folder-card-inner {
    flex-direction: row;
    gap: 0.4rem;
  }
  .folder-grid .folder-card .folder-icon {
    font-size: 1.2rem;
  }
  .folder-grid .folder-card h3 {
    font-size: 0.85rem;
    margin: 0;
  }
  .folder-grid .folder-card .folder-count {
    display: none; /* hide count on mobile to save space */
  }

  /* FAB position adjust */
  .category-fab {
    bottom: 5rem;
    right: 0.8rem;
  }
  .fab-toggle {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
  .fab-menu button {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .character-scroll .card {
    flex: 0 0 90%;
  }
  .folder-grid .folder-card {
    min-width: 100px;
    padding: 0.4rem 1rem;
  }
  .folder-grid .folder-card h3 {
    font-size: 0.75rem;
  }
}

/* ========== PORTFOLIO – 2‑column grid on mobile ========== */
@media (max-width: 760px) {
  .folder-image-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
  }
  .folder-image-item img {
    aspect-ratio: 1 / 1; /* square thumbnails work better in tight 2‑col grids */
    object-fit: cover;
  }
  .folder-image-caption {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
  }
}
/* ========== PRICE TABLE (contact.html) ========== */

.price-table-wrap {
  overflow-x: auto;
  margin-top: 1.6rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
}

.price-table th,
.price-table td {
  text-align: left;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.price-table th {
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 500;
  background: var(--bg-raised);
}

.price-table td {
  color: var(--ink);
  font-size: 0.95rem;
}

.price-table td.service {
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--ink-bright);
}

.price-table tbody tr:last-child td {
  border-bottom: none;
}

.price-table tbody tr:hover td {
  background: var(--bg-raised);
}

/* ========== PHILOSOPHY STEPS (contact.html, Process section) ========== */

.philosophy-steps {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 2.4rem;
}

.philosophy-step {
  flex: 1 1 160px;
  text-align: center;
  padding: 1.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg-raised);
}

.philosophy-step h4 {
  color: var(--vanta);
  font-size: 1.4rem;
  margin: 0 0 0.4rem;
}

.philosophy-step p {
  font-size: 0.85rem;
  color: var(--ink-dim);
  margin: 0;
}

.philosophy-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--line);
  font-size: 1.4rem;
  flex: 0 0 auto;
}

@media (max-width: 700px) {
  .philosophy-steps {
    flex-direction: column;
  }
  .philosophy-arrow {
    display: none;
  }
}

/* ========== MOBILE FIXES FOR CONTACT PAGE ========== */

/* 7th step spans both columns on mobile */
@media (max-width: 600px) {
  .workflow-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }
  .workflow-grid .step-7 {
    grid-column: 1 / -1;
  }
}

/* Payment breakdown cards stack on mobile */
@media (max-width: 600px) {
  .payment-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
  }
}

/* Desktop: keep the grid */
@media (min-width: 601px) {
  .workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.6rem;
  }
  .payment-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

/* ========== SERVICES GRID – 3 columns, 4th card full width on desktop ========== */
@media (min-width: 1024px) {
  #commission-types .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  #commission-types .grid .card:last-child {
    grid-column: 1 / -1;
  }
}

/* ========== TOAST (mailto fallback notification) ========== */

.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 1rem);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--ink-bright);
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 0.85rem 1.4rem;
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  z-index: 500;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: min(90vw, 380px);
  text-align: center;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
/* ========== REVIEWS (reviews.html) ========== */

.review-list {
  display: flex;
  flex-direction: column;
}

.review-row {
  display: flex;
  align-items: center;
  gap: var(--gap);
  padding: clamp(2rem, 5vw, 3rem) 0;
}

.review-row + .review-row { border-top: 1px solid var(--line); }

.review-row--reverse { flex-direction: row-reverse; }

.review-row-figure {
  flex: 0 0 clamp(160px, 24%, 240px);
}

.review-cover {
  aspect-ratio: 1 / 1;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.review-row-body {
  flex: 1 1 auto;
  min-width: 0;
}

.review-blurb {
  margin-top: 0.6rem;
}

.review-attribution {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-bright);
}

@media (max-width: 760px) {
  .review-row,
  .review-row--reverse {
    flex-direction: column;
    align-items: stretch;
  }
  .review-row-figure {
    flex: 0 0 auto;
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
  }
}