:root {
  --cyan: #e52332;
  --cyan2: #ff6871;
  --bg: #050506;
  --surface: #111113;
  --line: #ffffff20;
  --ladybug-red: #e52332;
  color-scheme: dark;
}

html, body { background: #050506; }
body { color: #f6f3f1; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 78px;
  display: grid;
  grid-template-columns: minmax(185px, 1fr) auto minmax(185px, 1fr);
  gap: clamp(14px, 3vw, 48px);
  align-items: center;
  padding: 0 clamp(20px, 4vw, 56px);
  border-bottom: 1px solid #ffffff0d;
  background: #050506eF;
  backdrop-filter: blur(18px);
}
.brand { gap: 12px; min-width: 0; }
.brand-name { color: #fff; letter-spacing: 1px; font-size: 12px; }
.brand-accent { color: var(--ladybug-red); }
.brand-logo { display: block; flex: 0 0 auto; width: 42px; height: 46px; object-fit: contain; object-position: center; }

.main-nav { justify-content: center; gap: clamp(18px, 3vw, 42px); height: 100%; }
.nav-link {
  height: 100%;
  display: inline-flex;
  align-items: center;
  color: #d5d1d1;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link.active::after { height: 3px; background: var(--ladybug-red); box-shadow: 0 0 14px #e5233270; }
.top-actions { justify-content: flex-end; margin: 0; min-width: 0; }

.search-wrap {
  position: relative;
  width: min(290px, 100%);
  display: flex;
  align-items: center;
  border: 1px solid #ffffff2a;
  border-radius: 999px;
  background: #0d0d0f;
  transition: border-color .2s, box-shadow .2s, width .2s;
}
.search-wrap:focus-within { border-color: #e523327f; box-shadow: 0 0 0 3px #e523321c; }
#catalog-search {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 4px 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
}
#catalog-search::placeholder { color: #969194; }
#catalog-search::-webkit-search-cancel-button { cursor: pointer; }
.search-toggle {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.search-toggle:hover { color: #ff7880; }
.search-toggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.search-results {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 60;
  width: min(390px, calc(100vw - 28px));
  max-height: min(70vh, 480px);
  overflow: auto;
  padding: 7px;
  border: 1px solid #e5233247;
  border-radius: 15px;
  background: #101012f7;
  box-shadow: 0 20px 60px #000b;
  backdrop-filter: blur(16px);
}
.search-results[hidden] { display: none; }
.search-result {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  transition: background .18s;
}
.search-result:hover, .search-result:focus-visible { outline: 0; background: #e5233221; }
.search-result img { width: 46px; height: 58px; border-radius: 6px; object-fit: cover; background: #29292c; }
.search-result-copy { min-width: 0; display: grid; gap: 4px; }
.search-result-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.search-result-copy small { color: #aaa5a6; font-size: 10px; }
.search-result-kind { color: #ff777f; font-size: 8px; font-weight: 800; letter-spacing: .7px; }
.search-empty { padding: 16px 13px; color: #c6c0c1; font-size: 12px; }
.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; }

.home-hero {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  padding: 0 clamp(28px, 7vw, 102px);
  background-position: center center;
  isolation: isolate;
}
.hero-overlay {
  background:
    linear-gradient(90deg, #050506d9 0%, #05050691 35%, #05050616 78%),
    linear-gradient(0deg, #050506 0%, #050506d9 12%, #05050642 52%, #0505061c 100%);
}
.hero-copy { width: min(780px, 100%); max-width: 780px; padding: 0 0 clamp(46px, 8vw, 92px); }
.eyebrow, .section-kicker { color: #ff727b; }
.eyebrow { margin-bottom: 14px; font-size: 10px; letter-spacing: 2px; }
.eyebrow-dot { width: 8px; height: 8px; background: var(--ladybug-red); box-shadow: 0 0 13px #ff3d48; }
.hero-copy h1 { max-width: 820px; margin: 0 0 8px; color: #fff; font: 850 clamp(36px, 6.4vw, 78px)/.98 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: -.045em; text-wrap: balance; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin: 18px 0 12px; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 1.15px; }
.hero-meta > span:first-child { color: #ff727b; }
.meta-divider { width: 4px; height: 4px; border-radius: 50%; background: #f4f0f0; }
.hero-description { max-width: 590px; margin: 0 0 22px; color: #e4dfe0; font-size: clamp(13px, 1.4vw, 16px); line-height: 1.65; }
.hero-actions { gap: 11px; }
.button-primary { border-color: var(--ladybug-red); background: var(--ladybug-red); color: #fff; box-shadow: 0 8px 26px #e5233238; }
.button-primary:hover { border-color: #ff4652; background: #ff3140; }
.button-glass { border-color: #ffffff50; background: #070708a8; color: #fff; backdrop-filter: blur(12px); }
.button-glass:hover { border-color: #ff6972; background: #1d1012; }

.home-catalog {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 14px clamp(18px, 4vw, 58px) 62px;
  background: #050506;
}
.home-catalog::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image: url('/attachments/banner/ladybug-pattern-custom.png');
  background-repeat: repeat;
  background-position: center top;
  background-size: min(100%, 1280px) auto;
  opacity: .56;
}
.home-section { width: min(1280px, 100%); margin: 0 auto; padding: 34px 0 12px; }
.home-section + .home-section { margin-top: 10px; }
.home-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 22px; }
.home-section-heading h2 {
  display: inline-flex;
  align-items: center;
  min-height: 58px;
  margin: 0;
  padding: 10px clamp(18px, 3vw, 34px);
  background: var(--ladybug-red);
  color: #09090a;
  font: 900 clamp(21px, 3.2vw, 34px)/1 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .025em;
}
.home-section-heading .text-link { color: #eee; font-size: 11px; }
.home-section-heading .text-link span, .site-footer>a:last-child span { color: #ff727b; }
.home-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 4vw, 42px); }
.special-page-grid { width: min(1280px, calc(100% - 48px)); margin: 0 auto 55px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.home-card {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  aspect-ratio: .69;
  border: 1px solid #ffffff18;
  border-radius: 20px;
  background: #27272a;
  box-shadow: 0 12px 35px #0008;
  color: #fff;
  text-decoration: none;
  isolation: isolate;
  transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
}
.home-card:hover { transform: translateY(-6px); border-color: #ff58648a; box-shadow: 0 18px 45px #000b, 0 0 24px #e523321a; }
.home-card > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.home-card:hover > img { transform: scale(1.045); }
.home-card::after { content: ""; position: absolute; z-index: -1; inset: 20% 0 0; background: linear-gradient(180deg, transparent 0%, #0505062a 28%, #050506eb 100%); }
.home-card-copy { position: absolute; inset: auto 0 0; display: grid; gap: 7px; padding: clamp(13px, 2vw, 22px); }
.home-card-copy strong { font: 800 clamp(16px, 2vw, 24px)/1.12 Inter, ui-sans-serif, system-ui, sans-serif; text-wrap: balance; }
.home-card-copy small { color: #e3dfe0; font-size: 10px; line-height: 1.4; }
.home-card-tag { width: fit-content; margin-bottom: 2px; padding: 5px 8px; border-radius: 999px; background: #e52332; color: #fff; font-size: 8px; font-weight: 850; letter-spacing: 1px; }
.home-card-arrow { position: absolute; top: 14px; right: 14px; width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid #ffffff66; border-radius: 50%; background: #08080988; color: #fff; font-size: 15px; }
.home-card.is-season { aspect-ratio: .72; }
.home-card.is-season::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(140deg, #e5233255, transparent 50%); }

.page-intro { padding-top: 54px; padding-bottom: 24px; }
.page-intro h1 { font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-weight: 850; letter-spacing: -.035em; }
.season-select-wrap select, .compact-season-select select { border-color: #e523324d; }
.season-select-wrap select:focus, .compact-season-select select:focus { border-color: var(--ladybug-red); }
.season-choice, .episode-card, .movie-credits, .player-shell { border-color: #ffffff20; }
.site-footer { border-top-color: #e5233228; }
.site-footer>a:last-child { color: #f2eeee; }

@media (max-width: 900px) {
  .topbar { grid-template-columns: minmax(145px, 1fr) auto minmax(150px, 1fr); gap: 14px; padding-inline: 22px; }
  .main-nav { gap: 18px; }
  .nav-link { font-size: 11px; }
  .search-wrap { width: 220px; }
  .special-page-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .topbar { height: 70px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 0 15px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 9px; letter-spacing: .6px; }
  .brand-logo { width: 35px; height: 39px; }
  .main-nav { gap: clamp(9px, 3vw, 18px); }
  .nav-link { font-size: clamp(8px, 2.1vw, 10px); letter-spacing: .5px; }
  .search-wrap { width: 42px; border-color: transparent; background: transparent; }
  #catalog-search { display: none; }
  .search-toggle { flex-basis: 40px; }
  .search-wrap.is-open { position: absolute; top: calc(100% + 7px); right: 12px; width: min(390px, calc(100vw - 24px)); padding-left: 10px; border-color: #e523327f; background: #0d0d0f; }
  .search-wrap.is-open #catalog-search { display: block; }
  .search-results { right: 0; }
  .home-hero { width: 100%; height: auto; min-height: 0; aspect-ratio: 16 / 9; padding: 12px 15px 11px; background-position: center center; }
  .hero-overlay { background: linear-gradient(0deg, #050506 0%, #050506df 14%, #05050635 75%), linear-gradient(90deg, #05050678, transparent 90%); }
  .hero-copy { width: 100%; padding: 0; }
  .eyebrow { margin-bottom: 4px; font-size: 8px; letter-spacing: 1px; }
  .hero-copy h1 { margin-bottom: 4px; font-size: clamp(20px, 5.7vw, 35px); line-height: 1; }
  .hero-meta { gap: 6px; margin: 5px 0 6px; font-size: 8px; letter-spacing: .5px; }
  .hero-description { display: -webkit-box; max-width: 540px; margin: 0 0 8px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 10px; line-height: 1.35; }
  .hero-actions { gap: 7px; }
  .hero-actions .button { min-height: 30px; padding-inline: 10px; font-size: 9px; }
  .home-catalog { padding-inline: 17px; }
  .home-section { padding-top: 26px; }
  .home-section-heading { margin-bottom: 15px; }
  .home-section-heading h2 { min-height: 49px; padding-inline: 16px; font-size: clamp(19px, 5vw, 27px); }
  .home-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .home-card { border-radius: 15px; }
  .home-card-copy { gap: 5px; padding: 12px; }
  .home-card-copy strong { font-size: clamp(13px, 3.9vw, 18px); }
  .home-card-copy small { font-size: 9px; }
  .home-card-tag { font-size: 7px; }
  .special-page-grid { width: calc(100% - 34px); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
  .page-intro { padding-top: 42px; }
}

@media (max-width: 390px) {
  .topbar { grid-template-columns: 38px minmax(0, 1fr) 38px; gap: 7px; padding-inline: 10px; }
  .brand-name { display: none; }
  .main-nav { gap: 9px; }
  .nav-link { font-size: 8px; letter-spacing: .25px; }
  .search-wrap { width: 38px; }
  .search-toggle { flex-basis: 36px; width: 36px; height: 36px; }
  .hero-meta { font-size: 9px; }
  .hero-description { font-size: 9px; }
  .hero-actions .button-glass { display: none; }
  .hero-actions { flex-wrap: nowrap; }
  .hero-actions .button { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
