/* ==========================================================================
   PASTELLE — Shared Tokens, Layout Chrome, Transitions & Collection Styles
   ========================================================================== */

:root {
  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-fast: 150ms;
  --motion-base: 220ms;
  --motion-slow: 320ms;

  /* Typography & Radii */
  --leading-body: 1.75;
  --leading-tight: 1.15;
  --radius: 0px;
  --radius-control: 8px;
  --radius-round: 50%;
  --eyebrow-size: var(--type-xs);
  --eyebrow-tracking: 0.14em;
  --eyebrow-weight: 600;

  /* Layout & Navigation Geometry */
  --measure: var(--container-measure);
  --gutter: 1.5rem;
  --page-gutter: 1.5rem;
  --pastelle-nav-height: 4.25rem;
  --pastelle-nav-height-condensed: 4.25rem;
  --pastelle-sticky-offset: var(--pastelle-nav-height);

  /* Z-Index Scale */
  --z-sticky: 30;
  --z-indicator: 40;
  --z-nav: 50;
  --z-dropdown: 60;
  --z-popover: 70;
  --z-modal: 100;
  --z-inquiry: 110;

  /* Light Theme Palette */
  --theme-bg: #F5F4F0;
  --theme-surface: #E5E5E5;
  --theme-surface-muted: #ECEBE2;
  --theme-surface-strong: rgba(18, 18, 18, 0.08);
  --theme-ink: #000000;
  --theme-muted: #55544F;
  --theme-leader-ink: #E4E3E0;
  --theme-accent: currentColor;
  --theme-hairline: rgba(18, 18, 18, 0.12);
  --theme-hairline-strong: rgba(18, 18, 18, 0.28);
  --theme-chrome-hairline: rgba(19, 18, 10, 0.1);
  --theme-menu-bg: #F5F4F0;
  --theme-menu-hairline: rgba(18, 18, 18, 0.12);
  --theme-menu-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
  --theme-hover-soft: color-mix(in srgb, currentColor 8%, transparent);
  --theme-hover-strong: color-mix(in srgb, currentColor 12%, transparent);
  --theme-chip-bg: color-mix(in srgb, currentColor 6%, transparent);

  --theme-live-bg: #F5F4F0;
  --theme-live-hairline: rgba(18, 18, 18, 0.075);
  --theme-frame-bg: #F5F4F0;
  --theme-frame-hairline: rgba(18, 18, 18, 0.12);
  --theme-modal-bg: #F5F4F0;
  --theme-modal-hairline: rgba(18, 18, 18, 0.1);
  --theme-modal-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  --theme-scrim: rgba(255, 255, 255, 0.78);
  --theme-cfooter-bg: #F5F4F0;
  --theme-cfooter-ink: #121212;
  --theme-cfooter-hairline: rgba(18, 18, 18, 0.08);
  --theme-copy-muted: #6C6C6C;

  --site-text-primary: #13120A;
  --site-text-secondary: #393831;
  --site-text-muted: #55544F;
  --page-muted: var(--site-text-muted);
  --projects-muted: var(--site-text-muted);
  --about-muted: var(--site-text-muted);
  --res-muted: var(--site-text-muted);
}

html.dark {
  --theme-bg: #000000;
  --theme-surface: #121212;
  --theme-surface-muted: #171713;
  --theme-surface-strong: rgba(255, 255, 255, 0.1);
  --theme-ink: #FFFFFF;
  --theme-muted: #BBB7AB;
  --theme-leader-ink: #242424;
  --theme-hairline: rgba(255, 255, 255, 0.12);
  --theme-hairline-strong: rgba(255, 255, 255, 0.3);
  --theme-chrome-hairline: rgba(246, 241, 227, 0.1);
  --theme-menu-bg: #121212;
  --theme-menu-hairline: rgba(255, 255, 255, 0.14);
  --theme-menu-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);

  --theme-live-bg: #000000;
  --theme-live-hairline: rgba(255, 255, 255, 0.085);
  --theme-frame-bg: #050505;
  --theme-frame-hairline: rgba(255, 255, 255, 0.12);
  --theme-modal-bg: #121212;
  --theme-modal-hairline: rgba(255, 255, 255, 0.12);
  --theme-modal-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --theme-scrim: rgba(0, 0, 0, 0.8);
  --theme-cfooter-bg: #000000;
  --theme-cfooter-ink: #F5F4F0;
  --theme-cfooter-hairline: rgba(255, 255, 255, 0.08);
  --theme-copy-muted: #AFAEAC;

  --site-text-primary: #F6F1E3;
  --site-text-secondary: #D6D2C5;
  --site-text-muted: #BBB7AB;
}

html.navy {
  background-color: #061830;
  color-scheme: dark;

  --theme-bg: #061830;
  --theme-surface: #0B2240;
  --theme-surface-muted: #0B2240;
  --theme-surface-strong: rgba(220, 235, 255, 0.12);
  --theme-ink: #FFFFFF;
  --theme-muted: #C0C7D1;
  --theme-leader-ink: #17273C;
  --theme-accent: #FFFFFF;
  --theme-hairline: rgba(220, 235, 255, 0.14);
  --theme-hairline-strong: rgba(220, 235, 255, 0.3);
  --theme-chrome-hairline: rgba(220, 235, 255, 0.12);
  --theme-menu-bg: #102C50;
  --theme-menu-hairline: rgba(220, 235, 255, 0.18);
  --theme-menu-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  --theme-hover-soft: rgba(220, 235, 255, 0.08);
  --theme-hover-strong: rgba(220, 235, 255, 0.12);
  --theme-chip-bg: rgba(10, 34, 64, 0.88);

  --theme-live-bg: #061830;
  --theme-live-hairline: rgba(220, 235, 255, 0.14);
  --theme-frame-bg: #0B2240;
  --theme-frame-hairline: rgba(220, 235, 255, 0.14);
  --theme-modal-bg: #0B2240;
  --theme-modal-hairline: rgba(220, 235, 255, 0.14);
  --theme-scrim: rgba(6, 24, 48, 0.82);
  --theme-cfooter-bg: #061830;
  --theme-cfooter-ink: #FFFFFF;
  --theme-cfooter-hairline: rgba(220, 235, 255, 0.14);
  --theme-copy-muted: #C0C7D1;

  --site-text-primary: #F4F8FF;
  --site-text-secondary: #D7DDE6;
  --site-text-muted: #C0C7D1;

  --color-neutral-50: #061830;
  --color-neutral-100: #0B2240;
  --color-neutral-200: rgba(220, 235, 255, 0.14);
  --color-neutral-300: rgba(220, 235, 255, 0.2);
  --color-neutral-700: rgba(220, 235, 255, 0.6);
  --color-neutral-800: rgba(220, 235, 255, 0.14);
  --color-neutral-900: #0B2240;
  --color-neutral-950: #061830;
}

/* --------------------------------------------------------------------------
   Palette themes. Each palette is four base colours (--p-*), declared once and
   shared by <html data-theme="…"> and the theme picker's [data-swatch] tiles.
   html.tinted derives every --theme-* token from them; dark-polarity palettes
   also carry .dark so Tailwind's dark: variants and the html.dark tokens
   (shadows, focus rings) apply. Light, dark and navy keep their hand-tuned
   blocks above; their --p-* values only colour their picker tiles.
   The ink IS the palette's colour (butter on plum, lime on olive, rust on
   cream, navy on sky) and every piece of text uses it: wordmark, body,
   secondary and muted copy alike. --p-accent is for non-text details only
   (selection, scroll progress, Token Studio borders). Ink clears 4.5:1 on
   both bg and surface.
   -------------------------------------------------------------------------- */
[data-swatch="light"]                        { --p-bg: #F5F4F0; --p-surface: #E5E5E5; --p-ink: #000000; --p-accent: #000000; }
html[data-theme="clay"], [data-swatch="clay"] { --p-bg: #F7F4EC; --p-surface: #EDE8DE; --p-ink: #963B17; --p-accent: #AD4920; }
html[data-theme="tangerine"], [data-swatch="tangerine"] { --p-bg: #FF6A22; --p-surface: #FF7C3B; --p-ink: #000000; --p-accent: #000000; }
html[data-theme="chartreuse"], [data-swatch="chartreuse"] { --p-bg: #9BBC0F; --p-surface: #A9C826; --p-ink: #082808; --p-accent: #082808; }
html[data-theme="moss"], [data-swatch="moss"] { --p-bg: #3A3E2E; --p-surface: #444A36; --p-ink: #D9FE00; --p-accent: #D9FE00; }
html[data-theme="sky"], [data-swatch="sky"]   { --p-bg: #D6E2EC; --p-surface: #CBD8E6; --p-ink: #1B3A8E; --p-accent: #1B3A8E; }
html[data-theme="cobalt"], [data-swatch="cobalt"] { --p-bg: #002FA7; --p-surface: #0F3BAC; --p-ink: #FFFFFF; --p-accent: #FFD400; }
[data-swatch="navy"]                         { --p-bg: #061830; --p-surface: #0B2240; --p-ink: #FFFFFF; --p-accent: #FFFFFF; }
html[data-theme="plum"], [data-swatch="plum"] { --p-bg: #2A1332; --p-surface: #362039; --p-ink: #F4E5A1; --p-accent: #F4E5A1; }
html[data-theme="merlot"], [data-swatch="merlot"] { --p-bg: #640322; --p-surface: #6C102E; --p-ink: #E4D7E9; --p-accent: #E4D7E9; }
[data-swatch="dark"]                         { --p-bg: #000000; --p-surface: #121212; --p-ink: #FFFFFF; --p-accent: #FFFFFF; }

html.tinted {
  background-color: var(--p-bg);

  --theme-bg: var(--p-bg);
  --theme-surface: var(--p-surface);
  --theme-surface-muted: var(--p-surface);
  --theme-surface-strong: color-mix(in srgb, var(--p-ink) 10%, transparent);
  --theme-ink: var(--p-ink);
  --theme-muted: var(--p-ink);
  --theme-leader-ink: color-mix(in srgb, var(--p-ink) 14%, var(--p-bg));
  --theme-accent: var(--p-ink);
  --theme-hairline: color-mix(in srgb, var(--p-ink) 14%, transparent);
  --theme-hairline-strong: color-mix(in srgb, var(--p-ink) 30%, transparent);
  --theme-chrome-hairline: color-mix(in srgb, var(--p-ink) 12%, transparent);
  --theme-menu-bg: var(--p-surface);
  --theme-menu-hairline: color-mix(in srgb, var(--p-ink) 16%, transparent);
  --theme-hover-soft: color-mix(in srgb, var(--p-ink) 8%, transparent);
  --theme-hover-strong: color-mix(in srgb, var(--p-ink) 12%, transparent);
  --theme-chip-bg: color-mix(in srgb, var(--p-ink) 6%, transparent);

  --theme-live-bg: var(--p-bg);
  --theme-live-hairline: color-mix(in srgb, var(--p-ink) 10%, transparent);
  --theme-frame-bg: var(--p-surface);
  --theme-frame-hairline: color-mix(in srgb, var(--p-ink) 14%, transparent);
  --theme-modal-bg: var(--p-surface);
  --theme-modal-hairline: color-mix(in srgb, var(--p-ink) 14%, transparent);
  --theme-scrim: color-mix(in srgb, var(--p-bg) 84%, transparent);
  --theme-cfooter-bg: var(--p-bg);
  --theme-cfooter-ink: var(--p-ink);
  --theme-cfooter-hairline: color-mix(in srgb, var(--p-ink) 10%, transparent);
  --theme-copy-muted: var(--p-ink);

  --site-text-primary: var(--p-ink);
  --site-text-secondary: var(--p-ink);
  --site-text-muted: var(--p-ink);

  --color-neutral-50: var(--p-bg);
  --color-neutral-100: var(--p-surface);
  --color-neutral-200: color-mix(in srgb, var(--p-ink) 14%, transparent);
}

/* Light polarity: the dark end of the neutral ramp is ink (text, rules, fills). */
html.tinted:not(.dark) {
  --color-neutral-300: color-mix(in srgb, var(--p-ink) 22%, var(--p-bg));
  --color-neutral-700: var(--p-ink);
  --color-neutral-800: color-mix(in srgb, var(--p-ink) 88%, var(--p-bg));
  --color-neutral-900: var(--p-ink);
  --color-neutral-950: var(--p-ink);
}

/* Dark polarity: mirrors navy, where the dark end of the ramp is surface/bg. */
html.tinted.dark {
  color-scheme: dark;
  --color-neutral-300: color-mix(in srgb, var(--p-ink) 20%, transparent);
  --color-neutral-700: color-mix(in srgb, var(--p-ink) 60%, transparent);
  --color-neutral-800: color-mix(in srgb, var(--p-ink) 14%, transparent);
  --color-neutral-900: var(--p-surface);
  --color-neutral-950: var(--p-bg);
}

@media (min-width: 1024px) {
  :root {
    --page-gutter: 3rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .max-w-measure.md\:px-12 {
    padding-inline: var(--page-gutter);
  }
}

/* ==========================================================================
   BASE DOCUMENT, TYPOGRAPHY & ACCESSIBILITY
   ========================================================================== */

body {
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-gutter: stable;
}

html.navy body,
html.tinted body {
  background-color: var(--theme-bg);
  color: var(--theme-ink);
}

html:has(body :is(#controls-bar, .collection-controls)),
html body:has(:is(#controls-bar, .collection-controls)) {
  overflow-x: clip;
}

.page-title-section,
.page-title-detail {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  text-transform: none;
  text-wrap: balance;
}

.page-title-section,
#page-header h1.page-title-section {
  font-size: var(--type-xl);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.page-title-detail,
#work-title.page-title-detail {
  font-size: var(--type-lg);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.eyebrow {
  font-size: var(--eyebrow-size);
  font-weight: var(--eyebrow-weight);
  letter-spacing: var(--eyebrow-tracking);
  line-height: var(--leading-tight);
  text-transform: uppercase;
}

button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.dark button:focus-visible,
.dark a:focus-visible,
.dark [role="button"]:focus-visible,
.dark select:focus-visible,
.dark input:focus-visible,
.dark textarea:focus-visible {
  outline-color: #D0D0CE;
}

button,
a,
[role="button"],
label {
  touch-action: manipulation;
}

button,
a[href],
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

.skip-to-content {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 9999;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius);
  background: var(--theme-ink);
  color: var(--theme-bg);
  font-size: var(--type-sm);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 140ms var(--ease-out-expo);
}

.skip-to-content:focus {
  transform: translateY(0);
}

::selection {
  background: #4B7BE5;
  color: #FFFFFF;
}

html.tinted ::selection {
  background: var(--p-accent);
  color: var(--p-bg);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #CCCCCC;
  border-radius: var(--radius);
}

.dark ::-webkit-scrollbar-thumb {
  background: #333333;
}

html.navy ::-webkit-scrollbar-thumb {
  background: #0F3566;
}

html.tinted ::-webkit-scrollbar-thumb,
html.tinted .custom-scrollbar::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--p-ink) 28%, var(--p-bg));
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: #CCCCCC;
  border-radius: var(--radius);
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: #42413B;
}

/* Navy + dark-polarity palette Tailwind utility alignment */
/* Palettes skip these two background remaps on purpose: their neutral ramp
   already resolves through --color-neutral-*, and leaving the utilities at
   their own specificity lets section tokens (--theme-live-bg = bg) win, so
   every band of the page sits on the one palette background. */
html.navy .bg-neutral-50,
html.navy .dark\:bg-neutral-950,
html.navy .bg-neutral-950,
html.navy section.bg-neutral-50,
html.navy section.dark\:bg-neutral-950 {
  background-color: var(--theme-bg);
}

html.navy .bg-neutral-100,
html.navy .dark\:bg-neutral-900,
html.navy .bg-neutral-900 {
  background-color: var(--theme-surface);
}

html.navy .border-neutral-200,
html.tinted.dark .border-neutral-200,
html.navy .dark\:border-neutral-800,
html.tinted.dark .dark\:border-neutral-800,
html.navy .dark\:border-neutral-700,
html.tinted.dark .dark\:border-neutral-700,
html.navy .border-neutral-200\/50,
html.tinted.dark .border-neutral-200\/50,
html.navy .dark\:border-neutral-800\/50,
html.tinted.dark .dark\:border-neutral-800\/50 {
  border-color: var(--theme-hairline);
}

html.navy .bg-neutral-200\/50,
html.tinted.dark .bg-neutral-200\/50,
html.navy .dark\:bg-neutral-800\/50,
html.tinted.dark .dark\:bg-neutral-800\/50 {
  background-color: var(--theme-chip-bg);
}

html.navy .hover\:bg-neutral-200\/50:hover,
html.tinted.dark .hover\:bg-neutral-200\/50:hover,
html.navy .dark\:hover\:bg-neutral-800\/50:hover,
html.tinted.dark .dark\:hover\:bg-neutral-800\/50:hover {
  background-color: var(--theme-hover-strong);
}

html.navy .text-neutral-900,
html.tinted.dark .text-neutral-900,
html.navy .dark\:text-white,
html.tinted.dark .dark\:text-white {
  color: var(--theme-ink);
}

/* Inverted pills (e.g. the work-page zoom controls) flip to ink-on-bg under
   dark palettes, matching how light/dark already invert them. */
html.tinted.dark .dark\:bg-neutral-100\/80 {
  background-color: color-mix(in srgb, var(--p-ink) 88%, transparent);
}

html.tinted.dark .dark\:text-black {
  color: var(--p-bg);
}

html.tinted.dark .dark\:bg-white {
  background-color: var(--p-ink);
}

/* Semantic text tone consistency */
html body .text-neutral-700,
html.dark body .dark\:text-neutral-300,
html.navy body .text-neutral-700,
html.navy body .dark\:text-neutral-300,
html.tinted body .text-neutral-700,
html.tinted body .dark\:text-neutral-300 {
  color: var(--site-text-secondary);
}

html body .text-neutral-500,
html body .text-neutral-400,
html.dark body .dark\:text-neutral-400,
html.dark body .dark\:text-neutral-500,
html.navy body .text-neutral-500,
html.navy body .text-neutral-400,
html.navy body .dark\:text-neutral-400,
html.navy body .dark\:text-neutral-500,
html.tinted body .text-neutral-500,
html.tinted body .text-neutral-400,
html.tinted body .dark\:text-neutral-400,
html.tinted body .dark\:text-neutral-500 {
  color: var(--site-text-muted);
}

html body :is(
  .about-eyebrow,
  .about-addr,
  .collection-page .artwork-item p,
  #site-footer .footer-note,
  #site-footer .footer-links a
) {
  color: var(--site-text-muted);
}

/* ==========================================================================
   MEDIA SHIMMER & SCROLL REVEALS
   ========================================================================== */

@keyframes pastelle-media-shimmer {
  from { background-position: 150% 0; }
  to   { background-position: -50% 0; }
}

.skeleton,
.media-frame {
  position: relative;
  background-color: var(--theme-surface);
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--theme-ink) 9%, transparent) 50%,
    transparent 100%
  );
  background-size: 60% 100%;
  background-repeat: no-repeat;
  animation: pastelle-media-shimmer 1.5s linear infinite;
}

.media-frame.media-ready,
.media-frame.media-failed {
  background-image: none;
  animation: none;
}

.media-frame[data-media-reserve]:not(.media-ready) {
  aspect-ratio: 1;
}

@media (prefers-reduced-motion: no-preference) {
  :where(html.js-anim-ready) .reveal-up {
    opacity: 0;
    transform: translateY(8px);
  }

  :where(html.js-anim-ready) .reveal-mask {
    clip-path: inset(0 0 100% 0);
    transform: translateY(10px);
  }

  .reveal-up {
    transition:
      opacity var(--motion-base) var(--ease-out-expo),
      transform var(--motion-slow) var(--ease-out-soft);
  }

  .reveal-mask {
    transition:
      clip-path 320ms var(--ease-out-expo),
      transform 320ms var(--ease-out-expo);
  }
}

.reveal-up.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-mask.active {
  clip-path: inset(-5% -5% -5% -5%);
  transform: translateY(0);
}

.link-animated {
  position: relative;
  text-decoration: none;
}

.link-animated::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background: currentColor;
  transform: translateX(-50%);
  transition: width 220ms var(--ease-out-expo);
}

.link-animated:hover::after {
  width: 100%;
}

/* ==========================================================================
   CROSS-PAGE VIEW TRANSITIONS
   ========================================================================== */

@view-transition {
  navigation: auto;
}

::view-transition-group(*) {
  animation-duration: 240ms;
  animation-timing-function: var(--ease-out-expo);
}

::view-transition-group(root) {
  background: var(--theme-bg);
}

::view-transition-old(root),
::view-transition-new(root) {
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  animation: vt-refocus-out 100ms ease-out both;
}

::view-transition-new(root) {
  animation: vt-refocus-in 220ms var(--ease-out-expo) both;
}

#navbar {
  view-transition-name: site-nav;
}

::view-transition-old(site-nav) {
  animation: none;
  opacity: 0;
}

::view-transition-new(site-nav) {
  animation: none;
}

@keyframes vt-refocus-out {
  to { opacity: 0; }
}

@keyframes vt-refocus-in {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Optional experimental transitions (?pt=luxe / ?pt=stack) */
html[data-page-transition="stack"]::view-transition-old(root) {
  animation: pt-stack-recede 420ms cubic-bezier(0.32, 0.72, 0, 1) both;
}

html[data-page-transition="stack"]::view-transition-new(root) {
  box-shadow: 0 -24px 64px rgb(0 0 0 / 0.22);
  animation: pt-stack-rise 420ms cubic-bezier(0.32, 0.72, 0, 1) both;
}

@keyframes pt-stack-recede {
  to { opacity: 0.45; transform: translate3d(0, -2%, 0) scale(0.96); }
}

@keyframes pt-stack-rise {
  from { transform: translate3d(0, 100%, 0); }
}

.pt-veil {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

html:not([data-page-transition-direction]) .pt-veil {
  display: none;
}

.pt-veil-sheet {
  position: fixed;
  top: -12vh;
  left: 0;
  width: 100vw;
  height: 124vh;
  border-radius: 50% / 12vh;
  background: var(--theme-bg);
  view-transition-name: pt-sheet;
}

html[data-page-transition="luxe"]::view-transition-new(pt-sheet) {
  animation: pt-luxe-sheet 360ms cubic-bezier(0.77, 0, 0.18, 1) both;
}

@keyframes pt-luxe-sheet {
  0% { transform: translate3d(0, 112vh, 0); }
  50% { opacity: 1; transform: translate3d(0, 0, 0); }
  100% { opacity: 0; transform: translate3d(0, 0, 0); }
}

@media (prefers-reduced-motion: no-preference) {
  html.page-transitioning-out::after {
    position: fixed;
    inset: 0;
    z-index: 10001;
    content: '';
    pointer-events: none;
    background: var(--theme-bg);
    animation: pastelle-page-exit 160ms var(--ease-out-expo) both;
  }

  .shared-artwork-transitioning {
    animation: pastelle-shared-artwork-exit 160ms var(--ease-out-expo) both;
  }
}

@keyframes pastelle-page-exit {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pastelle-shared-artwork-exit {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0.78; transform: scale(0.99); }
}

.page-transition-lab {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 10002;
  display: flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--theme-chrome-hairline);
  border-radius: 999px;
  background: var(--theme-bg);
  color: var(--theme-ink);
  box-shadow: var(--theme-menu-shadow);
  font: 500 0.8125rem / 1 'Manrope', sans-serif;
}

.page-transition-lab button {
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  opacity: 0.65;
  text-transform: capitalize;
  cursor: pointer;
}

.page-transition-lab button[aria-pressed="true"] {
  background: var(--theme-ink);
  color: var(--theme-bg);
  opacity: 1;
}

/* ==========================================================================
   SHARED SITE HEADER / NAVIGATION
   ========================================================================== */

#navbar.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  display: block;
  width: 100%;
  color: var(--theme-ink);
  background: var(--theme-bg);
}

#navbar.site-header > .site-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
  max-width: var(--measure);
  min-height: var(--pastelle-nav-height);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

@media (min-width: 1600px) {
  #navbar.site-header > .site-header-inner {
    max-width: none;
  }
}

.site-header-brand-row {
  display: flex;
  align-items: center;
}

.site-header-brand {
  display: flex;
  flex-direction: column;
  color: inherit;
  line-height: 1;
  text-decoration: none;
}

.site-header-wordmark {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.deck-nav {
  position: static;
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
  margin-right: 60px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.deck-nav-item {
  position: relative;
}

.deck-nav a,
.deck-nav button {
  color: var(--theme-ink);
  text-decoration: none;
}

.deck-nav-link,
.deck-menu-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.deck-nav-link::after,
.deck-menu-trigger > span:first-child::after {
  position: absolute;
  right: 0;
  bottom: 0.3rem;
  left: 0;
  height: 1px;
  background: currentColor;
  content: '';
  opacity: 0.72;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--motion-fast) var(--ease-out-expo);
}

.deck-menu-trigger > span:first-child {
  position: relative;
}

.deck-menu-trigger > span:first-child::after {
  bottom: -0.1rem;
}

.deck-nav-link:hover::after,
.deck-nav-link:focus-visible::after,
.deck-nav-link[aria-current="page"]::after,
.deck-menu-trigger:hover > span:first-child::after,
.deck-menu-trigger:focus-visible > span:first-child::after,
.deck-menu-trigger[data-active-parent="true"] > span:first-child::after {
  transform: scaleX(1);
}

.deck-menu-icon {
  display: inline-block;
  color: var(--site-text-muted);
  font-size: 0.75rem;
  font-weight: 400;
  transition: transform 180ms var(--ease-out-expo);
}

.deck-menu-trigger[aria-expanded="true"] .deck-menu-icon {
  color: inherit;
  transform: rotate(135deg);
}

.deck-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: -18px;
  z-index: var(--z-dropdown);
  min-width: 232px;
  padding: 8px 0;
  border: 1px solid var(--theme-menu-hairline);
  background: var(--theme-menu-bg);
  box-shadow: var(--theme-menu-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, -6px, 0);
  transform-origin: 50% 0;
  transition: opacity 150ms var(--ease-out-expo), transform 180ms var(--ease-out-expo), visibility 0s linear 180ms;
}

.deck-menu--end {
  right: -18px;
  left: auto;
}

.deck-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
  transition: opacity 150ms var(--ease-out-expo), transform 180ms var(--ease-out-expo), visibility 0s;
}

.deck-menu a {
  display: block;
  padding: 6px 18px;
  color: var(--site-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transform: translate3d(-6px, 0, 0);
  transition:
    opacity 150ms var(--ease-out-expo),
    transform 170ms var(--ease-out-expo),
    color 120ms ease;
}

.deck-menu a:nth-child(2) { --deck-menu-delay: 10ms; }
.deck-menu a:nth-child(3) { --deck-menu-delay: 20ms; }
.deck-menu a:nth-child(4) { --deck-menu-delay: 30ms; }
.deck-menu a:nth-child(5) { --deck-menu-delay: 40ms; }
.deck-menu a:nth-child(n+6) { --deck-menu-delay: 50ms; }

.deck-menu.is-open > a {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: var(--deck-menu-delay, 0ms), var(--deck-menu-delay, 0ms), 0s;
}

.deck-menu a:hover,
.deck-menu a:focus-visible,
.deck-menu a[aria-current="page"] {
  color: var(--theme-ink);
}

.site-header-actions {
  position: absolute;
  top: 50%;
  right: var(--page-gutter);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(-50%);
}

.site-header-menu-toggle {
  display: none;
}

.site-header-theme-toggle {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: opacity 150ms ease;
}

.site-header-theme-toggle:hover,
.site-header-theme-toggle:focus-visible {
  opacity: 0.72;
}

.site-header-theme-toggle:focus-visible,
.deck-nav a:focus-visible,
.deck-menu-trigger:focus-visible,
.deck-menu a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* Home Deck Header: transparent overlay, same top-right chrome alignment */
.deck-page #navbar.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: var(--z-nav);
  background: transparent;
  box-shadow: none;
}

.deck-page #navbar.site-header > .site-header-inner {
  max-width: none;
  min-height: 5.25rem;
  padding: 0 48px;
}

.deck-page .site-header-actions {
  right: 48px;
}

@media (min-width: 768px) and (max-width: 1023px) {
  #navbar.site-header > .site-header-inner {
    gap: 16px;
  }

  .deck-nav {
    gap: 14px;
    margin-right: 52px;
    font-size: 0.875rem;
  }

  .deck-page #navbar.site-header > .site-header-inner {
    padding: 0 var(--page-gutter);
  }

  .deck-page .site-header-actions {
    right: var(--page-gutter);
  }
}

/* Mobile Header & GPU-accelerated Overlay Drawer (identical across Home + Interior) */
@media (max-width: 767px) {
  :root {
    --pastelle-nav-height: 0px;
    --pastelle-nav-height-condensed: 0px;
    --pastelle-sticky-offset: 0px;
  }

  #navbar.site-header,
  .deck-page #navbar.site-header {
    position: relative;
    inset: auto;
    background: var(--theme-bg);
    box-shadow: none;
  }

  .deck-page #navbar.site-header {
    background: transparent;
  }

  #navbar.site-header > .site-header-inner {
    display: block;
    min-height: 0;
    padding: 20px var(--page-gutter) 18px;
  }

  .deck-page #navbar.site-header > .site-header-inner {
    padding: 0;
  }

  .site-header-brand-row {
    justify-content: space-between;
  }

  .site-header-actions,
  .deck-page .site-header-actions {
    position: static;
    top: auto;
    right: auto;
    transform: none;
  }

  .site-header-wordmark {
    font-size: 1.75rem;
  }

  .site-header-menu-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    border: 0;
    background: none;
    color: var(--theme-ink);
    cursor: pointer;
  }

  .site-header-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform var(--motion-fast) var(--ease-out-expo), opacity var(--motion-fast) ease;
  }

  .site-header-menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(7px) rotate(45deg);
  }

  .site-header-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .site-header-menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-7px) rotate(-45deg);
  }

  .deck-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: var(--z-dropdown);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin: 0;
    padding: 12px var(--page-gutter) 20px;
    background: var(--theme-bg);
    border-bottom: 1px solid var(--theme-chrome-hairline);
    box-shadow: var(--theme-menu-shadow);
    font-size: 1rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, -8px, 0);
    transition: opacity 160ms var(--ease-out-expo), transform 180ms var(--ease-out-expo), visibility 0s linear 180ms;
  }

  .deck-page .deck-nav {
    left: -24px;
    right: -24px;
    padding: 14px 24px 22px;
  }

  .deck-nav.is-mobile-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
    transition: opacity 160ms var(--ease-out-expo), transform 180ms var(--ease-out-expo), visibility 0s;
  }

  .deck-nav-item {
    width: 100%;
  }

  .deck-menu,
  .deck-menu--end {
    position: static;
    display: none;
    min-width: 0;
    padding: 2px 0 8px 16px;
    border: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }

  .deck-menu.is-open {
    display: flex;
    flex-direction: column;
  }

  .deck-menu a {
    padding: 6px 0;
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   THEME TOGGLE, SCROLL PROGRESS & BACK TO TOP
   ========================================================================== */

.theme-toggle-enhanced {
  position: relative;
  overflow: hidden;
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Trigger glyph: four swatches, the first filled in the palette accent. */
.theme-picker-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.theme-picker-icon .is-filled {
  fill: var(--theme-accent, currentColor);
  stroke: var(--theme-accent, currentColor);
}

/* --------------------------------------------------------------------------
   Theme picker (built by js/theme.js): a panel beside the header button,
   styled like the nav menus. Each tile is a type swatch ("Aa" in the
   palette's ink on its background) drawn via [data-swatch] → --p-*.
   -------------------------------------------------------------------------- */
.theme-picker {
  --picker-in: cubic-bezier(0.16, 1, 0.3, 1);
  --picker-out: cubic-bezier(0.4, 0, 1, 1);
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-popover);
  width: min(372px, calc(100vw - 24px));
  padding: 18px 18px 20px;
  border: 1px solid var(--theme-menu-hairline);
  border-radius: 16px;
  background: var(--theme-menu-bg);
  box-shadow: var(--theme-menu-shadow);
  color: var(--theme-ink);
  opacity: 0;
  transform: translate3d(0, -6px, 0) scale(0.97);
  transform-origin: top right;
  transition:
    opacity 220ms var(--picker-in),
    transform 460ms var(--picker-in);
}

.theme-picker[hidden] {
  display: none;
}

.theme-picker[data-placement="above"] {
  transform: translate3d(0, 6px, 0) scale(0.97);
}

.theme-picker[data-state="open"] {
  opacity: 1;
  transform: none;
}

.theme-picker[data-state="closing"] {
  opacity: 0;
  transform: scale(0.985);
  transition:
    opacity 140ms var(--picker-out),
    transform 160ms var(--picker-out);
}

.theme-picker-head {
  margin-bottom: 14px;
}

.theme-picker-label {
  color: var(--site-text-muted);
  font-size: var(--eyebrow-size);
  font-weight: var(--eyebrow-weight);
  letter-spacing: var(--eyebrow-tracking);
  line-height: var(--leading-tight);
  text-transform: uppercase;
}

.theme-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 12px;
}

@media (max-width: 340px) {
  .theme-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.theme-tile {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--site-text-muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* Tiles settle in as a ripple from the trigger's corner (--wave is set per
   tile by js/theme.js from its row/column distance to that corner). */
.theme-picker[data-state="open"] .theme-tile {
  animation: theme-tile-in 520ms var(--picker-in) both;
  animation-delay: calc(40ms + var(--wave, 0) * 28ms);
}

@keyframes theme-tile-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
}

.theme-tile:focus {
  outline: none;
}

/* A type swatch: the palette's background with "Aa" in its ink. */
.theme-tile-swatch {
  display: flex;
  aspect-ratio: 5 / 4;
  align-items: flex-end;
  padding: 7px 8px;
  border-radius: 7px;
  background: var(--p-bg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--p-ink) 10%, transparent);
  transition:
    transform 280ms var(--picker-in),
    box-shadow 200ms ease;
}

.theme-tile-aa {
  color: var(--p-ink);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
}

.theme-tile-name {
  overflow: hidden;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 160ms ease;
}

.theme-tile:hover .theme-tile-swatch {
  transform: translate3d(0, -2px, 0);
}

.theme-tile:hover .theme-tile-name,
.theme-tile:focus-visible .theme-tile-name,
.theme-tile[aria-checked="true"] .theme-tile-name {
  color: var(--theme-ink);
}

.theme-tile[aria-checked="true"] .theme-tile-swatch {
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--p-ink) 10%, transparent),
    0 0 0 2px var(--theme-menu-bg),
    0 0 0 3px var(--theme-ink);
}

.theme-tile:focus-visible .theme-tile-swatch {
  outline: 1px solid color-mix(in srgb, var(--theme-ink) 55%, transparent);
  outline-offset: 5px;
}

@media (prefers-reduced-motion: reduce) {
  .theme-picker,
  .theme-picker[data-state="closing"],
  .theme-tile-swatch {
    transition: opacity 120ms linear;
  }

  .theme-picker,
  .theme-picker[data-placement="above"],
  .theme-picker[data-state="closing"] {
    transform: none;
  }

  .theme-picker[data-state="open"] .theme-tile {
    animation: none;
  }

  .theme-tile:hover .theme-tile-swatch {
    transform: none;
  }
}

/* Theme switch: a short same-document cross-fade. Neutralise the cross-page
   rules (refocus keyframes, the site-nav group) while it runs. */
html.theme-fade * {
  view-transition-name: none !important;
}

html.theme-fade::view-transition-group(root),
html.theme-fade::view-transition-old(root) {
  animation: none;
  mix-blend-mode: normal;
}

html.theme-fade::view-transition-new(root) {
  animation: theme-fade-in 240ms ease both;
  mix-blend-mode: normal;
}

@keyframes theme-fade-in {
  from { opacity: 0; }
}

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, #121212, #666666);
  z-index: 9998;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 80ms linear;
}

.dark #scroll-progress {
  background: linear-gradient(90deg, #FFFFFF, #999999);
}

html.tinted #scroll-progress {
  background: linear-gradient(90deg, var(--p-ink), var(--p-accent));
}

#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: var(--z-indicator);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: var(--radius-round);
  background: var(--theme-ink);
  color: var(--theme-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.9);
  transition: opacity 160ms var(--ease-out-expo), visibility 160ms var(--ease-out-expo), transform 200ms var(--ease-out-expo);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

#back-to-top:hover {
  transform: translateY(-2px);
}

#back-to-top svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   COLLECTION PAGES (LIVE GENERATORS & ORBITAL)
   ========================================================================== */

body.collection-page,
body.orbital-page {
  background: var(--theme-bg);
}

.collection-page .collection-hero {
  padding-top: 0;
}

.collection-page .collection-hero h1 {
  font-size: var(--type-xl);
  line-height: 0.95;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.collection-page .collection-hero .h-px {
  opacity: 0.16;
}

.collection-page .collection-live {
  margin-top: 0;
  padding-top: clamp(1.25rem, 2.5vw, 2.25rem);
  padding-bottom: clamp(2.5rem, 4.5vw, 4rem);
  background: var(--theme-live-bg);
  border-bottom: 1px solid var(--theme-live-hairline);
}

.collection-live-title-page .collection-live .grid {
  display: grid;
  grid-template-columns: minmax(14rem, 0.55fr) minmax(0, 1.45fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: clamp(2rem, 5vw, 5rem);
  row-gap: clamp(0.85rem, 1.6vw, 1.25rem);
}

.collection-live-title-page .collection-live-copy {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: start;
  width: 100%;
  max-width: 34rem;
}

.collection-live-title-page .collection-live-copy h1 {
  font-size: var(--type-xl);
  line-height: 0.94;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.collection-live-title-page .collection-live-ext-link {
  text-decoration: none;
  border-bottom: 1px solid var(--theme-hairline);
  padding-bottom: 0.15rem;
}

.collection-live-title-page .collection-live-ext-link:hover {
  border-bottom-color: currentColor;
}

.collection-page .collection-live h2 {
  display: none;
}

.collection-live-title-page .collection-live .grid > .collection-live-copy + div {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  justify-self: end;
  width: min(100%, 920px, calc(100dvh - 12rem));
  display: flex;
  justify-content: center;
}

.collection-live-title-page .collection-live .grid > .collection-live-copy + div:not(:has(.p-4)) {
  display: none;
}

.collection-page .collection-live .grid > div > .p-4 {
  width: min(100%, 32rem);
  text-align: center;
  background: var(--theme-surface);
}

.collection-live-title-page .collection-live .grid > :last-child {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: end;
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.collection-page .collection-live-frame {
  max-width: min(100%, 920px, calc(100dvh - 12rem));
  margin-left: auto;
  margin-right: 0;
  border-radius: var(--radius);
  border: 1px solid var(--theme-frame-hairline);
  background: var(--theme-frame-bg);
}

.collection-page .collection-live-frame iframe {
  display: block;
  background: #FFFFFF;
}

.collection-scroll-indicator {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  z-index: var(--z-indicator);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transform: translateX(-50%);
  padding: 0.52rem 0.72rem 0.52rem 0.9rem;
  border: 1px solid var(--theme-hairline);
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-bg) 88%, var(--theme-ink) 6%);
  color: var(--theme-ink);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: var(--type-xs);
  line-height: 1;
  text-decoration: none;
  transition: opacity 200ms var(--ease-out-expo), transform 200ms var(--ease-out-expo), border-color 160ms ease;
}

.collection-scroll-indicator.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
}

.collection-scroll-indicator::after {
  content: '';
  width: 0.42rem;
  height: 0.42rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  animation: collection-scroll-cue 1.4s ease-in-out infinite;
}

.collection-scroll-indicator:hover,
.collection-scroll-indicator:focus-visible {
  border-color: var(--theme-ink);
  transform: translateX(-50%) translateY(-2px);
}

@keyframes collection-scroll-cue {
  0%, 100% { translate: 0 -1px; opacity: 0.65; }
  50% { translate: 0 3px; opacity: 1; }
}

.collection-page .collection-gallery {
  scroll-margin-top: calc(var(--pastelle-nav-height) + 1rem);
  padding-top: clamp(4.5rem, 7vw, 7.5rem);
  padding-bottom: clamp(5rem, 8vw, 8.5rem);
}

.collection-page .collection-gallery > .text-center,
.collection-page .collection-gallery > .text-left {
  text-align: left;
  max-width: 58rem;
  margin-left: 0;
  margin-right: auto;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.collection-page .collection-gallery h2 {
  font-size: var(--type-xl);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 500;
  text-wrap: balance;
}

.collection-page .collection-gallery p {
  max-width: 44rem;
  margin-left: 0;
  margin-right: auto;
  color: var(--theme-copy-muted);
  line-height: 1.65;
}

.collection-page .collection-gallery .grid,
.collection-page .collection-gallery #galleryGrid,
.collection-page .collection-gallery #gallery-grid {
  gap: clamp(1rem, 2vw, 1.75rem);
}

.collection-page .gallery-item {
  cursor: zoom-in;
  border-radius: var(--radius);
  transition: transform 240ms var(--ease-out-expo), opacity 200ms ease;
}

.collection-page .gallery-item:hover,
.collection-page .gallery-item:focus-visible {
  transform: translate3d(0, -3px, 0);
}

.collection-page .gallery-item > .relative,
.collection-page .gallery-item .aspect-ratio-box {
  border-radius: var(--radius);
  margin-bottom: 0;
  background: var(--theme-surface-muted);
  border: 1px solid var(--theme-hairline);
}

.collection-page .gallery-item img {
  transform-origin: center;
  transition: transform 280ms var(--ease-out-expo);
}

.collection-page .gallery-item:hover img,
.collection-page .gallery-item:focus-visible img {
  transform: scale(1.025);
}

/* Orbital Editorial Bento */
.orbital-page .orbital-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.orbital-page .orbital-title {
  position: relative;
  width: max-content;
  max-width: 100%;
  color: var(--theme-ink);
  animation: orbital-title-reveal 420ms var(--ease-out-expo) both;
}

.orbital-page .orbital-title::before {
  content: '';
  position: absolute;
  left: 0.04em;
  right: -0.12em;
  bottom: -0.16em;
  z-index: -1;
  height: 1px;
  background: currentColor;
  opacity: 0.3;
  transform: scaleX(0);
  transform-origin: left center;
  animation: orbital-title-rule 420ms var(--ease-out-expo) 100ms both;
}

@keyframes orbital-title-reveal {
  from { clip-path: inset(0 100% 0 0); opacity: 0.72; transform: translateY(0.06em); }
  to { clip-path: inset(0 0 0 0); opacity: 1; transform: translateY(0); }
}

@keyframes orbital-title-rule {
  to { transform: scaleX(1); }
}

.orbital-page .collection-gallery {
  padding-top: clamp(1.5rem, 3vw, 3rem);
}

.orbital-page .collection-gallery #gallery-grid {
  --orbital-gap: clamp(0.9rem, 1.6vw, 1.75rem);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--orbital-gap);
}

.orbital-page .gallery-item {
  cursor: pointer;
  min-width: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--theme-hairline);
  background: var(--theme-surface-muted);
}

.orbital-page .gallery-item.orbital-slot-1 { grid-column: 1 / span 6; grid-row: 1 / span 6; }
.orbital-page .gallery-item.orbital-slot-2 { grid-column: 7 / span 3; grid-row: 1 / span 3; }
.orbital-page .gallery-item.orbital-slot-3 { grid-column: 10 / span 3; grid-row: 1 / span 3; }
.orbital-page .gallery-item.orbital-slot-4 { grid-column: 7 / span 3; grid-row: 4 / span 3; }
.orbital-page .gallery-item.orbital-slot-5 { grid-column: 10 / span 3; grid-row: 4 / span 3; }
.orbital-page .gallery-item.orbital-slot-6 { grid-column: 1 / span 4; grid-row: 7 / span 4; }
.orbital-page .gallery-item.orbital-slot-7 { grid-column: 5 / span 4; grid-row: 7 / span 4; }
.orbital-page .gallery-item.orbital-slot-8 { grid-column: 9 / span 4; grid-row: 7 / span 4; }
.orbital-page .gallery-item.orbital-slot-9 { grid-column: 1 / span 6; grid-row: 11 / span 6; }
.orbital-page .gallery-item.orbital-slot-10 { grid-column: 7 / span 6; grid-row: 11 / span 6; }

.orbital-page .gallery-item > .relative {
  aspect-ratio: 1 / 1;
  height: 100%;
  border: 0;
  background: transparent;
}

.orbital-page .gallery-item img {
  object-fit: contain;
}

.orbital-page .orbital-card-copy {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  padding: clamp(0.8rem, 1.2vw, 1.15rem);
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--theme-bg) 88%, transparent) 34%, color-mix(in srgb, var(--theme-bg) 96%, transparent));
  opacity: 0;
  transform: translateY(0.3rem);
  transition: opacity 200ms ease, transform 200ms var(--ease-out-expo);
}

.orbital-page .gallery-item:hover .orbital-card-copy,
.orbital-page .gallery-item:focus-within .orbital-card-copy {
  opacity: 1;
  transform: translateY(0);
}

.orbital-page .orbital-card-title {
  min-width: 0;
  color: var(--theme-ink);
  text-wrap: balance;
}

.orbital-page .orbital-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.orbital-page .orbital-edition-label {
  flex: 0 0 auto;
  width: max-content;
  border: 1px solid var(--theme-hairline);
  padding: 0.25rem 0.75rem;
  color: var(--site-text-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: var(--type-xs);
  line-height: 1.1;
}

.orbital-page .gallery-item a[href*="superrare.com/artwork"]:hover,
.orbital-page .gallery-item a[href*="superrare.com/artwork"]:focus-visible {
  background: var(--theme-ink);
  color: var(--theme-bg);
}

@media (min-width: 1024px) {
  .orbital-page .gallery-item.orbital-tile-small .orbital-card-copy { padding: 0.8rem; }
  .orbital-page .gallery-item.orbital-tile-small .orbital-card-title { font-size: var(--type-base); }
  .orbital-page .gallery-item.orbital-tile-small .orbital-card-actions { align-items: flex-start; flex-direction: column; gap: 0.5rem; }
}

@media (max-width: 767px) {
  .collection-live-title-page .collection-live .grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    row-gap: 1.25rem;
  }

  .collection-live-title-page .collection-live-copy { grid-column: 1; grid-row: 1; }
  .collection-live-title-page .collection-live .grid > :last-child { grid-column: 1; grid-row: 2; justify-content: center; }
  .collection-live-title-page .collection-live .grid > .collection-live-copy + div { grid-column: 1; grid-row: 3; justify-self: center; width: 100%; }

  .collection-page .collection-live-frame {
    max-width: 100%;
    margin-inline: auto;
  }

  .collection-scroll-indicator {
    bottom: 0.85rem;
    padding: 0.48rem 0.66rem 0.48rem 0.78rem;
  }

  .orbital-page .collection-gallery #gallery-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(1.25rem, 6vw, 2rem);
  }

  .orbital-page .gallery-item[class*="orbital-slot-"] {
    grid-column: 1 / -1;
    grid-row: auto / span 6;
  }
}

/* ==========================================================================
   CAPSULE TABS & IMAGE MODAL HELPERS
   ========================================================================== */

[data-image-modal-trigger] {
  cursor: pointer;
}

[data-image-modal-overlay] {
  overscroll-behavior: contain;
}

[data-ui-capsule].ui-capsule-group {
  position: relative;
  isolation: isolate;
  gap: 0;
  padding: 3px;
  border: 1px solid var(--theme-hairline);
  border-radius: var(--radius);
  background: var(--theme-surface);
}

[data-ui-capsule] > .ui-capsule-indicator {
  position: absolute;
  z-index: 0;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 0;
  border: 1px solid var(--theme-hairline);
  border-radius: var(--radius);
  background: var(--theme-bg);
  opacity: 0;
  pointer-events: none;
  transform-origin: left center;
}

[data-ui-capsule] > :is(button, [role="tab"]) {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
}

[data-ui-tabs] [role="tabpanel"][hidden] {
  display: none;
}

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */

#site-footer {
  --footer-ink: var(--site-text-primary);
  --footer-muted: var(--site-text-muted);
  --footer-hairline: var(--theme-hairline);
  margin-top: clamp(3.5rem, 7vw, 8rem);
  padding: 2rem 0;
  background: transparent;
  border-top: 1px solid var(--footer-hairline);
  color: var(--footer-ink);
}

.site-footer-inner {
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 3rem;
  align-items: end;
}

#site-footer a.footer-mark {
  display: inline-block;
  color: var(--footer-ink);
  font-size: var(--type-lg);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.02em;
  text-decoration: none;
}

#site-footer .footer-note {
  max-width: 34rem;
  margin-top: 0.75rem;
  color: var(--footer-muted);
  font-size: var(--type-sm);
  line-height: 1.65;
}

#site-footer .footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(7rem, auto));
  gap: 1.5rem clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
  font-family: 'Manrope', sans-serif;
  font-size: var(--type-sm);
  font-weight: 500;
}

#site-footer .footer-group {
  display: grid;
  gap: 0.6rem;
  justify-items: start;
}

#site-footer .footer-group-label {
  margin: 0 0 0.25rem;
  color: var(--footer-muted);
  font-size: var(--type-xs);
  font-weight: 600;
  opacity: 0.72;
}

/* Palettes keep every piece of text at full ink: no opacity-dimmed labels. */
html.tinted #site-footer .footer-group-label,
html.tinted .deck-now-arrow {
  opacity: 1;
}

#site-footer .footer-links a {
  color: var(--footer-muted);
  text-decoration: none;
  transition: color 150ms ease, transform 160ms var(--ease-out-expo);
}

#site-footer .footer-links a:hover {
  color: var(--footer-ink);
  transform: translate3d(3px, 0, 0);
}

@media (max-width: 767px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
  }

  .media-frame,
  .skeleton {
    background-image: none;
    animation: none;
  }

  .orbital-page .orbital-title {
    clip-path: none;
    opacity: 1;
    transform: none;
  }

  .orbital-page .orbital-title::before {
    transform: scaleX(1);
  }
}
