/* ============================================================
   FlixWatch – Netflix-style Base Styles
   ============================================================ */

/* Google Fonts – Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================================
   Reset & Box Model
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================================
   Root / Body
   ============================================================ */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background-color: var(--ink);          /* #141414 */
  color: var(--paper);                   /* #FFFFFF */
  font-family: var(--font-body);         /* Inter, Helvetica Neue, Arial */
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* No grain texture – Netflix is clean */
}

/* Remove legacy projection-booth grain if it slipped through */
body::before {
  display: none !important;
  content: none !important;
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);      /* Inter – NO serif */
  font-weight: 700;
  line-height: 1.2;
  color: var(--paper);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
h4 { font-size: 1.1rem; }
h5 { font-size: 0.95rem; }
h6 { font-size: 0.875rem; }

p {
  color: var(--paper-dim);
  font-size: 1rem;
  line-height: 1.7;
}

strong, b { font-weight: 700; color: var(--paper); }
em, i     { font-style: italic; }

small {
  font-size: 0.8rem;
  color: var(--paper-muted);
}

/* ============================================================
   Links
   ============================================================ */
a {
  color: var(--paper);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus-visible {
  color: var(--paper);
  text-decoration: none;
  outline: 2px solid var(--projector);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   Lists
   ============================================================ */
ul, ol {
  list-style: none;
}

/* ============================================================
   Images & Media
   ============================================================ */
img, video, picture {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ============================================================
   Container
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);   /* 1400px */
  margin-inline: auto;
  padding-inline: 4%;            /* Netflix-style percentage padding */
}

/* ============================================================
   HEADER – Netflix style
   Fixed, transparent at top → fades to black on scroll
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--netflix-header-height);  /* 68px */
  display: flex;
  align-items: center;

  /* Gradient: transparent → black (always-on approach) */
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  transition: background var(--transition-normal);
}

/* When user has scrolled – JS adds .scrolled class */
.site-header.scrolled {
  background: #000000;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  height: 100%;
}

/* Logo */
.site-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--projector);       /* Netflix red */
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.site-logo:hover {
  opacity: 0.85;
  color: var(--projector);
  outline: none;
}

/* Primary Navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.site-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--paper-dim);
  text-decoration: none;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--paper);
  outline: none;
}

/* Header right actions */
.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--paper);
  border-radius: 2px;
  transition: transform var(--transition-normal), opacity var(--transition-fast);
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Main Content
   ============================================================ */
.site-main {
  padding-top: 0;   /* Hero is full-bleed – no top gap */
  min-height: calc(100vh - var(--netflix-header-height));
}

/* ============================================================
   Sections
   ============================================================ */
.section {
  padding-block: var(--space-7);
}

.section--flush {
  padding-block: 0;
}

.section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  gap: var(--space-3);
}

.section__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--paper);
}

.section__action {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--paper-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}

.section__action:hover {
  color: var(--paper);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color var(--transition-fast),
    transform var(--transition-fast),
    opacity var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.btn:active { transform: scale(0.97); }

/* Primary – Netflix red */
.btn-primary {
  background-color: var(--projector);
  color: var(--paper);
}

.btn-primary:hover {
  background-color: var(--projector-hover);
  color: var(--paper);
  outline: none;
}

/* Secondary – translucent white (Netflix "More Info" style) */
.btn-secondary {
  background-color: rgba(109, 109, 110, 0.7);
  color: var(--paper);
}

.btn-secondary:hover {
  background-color: rgba(109, 109, 110, 0.9);
  color: var(--paper);
  outline: none;
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(255,255,255,0.4);
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.7);
  color: var(--paper);
  outline: none;
}

/* Size variants */
.btn-sm {
  font-size: 0.8rem;
  padding: var(--space-1) var(--space-3);
}

.btn-lg {
  font-size: 1.05rem;
  padding: var(--space-3) var(--space-6);
}

/* ============================================================
   Cards – Netflix minimal
   ============================================================ */
.card {
  background: transparent;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal);
  cursor: pointer;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-card);
}

.card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--booth);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.card:hover .card__media img {
  transform: scale(1.08);
}

.card__body {
  padding: var(--space-3) var(--space-3);
  background: var(--booth);
}

.card__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--paper);
  margin-bottom: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card__meta {
  font-size: 0.75rem;
  color: var(--paper-muted);
}

/* ============================================================
   Badges / Tags
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-sm);
}

.badge--sub        { background: var(--sub-bg);        color: var(--sub);        }
.badge--rent       { background: var(--rent-bg);       color: var(--rent);       }
.badge--buy        { background: var(--buy-bg);        color: var(--buy);        }
.badge--theatrical { background: var(--theatrical-bg); color: var(--theatrical); }

/* ============================================================
   Forms / Inputs
   ============================================================ */
input,
select,
textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--paper);
  background: var(--booth);
  border: 1px solid var(--booth-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  width: 100%;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--paper-muted);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--paper-dim);
  background: var(--booth-raised);
}

/* ============================================================
   Divider
   ============================================================ */
hr {
  border: none;
  border-top: 1px solid var(--booth-border);
  margin-block: var(--space-5);
}

/* ============================================================
   Scrollbar – Netflix dark style
   ============================================================ */
::-webkit-scrollbar            { width: 6px; height: 6px; }
::-webkit-scrollbar-track      { background: #000; }
::-webkit-scrollbar-thumb      { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* ============================================================
   Selection
   ============================================================ */
::selection {
  background: var(--projector);
  color: var(--paper);
}

/* ============================================================
   Focus visible (keyboard nav)
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--projector);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: #000;
  border-top: 1px solid var(--booth-border);
  padding-block: var(--space-7);
  color: var(--paper-muted);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--paper-muted);
  transition: color var(--transition-fast);
}

.site-footer a:hover {
  color: var(--paper);
  outline: none;
}

/* ============================================================
   Utilities
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-muted   { color: var(--paper-muted) !important; }
.text-dim     { color: var(--paper-dim) !important; }
.text-primary { color: var(--paper) !important; }
.text-red     { color: var(--projector) !important; }
.text-green   { color: var(--verified) !important; }

.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }

/* ============================================================
   Responsive – Mobile (≤ 960px) – Netflix-style hidden nav
   ============================================================ */
@media (max-width: 960px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--netflix-header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #000;
    padding: var(--space-4) 4%;
    border-top: 1px solid var(--booth-border);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    font-size: 1rem;
    padding-block: var(--space-3);
    width: 100%;
    border-bottom: 1px solid var(--booth-border-subtle);
    color: var(--paper-dim);
  }

  .site-nav a:last-child {
    border-bottom: none;
  }

  .container {
    padding-inline: 4%;
  }

  h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  h2 { font-size: clamp(1.2rem, 4vw, 1.5rem); }
}

@media (max-width: 600px) {
  .site-logo { font-size: 1.3rem; }

  .btn-lg {
    font-size: 0.95rem;
    padding: var(--space-2) var(--space-4);
  }

  .container {
    padding-inline: 5%;
  }
}
