/* ===================================================================
   Kineor  Project Detail Page Styles
   =================================================================== */

.project-hero-title {
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 300;
  margin: 0;
  overflow: hidden;
}
.project-brief-section {
  padding: 120px 0;
}
.project-title-md {
  font-size: clamp(2rem, 5vw, 3.5rem);
}
.project-gallery-section {
  padding: 0 0 120px;
}
.project-gallery-section .container-fluid {
  padding: 0;
}
.project-impact-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  background:
    radial-gradient(
      ellipse 60% 50% at 50% 50%,
      rgba(185, 150, 84, 0.05),
      transparent
    ),
    var(--bg-alt);
}
[data-theme="light"] .project-impact-section {
  background:
    radial-gradient(
      ellipse 60% 50% at 50% 50%,
      rgba(96, 73, 38, 0.04),
      transparent
    ),
    var(--bg-alt);
}
.project-impact-inner {
  padding: 100px 0;
}
.project-final-gallery {
  padding: 120px 0;
}
.project-final-gallery .container-fluid {
  padding: 0;
}
.project-next-section {
  padding: 180px 0;
}
.project-title-next {
  font-size: clamp(3rem, 10vw, 7.5rem);
}

.project-hero {
  height: 85vh;
  height: 85dvh;
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  isolation: isolate;
}
.project-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.62),
      rgba(0, 0, 0, 0.28) 36%,
      rgba(0, 0, 0, 0.8)
    ),
    radial-gradient(circle at 22% 24%, rgba(185, 150, 84, 0.2), transparent 46%);
}
.project-hero::after {
  content: "";
  position: absolute;
  width: 48vw;
  height: 48vw;
  min-width: 360px;
  min-height: 360px;
  left: 62%;
  top: 12%;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
  filter: blur(22px);
  background: radial-gradient(
    circle,
    rgba(185, 150, 84, 0.2),
    rgba(185, 150, 84, 0)
  );
}
.project-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(60%) contrast(1.1);
  opacity: 0.52;
  transform: scale(1.04);
  animation: heroImageBreath 12s ease-in-out infinite alternate;
  clip-path: inset(0 100% 0 0);
}
.project-hero-content {
  position: absolute;
  bottom: 80px;
  left: 0;
  width: 100%;
  z-index: 2;
}
.project-hero-title {
  text-shadow: 0 18px 44px rgba(0, 0, 0, 0.44);
}
[data-theme="light"] .project-hero::before {
  background:
    linear-gradient(
      to bottom,
      rgba(241, 236, 227, 0.18),
      rgba(241, 236, 227, 0.08) 36%,
      rgba(241, 236, 227, 0.42)
    ),
    radial-gradient(circle at 22% 24%, rgba(96, 73, 38, 0.14), transparent 46%);
}
[data-theme="light"] .project-hero::after {
  background: radial-gradient(
    circle,
    rgba(96, 73, 38, 0.18),
    rgba(96, 73, 38, 0)
  );
}
[data-theme="light"] .project-hero-title {
  color: #f6efe4;
}
[data-theme="light"] .project-hero .section-tag {
  color: #f1dfbe;
}
.project-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.project-meta-item .label {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 12px;
}
.project-meta-item .value {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--text);
}
.project-gallery-img {
  width: 100%;
  display: block;
  filter: grayscale(100%);
  transition: filter 1.2s var(--ease);
}
.project-gallery-img:hover {
  filter: grayscale(0%);
}

@media (hover: none), (max-width: 992px) {
  .project-gallery-img {
    filter: none;
    transition: none;
  }
  .project-gallery-img:hover {
    filter: none;
  }
}

.project-video {
  background: var(--bg-alt);
  object-fit: cover;
  will-change: auto;
}

.project-video-vertical-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  width: min(100%, 520px);
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  background: var(--bg-alt);
}

.project-video-rotate-90 {
  position: absolute;
  top: 50%;
  left: 50%;
  /* source is landscape 16:9  swap dims to fill portrait 9:16 frame */
  width: 177.78%; /* 16/9 × 100% */
  height: 56.25%; /* 9/16 × 100% */
  object-fit: cover;
  transform: translate(-50%, -50%) rotate(var(--video-rotate, -90deg));
}

.project-video-rotate-90:hover {
  transform: translate(-50%, -50%) rotate(var(--video-rotate, -90deg));
}

/* --- THE FIT LIFE iOS frame --- */
.fitlife-ios-card {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0 20px;
}

.fitlife-phone-frame {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 9 / 19.5;
  margin: 0;
  padding: 12px;
  border-radius: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(150deg, #2c2d31 0%, #0d0e10 68%, #1c1d21 100%);
  box-shadow:
    0 28px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -2px 0 rgba(0, 0, 0, 0.55);
}

.fitlife-phone-frame::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 34px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.fitlife-phone-frame::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  width: 38%;
  height: 22px;
  transform: translateX(-50%);
  border-radius: 13px;
  background: linear-gradient(to bottom, #15171b, #090a0c);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.fitlife-phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 34px;
  object-fit: cover;
  filter: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .fitlife-phone-frame {
  border-color: rgba(26, 21, 16, 0.25);
  background: linear-gradient(150deg, #efe7db 0%, #c6b9a6 60%, #b5a58f 100%);
  box-shadow:
    0 24px 45px rgba(18, 13, 8, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 0 rgba(44, 33, 21, 0.18);
}

[data-theme="light"] .fitlife-phone-frame::before {
  border-color: rgba(35, 26, 18, 0.15);
}

/* --- Testimonial (also used on project detail) --- */
.testimonial-block {
  padding: 120px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.testimonial-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 300;
  color: var(--text);
  opacity: 0.85;
  line-height: 1.4;
  font-style: italic;
  max-width: 900px;
  margin: 0 auto 40px;
}
.testimonial-author {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--accent);
}

/* --- Next Project Link --- */
.next-project-link {
  color: var(--text);
  text-decoration: none;
  transition: color 0.4s ease;
}
.next-project-link:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .project-hero {
    height: 62vh;
    height: 62dvh;
    min-height: 420px;
  }
  .project-hero::after {
    width: 80vw;
    height: 80vw;
    min-width: 260px;
    min-height: 260px;
    left: 50%;
    top: 20%;
  }
  .project-hero-content {
    bottom: 36px;
    text-align: center;
  }
  .project-brief-section,
  .project-gallery-section,
  .project-final-gallery,
  .project-next-section {
    padding: 60px 0;
  }
  .project-brief-section .col-lg-5,
  .project-brief-section .col-lg-6,
  .project-gallery-section .col-lg-5,
  .project-gallery-section .col-lg-6 {
    text-align: center;
  }
  .project-impact-inner {
    padding: 70px 0;
  }
  .project-meta-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 38px 0;
    text-align: center;
  }
  .project-meta-item .value {
    font-size: 1rem;
  }
  .testimonial-block {
    padding: 80px 0;
  }
  .testimonial-quote {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    margin-bottom: 28px;
  }
  .project-next-section {
    padding: 100px 0;
  }
  .fitlife-phone-frame {
    width: min(100%, 300px);
    border-radius: 38px;
    padding: 10px;
  }
  .fitlife-phone-screen {
    border-radius: 30px;
  }
}
@media (max-width: 560px) {
  .project-meta-grid {
    grid-template-columns: 1fr;
  }
  .fitlife-phone-frame {
    width: min(100%, 270px);
  }
}
