/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --font-sans: 'Manrope', sans-serif;
  --font-serif: 'Sora', sans-serif;
  --font-mono: 'DM Sans', sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  background: #050508;
  font-family: var(--font-sans);
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ═══════════════════════════════════════════════════════════════
   SCENE CONTAINER
   ═══════════════════════════════════════════════════════════════ */
.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

#unicorn-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.scene:active {
  cursor: grabbing;
}

/* ── Ambient background ──────────────────────────────────────── */
.scene__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 20% 80%, rgba(60, 45, 140, 0.07) 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 80% 20%, rgba(180, 80, 120, 0.05) 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(30, 100, 160, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── Edge vignette ───────────────────────────────────────────── */
.scene__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 75% 70% at 50% 50%,
    transparent 30%,
    rgba(5, 5, 8, 0.75) 100%
  );
  pointer-events: none;
  z-index: 10;
}

/* ── Film grain ──────────────────────────────────────────────── */
.scene__grain {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 11;
}

.scene::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 8, 0.62);
  backdrop-filter: blur(10px);
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease, backdrop-filter 0.5s ease;
}

body.modal-browse-active .scene::after {
  opacity: 1;
}

body.modal-browse-active .scene__perspective {
  z-index: 6;
}

body.modal-browse-active .card {
  border-radius: 44px;
  background: #0b0d12;
}

body.modal-browse-active .card__border {
  border-radius: 44px;
}

body.modal-browse-active .card__img,
body.modal-browse-active .card__video {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
}

body.modal-browse-active .card__overlay {
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 0;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 4;
}

body.modal-browse-active .card__shine {
  opacity: 0.04;
}

body.modal-browse-active .card__gradient {
  opacity: 0;
}

body.modal-browse-active .card__gradient-white {
  opacity: 1;
  transform: translateY(0);
}

body.modal-browse-active .card__category {
  font-size: 10px;
  margin-bottom: 8px;
  letter-spacing: 0.14em;
}

body.modal-browse-active .card__title {
  font-size: 32px;
  line-height: 1.1;
  margin-bottom: 12px;
  color: #12141b;
  font-weight: 600;
}

body.modal-browse-active .card:hover .card__img,
body.modal-browse-active .card:hover .card__video {
  transform: none;
}

/* ═══════════════════════════════════════════════════════════════
   3D PERSPECTIVE LAYER
   ═══════════════════════════════════════════════════════════════ */
.scene__perspective {
  position: absolute;
  inset: 0;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  z-index: 5;
}

/* ═══════════════════════════════════════════════════════════════
   GALLERY CARDS
   ═══════════════════════════════════════════════════════════════ */
.card {
  position: absolute;
  border-radius: 38px;
  cursor: pointer;
  background: #0d0f17;
  will-change: transform, opacity;
  perspective: 1200px;
  transform-style: preserve-3d;
  transition: box-shadow 0.4s ease;
}

body.layout-transitioning .card {
  transition:
    transform 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.68s ease,
    filter 0.68s ease,
    box-shadow 0.68s ease;
}

/* ── Flip Card Structure ─────────────────────────────────────── */
.card__flipper {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transform-style: preserve-3d;
  transition: transform 0.72s cubic-bezier(0.2, 0.85, 0.32, 1.05);
}

.card.is-flipped-right .card__flipper {
  transform: rotateY(180deg);
}

.card.is-flipped-left .card__flipper {
  transform: rotateY(-180deg);
}

.card__face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card__face--front {
  z-index: 2;
  transform: rotateY(0deg);
}

.card__face--back {
  z-index: 1;
  transform: rotateY(180deg);
  background: #0c0e14;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px 30px;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

/* ── Card Back Details ───────────────────────────────────────── */
.card__back-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, var(--accent-color, #6B5CE7) 0%, transparent 60%),
    radial-gradient(circle at 15% 85%, rgba(45, 55, 90, 0.35) 0%, transparent 70%),
    linear-gradient(170deg, #161824 0%, #0c0e14 100%);
  opacity: 0.96;
  pointer-events: none;
}

.card__back-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  align-items: flex-start;
}

.card__back-header {
  margin-top: 2px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.card__back-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.card__back-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.card__back-title {
  font-family: var(--font-serif);
  font-size: 24px;
  color: #ffffff;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.card__back-desc {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: auto;
  overflow-y: auto;
  max-height: 240px;
  padding-right: 4px;
}

.card__back-desc::-webkit-scrollbar {
  width: 3px;
}
.card__back-desc::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.card__back-footer {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-top: 14px;
}

/* ── Subtle Flip Button ──────────────────────────────────────── */
.card__flip-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 14, 20, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.65);
  display: none; /* hidden in tunnel mode */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.22s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.modal-browse-active .card__flip-btn {
  display: inline-flex;
}

.card__flip-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.32);
  transform: scale(1.08);
}

.card__flip-btn:active {
  transform: scale(0.94);
}

.card:hover {
  z-index: 999 !important;
}

.card:hover .card__shine {
  opacity: 0.12;
}

.card:hover .card__overlay {
  opacity: 1;
  transform: translateY(0);
}

.card:hover .card__img {
  transform: scale(1.07);
}

body:not(.modal-browse-active) .card:hover .card__gradient {
  opacity: 0;
}

body:not(.modal-browse-active) .card:hover .card__gradient-white {
  opacity: 1;
  transform: translateY(0);
}

body:not(.modal-browse-active) .card:hover .card__title {
  color: #12141b;
}

/* ── Picture wrapper & Media ─────────────────────────────────── */
.card__picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  overflow: hidden;
  border-radius: inherit;
}

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  opacity: 0;
  filter: blur(4px);
  transform: scale(1.03);
  transition:
    opacity 1.25s cubic-bezier(0.16, 1, 0.3, 1),
    filter 1.25s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, filter, transform;
}

.card__img.is-loaded {
  opacity: 1;
  filter: blur(0px);
  transform: scale(1);
}

.card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  opacity: 0;
  filter: blur(4px);
  transform: scale(1.03);
  transition:
    opacity 1.25s cubic-bezier(0.16, 1, 0.3, 1),
    filter 1.25s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, filter, transform;
}

.card__video.is-loaded {
  opacity: 1;
  filter: blur(0px);
  transform: scale(1);
}

.card:hover .card__video {
  transform: scale(1.07);
}

/* ── Gradient bottom ─────────────────────────────────────────── */
.card__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 25%,
    rgba(0, 0, 0, 0.75) 100%
  );
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── White gradient overlay (hover tunnel / always modal) ────── */
.card__gradient-white {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.78) 72%, rgba(255, 255, 255, 0.96) 100%);
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 2;
}

/* ── Shine highlight ─────────────────────────────────────────── */
.card__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.22) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 3;
}

/* ── Border ring ─────────────────────────────────────────────── */
.card__border {
  position: absolute;
  inset: 0;
  border-radius: 38px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

/* ── Info overlay ────────────────────────────────────────────── */
.card__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 18px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  z-index: 4;
}

.card__category {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 5px;
  opacity: 0.9;
}

.card__title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.01em;
  transition: color 0.5s ease;
}

.card__cta {
  display: none;
}

body.modal-browse-active .card__cta {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(18, 20, 28, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.62) 100%);
  color: #12141b;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(18, 20, 28, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.66);
  transition: background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, transform 0.28s ease;
}

body.modal-browse-active .card__cta::after {
  content: "\2197";
  font-size: 11px;
  line-height: 1;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(0);
}

body.modal-browse-active .card__cta:hover {
  background: linear-gradient(180deg, rgba(18, 20, 28, 0.96) 0%, rgba(18, 20, 28, 0.88) 100%);
  color: rgba(255, 255, 255, 0.97);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

body.modal-browse-active .card__cta:hover::after {
  animation: cta-arrow-loop 0.72s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes cta-arrow-loop {
  0% {
    transform: translate(0, 0);
    opacity: 1;
  }
  42% {
    transform: translate(5px, -5px);
    opacity: 0;
  }
  43% {
    transform: translate(-5px, 5px);
    opacity: 0;
  }
  100% {
    transform: translate(0, 0);
    opacity: 1;
  }
}

body.modal-browse-active .card__cta:active {
  transform: translateY(0);
  background: linear-gradient(180deg, rgba(18, 20, 28, 0.9) 0%, rgba(18, 20, 28, 0.82) 100%);
  color: rgba(255, 255, 255, 0.94);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.modal-browse-active .card__cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(18, 20, 28, 0.2), 0 8px 22px rgba(18, 20, 28, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ═══════════════════════════════════════════════════════════════
   MARQUEE
   ═══════════════════════════════════════════════════════════════ */
.marquee-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 900px;
  height: 52px;
  overflow: hidden;
  z-index: 2;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
}

.marquee-container:active {
  cursor: grabbing;
}

.marquee-container::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 200px;
  background: linear-gradient(90deg, #000000 0%, rgba(0, 0, 0, 0.9) 50%, transparent 100%);
  z-index: 10;
  pointer-events: none;
}

.marquee-container::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 200px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.9) 50%, #000000 100%);
  z-index: 10;
  pointer-events: none;
}

.marquee {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  padding: 0;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 16px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.05em;
  will-change: transform;
  backface-visibility: hidden;
}

.marquee-text {
  display: flex;
  gap: 40px;
  align-items: center;
}

.marquee-bullet {
  color: rgba(255, 255, 255, 0.2);
}

.marquee-gradient-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 25%;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
  z-index: 1;
  pointer-events: none;
}

.bottom-gradient {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 54%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.25) 15%,
    rgba(0, 0, 0, 0.5) 30%,
    rgba(0, 0, 0, 0.8) 50%,
    rgba(0, 0, 0, 1.0) 75%,
    rgba(0, 0, 0, 1.0) 100%
  );
  z-index: 1;
  pointer-events: none;
}

body.modal-browse-active .bottom-gradient {
  height: 29%;
}

body.modal-browse-active .marquee-container {
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
  pointer-events: none;
}

.header > * {
  pointer-events: auto;
}

.logo {
  font-family: var(--font-serif);
  font-size: 23px;
  color: #fff;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.logo__dot {
  color: #6B5CE7;
  font-style: italic;
}

.nav {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  list-style: none;
}

.nav__link {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
}

.nav__link svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.5;
}

.nav__link:hover {
  color: rgba(255, 255, 255, 0.9);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.3s ease;
}

.nav__link:hover::after {
  width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 50;
  pointer-events: none;
}

.footer > * {
  pointer-events: auto;
}

.scroll-cue {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.06em;
}

.scroll-cue__track {
  width: 2px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1px;
  overflow: hidden;
  position: relative;
}

.scroll-cue__pip {
  position: absolute;
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 1px;
  animation: pipSlide 1.5s ease-in-out infinite;
}

@keyframes pipSlide {
  0%, 100% { top: 0; }
  50% { top: 26px; }
}

.counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.04em;
}

.counter__current {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   PROJECT MODAL
   ═══════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 4, 8, 0);
  backdrop-filter: blur(0px);
  transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 24px;
  opacity: 0;
  pointer-events: none;
}

.modal-backdrop.is-open {
  background: rgba(4, 4, 8, 0.92);
  backdrop-filter: blur(28px);
  opacity: 1;
  pointer-events: auto;
}

body.modal-browse-active .modal-backdrop.is-open {
  background: rgba(4, 4, 8, 0.12);
  backdrop-filter: blur(0px);
  touch-action: none;
  overscroll-behavior: none;
  pointer-events: none;
}

body.modal-browse-active .modal {
  display: none;
}

@media (max-width: 768px) {
  body.modal-browse-active .card__img,
  body.modal-browse-active .card__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  body.modal-browse-active .card__gradient {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.78) 72%, rgba(255, 255, 255, 0.96) 100%);
  }

  body.modal-browse-active .card__overlay {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 24px 20px;
    justify-content: flex-end;
  }

  body.modal-browse-active .card__title {
    font-size: 24px;
    line-height: 1.12;
    margin-bottom: 8px;
  }

  body.modal-browse-active .card__category {
    font-size: 9px;
    margin-bottom: 6px;
  }

  body.modal-browse-active .card__cta {
    margin-top: 10px;
    min-height: 32px;
    padding: 0 14px;
    font-size: 10px;
  }

  body.modal-browse-active .card__face--back {
    padding: 24px 20px;
  }

  body.modal-browse-active .card__back-title {
    font-size: 20px;
    margin-bottom: 8px;
  }

  body.modal-browse-active .card__back-desc {
    font-size: 12px;
    line-height: 1.55;
    max-height: 190px;
  }

  body.modal-browse-active .card__back-cta {
    margin-top: 12px;
    padding: 10px 16px;
    font-size: 10px;
  }
}

.modal {
  width: min(92vw, 880px);
  max-height: 88vh;
  background: linear-gradient(150deg, #141418, #0b0b0f);
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  box-shadow:
    0 60px 140px -30px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: scale(0.88) translateY(40px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-backdrop.is-open .modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal__media {
  flex: 1 1 55%;
  position: relative;
  overflow: hidden;
  min-height: 300px;
  background: #0d0f17;
}

.modal__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal__img.is-loaded {
  opacity: 1;
}

.modal__img#modalVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal__img#modalVideo.is-loaded {
  opacity: 1;
}

.modal__media-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 50%, #0b0b0f 100%);
}

.modal__body {
  flex: 1 1 45%;
  padding: 52px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.5);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.modal__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.modal__category {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.modal__title {
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 16px;
}

.modal__desc {
  font-family: var(--font-sans);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.75;
  margin: 0 0 30px;
}

.modal__cta {
  align-self: flex-start;
  padding: 13px 30px;
  border-radius: 50px;
  border: none;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal__cta:hover {
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .header {
    padding: 18px 22px;
  }

  .footer {
    padding: 18px 22px;
  }

  .nav {
    gap: 14px;
    align-items: center;
  }

  .card__title {
    font-size: 16px;
  }

  .card__overlay {
    padding: 14px 12px;
  }

  .modal {
    flex-direction: column;
  }

  .modal__media {
    flex: none;
    min-height: 220px;
    max-height: 240px;
  }

  .modal__media-fade {
    background: linear-gradient(180deg, transparent 40%, #0b0b0f 100%);
  }

  .modal__body {
    padding: 24px 28px 36px;
  }

  .modal__title {
    font-size: 28px;
  }

  .bottom-gradient {
    height: 38%;
  }

  body.modal-browse-active .bottom-gradient {
    height: 16%;
  }
}
