/* ============================================================
   layout.css — page-level structure & responsive scaffolding
   Mobile-first. Desktop enhancements gated behind min-width.
   ============================================================ */

.skip-link {
  position: absolute; left: 0.5rem; top: -3rem;
  z-index: 100; padding: 0.5em 1em;
  background: var(--surface); color: var(--gold-3);
  border-radius: 0 0 8px 8px; transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(1rem, 0.5rem + 3vw, 2.5rem) clamp(1.5rem, 1rem + 3vw, 3rem);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  background: url("../Hero Banner/Hero Background.png") center top / cover no-repeat;
}
.hero__bg::after { /* fade base into the page */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, var(--bg) 100%);
}
.hero__inner { display: grid; justify-items: center; gap: clamp(0.5rem, 2vw, 1.4rem); }
.hero__logo { width: min(360px, 62%); height: auto; filter: drop-shadow(0 4px 14px rgba(0,0,0,.6)); }

.hero__swipe {
  font-size: var(--step--1); letter-spacing: 0.12em; color: var(--text-dim);
  text-transform: none;
}
.hero__swipe span { color: var(--gold-3); }

/* Stage: mobile = horizontal snap carousel; desktop = 3-up grid */
.hero__stage {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 74%;
  gap: clamp(0.5rem, 3vw, 1.2rem);
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-inline: 13%;               /* peek neighbours */
  scroll-padding-inline: 13%;
  scrollbar-width: none;
}
.hero__stage::-webkit-scrollbar { display: none; }

@media (min-width: 780px) {
  /* Hero occupies exactly one viewport; content is vertically centred and the
     cards are sized from the available height (see .pedestal__card) so the
     whole banner never exceeds 100dvh. */
  .hero {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding-block: clamp(1rem, 4vh, 2.5rem);
  }
  .hero__inner { width: 100%; }
  .hero__swipe { display: none; }
  .hero__stage {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    grid-auto-flow: unset;
    overflow: visible;
    padding-inline: 0;
    max-width: 980px;
  }
}

/* ---------- SEARCH ---------- */
.searchbar {
  display: flex; align-items: center; gap: 0.7rem;
  margin-block: clamp(1rem, 3vw, 1.6rem);
}

/* ---------- TICKER ---------- */
.ticker {
  border-block: 1px solid var(--hairline-soft);
  background:
    linear-gradient(180deg, rgba(20,17,12,.9), rgba(8,7,6,.95));
  overflow: hidden;
}

/* ---------- PARTNERS ---------- */
.partners {
  margin-block: clamp(1.4rem, 4vw, 2.4rem);
  padding-inline: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
/* Continuous marquee: the list holds two copies of the logos and slides by
   half its width, so it loops seamlessly (matches .ticker__track). */
.partners__list {
  display: inline-flex; align-items: center; flex-wrap: nowrap;
  gap: clamp(0.8rem, 3vw, 2.2rem);
  width: max-content;
}
.partners__item { flex: 0 0 auto; }

/* ---------- FEATURE SECTIONS (Road / Club) ---------- */
.feature {
  position: relative;
  isolation: isolate;
  margin-block: var(--section-gap);
  padding-block: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
}
.feature__bg {
  position: absolute; inset: 0; z-index: -1;
  background-size: cover; background-position: center;
}
/* Diamond Road: the backdrop is a real <img> element so it can be sized and
   positioned independently of the section. Tweak height / top / object-fit
   here to move or shrink the art without cropping it. */
.feature--road .feature__img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;            /* ← reduce this freely to shrink the frame */
  object-fit: fill;        /* stretches to fill full width at the frame's height */
  object-position: center top;
}
/* Diamond Club: anchor the image to the top so its bottom is cropped off,
   matching the reference composition (the website was showing the full art). */
.feature--club {
  padding-block: clamp(1.2rem, 3vw, 2.2rem);
}
.feature--club .feature__bg {
  background-position: top center;
  background-size: 100% 100%;   /* stretch to full width, keep the frame's height */
}
.feature__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--bg) 0%, transparent 22% 78%, var(--bg) 100%);
}
/* minmax(0,1fr): cap the single column at the container width so the diamond
   strip's overflow-scroll runway can scroll instead of stretching the section. */
.feature__inner { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: clamp(1rem, 3vw, 1.6rem); }
.feature__title { width: min(420px, 78%); height: auto; }
.feature__lede {
  max-width: 46ch; color: var(--text-dim); font-size: var(--step-0);
  line-height: 1.6;
}
.feature__lede strong { color: var(--gold-3); font-weight: 600; }

/* ---------- ROW SECTIONS ---------- */
.row-section { margin-block: var(--section-gap); }
.row-section.is-empty { display: none; }

/* Card row: mobile = horizontal snap, desktop = 4-col grid */
.card-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 42%);
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 2px;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}
.card-row::-webkit-scrollbar { display: none; }
.card-row > .card { scroll-snap-align: start; }

@media (min-width: 720px) {
  .card-row {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-columns: unset;
    overflow: visible;
  }
}

/* ---------- FOOTER ---------- */
.site-footer {
  margin-top: var(--section-gap);
  padding-block: 2.5rem;
  border-top: 1px solid var(--hairline-soft);
  background: var(--bg-1);
}
.site-footer .wrap { display: grid; justify-items: center; gap: 1rem; text-align: center; }
.site-footer img { width: 160px; opacity: 0.9; }
.site-footer p { color: var(--text-mute); font-size: var(--step--1); }

/* ============================================================
   Collapsible behaviour
   Mobile: detail hidden until .is-open. Desktop: always shown,
   toggle button hidden.
   ============================================================ */
.road__detail {
  display: grid;
  grid-template-rows: 0fr;
  width: 100%;
  opacity: 0;
  transition: grid-template-rows 0.4s var(--ease), opacity 0.3s var(--ease);
}
.road__detail > * { min-height: 0; overflow: hidden; }
.road__detail.is-open { grid-template-rows: 1fr; opacity: 1; }

@media (min-width: 780px) {
  .feature__toggle { display: none; }
  .road__detail { grid-template-rows: 1fr; opacity: 1; }
}

/* Diamond Club: the throne and leaderboard share one spot and crossfade. Each
   morphs its own height (grid-rows 0fr↔1fr) rather than swapping display, so the
   swap animates smoothly with no hard reflow / repaint. The line-draw detail
   lives in components.css. */
.club__detail {
  display: grid;
  grid-template-rows: 0fr;
  width: 100%;
  opacity: 0;
  overflow: hidden;
  transition: grid-template-rows 0.5s var(--ease), opacity 0.4s var(--ease);
}
.club__detail > * { min-height: 0; }
.feature--club.is-revealed .club__detail {
  grid-template-rows: 1fr;
  opacity: 1;
}
