/*
 * Main stylesheet for the H3 Cinematic Theme
 *
 * This file defines a dark, cinematic colour palette and responsive layout
 * rules inspired by the reference site.  It relies on CSS variables to
 * simplify customisation and makes heavy use of flexbox and grid for
 * modern layouts.  See README for instructions on replacing placeholder
 * images and modifying colours.
 */

:root {
  --color-background: #0A0A1F;
  --color-surface: #111827;
  --color-primary-start: #8657E9;
  --color-primary-end: #4A89FF;
  --color-text-light: #F3F4F6;
  --color-text-muted: #A1A6BD;
  --radius-md: 12px;
  --transition-fast: 0.3s ease;
  --container-max-width: 1280px;
}

body {
  background-color: var(--color-background);
  color: var(--color-text-light);
  font-family: 'Poppins', sans-serif;
  margin: 0;
  line-height: 1.6;
}

.container {
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Header */
.site-header {
  background-color: var(--color-surface);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Header appearance when scrolled past the hero section */
.site-header.scrolled {
  background-color: rgba(17, 24, 39, 0.95);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.site-branding .site-title {
  color: var(--color-text-light);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
}

.primary-navigation .menu {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-navigation .menu li a {
  color: var(--color-text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.primary-navigation .menu li a:hover {
  color: var(--color-primary-end);
}

/* Hero */
.hero-cover {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 4rem 1rem;
}

.hero-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 31, 0.65);
  z-index: 1;
}

.hero-cover .content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-cover h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .hero-cover h1 {
    font-size: 3.5rem;
  }
}

.hero-cover h1 .gradient {
  background: linear-gradient(90deg, var(--color-primary-start), var(--color-primary-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.hero-subheading {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--color-text-muted);
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-dark {
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(90deg, var(--color-primary-start), var(--color-primary-end));
  color: #ffffff;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-text-light);
  color: var(--color-text-light);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-dark {
  background: var(--color-surface);
  color: var(--color-text-light);
  border: none;
}

.btn-dark:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Film section */
.film-section {
  background-color: var(--color-background);
  padding: 4rem 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-label {
  font-size: 0.75rem;
  color: var(--color-primary-end);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-right: 1rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-text-light);
}

.view-all {
  color: var(--color-primary-end);
  font-weight: 600;
  text-decoration: none;
}

.view-all:hover {
  text-decoration: underline;
}

.film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.film-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.film-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.film-card .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.8));
}

.film-card .category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
  display: inline-block;
}

.category-sci-fi {
  color: #00FAFF;
}
.category-fantasy {
  color: #F5D259;
}
.category-thriller {
  color: #FF6F61;
}
.category-documentary {
  color: #6EE7B7;
}

.film-card .title {
  font-size: 1.2rem;
  margin: 0 0 0.3rem 0;
  font-weight: 700;
  color: var(--color-text-light);
}

.film-card .meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.film-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

/* Newsletter section */
.newsletter-section {
  background-color: var(--color-surface);
  padding: 4rem 0;
  text-align: center;
}

.newsletter {
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-heading {
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.newsletter-subheading {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: var(--color-text-muted);
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.newsletter-input {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-text-muted);
  background-color: transparent;
  color: var(--color-text-light);
  flex: 1;
  min-width: 250px;
}

.newsletter-input::placeholder {
  color: var(--color-text-muted);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--color-primary-end);
}

/* Footer */
.site-footer {
  background-color: var(--color-surface);
  color: var(--color-text-light);
  padding-top: 3rem;
  margin-top: 4rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu li {
  margin-bottom: 0.5rem;
}

.footer-menu a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-menu a:hover {
  color: var(--color-primary-end);
}

.footer-tagline {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  max-width: 220px;
}

.footer-site-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.footer-bottom {
  background-color: #0A0A1F;
  padding: 1rem 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    gap: 1rem;
  }
  .primary-navigation .menu {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
  .film-grid {
    grid-template-columns: 1fr 1fr;
  }
}