/* ========== Studio — artsy gallery ========== */

.studio-page {
  padding-top: 7rem;
  padding-bottom: 5rem;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.studio-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 10% 20%, rgba(121, 197, 106, 0.08), transparent 50%),
    radial-gradient(ellipse 40% 50% at 90% 80%, rgba(232, 197, 71, 0.06), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.studio-inner {
  width: var(--container);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.studio-header {
  margin-bottom: 3rem;
  max-width: 36rem;
}

.studio-header__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.studio-header__title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--sage) 80%, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.studio-header__sub {
  color: var(--text-muted);
  font-size: 1.125rem;
  line-height: 1.7;
}

/* Tabs */
.studio-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 3rem;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}

.studio-tab {
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.3s, background 0.3s, transform 0.3s var(--ease-spring);
  position: relative;
}

.studio-tab:hover {
  color: var(--text-primary);
}

.studio-tab.active {
  background: linear-gradient(135deg, var(--leaf), #6ab85c);
  color: var(--forest);
  box-shadow: 0 4px 16px rgba(121, 197, 106, 0.35);
}

.studio-tab.active:hover {
  transform: scale(1.03);
}

/* Masonry-ish grid */
.studio-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.studio-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.4s, box-shadow 0.4s, transform 0.5s var(--ease-out);
  transform-style: preserve-3d;
}

.studio-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow-gold), 0 20px 40px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

/* Varied sizes for artsy layout */
.studio-card--wide {
  grid-column: span 7;
  aspect-ratio: 16 / 10;
}

.studio-card--tall {
  grid-column: span 5;
  aspect-ratio: 3 / 4;
}

.studio-card--square {
  grid-column: span 6;
  aspect-ratio: 1;
}

.studio-card--full {
  grid-column: span 12;
  aspect-ratio: 21 / 9;
}

.studio-card__media {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: transform 0.7s var(--ease-out);
}

.studio-card:hover .studio-card__media {
  transform: scale(1.06);
}

.studio-card__label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(13, 35, 26, 0.92) 0%, transparent 55%);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s, transform 0.4s var(--ease-out);
}

.studio-card:hover .studio-card__label {
  opacity: 1;
  transform: translateY(0);
}

.studio-card__cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.studio-card__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
}

.studio-card__cta {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--leaf);
  font-weight: 500;
}

/* Always show label on touch */
@media (pointer: coarse) {
  .studio-card__label {
    opacity: 1;
    transform: none;
  }
}

/* Floating deco orbs */
.studio-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  animation: studio-float 12s ease-in-out infinite alternate;
}

.studio-orb--1 {
  width: 280px;
  height: 280px;
  background: var(--leaf);
  top: 15%;
  right: 5%;
  animation-delay: 0s;
}

.studio-orb--2 {
  width: 200px;
  height: 200px;
  background: var(--gold);
  bottom: 20%;
  left: 8%;
  animation-delay: -4s;
}

@keyframes studio-float {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(20px, -30px) scale(1.1); }
}

/* Panel visibility */
.studio-panel {
  display: none;
}

.studio-panel.active {
  display: grid;
}

/* Hidden filter state */
.studio-card.is-hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .studio-card--wide,
  .studio-card--tall,
  .studio-card--square,
  .studio-card--full {
    grid-column: span 12;
    aspect-ratio: 16 / 10;
  }

  .studio-tabs {
    border-radius: var(--radius-md);
    width: 100%;
  }

  .studio-tab {
    flex: 1;
    text-align: center;
    padding: 0.6rem 0.75rem;
    font-size: 0.8125rem;
  }
}

/* Studio detail page extras */
.studio-detail-hero {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: flex-end;
  padding: 8rem 0 3rem;
  width: 100%;
  overflow: hidden;
}

.studio-detail-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.studio-detail-hero__gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 40% 30%, rgba(121, 197, 106, 0.2), transparent 55%),
    radial-gradient(ellipse 50% 40% at 80% 70%, rgba(232, 197, 71, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 100%);
}

.studio-detail-hero__inner {
  width: var(--container);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.studio-detail-body {
  width: var(--container);
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

.studio-detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin: 2.5rem 0;
}

.studio-detail-gallery__item {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: border-color 0.3s, box-shadow 0.4s;
}

.studio-detail-gallery__item:hover {
  border-color: var(--border-hover);
  box-shadow: var(--glow);
}

.studio-detail-gallery__item span {
  font-family: var(--font-heading);
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.125rem;
  z-index: 1;
  padding: 3rem;
}

/* Keep original aspect ratio — no crop */
.studio-detail-gallery__item img {
  width: 100%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.studio-detail-gallery__caption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

.studio-detail-gallery__block {
  width: 100%;
}

/* Full-bleed option for hero showcase */
.studio-detail-feature {
  width: 100%;
  max-width: min(1200px, 92vw);
  margin: 0 auto 3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  padding: 0;
}

.studio-detail-feature img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  display: block;
}

.studio-detail-feature span {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.3);
}


/* Studio detail: full-width showcase images */
.studio-detail-gallery {
  width: min(1200px, 92vw);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  .studio-detail-feature img,
  .studio-detail-gallery__item img {
    max-height: none;
  }
}
