/* =============================================
   netflixhasnohomepage.com
   Minimal, zero-dependency CSS
   ============================================= */

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

:root {
  --red:        #E50914;
  --red-dark:   #B00710;
  --black:      #0a0a0a;
  --near-black: #130F0F;
  --dark:       #1a1a1a;
  --mid:        #2a2a2a;
  --border:     #333;
  --muted:      #999;
  --text:       #e5e5e5;
  --white:      #ffffff;
  --grey:       #363533;
  --dark-blue:  #4061E7;

  --font-sans:  system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --radius:     8px;
  --btn-radius: 4px;
  --max-width:  1280px;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--black);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

p {
    margin-bottom: 1em;
}

a {
  color: var(--red-dark);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Layout helpers --- */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2.5rem);
}

/* --- Header --- */
.site-header {
  padding: 1.25rem clamp(1rem, 5vw, 2.5rem);
  border-bottom: 1px solid var(--border);
  background: var(--black);
  position: sticky;
  top: 0;
  z-index: 100;
  text-align: center;
}

.wordmark {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  font-weight: 400;
}

/* --- Hero --- */
.hero {
  min-height: 46vh;
  display: flex;
  align-items: center;
  background-color: var(--near-black);
  background-image: url(/images/hero-bg.jpeg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  position: relative;
  overflow: hidden;
  padding-block: 6rem;
  text-align: center;
  box-shadow: 0 8em 10em -10.5em var(--dark-blue);
  border-bottom: 4px solid transparent;
  border-image: linear-gradient(
    to right,
    transparent 0%,
    var(--red) 50%,
    var(--red) 50%,
    transparent 100%
  );
  border-image-slice: 1;
}

figcaption {
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.hero-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2.5rem);
  position: relative;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 4rem);
  font-weight: 700;
  line-height: 3.75rem;
  color: var(--white);
  margin-bottom: 1.25rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--red);
}

.hero-sub {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--text);
  font-weight: 400;
  margin: 0;
}

.hero-sub strong {
  color: var(--white);
  font-weight: 700;
}

/* --- Explainer grid --- */
.explainer {
  padding-block: 4rem;
}

.explainer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.explainer-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.explainer-icon {
  font-size: 2rem;
  line-height: 1;
}

.explainer-icon img {
    width: 33.3%;
}

.explainer-item h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--white);
}

/* --- Gallery --- */
.section-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

/* Caption under each screenshot */
.gallery figure {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.gallery figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  padding-inline: 0.25rem;
}

.gallery figcaption strong {
  color: var(--text);
  font-weight: 600;
}

/* Placeholder state (before screenshots are added) */
.gallery-placeholder {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9rem;
}

/* --- Story sections (01 Language / 02 Content / 03 Titles) --- */
.story-section {
  padding-block: 4rem;
}

.story-intro {
  max-width: 100%;
  margin-bottom: 2.5rem;
  border-top: thin solid var(--grey);
  padding-top: 1em;
}

.story-intro h2 {
    font-size: 1em;
    margin-bottom: 2em;
}

.story-body {
    max-width: 66.6%;
}

.story-body code {
  font-size: 0.875em;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  background: var(--dark);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: var(--btn-radius);
  color: var(--text);
}

/* Media area — full container width, no extra top margin needed */
.story-media {
  /* children that previously had their own margin-top get it cleared here */
}

.story-media > .bs-compare,
.story-media > .ic-wrap {
  margin-top: 0;
}

/* Two-up image grid for the language section */
.story-media--two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.story-figure img {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* --- Explorer section --- */
.explorer-section {
  padding-block: 4rem;
}

.explorer-widget {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.explorer-sitename {
    padding-left: 1em;
}

/* Controls row: select + language buttons side-by-side on wide screens */
.explorer-controls {
  display: flex;
  gap: 0.5em;
}

/* Custom select */
.explorer-select-wrap {
  min-width: 240px;
}

.select-shell {
  position: relative;
  display: inline-block;
  width: 100%;
}

.select-shell select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 0.65rem 2.5rem 0.65rem 1rem;
  background: var(--dark);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-sans);
  cursor: pointer;
  outline-offset: 2px;
  transition: border-color 0.15s;
}

.select-shell select:hover  { border-color: #555; }
.select-shell select:focus  { border-color: var(--red); outline: 2px solid rgba(229,9,20,0.4); }

.select-chevron {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
}

/* Language toggle buttons */
.explorer-lang-wrap {
  display: flex;
  gap: 0.5rem;
}

.explorer-lang-wrap > .explorer-label {
  margin-bottom: 0;
}

#lang-buttons {
  /*display: flex;*/
  /*flex-wrap: wrap;*/
  /*gap: 0.5rem;*/
}

.lang-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.lang-btn:hover {
  border-color: #555;
  color: var(--text);
}

.lang-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
  font-weight: 600;
}

.lang-btn:focus-visible {
  outline: 2px solid rgba(229,9,20,0.6);
  outline-offset: 2px;
}

/* Display area */
.explorer-display {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.explorer-display.is-loading {
    min-height: 50vh;
}

/* Shimmer while image loads */
.explorer-display.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--dark) 25%, var(--mid) 50%, var(--dark) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Figure + image */
.explorer-figure {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.explorer-img {
  width: 100%;
  display: block;
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: opacity 0.2s;
}

.explorer-img:hover {
  opacity: 0.92;
}

.load-error .explorer-img {
  display: none;
}

/* Caption bar */
.explorer-caption {
  display: flex;
  justify-content: space-between;
}

.explorer-flag {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.explorer-fullsize {
  color: var(--red);
  text-decoration: none;
  font-weight: bold;
  transition: border-color 0.15s, color 0.15s;
}

/* Footer hero */
.footer-hero {
  padding-top: 4rem;
  text-align: center;
}

.footer-hero-inner {
  padding: 6em 0;
  position: relative;
  border-top: thin solid var(--grey);
}

.footer-hero-inner p {
    margin: 0 6rem 3rem 6rem;
}

.footer-hero-inner p a {
    color: white;
}

.footer-hero-inner p a:hover {
    color: var(--muted);
}

.footer-hero-inner p.footer-ps {
    font-size: 0.8125rem;
    font-style: italic;
    color: var(--muted);
    line-height: 1.6;
    max-width: 42rem;
    margin: 2rem auto 0 auto;
}

.footer-hero h3 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: normal;
}

.footer-hero-btn {
    background: var(--red);
    border-color: var(--red);
    color: var(--text);
    font-weight: bold;
    padding: 0.75em 1em;
    text-decoration: none;
    border-radius: var(--btn-radius);
    font-size: 0.875rem;
    display: inline-block;
}

.footer-hero-btn:hover {
    color: var(--white);
    text-decoration: none;
}

/* --- Image comparison slider --- */
.ic-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-top: 1.75rem;
  cursor: ew-resize;
  touch-action: none;       /* let JS own all pointer events */
  user-select: none;
  -webkit-user-select: none;
}

.ic-base,
.ic-overlay {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
}

.ic-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  object-fit: cover;
  clip-path: inset(0 50% 0 0); /* right-hand side clipped away; updated by JS */
}

/* Corner labels */
.ic-label {
  position: absolute;
  top: 0.875rem;
  padding: 0.2rem 0.6rem;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 4px;
  pointer-events: none;
  z-index: 5;
}

.ic-label-left  { left: 0.875rem; }
.ic-label-right { right: 0.875rem; }

/* Drag handle */
.ic-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%; /* updated by JS */
  width: 44px;
  margin-left: -22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: ew-resize;
  outline: none;
}

.ic-line {
  position: absolute;
  inset: 0 auto;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.85);
  pointer-events: none;
}

.ic-thumb {
  position: relative;
  width: 40px;
  height: 40px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ic-handle:hover .ic-thumb {
  transform: scale(1.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.65);
}

.ic-handle:focus-visible .ic-thumb {
  transform: scale(1.1);
  outline: 2px solid rgba(229, 9, 20, 0.7);
  outline-offset: 3px;
}

/* --- Backsplash compare toggle (CSS-only, no JS) --- */
.bs-compare {
  margin-top: 1.75rem;
}

/* Visually hide the radio inputs while keeping them in tab/focus order */
.bs-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.bs-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* Reuse the same pill style as the language buttons */
.bs-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  color: var(--muted);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.bs-btn:hover {
  border-color: #555;
  color: var(--text);
}

/* Active pill for all 5 buttons */
#bs-ca:checked ~ .bs-controls label[for="bs-ca"],
#bs-us:checked ~ .bs-controls label[for="bs-us"],
#bs-uk:checked ~ .bs-controls label[for="bs-uk"],
#bs-za:checked ~ .bs-controls label[for="bs-za"],
#bs-au:checked ~ .bs-controls label[for="bs-au"] {
    background: var(--red);
    border-color: var(--red);
    color: var(--white);
    font-weight: 600;
}

/* Focus ring for all 5 buttons */
#bs-ca:focus-visible ~ .bs-controls label[for="bs-ca"],
#bs-us:focus-visible ~ .bs-controls label[for="bs-us"],
#bs-uk:focus-visible ~ .bs-controls label[for="bs-uk"],
#bs-za:focus-visible ~ .bs-controls label[for="bs-za"],
#bs-au:focus-visible ~ .bs-controls label[for="bs-au"] {
    outline: 2px solid rgba(229,9,20,0.6);
    outline-offset: 2px;
}

.bs-figure {
  margin: 0;
}

/* Hide all images by default */
.bs-img {
    width: 100%;
    display: none;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* Show image that matches the checked radio */
#bs-ca:checked ~ .bs-figure .bs-img-ca,
#bs-us:checked ~ .bs-figure .bs-img-us,
#bs-uk:checked ~ .bs-figure .bs-img-uk,
#bs-za:checked ~ .bs-figure .bs-img-za,
#bs-au:checked ~ .bs-figure .bs-img-au {
    display: block;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  border-top: thin solid var(--grey);
  padding-top: 0.75em;
}

.site-footer p {
  font-size: 0.8rem;
  color: var(--muted);
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2.5rem);
}

/* --- Responsive tweaks --- */
@media (max-width: 1024px) {
  .hero {
    padding-block: 4rem;
    box-shadow: 0 8em 8em -10.5em var(--dark-blue);
    background-size: cover;
  }

  .explorer-details, .explorer-caption {
    display: flex;
    flex-direction: column;
  }

  .explainer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .story-body {
    max-width: 100%;
  }

  .explorer-sitename {
    padding-left: 0;
  }
}

@media (max-width: 640px) {
  .explorer-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .explorer-select-wrap {
    min-width: 0;
    width: 100%;
  }

  .explorer-caption {
    flex-wrap: wrap;
  }

  .explorer-sitename {
      padding: 0;
  }

  .explorer-fullsize {
    width: 100%;
    justify-content: center;
  }

  .story-media--two-up {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .hero {
      box-shadow: 0 10em 8em -8.5em var(--dark-blue);
  }

  .explainer-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .explainer-item {
    text-align: center;
  }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery img { transition: none; }
  .explorer-display.is-loading::after { animation: none; }
  .explorer-img { transition: none; }
}
