/* Memories Film - Krishna Luxury Styling & Dynamic Color Variables */

:root {
  /* Default: Royal Antique Gold Theme */
  --color-primary: #c5a47e;
  --color-primary-light: #e8cca8;
  --color-primary-dark: #987a54;
  --color-primary-rgb: 197, 164, 126;
  --color-bg-base: #0c0b09;
  --color-bg-surface: #141310;
  --color-bg-elevated: #1d1b17;
  --color-border: rgba(197, 164, 126, 0.22);
  --color-text-main: #f5f2eb;
  --color-text-muted: #9e988e;
}

/* Lenis Recommended CSS */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Base resets & typography */
html {
  overflow-x: hidden;
}

body {
  background-color: var(--color-bg-base);
  color: var(--color-text-main);
  font-family:
    "Plus Jakarta Sans",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  overflow-x: hidden;
  letter-spacing: 0.01em;
  transition:
    background-color 0.4s ease,
    color 0.4s ease;
}

/* Luxury Headings */
h1,
h2,
h3,
.font-serif-luxury {
  font-family: "Cormorant Garamond", Georgia, serif;
}

.font-cinzel {
  font-family: "Cinzel", "Cormorant Garamond", serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-base);
}
::-webkit-scrollbar-thumb {
  background: rgba(197, 164, 126, 0.35);
  border-radius: 1px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Hide scrollbars while preserving scrolling */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* Selection Highlight */
::selection {
  background-color: var(--color-primary);
  color: #000;
}

/* Radio choice buttons (Side Coverage).
   Authored as plain CSS rather than peer-checked utilities because
   --color-primary is a hex value, so Tailwind cannot derive the
   translucent background from the /alpha modifier. Only the checked
   option ever receives the gold state, so exactly one looks selected. */
.side-choice label,
.side-pick label {
  transition: border-color 0.25s ease, background-color 0.25s ease,
    color 0.25s ease;
}
.side-choice input:checked + label,
.side-pick input:checked + label {
  border-color: var(--color-primary);
  background-color: rgba(var(--color-primary-rgb), 0.14);
  color: var(--color-primary);
}
.side-choice input:focus-visible + label,
.side-pick input:focus-visible + label {
  outline: 1px solid var(--color-primary);
  outline-offset: 1px;
}

/* Luxury Gold Shimmer / Gradients */
.gold-gradient-text {
  background: linear-gradient(
    135deg,
    var(--color-primary-light) 0%,
    var(--color-primary) 50%,
    var(--color-primary-dark) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gold-gradient-bg {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-light) 100%
  );
}

.gold-border-glow {
  box-shadow: 0 0 25px -5px rgba(var(--color-primary-rgb), 0.18);
}

/* Smooth Image Zoom on Card Hover */
.group:hover .story-img-zoom {
  transform: scale(1.06);
}

/* Portfolio masonry photos: a gentle zoom plus a focus outline so the
   lightbox trigger is obvious when reached by keyboard. */
.group:hover .portfolio-img {
  transform: scale(1.05);
}

.portfolio-photo:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.portfolio-photo:focus-visible .portfolio-img {
  transform: scale(1.05);
}

/* Custom Film Aspect Ratio */
.aspect-cinematic {
  aspect-ratio: 2.35 / 1;
}

/* Noise overlay for cinematic luxury feel */
.film-grain {
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.03) 1px,
    transparent 0
  );
  background-size: 24px 24px;
}

/* Date input styling for luxury dark theme */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.8) sepia(50%) saturate(300%) hue-rotate(350deg);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Keep booking form values readable across browser color schemes */
#booking input,
#booking select {
  color: var(--color-text-main);
  caret-color: var(--color-primary);
  color-scheme: dark;
}
#booking input::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}
#booking select option {
  color: var(--color-text-main);
  background-color: var(--color-bg-elevated);
}

body.intro-active {
  overflow: hidden;
}

#page-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(
    circle at center,
    rgba(17, 15, 12, 0.7),
    rgba(10, 9, 8, 0.98)
  );
}

.intro-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(var(--color-primary-rgb), 0.18),
    rgba(0, 0, 0, 0.2),
    rgba(var(--color-primary-rgb), 0.08)
  );
  filter: blur(20px);
}

.intro-content {
  position: relative;
  z-index: 1;
  text-align: center;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.intro-kicker {
  display: block;
  color: var(--color-primary-light);
  font-size: 0.68rem;
  margin-bottom: 1rem;
}

.intro-content h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.5rem, 7vw, 7rem);
  line-height: 0.88;
  color: #f3efe8;
  text-transform: none;
  letter-spacing: 0.04em;
}

/* 3D luxury motion */
.luxury-hero-shell {
  perspective: 1800px;
  transform-style: preserve-3d;
}

.hero-ambient-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  transform-style: preserve-3d;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.72;
  background: radial-gradient(
    circle,
    rgba(var(--color-primary-rgb), 0.9) 0%,
    rgba(var(--color-primary-rgb), 0.25) 35%,
    transparent 72%
  );
  animation: floatOrb 10s ease-in-out infinite alternate;
  transform: translateZ(0);
}

.hero-orb-1 {
  width: 26rem;
  height: 26rem;
  left: 8%;
  top: 10%;
}

.hero-orb-2 {
  width: 32rem;
  height: 32rem;
  right: -3%;
  bottom: 4%;
  animation-delay: 2s;
}

#hero-3d-canvas {
  position: absolute;
  inset: 8% 16% 12% 16%;
  width: 68%;
  height: 72%;
  opacity: 0.82;
  filter: drop-shadow(0 0 40px rgba(var(--color-primary-rgb), 0.35));
  transform: translateZ(30px);
}

.hero-content > * {
  transform-style: preserve-3d;
  will-change: transform, opacity, filter;
}

.parallax-layer {
  transition: transform 0.4s ease-out;
  will-change: transform;
}

.luxury-tilt-card {
  transform-style: preserve-3d;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease,
    filter 0.35s ease;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  will-change: transform;
}

.luxury-tilt-card:hover {
  border-color: rgba(var(--color-primary-rgb), 0.6);
  filter: saturate(1.08);
}

.luxury-card-face {
  transform: translateZ(26px);
}

.film-feature {
  min-height: 220px;
}

.film-feature-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  transform: scale(1.06);
  opacity: 0;
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
  will-change: opacity, transform;
}

.film-feature-bg.is-active {
  opacity: 1;
  transform: scale(1);
}

@keyframes floatOrb {
  0% {
    transform: translate3d(0, 0, 0) scale(0.96);
  }
  100% {
    transform: translate3d(20px, -25px, 0) scale(1.08);
  }
}

.reviews-marquee {
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
}

.reviews-marquee-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: reviewsMarqueeScroll 55s linear infinite;
  will-change: transform;
}

.review-card:hover {
  border-color: rgba(var(--color-primary-rgb), 0.6);
}

.reviews-marquee:hover .reviews-marquee-track {
  animation-play-state: paused;
}

/* Work steps: slow one-by-one reveal, gated on the section scrolling into view.
   Without .is-visible the steps stay hidden so the animation is not missed. */
.work-steps-flow .step-item {
  opacity: 0;
  transform: translateY(28px);
}

.work-steps-flow.is-visible .step-item {
  animation: stepReveal 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.work-steps-flow.is-visible .step-item:nth-child(1) {
  animation-delay: 0.15s;
}
.work-steps-flow.is-visible .step-item:nth-child(2) {
  animation-delay: 0.75s;
}
.work-steps-flow.is-visible .step-item:nth-child(3) {
  animation-delay: 1.35s;
}
.work-steps-flow.is-visible .step-item:nth-child(4) {
  animation-delay: 1.95s;
}
.work-steps-flow.is-visible .step-item:nth-child(5) {
  animation-delay: 2.55s;
}

@keyframes stepReveal {
  0% {
    opacity: 0;
    transform: translateY(28px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-steps-flow .step-item {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Without JS the gate never opens, so reveal the steps as a fallback. */
html.no-js .work-steps-flow .step-item {
  animation: none;
  opacity: 1;
  transform: none;
}

@keyframes reviewsMarqueeScroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reviews-marquee-track {
    animation: none;
  }
}

/* Service cards are square, so keep long descriptions from spilling out. */
.service-card .line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  #hero-3d-canvas {
    inset: 18% 8% 12% 8%;
    width: 84%;
    height: 58%;
  }

  .hero-orb-1 {
    width: 16rem;
    height: 16rem;
  }

  .hero-orb-2 {
    width: 18rem;
    height: 18rem;
  }
}
