/* netflixmovies.com - one stylesheet, no framework.
   Dark theme close to the old site: near-black page, red accent, white text.
   Layout is CSS grid; type is the system stack. Contrast is kept at 4.5:1 or better. */

:root {
  --bg: #0b0c0f;
  --bg-soft: #14161c;
  --bg-card: #171a21;
  --line: #262a34;
  --text: #f2f3f5;
  --muted: #b3b8c4;       /* 7.3:1 on --bg */
  --accent: #e50914;
  --accent-text: #ff6a72; /* accent tint used for text, 5.1:1 on --bg */
  --amazon: #ffa724;
  --radius: 8px;
  --wrap: 1180px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--text); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); }
h2 { font-size: clamp(1.15rem, 1rem + .7vw, 1.45rem); margin-top: 2rem; }

p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.small { font-size: .875rem; color: var(--muted); }
.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;
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--accent); padding: 8px 12px; border-radius: var(--radius); z-index: 20; }

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--line); background: #0d0e12; position: sticky; top: 0; z-index: 10; }
.head-inner { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; padding-block: 12px; }
.brand { font-weight: 800; letter-spacing: .04em; font-size: 1.1rem; }
.brand-mark { color: var(--accent-text); }
.main-nav { display: flex; flex-wrap: wrap; gap: 14px; font-size: .95rem; color: var(--muted); }
.main-nav a { color: var(--muted); }
.main-nav a:hover { color: var(--text); }
.search { margin-left: auto; display: flex; gap: 6px; }
.search input {
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text);
  padding: 8px 12px; border-radius: var(--radius); min-width: 190px; font: inherit;
}
.search button, .contact-form button, .btn {
  background: var(--bg-card); border: 1px solid var(--line); color: var(--text);
  padding: 8px 14px; border-radius: var(--radius); font: inherit; cursor: pointer;
}
.search button:hover, .btn:hover { background: #222634; }
.search-big { margin: 1.5rem 0; }
.search-big input { flex: 1; }

/* ---------- hero ---------- */
.hero { background: var(--bg-soft) center/cover no-repeat; border-bottom: 1px solid var(--line); }
.hero-home { padding: 3rem 0; }
.hero-inner { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding-block: 28px; }
.hero-poster img { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.55); }
.hero-text h1 { margin-bottom: .35em; }
.year { color: var(--muted); font-weight: 400; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 46ch; }
.tagline { max-width: 68ch; color: #dfe2e8; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1em; }
.chip {
  display: inline-block; padding: 3px 10px; border: 1px solid var(--line);
  border-radius: 999px; font-size: .8rem; color: var(--muted); background: rgba(20,22,28,.7);
}
.chip-link:hover { color: var(--text); border-color: #3a4152; text-decoration: none; }
.watch { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-block; }
.btn-netflix { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-netflix:hover { background: #c40810; }
.btn-amazon { background: var(--amazon); border-color: var(--amazon); color: #1a1205; font-weight: 600; }
.btn-itunes { background: #f2f3f5; border-color: #f2f3f5; color: #14161c; font-weight: 600; }
.ratings { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: .95rem; }
.rating b { color: var(--text); font-size: 1.05rem; }

/* ---------- two column body ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; padding-block: 28px; align-items: start; }
.col-side { position: sticky; top: 76px; display: grid; gap: 20px; }

/* ---------- grids and cards ---------- */
.grid {
  list-style: none; margin: 0 0 1.5rem; padding: 0;
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.card a { display: block; }
.card picture img, .card .noimg {
  width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover;
  border-radius: var(--radius); background: var(--bg-card); display: block;
}
.card-title { display: block; margin-top: 8px; font-size: .92rem; font-weight: 600; }
.card-meta { display: block; font-size: .8rem; color: var(--muted); }

.tiles { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.tiles a, .tiles-plain li {
  display: block; padding: 14px 16px; background: var(--bg-card);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.tiles b { display: block; }
.tiles span { display: block; font-size: .82rem; color: var(--muted); }
.tiles a:hover { border-color: #3a4152; text-decoration: none; }

.post-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 14px; }
.post-list li { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.post-list span { display: block; font-size: .88rem; color: var(--muted); margin-top: 4px; }
.post-list time { font-size: .8rem; color: var(--muted); }

/* ---------- stills, cast ---------- */
.thumbs { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.thumbs img, .thumbs .noimg { border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--bg-card); display: block; }

.people { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.people a { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: center; }
.avatar, .people .noimg { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--bg-card); display: block; }
.avatar-lg { width: 96px; height: 96px; }
.p-name { display: block; font-size: .9rem; font-weight: 600; }
.p-role { display: block; font-size: .78rem; color: var(--muted); }
.person-head { display: flex; gap: 18px; align-items: center; margin: 24px 0; }

/* ---------- prose ---------- */
.prose { max-width: 72ch; padding-block: 24px; }
.prose-legal { max-width: 80ch; font-size: .95rem; color: #dfe2e8; }
.prose h2 { margin-top: 1.8rem; }
.prose a { color: var(--accent-text); }
.prose blockquote { margin: 0 0 1em; padding-left: 16px; border-left: 3px solid var(--line); color: #dfe2e8; }
.facts-box { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.facts-box h2 { margin: 0 0 .8em; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts-box dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: .9rem; }
.facts-box dt { color: var(--muted); }
.facts-box dd { margin: 0; }
.facts-box .links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; }

/* ---------- media ---------- */
.embed { position: relative; aspect-ratio: 16 / 9; margin-bottom: 1.5rem; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }

/* ---------- pagination ---------- */
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 2rem 0; flex-wrap: wrap; }
.pager a { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-card); }
.pager-state { color: var(--muted); font-size: .9rem; }

/* ---------- forms ---------- */
.contact-form { max-width: 34rem; }
.contact-form label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.contact-form input, .contact-form textarea {
  width: 100%; background: var(--bg-soft); border: 1px solid var(--line);
  color: var(--text); padding: 10px 12px; border-radius: var(--radius); font: inherit;
}
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.field-error { display: block; color: #ff8d94; font-size: .85rem; margin-top: 4px; }
.notice { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line); }
.notice-ok { background: #10251a; border-color: #1f5136; }
.notice-bad { background: #2a1315; border-color: #5c2126; }

/* ---------- ads ---------- */
.ad { margin: 2rem 0; text-align: center; min-height: 90px; overflow: hidden; }
.ad-box { min-height: 250px; margin: 0; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; background: rgba(5,6,8,.93); z-index: 50;
  display: grid; place-items: center; padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: var(--radius); }
.lb-cap { color: var(--muted); font-size: .9rem; margin-top: 12px; text-align: center; }
.lb-close {
  position: absolute; top: 12px; right: 16px; font-size: 2rem; line-height: 1;
  background: none; border: 0; color: var(--text); cursor: pointer;
}

/* ---------- errors ---------- */
.error-block { padding: 4rem 16px; max-width: 46rem; }
.error-block .code { font-size: 3rem; font-weight: 800; color: var(--accent-text); margin: 0; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); margin-top: 3rem; padding: 28px 0 40px; background: #0d0e12; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; }
.site-foot a { color: var(--muted); font-size: .92rem; }
.site-foot a:hover { color: var(--text); }
.site-foot p { max-width: 80ch; }

/* ---------- narrow screens ---------- */
@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
  .col-side { position: static; }
  .hero-inner { grid-template-columns: 140px 1fr; gap: 18px; }
}
@media (max-width: 620px) {
  .head-inner { gap: 10px; }
  .search { margin-left: 0; width: 100%; }
  .search input { flex: 1; min-width: 0; }
  .main-nav { order: 3; width: 100%; }
  .hero-inner { grid-template-columns: 110px 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
