/* ---------------------------------------------------------------
   Deron Holmes-Cannon portfolio
   Dark, cinematic, restrained. System type, hairline rules,
   per-collection color atmospheres, quiet motion.
   --------------------------------------------------------------- */

:root {
  color-scheme: dark;
  --paper: #08080b;
  --surface: #131318;
  --surface-2: #1a1a21;
  --ink: #f5f5f7;
  --ink-2: #9b9ba4;
  --ink-3: #6e6e78;
  --hairline: rgba(255, 255, 255, 0.1);
  --hairline-soft: rgba(255, 255, 255, 0.06);
  --accent: #8b7bff;
  --accent-2: #6db8ff;
  --warm: #ffb26b;
  --grad: linear-gradient(90deg, #8b7bff, #56b9ff 55%, #ffb26b);
  --radius: 18px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 52px;
  --pad: clamp(20px, 4vw, 40px);
  /* text and controls sit this far from the screen edge; the art itself
     runs to 0, so this is the only inset on the page */
  --gutter: clamp(18px, 2.5vw, 48px);
}

/* per-collection atmosphere */
body[data-collection="concept-art"]  { --glow-a: rgba(255, 86, 74, 0.13);  --glow-b: rgba(255, 170, 90, 0.09); }
body[data-collection="illustration"] { --glow-a: rgba(139, 123, 255, 0.15); --glow-b: rgba(86, 185, 255, 0.1); }
body[data-collection="comic"]        { --glow-a: rgba(64, 214, 190, 0.12); --glow-b: rgba(255, 94, 168, 0.09); }
body[data-page="project"]            { --glow-a: rgba(139, 123, 255, 0.14); --glow-b: rgba(255, 170, 90, 0.08); }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(139, 123, 255, 0.85); color: #fff; }

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

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Full width, aligned to the page gutter. Nothing is centred in a narrow
   column any more, so headings and links line up with the edge-to-edge art
   instead of floating inset from it. Long copy is constrained by the
   individual blocks (.page-head, .proj-details, .contact-card p). */
.wrap {
  max-width: none;
  margin: 0;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 8, 11, 0.7);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.nav.is-scrolled { border-bottom-color: var(--hairline-soft); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.brand {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: clamp(14px, 3vw, 32px);
}

.nav-links a {
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: 0.01em;
  transition: color 0.2s var(--ease);
}

.nav-links a:hover { color: var(--ink); }

.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 550; }

.brand-short,
.nav-toggle { display: none; }

/* Phones: initials for the home link, links folded behind a menu button. */
@media (max-width: 760px) {
  .brand-full { display: none; }
  .brand-short { display: inline; font-size: 17px; font-weight: 700; letter-spacing: 0.06em; }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--ink);
    cursor: pointer;
  }
  .nav-toggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
  .nav-icon { width: 22px; height: 22px; }
  .nav-icon-close { display: none; }
  .nav.is-open .nav-icon-open { display: none; }
  .nav.is-open .nav-icon-close { display: block; }

  .nav.is-open { background: rgba(8, 8, 11, 0.97); }

  /* .nav's backdrop-filter makes it the containing block, so the panel hangs
     off the bar with absolute positioning rather than fixed. */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100dvh - var(--nav-h));
    flex-direction: column;
    gap: 0;
    padding: 12px var(--gutter) 40px;
    background: rgba(8, 8, 11, 0.97);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s linear 0.22s;
  }
  .nav.is-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s;
  }
  .nav-links a {
    display: block;
    padding: 16px 0;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink-2);
    border-bottom: 1px solid var(--hairline-soft);
  }
  .nav-links a[aria-current="page"] { color: var(--ink); }

  html.menu-open { overflow: hidden; }
}

@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  .nav-links, .nav.is-open .nav-links { transition: none; transform: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: #0a0a0e;
  font-size: 15px;
  font-weight: 550;
  padding: 12px 24px;
  border-radius: 980px;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.98); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--accent-2);
  transition: color 0.2s var(--ease);
}

.link-arrow:hover { color: #fff; }


/* ---------- Projects: full-bleed square mosaic (home) ----------
   Edge to edge, no gutters, no rounded corners. The art carries the
   page; titles surface only when a tile is hovered. */

.projects-section { width: 100%; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);   /* 11 projects = 4 + 4 + 3 */
  gap: 0;
}

/* Never strand a single tile on a row of its own: if the last one would land
   alone, it takes half the row as a wide closer instead. */
.projects-grid .ptile:last-child:nth-child(4n + 1) { grid-column: span 2; }
.projects-grid .ptile:last-child:nth-child(4n + 1) img { aspect-ratio: 2 / 1; }

@media (max-width: 900px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid .ptile:last-child:nth-child(4n + 1) { grid-column: auto; }
  .projects-grid .ptile:last-child:nth-child(4n + 1) img { aspect-ratio: 1 / 1; }
  .projects-grid .ptile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .projects-grid .ptile:last-child:nth-child(odd) img { aspect-ratio: 2 / 1; }
}

.ptile {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--surface);
}

.ptile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.ptile-meta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
  padding: clamp(14px, 1.8vw, 24px);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.34) 42%, transparent 78%);
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

/* reveal on hover where hovering exists; always legible on touch */
@media (hover: hover) {
  .ptile:hover .ptile-meta,
  .ptile:focus-visible .ptile-meta { opacity: 1; }
}
@media (hover: none) { .ptile-meta { opacity: 1; } }

.ptile-title {
  font-size: clamp(15px, 1.5vw, 19px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ptile-type {
  font-size: clamp(10px, 1.1vw, 12px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}

.piece-count {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-3);
}

/* ---------- Project page: Carbonmade-style stack ----------
   Title centred, then the art as one column (banner first when there is
   one), 10px apart, square corners, nothing moving. The words wait at the
   bottom in a label/value block so the art is seen first. */

.proj-head {
  position: relative;
  isolation: isolate;
  text-align: center;
  padding: clamp(40px, 7vh, 72px) var(--gutter) clamp(24px, 4vh, 36px);
}

.proj-head::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -120px;
  bottom: -40px;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 46% 40% at 50% 36%, var(--glow-a, transparent), transparent 70%),
    radial-gradient(ellipse 40% 34% at 62% 28%, var(--glow-b, transparent), transparent 70%);
}

.proj-head h1 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-wrap: balance;
  background: linear-gradient(180deg, #ffffff 55%, #c4c7e6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.proj-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(960px, 100% - 2 * var(--gutter));
  margin: 0 auto;
}

@media (max-width: 760px) { .proj-stack { width: 100%; } }

.proj-banner { display: block; width: 100%; height: auto; }

.stack-item {
  display: block;
  background: var(--surface);
  cursor: zoom-in;
}

.stack-item img { width: 100%; height: auto; }

.proj-details {
  width: min(780px, 100% - 2 * var(--gutter));
  margin: clamp(48px, 8vh, 80px) auto 0;
}

.proj-details dl { display: flex; flex-direction: column; gap: 18px; }

.proj-details .row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
}

.proj-details dt { font-size: 13px; color: var(--ink-3); padding-top: 2px; }

.proj-details dd { font-size: 15px; line-height: 1.6; color: var(--ink); max-width: 62ch; }

.proj-details + .next-collection { padding-top: clamp(40px, 7vh, 72px); }

@media (max-width: 560px) {
  .proj-details .row { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Home: per-collection preview sections ---------- */

#collections { padding-top: clamp(52px, 9vh, 104px); }

.home-section { padding-bottom: clamp(44px, 7vh, 84px); }

.section-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(18px, 3vh, 28px);
}

.section-row h2 {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.section-sub {
  font-size: 14px;
  color: var(--ink-2);
  margin-top: 4px;
}

/* The whole header row is one link to the collection: title, line and button. */
.section-link { color: inherit; }
.section-link h2 {
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
  transition: text-decoration-color 0.2s var(--ease);
}
.section-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 8px; border-radius: 10px; }

.section-cta {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-size: 14px;
  font-weight: 550;
  white-space: nowrap;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

@media (hover: hover) {
  .section-link:hover h2 { text-decoration-color: currentColor; }
  .section-link:hover .section-cta { background: var(--ink); border-color: var(--ink); color: #0a0a0e; }
}
.section-link:focus-visible .section-cta { background: var(--ink); border-color: var(--ink); color: #0a0a0e; }
.section-link:active .section-cta { transform: scale(0.98); }

/* ---------- Contact ---------- */

.contact { padding-bottom: clamp(56px, 9vh, 104px); }

.contact-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--surface);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: 0 0 0 1px var(--hairline-soft);
  padding: clamp(48px, 8vw, 88px) var(--pad);
  text-align: center;
}

.contact-card::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42% 44% at 22% 30%, rgba(139, 123, 255, 0.14), transparent 70%),
    radial-gradient(44% 46% at 80% 72%, rgba(86, 185, 255, 0.1), transparent 70%);
}

.contact-card h2 {
  font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 650;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
  width: fit-content;
  margin-inline: auto;
  background: linear-gradient(90deg, #cfc6ff, #8ed0ff 55%, #ffcf9e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.contact-card > p {
  color: var(--ink-2);
  max-width: 36em;
  margin: 0 auto 30px;
  text-wrap: balance;
}

.contact-note { font-size: 13px; color: var(--ink-3); margin-top: 18px; }

/* ---------- Gallery pages ---------- */

.page-head {
  position: relative;
  isolation: isolate;
  /* horizontal padding must be the gutter, not 0: this shorthand comes
     after .wrap and would otherwise reset it and misalign the heading */
  padding: clamp(56px, 9vh, 100px) var(--gutter) clamp(32px, 5vh, 52px);
  max-width: calc(760px + var(--gutter) * 2);
}

.page-head::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -120px;
  bottom: -40px;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 46% 40% at 33% 36%, var(--glow-a, transparent), transparent 70%),
    radial-gradient(ellipse 40% 34% at 68% 28%, var(--glow-b, transparent), transparent 70%);
}

.page-head h1 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Roboto, sans-serif;
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.05;
  margin-bottom: 16px;
  width: fit-content;
  background: linear-gradient(180deg, #ffffff 55%, #c4c7e6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-head .lede {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

.gallery { padding-bottom: clamp(48px, 7vh, 88px); }



/* ---------- Collection mosaics (home + gallery pages) ----------
   Same treatment as the project grid: full bleed, no gutters, square
   tiles, square corners, titles only on hover. Each grid sets --cols to
   whatever divides its item count into complete rows. */

.mosaic {
  display: grid;
  grid-template-columns: repeat(var(--cols, 5), 1fr);
  gap: 0;
}

.mosaic .tile {
  position: relative;
  aspect-ratio: 1 / 1;      /* squareness lives here; the img carries an
                               inline per-artwork ratio that would win */
  margin-bottom: 0;
  box-shadow: none;
  transform: none;          /* no slide-in: the mosaic must stay seamless */
}

.mosaic .tile.in:hover { transform: none; }   /* and no hover lift */

.mosaic .tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-meta {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: clamp(9px, 1.1vw, 15px);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.22) 46%, transparent 76%);
  color: #fff;
  font-size: clamp(11px, 0.95vw, 13px);
  font-weight: 550;
  line-height: 1.3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

@media (hover: hover) { .mosaic .tile:hover .tile-meta { opacity: 1; } }
@media (hover: none)  { .tile-meta { display: none; } }

@media (max-width: 760px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); }
  /* an odd final tile fills its row rather than leaving a hole */
  .mosaic > .tile:last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
}

.tile {
  display: block;
  width: 100%;
  margin-bottom: 22px;
  break-inside: avoid;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--hairline-soft);
  cursor: zoom-in;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}

.tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 18px 44px -12px rgba(0, 0, 0, 0.65);
}

.tile img { width: 100%; height: auto; }

/* entrance */
.tile { opacity: 0; transform: translateY(14px); }
.tile.in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out), box-shadow 0.4s var(--ease-out); }
.tile.in:hover { transform: translateY(-3px); }

/* mosaic tiles and stacked project art fade only, so nothing shifts while loading */
.ptile, .stack-item { opacity: 0; }
.ptile.in, .stack-item.in { opacity: 1; transition: opacity 0.7s var(--ease-out); }

.next-collection {
  display: flex;
  justify-content: center;
  padding-bottom: clamp(64px, 10vh, 112px);
}

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--hairline-soft); background: var(--paper); }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 28px;
  padding-bottom: 36px;
}

.footer .fbrand { font-size: 14px; font-weight: 600; }

.footer nav { display: flex; gap: 22px; flex-wrap: wrap; }

.footer nav a, .footer .fmail {
  font-size: 13px;
  color: var(--ink-2);
  transition: color 0.2s var(--ease);
}

.footer nav a:hover, .footer .fmail:hover { color: var(--ink); }

.footer .copyright {
  width: 100%;
  font-size: 12px;
  color: var(--ink-3);
  padding-bottom: 28px;
}

.footer .studio-link { color: var(--ink-3); transition: color 0.2s var(--ease); }
.footer .studio-link:hover { color: var(--ink-2); }

/* ---------- Lightbox ---------- */

.lb {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.28s var(--ease);
}

.lb[hidden] { display: none !important; }

.lb.open { opacity: 1; }

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.95);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.lb-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
}

.lb-img {
  max-width: min(1600px, calc(100vw - 32px));
  max-height: calc(100dvh - 128px);
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  will-change: transform;
}

.lb-img.anim { transition: transform 0.32s var(--ease); }

.lb.zoomed .lb-stage { cursor: grab; }
.lb.dragging .lb-stage { cursor: grabbing; }

.lb-spinner {
  position: absolute;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.85);
  animation: lb-spin 0.8s linear infinite;
  pointer-events: none;
}

@keyframes lb-spin { to { transform: rotate(360deg); } }

.lb-btn {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), opacity 0.2s var(--ease);
}

.lb-btn:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }

.lb-btn svg { width: 18px; height: 18px; }

.lb-top {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lb-zoomgroup {
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.lb-zoomgroup .lb-btn { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.lb-zoomgroup .lb-btn:hover { background: rgba(255, 255, 255, 0.16); }

.lb-scale {
  min-width: 52px;
  text-align: center;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.85);
  padding: 0 4px;
}

.lb-scale:hover { color: #fff; }

.lb-prev, .lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px; height: 44px;
}

.lb-prev { left: 16px; }
.lb-next { right: 16px; }

.lb-meta {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: baseline;
  gap: 12px;
  max-width: calc(100vw - 140px);
  padding: 9px 18px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.09);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #fff;
  white-space: nowrap;
}

.lb-title {
  font-size: 14px;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-count {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
}

.lb-hint {
  position: absolute;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  z-index: 3;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.6);
  padding: 7px 14px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
  opacity: 0;
  animation: lb-hint 4s var(--ease) 0.6s forwards;
}

@keyframes lb-hint {
  0% { opacity: 0; }
  12% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

@media (max-width: 640px) {
  .lb-prev, .lb-next { display: none; }  /* swipe instead */
  .lb-meta { max-width: calc(100vw - 32px); }
  .lb-hint { display: none; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .tile, .ptile, .stack-item { opacity: 1; transform: none; }
}
