/* ==========================================================================
   Site chrome: header, navigation, search, hero, footer, page shells
   ========================================================================== */

/* -------------------------------------------------------------------------- */
/* Header                                                                      */
/* -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(to bottom, rgb(10 12 15 / .92), rgb(10 12 15 / .55) 70%, transparent);
  transition: background .25s var(--ease), border-color .25s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgb(10 12 15 / .96);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line-soft);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme='dark']) .site-header {
    background: linear-gradient(to bottom, rgb(255 255 255 / .95), rgb(255 255 255 / .6) 70%, transparent);
  }
  :root:not([data-theme='dark']) .site-header.is-scrolled { background: rgb(255 255 255 / .96); }
}

.header__inner {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Brand ------------------------------------------------------------------- */

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
}
.brand:hover { color: inherit; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: var(--brand-ink);
  box-shadow: 0 6px 18px -8px rgb(255 176 32 / .8);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-size: 1.15rem; letter-spacing: .06em; font-weight: 800; }
.brand__text em {
  font-style: normal;
  font-size: .72rem;
  color: var(--brand);
  font-family: var(--font-mm);
  line-height: 1.6;
}

/* Navigation --------------------------------------------------------------- */

.nav { flex: 1; }
.nav ul { display: flex; gap: .25rem; }
.nav a {
  display: block;
  padding: .5rem .8rem;
  border-radius: var(--r);
  font-size: .93rem;
  font-weight: 600;
  color: var(--text-2);
  transition: background .16s var(--ease), color .16s var(--ease);
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current='page'] { color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); }
.nav__mm { display: none; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Header search ------------------------------------------------------------ */

.search {
  position: relative;
  flex-shrink: 0;
  width: min(320px, 34vw);
}
.search__icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.search input {
  width: 100%;
  padding: .55rem .9rem .55rem 2.35rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: .9rem;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { border-color: var(--brand); background: var(--surface-2); outline: none; }

.search__results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  z-index: 120;
}
.search__row {
  display: flex;
  gap: .7rem;
  align-items: center;
  padding: .55rem .7rem;
  border-bottom: 1px solid var(--line-soft);
}
.search__row:last-child { border-bottom: 0; }
.search__row:hover { background: var(--surface-2); color: inherit; }
.search__row img { border-radius: 4px; object-fit: cover; }
.search__row-body { display: flex; flex-direction: column; min-width: 0; }
.search__row-body strong { font-size: .9rem; }
.search__row-body small { color: var(--text-3); font-size: .78rem; }
.search__empty { padding: .9rem; color: var(--text-3); font-size: .875rem; margin: 0; }

@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--surface);
    border-block: 1px solid var(--line);
    padding: .5rem 1rem 1rem;
    display: none;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { padding: .7rem .8rem; }
  .nav__mm { display: inline; margin-left: .5rem; color: var(--text-3); font-size: .8rem; }
  .search { width: auto; flex: 1; }
}
@media (max-width: 560px) {
  .brand__text em { display: none; }
  .search input { padding-left: 2.2rem; }
}

/* -------------------------------------------------------------------------- */
/* Hero                                                                        */
/* -------------------------------------------------------------------------- */

.hero {
  position: relative;
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + 4rem);
  padding-bottom: 3.5rem;
  min-height: min(80vh, 680px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center 28%;
  transform: scale(1.04);
}
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg) 2%, rgb(10 12 15 / .55) 45%, rgb(10 12 15 / .25) 100%),
    linear-gradient(to right, rgb(10 12 15 / .92) 0%, rgb(10 12 15 / .45) 55%, transparent 100%);
}
.hero__inner { max-width: 680px; }
.hero__eyebrow {
  font-size: .8rem;
  font-weight: 750;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .6rem;
}
.hero__title { margin-bottom: .1em; text-shadow: 0 2px 24px rgb(0 0 0 / .6); }
.hero__title-mm { font-size: 1.1rem; color: var(--text-2); margin-bottom: .7rem; }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  color: var(--text-2);
  font-size: .92rem;
  font-weight: 600;
  margin-bottom: .9rem;
}
.hero__rating { color: var(--brand); font-weight: 800; }
.hero__overview {
  color: var(--text-2);
  font-size: 1.02rem;
  max-width: 58ch;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero__actions { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.4rem 0 1rem; }
.hero__badges { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0; }

@media (max-width: 640px) {
  .hero { min-height: 74vh; padding-bottom: 2.5rem; }
  .hero__overview { -webkit-line-clamp: 4; font-size: .95rem; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* -------------------------------------------------------------------------- */
/* Page shells                                                                 */
/* -------------------------------------------------------------------------- */

main { display: block; min-height: 60vh; }

.pagehead {
  padding: calc(var(--header-h) * .5 + 1.5rem) 0 1.25rem;
}
.pagehead h1 { margin-bottom: .15em; }
.pagehead p { color: var(--text-2); margin: 0; }
.pagehead__desc { max-width: 62ch; margin-top: .5rem !important; }

.rails { padding-block: 2rem 3rem; display: flex; flex-direction: column; gap: 2.5rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 1.15rem;
  padding-bottom: 3rem;
}
@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .8rem; }
}

.results-count {
  color: var(--text-3);
  font-size: .875rem;
  margin-bottom: .9rem;
}

.crumbs {
  font-size: .85rem;
  color: var(--text-3);
  margin-bottom: 1rem;
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.crumbs a:hover { color: var(--brand); }

/* -------------------------------------------------------------------------- */
/* Footer                                                                      */
/* -------------------------------------------------------------------------- */

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-2);
}
.footer__inner {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
  padding: 3rem 0 2rem;
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) 2fr;
  gap: 2.5rem;
}
.footer__brand strong { font-size: 1.2rem; letter-spacing: .06em; }
.footer__brand p { color: var(--text-2); font-size: .92rem; margin-top: .5rem; }
.footer__muted { color: var(--text-3) !important; font-size: .85rem !important; }

.footer__links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
}
.footer__links h3 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-3);
  margin-bottom: .7rem;
}
.footer__links li { margin-bottom: .45rem; }
.footer__links a { color: var(--text-2); font-size: .9rem; }

.footer__bar {
  border-top: 1px solid var(--line-soft);
  padding: 1rem 0;
}
.footer__bar p {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
  color: var(--text-3);
  font-size: .82rem;
}
.footer__bar p + p { margin-top: .25rem; }

@media (max-width: 800px) {
  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
}
