/* ==========================================================================
   PORTFOLIO — Modern Agency Showcase (Straight, Balanced & Deep)
   ========================================================================== */

body {
  background: var(--page-color, var(--cream));
}

.works-section {
  padding: 100px 6% 120px;
  overflow: clip;
  position: relative;
}

.works-heading {
  max-width: 1300px;
  margin: 0 auto 60px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}

.works-heading h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(44px, 5.5vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin: 0;
}

.works-heading p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-muted);
  max-width: 380px;
  margin: 0;
}

/* Works Collage — Clean 2-column or 3-column masonry */
.work-collage {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  position: relative;
}

.work-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px;
  background: #fffdf5;
  border-radius: var(--radius-md);
  border: 1px solid var(--ink-border);
  box-shadow: var(--shadow-sm);
  transform: none !important;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), border-color 0.45s var(--ease-out);
  position: relative;
  z-index: 1;
}

.work-card:hover,
.work-card:focus-visible {
  transform: translateY(-8px) !important;
  box-shadow: var(--shadow-hover);
  border-color: rgba(191, 51, 11, 0.45);
  z-index: 3;
}

.work-image {
  position: relative;
  overflow: hidden;
  background: #e7dec2;
  border-radius: calc(var(--radius-md) - 6px);
  aspect-ratio: 16/11;
}

.work-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.work-card:hover img {
  transform: scale(1.05);
}

.work-caption {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 20px 8px 8px;
}

.work-caption strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  display: block;
}

.work-caption small {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
  margin-top: 6px;
}

.work-caption > span:last-child {
  font-size: 24px;
  transition: transform 0.3s var(--ease-out);
}
.work-card:hover .work-caption > span:last-child {
  transform: translate(3px, -3px);
}

.all-work-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 60px auto 0;
  padding: 14px 28px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
  transition: all 0.3s var(--ease-out);
}
.all-work-link:hover {
  background: var(--ink);
  color: var(--cream);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(191, 51, 11, 0.22);
}

/* PROJECT CASE DETAIL PAGE */
.project-page {
  background: var(--project-bg, var(--cream));
}

.project-page .project-main {
  max-width: 1300px;
  margin: 40px auto 0;
  padding: 0 5%;
}

.project-top {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: end;
  margin: 40px 0 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--ink-border);
}

.project-top h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(48px, 6vw, 84px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin: 16px 0;
}

.project-top p {
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink-muted);
  margin: 0;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.project-tag {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--ink-border);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.project-art {
  max-width: 1100px;
  margin: 0 auto;
  background: #fffdf5;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--ink-border);
  box-shadow: var(--shadow-lg);
  transform: none !important;
}

.project-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.project-art figcaption {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted);
  padding: 16px 8px 4px;
  text-align: center;
}

/* A short, layered opening, with content never gated behind script. (Exact original from Grovia-Studio-UI.zip) */
.opening {
  animation: openingGone .1s 2s forwards;
}
.curtain {
  animation-delay: .6s;
  animation-duration: 1.25s;
}
.curtain.top {
  border-radius: 0 0 48% 0;
}
.curtain.bottom {
  border-radius: 48% 0 0 0;
}
.opening-mark {
  animation: markAway 1.25s .2s both;
}
.hero-image {
  animation: flowerReveal 2.7s cubic-bezier(.2,.65,.2,1) both, breathe 20s 2.7s ease-in-out infinite alternate;
}
.glyph {
  animation-name: brandLetter;
  animation-duration: 1.4s;
  animation-delay: calc(1s + var(--i)*.09s);
}
.studio-word {
  animation: studioReveal 1.4s 1.75s cubic-bezier(.16,1,.3,1) both;
}
.hero header {
  animation-delay: 1.8s;
}
.hero .eyebrow {
  animation-delay: 2s;
}
.hero-bottom {
  animation-delay: 2.2s;
}
.hero .asterisk {
  animation: starArrive 1.3s 1.7s both, turn 30s 3s linear infinite;
}

@keyframes flowerReveal {
  0% {
    filter: blur(22px);
    transform: scale(1.22);
    clip-path: circle(12% at 50% 50%);
  }
  45% {
    filter: blur(9px);
  }
  100% {
    filter: blur(0);
    transform: scale(1);
    clip-path: circle(85% at 50% 50%);
  }
}

@keyframes brandLetter {
  0% {
    opacity: 0;
    transform: translateY(100px) rotate(20deg) scale(.75);
    filter: blur(9px);
  }
  75% {
    opacity: 1;
    transform: translateY(-7px) rotate(calc(var(--rest,0deg) - 2deg)) scale(1.02);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(var(--rest,0deg)) scale(1);
    filter: blur(0);
  }
}

@keyframes studioReveal {
  from {
    opacity: 0;
    transform: translateY(65px);
    clip-path: inset(100% 0 0);
    letter-spacing: .08em;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0);
    letter-spacing: -.07em;
  }
}

@keyframes starArrive {
  from {
    opacity: 0;
    scale: .2;
    rotate: -150deg;
  }
  to {
    opacity: 1;
    scale: 1;
    rotate: 0deg;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .work-collage {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .works-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  .project-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
