/* Home index: compact welcome, overlapping feature bar, dark page shelf.
   Load on the home view only (content_loader in home()), after pd-theme.css and main.css. */

/* The index is a dark page. Body #eee must not show in the shelf behind the
   feature bar, in empty ad slots between sections, or above the footer. */
body:has(.pd-welcome),
body:has(.pd-arrivals) {
  background-color: var(--pd-bg, #0e0f11) !important;
}
#content:has(.pd-welcome),
#content:has(.pd-arrivals) {
  background-color: var(--pd-bg, #0e0f11);
}
#content:has(.pd-welcome) + footer,
#content:has(.pd-arrivals) + footer {
  margin-top: 0 !important;
}

/* ----- Compact welcome (overrides the taller py-4 / py-md-5 band in main.css) ----- */
.pd-welcome .container {
  padding-top: .7rem;
  padding-bottom: .75rem;
}
.pd-welcome .pd-welcome-eyebrow {
  margin-bottom: .2rem !important;
  font-size: .8rem;
  letter-spacing: .12em;
}
.pd-welcome .pd-welcome-title {
  font-size: clamp(1.45rem, 3.6vw, 2.2rem);
  margin-bottom: .25rem;
  max-width: 100%;
}
.pd-welcome .pd-welcome-sub {
  font-size: clamp(.92rem, 1.6vw, 1.05rem);
  max-width: 42rem;
  margin-bottom: 0;
}
@media (max-width: 575.98px) {
  .pd-welcome .container {
    padding-top: .55rem;
    padding-bottom: .6rem;
  }
  .pd-welcome .pd-welcome-title,
  .pd-welcome .pd-welcome-sub { max-width: 92%; }
}

/* ----- Hero band: full-bleed dark shelf under the overlapping bar ----- */
.pd-hero-band {
  position: relative;
  overflow: visible;
  background: var(--pd-bg, #0e0f11);
  padding-bottom: 1.75rem;
}
.pd-hero-band .pd-hero {
  border-radius: 0;
}
.pd-hero-band .pd-hero-btn { bottom: 22%; }
@media (max-width: 575.98px) {
  .pd-hero-band .pd-hero-btn { bottom: 26%; }
}

/* ----- Feature bar, overlapping the hero ----- */
.pd-feature-bar {
  position: relative;
  z-index: 4;
  margin-top: -3.4rem;
  margin-bottom: 0;
}
.pd-feature-bar-inner {
  background:
    var(--pd-dusk-glow, radial-gradient(ellipse at 0% 0%, rgba(208, 24, 32, .14), transparent 55%)),
    var(--pd-surface, #15171a);
  border: 1px solid var(--pd-line, #2c3036);
  border-top: 2px solid var(--pd-accent, #d01820);
  border-radius: 6px;
  box-shadow:
    0 16px 36px rgba(0, 0, 0, .48),
    0 0 0 1px rgba(255, 255, 255, .03);
  overflow: hidden;
}
.pd-feature-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.pd-feature-item {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  text-align: left;
  padding: 1.05rem 1.15rem 1.15rem;
  border-right: 1px solid var(--pd-line, #2c3036);
  color: var(--pd-text, #eceef0);
  background: transparent;
}
.pd-feature-item:last-child { border-right: 0; }
.pd-feature-icon {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  color: var(--pd-accent-text, #ff5a5f);
  background: rgba(208, 24, 32, .14);
  border: 1px solid rgba(208, 24, 32, .4);
  border-radius: 4px;
  font-size: 1.15rem;
  line-height: 1;
}
.pd-feature-title {
  font-family: var(--pd-font-display, "Barlow Condensed", "Arial Narrow", sans-serif);
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-size: clamp(.98rem, 1.25vw, 1.18rem);
  line-height: 1.12;
  color: #fff;
  margin: 0 0 .28rem;
}
.pd-feature-text {
  margin: 0;
  color: var(--pd-muted, #9aa1a9);
  font-size: .86rem;
  line-height: 1.35;
}
.pd-feature-link {
  display: inline-block;
  margin-top: .4rem;
  color: var(--pd-accent-text, #ff5a5f);
  font-family: var(--pd-font-display, "Barlow Condensed", "Arial Narrow", sans-serif);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
}
.pd-feature-link:hover,
.pd-feature-link:focus {
  color: #fff;
  text-decoration: underline;
}

/* Red skewed plate — the only thing on the rail */
.pd-feature-free-rail {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: .55rem 1.15rem .5rem;
  border-bottom: 1px solid var(--pd-line, #2c3036);
  background: linear-gradient(90deg, rgba(208, 24, 32, .16), rgba(208, 24, 32, .05) 55%, transparent);
}
.pd-feature-free-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  isolation: isolate;
  max-width: 100%;
  padding: .32rem .95rem .28rem;
  font-family: var(--pd-font-display, "Barlow Condensed", "Arial Narrow", sans-serif);
  font-style: italic;
  font-weight: 800;
  font-size: clamp(.92rem, 2.15vw, 1.2rem);
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  line-height: 1.1;
  white-space: nowrap;
}
.pd-feature-free-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--pd-accent, #d01820);
  border-radius: 3px;
  transform: skewX(-8deg);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .35);
}

.pd-hero-band + .pd-about { margin-top: 0; }
.pd-hero-band + .pd-about > .container { padding-top: 2.25rem; }

/* Mobile: horizontal snap row, keeps the bar one card tall so it still bleeds into the hero */
@media (max-width: 767.98px) {
  .pd-hero-band { padding-bottom: 1.25rem; }
  .pd-feature-bar { margin-top: -2.15rem; }
  .pd-feature-items {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .pd-feature-item {
    flex: 0 0 82%;
    scroll-snap-align: start;
    border-right: 1px solid var(--pd-line, #2c3036);
    padding: .9rem .95rem 1rem;
  }
  .pd-feature-title { font-size: 1.05rem; }
  .pd-feature-free-rail {
    padding: .45rem .7rem .4rem;
  }
  .pd-feature-free-badge {
    font-size: clamp(.78rem, 4.1vw, .95rem);
    letter-spacing: .04em;
    padding: .28rem .7rem .24rem;
    white-space: normal;
    text-wrap: balance;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-feature-items { scroll-behavior: auto; }
}
