/* ============================================
   JAMES LUCY PRODUCTIONS — Design System
   Cinematic dark theme, modern production site
   ============================================ */

/* --- Self-hosted Lato font --- */
@font-face {
  font-family: 'Lato';
  src: url('../assets/fonts/Lato-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lato';
  src: url('../assets/fonts/Lato-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Lato';
  src: url('../assets/fonts/Lato-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* --- CSS Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-light);
}

ul, ol {
  list-style: none;
}

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

/* --- Custom Properties --- */
:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;

  --text-primary: #e8e8ec;
  --text-secondary: #9a9aab;
  --text-muted: #5a5a6e;

  --accent: #c9a84c;
  --accent-light: #e0c872;
  --accent-dim: rgba(201, 168, 76, 0.15);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(201, 168, 76, 0.25);

  /* Typography */
  --font-heading: 'Lato', sans-serif;
  --font-body: 'Lato', sans-serif;

  --fs-hero: clamp(2.2rem, 5vw, 4rem);
  --fs-h2: clamp(1.8rem, 3.5vw, 2.8rem);
  --fs-h3: clamp(1.4rem, 2.5vw, 2rem);
  --fs-h4: clamp(0.75rem, 1.2vw, 0.85rem);
  --fs-body: clamp(0.95rem, 1.1vw, 1.05rem);
  --fs-small: 0.85rem;

  /* Spacing */
  --section-padding: clamp(80px, 12vw, 160px);
  --container-max: 1100px;
  --container-padding: clamp(20px, 4vw, 40px);

  /* Effects */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(201, 168, 76, 0.08);
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

h2 {
  font-size: var(--fs-h2);
  color: var(--text-primary);
}

h3 {
  font-size: var(--fs-h3);
  color: var(--text-primary);
}

h4 {
  font-size: var(--fs-h4);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
}

p {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  line-height: 1.8;
}

/* --- Container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* --- Section Number Labels --- */
.section-label {
  font-size: var(--fs-h4);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-accent), transparent);
  max-width: 120px;
}

/* --- Navigation --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: background-color var(--transition-base), padding var(--transition-base), backdrop-filter var(--transition-base);
}

.site-nav.scrolled {
  background-color: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo img {
  height: 36px;
  width: auto;
  filter: brightness(2) saturate(0);
  transition: filter var(--transition-base);
}

.nav-logo:hover img {
  filter: brightness(2.2) saturate(0);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  position: relative;
  padding: 0.3rem 0;
  transition: color var(--transition-base);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition-base);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-base);
  display: block;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/mnis76.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: saturate(0.3) brightness(0.4);
  transform: scale(1.05);
  transition: transform 8s ease-out;
}

.hero.loaded .hero-bg {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 15, 0.3) 0%,
    rgba(10, 10, 15, 0.15) 40%,
    rgba(10, 10, 15, 0.5) 70%,
    rgba(10, 10, 15, 0.95) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
}

.hero-logo {
  max-width: 560px;
  width: 80vw;
  margin: 0 auto 2rem;
  filter: brightness(2) saturate(0);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s ease 0.3s forwards;
}

.hero h1 {
  font-size: var(--fs-hero);
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  /* Visually hidden but present for SEO */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-scroll {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  opacity: 0;
  animation: fadeUp 1s ease 1s forwards;
}

.hero-scroll a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: color var(--transition-base);
}

.hero-scroll a:hover {
  color: var(--accent);
}

.hero-scroll .scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* --- About Section --- */
.about {
  padding: var(--section-padding) 0;
  background: var(--bg-secondary);
}

.about-content {
  max-width: 720px;
}

.about-text {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 2;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.about-text:last-child {
  margin-bottom: 0;
}

/* --- Work Section --- */
.work {
  padding: var(--section-padding) 0;
  background: var(--bg-primary);
}

.work-header {
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

/* Film Card */
.film-card {
  margin-bottom: clamp(4rem, 8vw, 7rem);
}

.film-card:last-child {
  margin-bottom: 0;
}

.film-main {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  margin-bottom: 2.5rem;
}

.film-info {
  order: 1;
}

.film-poster-wrap {
  order: 2;
}

.film-card:nth-child(even) .film-main {
  grid-template-columns: 280px 1fr;
}

.film-card:nth-child(even) .film-info {
  order: 2;
}

.film-card:nth-child(even) .film-poster-wrap {
  order: 1;
}

.film-type {
  margin-bottom: 0.5rem;
}

.film-title {
  margin-bottom: 1.2rem;
}

.film-synopsis {
  margin-bottom: 1.5rem;
}

.film-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.film-website {
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--border-accent);
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  transition: all var(--transition-base);
}

.film-website:hover {
  background: var(--accent-dim);
  color: var(--accent-light);
}

.film-social {
  display: flex;
  gap: 0.75rem;
}

.film-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: all var(--transition-base);
}

.film-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.film-social a svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Film poster */
.film-poster {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.film-poster:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.film-poster img {
  width: 100%;
  height: auto;
  transition: transform var(--transition-slow);
}

.film-poster:hover img {
  transform: scale(1.02);
}

/* Trailer section */
.film-trailer {
  margin-top: 2rem;
}

.film-trailer-label {
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg-card);
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Video poster (click-to-play) */
.video-poster {
  position: absolute;
  inset: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-btn {
  position: relative;
  z-index: 2;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.play-btn svg {
  width: 68px;
  height: 48px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.video-poster:hover .play-btn {
  transform: scale(1.1);
}

.video-poster:hover .play-btn svg path:first-child {
  fill: var(--accent);
  fill-opacity: 0.95;
}

/* Streaming platforms */
.film-streaming {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.streaming-label {
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.streaming-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.platform-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-1px);
}

/* On-demand cable section */
.ondemand-section {
  margin-top: 2rem;
}

.ondemand-label {
  font-size: var(--fs-small);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.ondemand-group {
  margin-bottom: 1rem;
}

.ondemand-group h5 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.ondemand-providers {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  line-height: 1.8;
}

.ondemand-providers span:not(:last-child)::after {
  content: ' · ';
  color: var(--text-muted);
}

/* --- Contact Section --- */
.contact {
  padding: var(--section-padding) 0;
  background: var(--bg-secondary);
}

.contact .contact-form {
  max-width: 560px;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  padding: 0.8rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: var(--fs-body);
  transition: all var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2.5rem;
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-base);
  align-self: flex-start;
}

.form-submit:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.3);
}

/* Form result message */
.form-result {
  padding: 0.8rem 1rem;
  border-radius: 4px;
  font-size: var(--fs-small);
  display: none;
}

.form-result.success {
  display: block;
  background: rgba(76, 201, 120, 0.1);
  border: 1px solid rgba(76, 201, 120, 0.3);
  color: #4cc978;
}

.form-result.error {
  display: block;
  background: rgba(201, 76, 76, 0.1);
  border: 1px solid rgba(201, 76, 76, 0.3);
  color: #c94c4c;
}

/* --- Footer --- */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-primary);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.footer-copy {
  font-size: var(--fs-small);
  color: var(--text-muted);
}

.footer-back-top a {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  transition: color var(--transition-base);
}

.footer-back-top a:hover {
  color: var(--accent);
}

/* --- Animations --- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scrollPulse {
  0%, 100% {
    opacity: 0.3;
    transform: scaleY(1);
  }
  50% {
    opacity: 1;
    transform: scaleY(1.2);
  }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */

/* Tablet */
@media (max-width: 900px) {
  .film-main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .film-poster-wrap {
    order: -1 !important;
    max-width: 220px;
  }

  .film-card:nth-child(even) .film-main {
    grid-template-columns: 1fr;
  }

  .film-card:nth-child(even) .film-info {
    order: 1;
  }

  .film-card:nth-child(even) .film-poster-wrap {
    order: -1;
  }

}

/* Mobile */
@media (max-width: 640px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70vw;
    max-width: 300px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-secondary);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    border-left: 1px solid var(--border-subtle);
    transition: right var(--transition-slow);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
  }

  .mobile-overlay.active {
    opacity: 1;
    pointer-events: all;
  }

  .hero-logo {
    max-width: 320px;
  }

  .film-poster-wrap {
    max-width: 180px;
  }

  .streaming-platforms {
    gap: 0.4rem;
  }

  .platform-pill {
    padding: 0.35rem 0.8rem;
    font-size: 0.75rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .hero-bg {
    transform: scale(1) !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
