/* Home page hero (Scout teaser). */

:root {
  --home-olive: var(--header-green);
  --home-amber: #edad01;
  --home-charcoal: #0c0c0c;
  --home-card: #1a1a1a;
  --home-border: #2a2a2a;
  --home-text: #f2f2f2;
  --home-muted: #b1b1b1;
  --home-accent: #d96528;
  --home-font-display: "Barlow Condensed", sans-serif;
  --home-font-body: "Jost", sans-serif;
}

@property --home-aura-angle {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

@keyframes home-aura-orbit {
  from {
    --home-aura-angle: 0deg;
  }
  to {
    --home-aura-angle: 360deg;
  }
}

.home-page .home-hero {
  position: relative;
  padding: 25px 0 30px;
  color: var(--home-text);
  background:
    radial-gradient(900px 420px at 12% 10%, rgba(140, 149, 0, 0.35), transparent 65%),
    radial-gradient(900px 520px at 85% -10%, rgba(217, 101, 40, 0.35), transparent 70%),
    linear-gradient(180deg, #070707 0%, #0c0c0c 55%, #0b0b0b 100%);
  overflow: hidden;
}
.home-page .home-hero-inner {
  position: relative;
  z-index: 1;
  width: var(--home-content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: center;
}
.home-page .home-eyebrow {
  margin-bottom: 3px;
  margin-left: 2px;
}
.home-page .home-hero-copy h1 {
  font-family: var(--home-font-display);
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.05;
  margin: 6px 0 14px;
  color: #fff;
}
.home-page .home-subhead {
  font-family: var(--home-font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 520px;
  margin-top: 0;
  margin-bottom: 20px;
}
.home-page .home-hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.home-page .home-hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-left: 10px;
  min-height: 260px;
  justify-content: center;
}
.home-page .home-hero-library-bg {
  position: absolute;
  inset: -50px -128px -59px;
  margin-right: 90px;
  border-radius: 18px;
  /* min() - use min() as it has wide browser support */
  min-width: min(549px, calc(100vw - 20px));
  background-image: url("/images/scout-image-computer.webp");
  background-size: cover;
  background-position: 34% center;
  background-repeat: no-repeat;
  filter: sepia(0.35) saturate(0.9) contrast(1.08);
  opacity: 0.4;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.75) 18%, rgba(0, 0, 0, 1) 35%, rgba(0, 0, 0, 1) 65%, rgba(0, 0, 0, 0.75) 82%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.75) 18%, rgba(0, 0, 0, 1) 35%, rgba(0, 0, 0, 1) 65%, rgba(0, 0, 0, 0.75) 82%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  z-index: 0;
  pointer-events: none;
}
.home-page .home-hero-library-bg::after {
  content: none;
}

/* Home page scout input - page-specific overrides only (base styles in global.css) */
.home-page .home-scout-input-wrap {
  height: 50px;
  --scout-aura-radius: 10px;
  --scout-input-radius: 9px;
  /* Input stops 5px before button: button right (7px) + button width (36px) + 5px gap = 48px */
  --scout-input-right-stop: 48px;
}
.home-page .scout-search-submit {
  right: 7px;
}

.home-page .home-benefits {
  position: relative;
  background: linear-gradient(145deg, #1b1b1b 0%, #242424 55%, #1b1b1b 100%);
  border-top: 1px solid #1f1f1f;
  border-bottom: 1px solid #1f1f1f;
  padding: 35px 0;
  overflow: hidden;
}
.home-page .home-benefits::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/images/flexpass-logo.webp");
  background-repeat: no-repeat;
  background-size: 350px auto;
  background-position: left 135px bottom -36px;
  opacity: 0.08;
  pointer-events: none;
}
.home-page .home-benefits::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 260px at 85% 0%, rgba(255, 255, 255, 0.08), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 7px);
  opacity: 0.35;
  pointer-events: none;
}
.home-page .home-benefits-header {
  width: var(--home-content-width);
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
}
.home-page .home-benefits-header-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.home-page .home-benefits-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.home-page .home-benefits-header-top .home-eyebrow {
  flex: 1;
}
.home-page .home-benefits-cta {
  flex-shrink: 0;
}
.home-page .home-benefits-header-headline h2 {
  font-family: var(--home-font-display);
  color: #fff;
  font-size: 36px;
  margin: 0;
}
.home-page .home-benefits-inner {
  width: var(--home-content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  position: relative;
  z-index: 1;
}
.home-page .home-benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #c75000;
  border: 1px solid #232323;
  border-radius: 14px;
  padding: 14px 16px;
  color: #fff;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 16px;
  font-weight: 600;
}
.home-page .home-benefit img {
  width: 40px;
  height: 40px;
  filter: invert(100%);
  opacity: 0.5;
}

/* Home page popular categories variants (remove the unused variant blocks when chosen). */
.home-page .home-popular-variant {
  position: relative;
  width: 100%;
  max-width: 100vw;
  padding: 36px 0;
  background: linear-gradient(145deg, #141414 0%, #0e0e0e 45%, #141414 100%);
  border-top: 1px solid #1c1c1c;
  border-bottom: 1px solid #1c1c1c;
  overflow: hidden;
}
.home-page .home-popular-variant::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 8px);
  opacity: 0.25;
  pointer-events: none;
}
.home-page .home-popular-variant::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(620px 220px at 12% 0%, rgba(140, 149, 0, 0.2), transparent 65%),
    radial-gradient(640px 240px at 88% 10%, rgba(217, 101, 40, 0.18), transparent 65%);
  opacity: 0.9;
  pointer-events: none;
}
.home-page .home-popular-variant__inner {
  width: var(--home-content-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.home-page .home-popular-variant__header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.home-page .home-popular-variant__header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.home-page .home-popular-variant__title h2 {
  margin: 0;
  font-family: var(--home-font-display);
  font-size: 36px;
  color: #fff;
}
.home-page .home-popular-variant__cta {
  text-decoration: none;
  flex-shrink: 0;
}

.home-page .home-popular-variant--pills {
  background: transparent;
}

/* Desktop: centered flex-wrap layout */
.home-page .home-popular-variant--pills .home-popular-variant__pill-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding-bottom: 4px;
}

.home-page .home-popular-variant--pills .home-popular-variant__pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #2f2f2f;
  background-color: rgba(199, 80, 0, 0.50);
  color: #fff;
  text-decoration: none;
  font-family: var(--home-font-display);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.home-page .home-popular-variant--pills .home-popular-variant__pill:hover {
  border-color: var(--home-amber);
  color: var(--home-amber);
}

/* Mobile: horizontal scroll with fade edges */
@media (max-width: 767px) {
  .home-page .home-popular-variant--pills .home-popular-variant__inner {
    width: 100%;
    padding: 0;
  }

  .home-page .home-popular-variant--pills .home-popular-variant__header {
    padding: 0 16px;
  }

  .home-page .home-popular-variant--pills .home-popular-variant__pill-row {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 16px 12px;
    margin: 0 -16px;
    gap: 10px;
    /* Fade edges to indicate scrollability */
    mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
  }

  .home-page .home-popular-variant--pills .home-popular-variant__pill-row::-webkit-scrollbar {
    display: none;
  }

  .home-page .home-popular-variant--pills .home-popular-variant__pill {
    flex: 0 0 auto;
    padding: 12px 20px;
    font-size: 13px;
  }

  .home-page .home-popular-variant--pills .home-popular-variant__pill:first-child {
    margin-left: 10px;
  }
}

/* Featured Author (Home) - Author Universe layout. */
.home-page .featured-section {
  position: relative;
  width: 100%;
  max-width: 100vw;
  padding: 38px 0 44px;
  background: linear-gradient(155deg, #141414 0%, #0f0f0f 45%, #181818 100%);
  border-top: 1px solid #1c1c1c;
  border-bottom: 1px solid #1c1c1c;
  overflow: hidden;
}
.home-page .featured-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 280px at 10% 0%, rgba(140, 149, 0, 0.2), transparent 70%),
    radial-gradient(700px 280px at 90% 0%, rgba(217, 101, 40, 0.18), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 8px);
  opacity: 0.9;
  pointer-events: none;
}
.home-page .featured-author-universe,
.home-page .featured-author-inner {
  position: relative;
  z-index: 1;
}
.home-page .featured-author > div {
  float: none;
}
.home-page .featured-author-inner {
  width: var(--home-content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  float: none;
}
.home-page .featured-author-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.home-page .featured-author-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  background: rgba(12, 12, 12, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--home-amber);
}
.home-page .featured-author-cover img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  display: block;
}
.home-page .featured-author-cover-caption a {
  color: #fff;
  font-family: var(--home-font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.home-page .featured-author-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.home-page .featured-author-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.home-page .featured-author-name {
  margin: 0;
  font-family: var(--home-font-display);
  font-size: 36px;
  line-height: 1.1;
}
.home-page .featured-author-name a {
  color: #fff;
  text-decoration: none;
}
.home-page .featured-author-description {
  color: var(--home-muted);
  font-family: var(--home-font-body);
  line-height: 1.7;
}
.home-page .featured-author-collection-label {
  display: inline-flex;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--home-amber);
  margin-bottom: 10px;
  font-weight: 700;
}
.home-page .featured-author-covers {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
}
.home-page .featured-author-covers img {
  width: 92px;
  height: auto;
  border-radius: 0;
  border: 1px solid #555;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}
.home-page .featured-author-scout {
  position: relative;
  border-radius: 16px;
  margin-top: 10px;
  padding: 2px;
  background: transparent;
  overflow: visible;
  isolation: isolate;
}
.home-page .featured-author-scout::before {
  content: none;
}
.home-page .featured-author-scout-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  background: transparent;
  background-color: rgba(255, 255, 255, 0.10);
  border: 1px solid #444;
}
.home-page .featured-author-scout-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  min-width: 0;
  margin-right: 56px;
}
.home-page .featured-author-scout-title {
  color: var(--home-amber);
  font-family: var(--home-font-body);
  font-size: 18px;
  font-weight: 600;
}
.home-page .featured-author-scout-text {
  color: var(--home-muted);
  font-family: var(--home-font-body);
  font-size: 14px;
  position: relative;
  z-index: 2;
}
.home-page .featured-author-scout-btn-wrap {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  border-radius: 999px;
  overflow: visible;
}
.home-page .featured-author-scout-btn-wrap::before {
  content: none;
}
.home-page .featured-author-scout-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px 11px;
  border-radius: 999px;
  border: 2px solid transparent;
  background:
    linear-gradient(#111, #111) padding-box,
    conic-gradient(
      from var(--home-aura-angle, 0deg),
      transparent 0deg,
      transparent 25deg,
      rgba(52, 168, 83, 0.9) 60deg,
      rgba(255, 211, 20, 0.9) 100deg,
      rgba(255, 70, 65, 0.9) 140deg,
      rgba(49, 134, 255, 0.9) 180deg,
      rgba(49, 134, 255, 0.6) 240deg,
      rgba(49, 134, 255, 0.3) 300deg,
      transparent 360deg
    ) border-box;
  color: #fdf1b0;
  font-family: var(--home-font-display);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 1;
  overflow: hidden;
  animation: home-aura-orbit 4s linear infinite;
}
.home-page .featured-author-scout-btn:hover {
  filter: brightness(1.05);
}
.home-page .featured-author-scout-btn > * {
  position: relative;
  z-index: 1;
}
.home-page .featured-author-scout-icon {
  width: auto;
  height: 24px;
}
.home-page .featured-author-scout-icon--floating {
  position: absolute;
  left: -42px;
  top: -16px;
  height: 73px;
  width: auto;
  transform: scaleX(-1);
  filter: drop-shadow(-5px -5px 10px rgb(0, 0, 0));
  z-index: 3;
  pointer-events: none;
}

.home-page .slider-section {
  padding: 0 0 10px;
  border-top: none;
}
.home-page {
  --home-content-width: min(1080px, 92%);
  --home-slider-extra: 0px;
}
.home-page .slider-section .heading-bar {
  width: var(--home-content-width);
  margin: 0 0 18px;
  border-bottom: none;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 16px;
  padding: 0;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.home-page .slider-section .heading-bar h3 {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--home-font-display);
  font-size: 36px;
  line-height: 1.1;
  font-weight: 400;
  color: #fff;
  text-align: left;
}
.home-page .slider-section .heading-bar h3::before {
  content: "Featured";
  font-family: var(--home-font-body);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--home-amber);
  font-weight: 600;
  display: block;
}
.home-page .slider-section .slider-btn.yellow-btn a {
  letter-spacing: normal;
}
.home-page .slider-section .slider-btn.transparent-btn {
  margin-left: auto;
}
.home-page .slider-section .titles-slider {
  width: calc(var(--home-content-width) + var(--home-slider-extra));
  margin: 0 auto;
}
.home-page .slider-section .slick-dots {
  display: none !important;
}
.home-page .slider-section .slick-dotted.slick-slider {
  margin-bottom: 0 !important;
}

.home-page #content-holder {
  padding-top: 40px;
}
.home-page #content-holder > * + * {
  margin-top: 70px;
}

@keyframes home-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-page .home-hero-copy,
.home-page .home-hero-visual,
.home-page .home-benefits-inner {
  animation: home-fade-up 1.8s ease both;
}
.home-page .home-hero-visual {
  animation-delay: 0.12s;
}
.home-page .home-benefits-inner {
  animation-delay: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  .home-page .home-hero-copy,
  .home-page .home-hero-visual,
  .home-page .home-benefits-inner {
    animation: none;
  }
}

@media (max-width: 960px) {
  .home-page .home-hero {
    position: relative;
  }
  .home-page .home-hero::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-image: url("/images/scout-image-computer.webp");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    filter: sepia(0.35) saturate(0.9) contrast(1.0) brightness(0.4);
    opacity: 0.35;
    z-index: 0;
    pointer-events: none;
  }
  .home-page .home-hero-inner {
    grid-template-columns: 1fr;
    position: relative;
    z-index: 2;
  }
  .home-page .home-hero-visual {
    display: none;
  }
  .home-page .home-hero-copy {
    position: relative;
    z-index: 2;
  }
  .home-page .home-scout-input-wrap {
    position: relative;
    z-index: 2;
    pointer-events: auto;
  }
  .home-page .home-hero-actions {
    position: relative;
    z-index: 2;
    pointer-events: auto;
  }
  .home-page .home-hero-actions .btn-home-outline,
  .home-page .home-hero-actions .btn-home-filled {
    pointer-events: auto;
  }
  .home-page .featured-author-inner {
    grid-template-columns: 1fr;
  }
  .home-page .featured-author-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .home-page .featured-author-scout {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .home-page .home-hero {
    padding: 24px 0 26px;
  }
  .home-page .home-benefits-header-headline h2 {
    font-size: 28px;
  }
}

@media (max-width: 500px) {
  .home-page .home-hero-copy h1 {
    font-size: clamp(30px, 4.5vw, 56px);
    margin: 6px 0 10px;
  }
  .home-page .home-subhead {
    line-height: 1.5;
    margin-bottom: 17px;
  }
  .home-page .home-hero-actions {
    margin-top: 23px;
  }
}
