/* ==========================================================================
   Movie Landing Page — Styles
   Cinematic, responsive, accessible design system
   ========================================================================== */

:root {
  /* Color scheme sampled from the "God Of This Age" poster: near-black
     night exterior lit by a single blood-red glow. */
  --bg-dark: #070506;
  --bg-card: #170d0e;
  --bg-elevated: #1f1213;
  --text-primary: #f5efec;
  --text-secondary: #b3a09e;
  --text-muted: #6b5c5b;
  --accent: #bc1014;
  --accent-hover: #dc1a1f;
  --on-accent: #fdf6f4;
  --border: rgba(255, 255, 255, 0.08);
  --overlay: rgba(7, 5, 6, 0.75);
  --shadow-poster: 0 24px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.25s ease;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --header-height: 72px;
  --container-max: 1140px;
}

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

/* Without this, elements whose class sets `display` (e.g. .btn) stay
   visually shown even when their `hidden` attribute is set — author
   styles always outrank the browser's built-in [hidden] rule. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-dark);
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  transition: background var(--transition), box-shadow var(--transition);
}

.site-header--scrolled {
  background: rgba(7, 5, 6, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

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

.nav__logo {
  display: flex;
  align-items: center;
  transition: opacity var(--transition);
}

.nav__logo img {
  height: 44px;
  width: auto;
}

.nav__logo:hover {
  opacity: 0.85;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.nav__toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--transition), opacity var(--transition);
}

.nav__toggle[aria-expanded='true'] .nav__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle[aria-expanded='true'] .nav__toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded='true'] .nav__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--text-primary);
}

.nav__link:hover::after,
.nav__link:focus-visible::after {
  width: 100%;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(188, 16, 20, 0.35);
}

.btn--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
  border-color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.btn--large {
  padding: 1rem 2.5rem;
  font-size: 0.9375rem;
}

.btn--full {
  width: 100%;
}

.btn--disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Hero */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  transform: scale(1.02);
  animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
  from { transform: scale(1.02); }
  to { transform: scale(1.08); }
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(7, 5, 6, 0.95) 0%, rgba(7, 5, 6, 0.7) 45%, rgba(7, 5, 6, 0.4) 100%),
    linear-gradient(to top, var(--bg-dark) 0%, transparent 40%);
}

.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.hero__tagline {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.hero__title {
  font-family: var(--font-display);
  /* Capped at 4.5rem (rather than scaling further with viewport width) so the
     title stays on one line next to the poster — beyond ~1140px the poster
     column stops growing but the text column doesn't gain extra room, so an
     uncapped font size wraps to two lines on wide screens. */
  font-size: clamp(3rem, 8vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.hero__description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__poster {
  flex-shrink: 0;
}

.hero__poster img {
  width: clamp(340px, 42vw, 640px);
  aspect-ratio: 37 / 20;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-poster);
}

/* Sections */

.section {
  padding: 5rem 0;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: 0.04em;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--accent);
}

/* Trailer */

.trailer {
  background: var(--bg-card);
}

.trailer__wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-poster);
  background: var(--bg-elevated);
}

.trailer__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.trailer__embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* About */

.about__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}

.about__text p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.about__text p:last-child {
  margin-bottom: 0;
}

.about__poster img {
  width: 520px;
  max-width: 100%;
  aspect-ratio: 37 / 20;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-poster);
}

/* Details */

.details {
  background: var(--bg-card);
}

.details__intro {
  color: var(--text-secondary);
  margin-top: -1rem;
  margin-bottom: 2rem;
  max-width: 480px;
}

.details__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.details__item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--accent);
}

.details__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.details__value {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

/* CTA */

.cta {
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(188, 16, 20, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.cta__inner {
  text-align: center;
  position: relative;
}

.cta__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.cta__text {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.125rem;
}

/* Email Subscription (Kit embed) */

.updates__inner {
  max-width: 520px;
  margin: 0 auto;
}

.updates__intro {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.email-subscription {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.email-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.email-form__input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.email-form__input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.email-form__submit {
  flex: 0 0 auto;
}

.email-form__message {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.email-form__message--error {
  color: #e05a5a;
}

.email-form__frame {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Footer */

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer__copy {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer__nav {
  display: flex;
  gap: 1.5rem;
}

.footer__nav a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

/* Responsive */

@media (max-width: 900px) {
  .details__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__poster {
    order: -1;
  }

  .hero__poster img {
    margin: 0 auto;
    width: min(100%, 440px);
  }

  .about__grid {
    grid-template-columns: 1fr;
  }

  .about__poster {
    order: -1;
    text-align: center;
  }

  .about__poster img {
    margin: 0 auto;
    width: min(100%, 440px);
  }
}

@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(300px, 85vw);
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem;
    background: rgba(7, 5, 6, 0.98);
    backdrop-filter: blur(16px);
    transform: translateX(100%);
    transition: transform var(--transition);
    border-left: 1px solid var(--border);
  }

  .nav__menu--open {
    transform: translateX(0);
  }

  .nav__link {
    font-size: 1.125rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .hero__overlay {
    background:
      linear-gradient(to bottom, rgba(7, 5, 6, 0.7) 0%, rgba(7, 5, 6, 0.9) 60%, var(--bg-dark) 100%);
  }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .details__grid {
    grid-template-columns: 1fr;
  }

  .email-subscription {
    padding: 1.5rem;
  }

  .email-form {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__bg {
    animation: none;
  }

  .btn:hover {
    transform: none;
  }
}
