/* Hero + home collections — keep in sync with kirby-cms/css/hero-home.css */

.hero {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: var(--hero-aspect, 21 / 9);
  max-height: var(--hero-max-height, min(72vh, 50rem));
  min-height: 11rem;
  background: var(--surface);
  overflow: hidden;
}

/* Break out of .page-wrapper horizontal padding — edge-to-edge with header gutters */
.hero--full-bleed {
  --hero-bleed-pad: var(--pad-x, clamp(1.25rem, 4vw, 2.25rem));
  margin-left: calc(-1 * var(--hero-bleed-pad));
  margin-right: calc(-1 * var(--hero-bleed-pad));
  width: calc(100% + 2 * var(--hero-bleed-pad));
  max-width: none;
  box-sizing: border-box;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  /* Softer foot scrim: type controls + photography stay legible */
  background: linear-gradient(
    to top,
    rgba(var(--fg-rgb), 0.2) 0%,
    rgba(var(--fg-rgb), 0.03) 30%,
    transparent 52%
  );
}

.hero-slides {
  display: flex;
  align-items: stretch;
  gap: 0;
  height: 100%;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  position: relative;
  z-index: 0;
}

.hero-slides::-webkit-scrollbar {
  display: none;
}

/* One full-width landscape slide per track */
.hero-slide {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero-slide img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform 0.65s var(--ease-out);
}

@media (hover: hover) {
  .hero-slide:hover img {
    transform: scale(1.02);
  }
}

/* Dots (e.g. home-rail) — not used on main hero */
.hero-nav {
  position: absolute;
  bottom: clamp(1rem, 3vw, 1.4rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--gap-col);
  z-index: 2;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-pill);
  background: rgba(var(--bg-rgb), 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 var(--line);
}

.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  padding: 0;
  cursor: pointer;
  opacity: 1;
  transition: opacity var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease),
    background-color var(--dur-fast) var(--ease);
}

.hero-dot:hover {
  opacity: 1;
  transform: scale(1.15);
}

.hero-dot.is-active {
  background: var(--paper);
  opacity: 1;
}

/* ← → minimal invisible controls (hero + PDP gallery) */
.hero-arrow,
.pdp-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body, var(--font));
  font-size: 0.75rem;
  font-weight: var(--weight, 300);
  line-height: 1;
  color: var(--fg);
  opacity: 0.35;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: opacity var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.hero-arrow:hover,
.hero-arrow:focus-visible,
.pdp-arrow:hover,
.pdp-arrow:focus-visible {
  opacity: 1;
  transform: translateY(-50%);
}

.hero-arrow:active,
.pdp-arrow:active {
  opacity: 0.85;
  transform: translateY(-50%) scale(0.98);
}

.hero-arrow--prev {
  left: var(--pad-x, clamp(1.25rem, 4vw, 2.25rem));
}

.hero-arrow--next {
  right: var(--pad-x, clamp(1.25rem, 4vw, 2.25rem));
}

.pdp-arrow--prev {
  left: clamp(0.75rem, 3vw, var(--pad-x));
}

.pdp-arrow--next {
  right: clamp(0.75rem, 3vw, var(--pad-x));
}

/* Home: section + grid (padding on section) */
.home-collections {
  padding: var(--section-y) 0 calc(var(--section-y) + 0.75rem);
}

.home-collections-label {
  margin: 0 0 clamp(1.5rem, 3vw, 2rem);
  font-size: var(--text-xs);
  font-weight: var(--weight, 300);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.home-collections .collection-cards {
  --collection-cards-gap-v: clamp(1.5rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--collection-cards-gap-v) var(--gap-h);
}

@media (max-width: 640px) {
  .home-collections .collection-cards {
    grid-template-columns: 1fr;
  }
}

.home-collections .collection-card {
  display: flex;
  flex-direction: column;
  gap: clamp(0.85rem, 2.2vw, 1.25rem);
}

.collection-card .discover {
  font-family: var(--font-sans);
  font-size: var(--header-text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  align-self: center;
  padding-bottom: 2px;
  transition: letter-spacing var(--dur-med) var(--ease-out),
    opacity var(--dur-fast) var(--ease);
}

.collection-card .discover:hover {
  letter-spacing: 0.1em;
  opacity: 1;
}

.collection-card .card-visual {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 14rem;
  background: var(--surface);
  overflow: hidden;
  border-radius: 0;
  box-shadow: var(--shadow-sm);
  border-bottom: none;
}

.collection-card .card-visual:hover {
  border-bottom: none;
}

.collection-card .card-visual img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

/* No zoom on hover — keeps photos at full sharpness / original scale */

.collection-card h2,
.collection-card h3,
.collection-card .collection-card__title {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: var(--weight, 300);
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-align: center;
  text-wrap: balance;
}

.collection-card h2 a,
.collection-card h3 a,
.collection-card .collection-card__title a {
  border-bottom: none;
}

/* Optional second band (CMS / future home layouts) */
.home-rail {
  position: relative;
  width: 100%;
  height: clamp(14rem, 40vh, 28rem);
  background: var(--surface);
  overflow: hidden;
}

.home-rail-slides {
  display: flex;
  align-items: stretch;
  gap: 0;
  height: 100%;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  position: relative;
  z-index: 0;
}

.home-rail-slides::-webkit-scrollbar {
  display: none;
}

.home-rail-slide {
  flex: 0 0 calc(100% / 2.5);
  min-width: 0;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.home-rail-slide img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.home-rail-nav {
  position: absolute;
  bottom: clamp(0.65rem, 2.5vw, 1rem);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--gap-col);
  z-index: 2;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(var(--bg-rgb), 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 var(--line);
}

.home-rail-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(var(--paper-rgb), 0.92);
  cursor: pointer;
  font-family: var(--font);
  font-size: var(--text-lg);
  font-weight: var(--weight, 300);
  line-height: 1;
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease),
    opacity var(--dur-fast) var(--ease);
}

.home-rail-arrow:hover {
  background: var(--paper);
  transform: translateY(-50%) scale(1.05);
}

.home-rail-arrow:active {
  transform: translateY(-50%) scale(0.98);
}

.home-rail-arrow--prev {
  left: 0.75rem;
}

.home-rail-arrow--next {
  right: 0.75rem;
}

/* Featured collection intro (Kirby elizfan.home_featured) */
.home-featured {
  padding: clamp(2.25rem, 5vw, 3.5rem) 0 clamp(1.5rem, 3vw, 2rem);
}

.home-featured__inner {
  max-width: none;
  width: 100%;
  margin: 0;
  text-align: center;
  color: var(--fg);
  box-sizing: border-box;
}

.home-featured__kicker {
  margin: 0 0 0.75rem;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight, 300);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
}

.home-featured__title {
  margin: 0 0 clamp(1rem, 2.5vw, 1.35rem);
  font-family: var(--font);
  font-size: var(--text-xl);
  font-weight: var(--weight, 300);
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.home-featured__body {
  margin: 0 0 clamp(1.25rem, 3vw, 1.6rem);
}

.home-featured__prose {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--fg);
}

.home-featured__prose + .home-featured__prose {
  margin-top: 1.15rem;
}

.home-featured__cta {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-bottom: 2px;
  text-decoration: none;
  color: var(--fg);
  border: none;
  border-bottom: 1px solid var(--line);
}

.home-featured__cta:hover {
  border-bottom-color: var(--accent);
}
