/* Model grid cards — editorial / luxury (glass panel over image) */

.modelCardRoot {
  background: transparent;
  border-radius: 14px;
  border: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: #141414;
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 420ms ease;
}

html[data-public-theme='dark'] .modelCardRoot {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  color: #f5f4f1;
}

[data-model-card]:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

html[data-public-theme='dark'] [data-model-card]:hover {
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.65);
}

/* Image frame — film metrics; hover lift = strip height minus glass bottom inset + tight gap */
.modelCardMedia {
  --film-tray-bottom: 12px;
  --film-tray-height: clamp(70px, 10vw, 92px);
  /* Space between glass bottom edge and top of thumbnail strip after hover lift */
  --panel-above-tray-gap: 6px;
  --glass-hover-lift-subtle: 5px;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}

/* Bottom readability fade: day = darken toward black glass; night = lighten toward white glass */
.modelCardMedia::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 42%,
    rgba(0, 0, 0, 0.18) 72%,
    rgba(0, 0, 0, 0.32) 100%
  );
  transition: background 380ms ease;
}

html[data-public-theme='dark'] .modelCardMedia::after {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 42%,
    rgba(255, 255, 255, 0.14) 72%,
    rgba(255, 255, 255, 0.26) 100%
  );
}

[data-model-card]:hover .modelCardMedia::after {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 38%,
    rgba(0, 0, 0, 0.26) 68%,
    rgba(0, 0, 0, 0.42) 100%
  );
}

html[data-public-theme='dark'] [data-model-card]:hover .modelCardMedia::after {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 38%,
    rgba(255, 255, 255, 0.2) 68%,
    rgba(255, 255, 255, 0.34) 100%
  );
}

.modelCardHeroImg {
  display: block;
  transform: scale(1);
  transition: transform 640ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

[data-model-card]:hover .modelCardHeroImg {
  transform: scale(1.03);
}

/* Floating glass — default: low / grounded; hover: rises when a film strip exists */
.modelCardGlass {
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: var(--film-tray-bottom);
  z-index: 3;
  padding: 0.7rem 0.85rem 0.8rem;
  border-radius: 12px;
  /* Day: black frosted bar + light type */
  background: rgba(8, 8, 12, 0.78);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  transform: translateY(0);
  transition:
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 420ms ease,
    border-color 420ms ease;
}

.modelCardGlass .modelCardName {
  color: rgba(255, 255, 255, 0.96);
}

.modelCardGlass .modelCardMeta {
  color: rgba(255, 255, 255, 0.52);
}

[data-model-card]:hover .modelCardGlass .modelCardMeta {
  color: rgba(255, 255, 255, 0.72);
}

/* Night: white frosted glass, dark type */
html[data-public-theme='dark'] .modelCardGlass {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  color: #141414;
}

html[data-public-theme='dark'] .modelCardGlass .modelCardName {
  color: #141414;
}

html[data-public-theme='dark'] .modelCardGlass .modelCardMeta {
  color: rgba(0, 0, 0, 0.48);
}

html[data-public-theme='dark'] [data-model-card]:hover .modelCardGlass .modelCardMeta {
  color: rgba(0, 0, 0, 0.62);
}

/* No film strip: gentle lift only */
[data-model-card]:hover .modelCardGlass {
  transform: translateY(calc(-1 * var(--glass-hover-lift-subtle)));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.09);
}

html[data-public-theme='dark'] [data-model-card]:hover .modelCardGlass {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

/* Film strip: lift only enough to clear strip; glass stays close (gap = --panel-above-tray-gap) */
[data-model-card]:has(.filmTray):hover .modelCardGlass {
  transform: translateY(
    calc(-1 * (var(--film-tray-height) - var(--film-tray-bottom) + var(--panel-above-tray-gap)))
  );
}

.modelCardName {
  margin: 0;
  padding: 0;
  font-family: ui-serif, 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman', serif;
  font-size: clamp(1.22rem, 3vw, 1.48rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: inherit;
  opacity: 0.88;
  transition: opacity 320ms ease;
}

[data-model-card]:hover .modelCardName {
  opacity: 1;
}

.modelCardMeta {
  margin: 0.45rem 0 0;
  padding: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.45;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.42);
  transition: color 320ms ease, opacity 320ms ease;
  opacity: 0.85;
}

/* No film strip: keep glass low like a normal footer overlay */
.modelCardMedia--placeholder {
  --film-tray-height: 0px;
  --panel-above-tray-gap: 0.5rem;
  --film-tray-bottom: 0.65rem;
}

.modelCardMedia--placeholder .modelCardPlaceholderLabel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0.35;
}

@media (min-width: 768px) {
  .modelCardMedia:not(.modelCardMedia--placeholder) {
    --film-tray-bottom: 14px;
    --panel-above-tray-gap: 8px;
    --glass-hover-lift-subtle: 6px;
  }

  .modelCardMedia--placeholder {
    --film-tray-bottom: 0.85rem;
  }

  .modelCardGlass {
    left: 0.85rem;
    right: 0.85rem;
    padding: 0.85rem 1rem 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modelCardRoot,
  [data-model-card]:hover {
    transition: none;
  }

  [data-model-card]:hover {
    transform: none;
  }

  .modelCardHeroImg,
  [data-model-card]:hover .modelCardHeroImg {
    transition: none;
    transform: none;
  }

  .modelCardMedia::after {
    transition: none;
  }

  .modelCardGlass {
    transition: none;
    transform: translateY(0);
  }

  [data-model-card]:hover .modelCardGlass {
    transform: translateY(0);
  }

  /* Keep panel clear of strip when both show; no motion */
  [data-model-card]:has(.filmTray):hover .modelCardGlass {
    transform: translateY(
      calc(-1 * (var(--film-tray-height) - var(--film-tray-bottom) + var(--panel-above-tray-gap)))
    );
  }

  .modelCardName,
  .modelCardMeta {
    transition: none;
  }

  .filmTray {
    transition: none;
  }

  [data-model-card]:hover .filmTray {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Film strip: bottom-anchored; z above glass; soft slide + fade on hover */
.filmTray {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--film-tray-height);
  transform: translateY(calc(100% + 12px));
  opacity: 0;
  transition:
    transform 440ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 360ms ease-out;
  /* Day: dark tray under black glass */
  background: rgba(12, 12, 16, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-public-theme='dark'] .filmTray {
  /* Night: light tray */
  background: rgba(255, 255, 255, 0.9);
  border-top-color: rgba(0, 0, 0, 0.08);
}

[data-model-card]:hover .filmTray {
  transform: translateY(0);
  opacity: 1;
}

.filmTrack {
  display: flex;
  gap: 12px;
  align-items: center;
  height: 100%;
  padding: 10px 14px;
  will-change: transform;
  animation: filmScroll 12s linear infinite;
  animation-play-state: paused;
}

[data-model-card]:hover .filmTrack {
  animation-play-state: running;
}

@keyframes filmScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.filmThumb {
  width: 74px;
  height: 74px;
  flex: 0 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: #eaeaea;
  position: relative;
}

html[data-public-theme='dark'] .filmThumb {
  background: #2a2a2a;
}

.filmThumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .filmTrack {
    animation: none;
  }

  [data-model-card]:hover .filmTrack {
    animation: none;
  }
}

/* Work restriction badges + non-navigable card when draft dates/location rule out the model */
.modelCardRestrictionBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.modelCardRestrictionBadge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
}

/* Night: glass panel is light — badges must stay dark-on-light for contrast */
html[data-public-theme='dark'] .modelCardGlass .modelCardRestrictionBadge {
  background: rgba(255, 255, 255, 0.94);
  color: #141414;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.modelCardRestrictionNote {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  line-height: 1.35;
  color: rgba(255, 210, 210, 0.95);
}

.modelCardRoot--workBlocked {
  pointer-events: none;
  opacity: 0.58;
  cursor: not-allowed;
}

/* ── Touch / coarse pointer: first tap expands (mirrors hover); CTA links to profile ── */
[data-model-card-touch-root] {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

[data-model-card-touch-root]:focus {
  outline: none;
}

[data-model-card-touch-root]:focus-visible {
  outline: 2px solid rgba(201, 169, 98, 0.95);
  outline-offset: 3px;
}

@media (min-width: 768px) {
  [data-model-card-touch-root]:focus-visible {
    outline-offset: 4px;
  }
}

/* Expanded: mirror desktop hover (subtle, fast transitions already on children) */
[data-model-card-touch-root][data-expanded='true'] {
  transform: translateY(-1px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

html[data-public-theme='dark'] [data-model-card-touch-root][data-expanded='true'] {
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.65);
}

[data-model-card-touch-root][data-expanded='true'] .modelCardMedia::after {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 38%,
    rgba(0, 0, 0, 0.26) 68%,
    rgba(0, 0, 0, 0.42) 100%
  );
}

html[data-public-theme='dark'] [data-model-card-touch-root][data-expanded='true'] .modelCardMedia::after {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 38%,
    rgba(255, 255, 255, 0.2) 68%,
    rgba(255, 255, 255, 0.34) 100%
  );
}

[data-model-card-touch-root][data-expanded='true'] .modelCardHeroImg {
  transform: scale(1.03);
}

[data-model-card-touch-root][data-expanded='true'] .modelCardGlass {
  transform: translateY(calc(-1 * var(--glass-hover-lift-subtle)));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.09);
}

html[data-public-theme='dark'] [data-model-card-touch-root][data-expanded='true'] .modelCardGlass {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}

[data-model-card-touch-root][data-expanded='true'] .modelCardGlass .modelCardMeta {
  color: rgba(255, 255, 255, 0.72);
}

html[data-public-theme='dark'] [data-model-card-touch-root][data-expanded='true'] .modelCardGlass .modelCardMeta {
  color: rgba(0, 0, 0, 0.62);
}

[data-model-card-touch-root][data-expanded='true'] .modelCardName {
  opacity: 1;
}

[data-model-card-touch-root]:has(.filmTray)[data-expanded='true'] .modelCardGlass {
  transform: translateY(
    calc(-1 * (var(--film-tray-height) - var(--film-tray-bottom) + var(--panel-above-tray-gap)))
  );
}

[data-model-card-touch-root][data-expanded='true'] .filmTray {
  transform: translateY(0);
  opacity: 1;
}

[data-model-card-touch-root][data-expanded='true'] .filmTrack {
  animation-play-state: running;
}

@media (prefers-reduced-motion: reduce) {
  [data-model-card-touch-root][data-expanded='true'] {
    transform: none;
  }

  [data-model-card-touch-root][data-expanded='true'] .modelCardHeroImg {
    transform: none;
  }

  [data-model-card-touch-root][data-expanded='true'] .modelCardGlass {
    transform: translateY(0);
  }

  [data-model-card-touch-root]:has(.filmTray)[data-expanded='true'] .modelCardGlass {
    transform: translateY(
      calc(-1 * (var(--film-tray-height) - var(--film-tray-bottom) + var(--panel-above-tray-gap)))
    );
  }
}

.modelCardViewProfileCta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.65rem;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.95);
  color: #141414;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition:
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.modelCardViewProfileCta:active {
  transform: scale(0.98);
}

html[data-public-theme='dark'] .modelCardViewProfileCta {
  background: #141414;
  color: #f5f4f1;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}

