/* ============================================================
   home.css — Homepage styles
   ============================================================ */


/* ----------------------------------------------------------
   Hero — sticky image + scrolling text panel
   ---------------------------------------------------------- */

/* Outer wrapper: establishes the scroll container for the sticky */
.hero-wrapper {
  position: relative;
}

/* The hero section itself: sticky, image-only, full viewport */
.hero {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  z-index: 0;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.6);
}

/*
  Text panel: pulled back up to y=0 via negative margin so it overlaps
  the sticky hero from the very start.

  Contains two hero__screen divs, each 100vh tall with text at flex-end:
    • Screen 1 — "World class audio."     → visible at viewport bottom on load
    • Screen 2 — "Crafted in the…"        → enters as screen 1 exits the top

  Total panel height = 200vh. Wrapper total = 300vh (100vh hero + 200vh panel).
  Sticky releases at scroll = 300 - 100 = 200vh, keeping the image alive
  through both lines.
*/
.hero__text-panel {
  position: relative;
  z-index: 1;
  /* Pull the panel back up so it starts at y=0, overlapping the sticky image */
  margin-top: -100vh;
  margin-top: -100svh;
}

/*
  Each screen is one viewport tall with its text pinned to the bottom.
  Because the panel starts at y=0 and each screen is 100vh:
    Screen 1 text bottom ≈ y=96vh  → viewport bottom at scroll=0  ✓
    Screen 2 text bottom ≈ y=196vh → enters viewport bottom at scroll≈96vh,
                                      exactly when screen 1 text exits the top ✓
*/
.hero__screen {
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(2rem, 5vw, 4.5rem);
  padding-inline: var(--space-page-x);
}

/* Both lines identical size per design */
.hero__heading,
.hero__sub {
  font-family: var(--font-display);
  font-weight: var(--weight-extrabold);
  font-size: clamp(2.5rem, 9vw, 9rem);
  line-height: 0.95;
  color: var(--color-cream);
  letter-spacing: -0.02em;
  padding-bottom: 0.12em;
}


/* ----------------------------------------------------------
   Highlights
   ---------------------------------------------------------- */

.highlights {
  background: var(--color-tube-streamer);
  padding-top: clamp(1.5rem, 4vw, 3rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
}

.highlights__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  /* Heading bleeds flush to left edge; button retains right gutter */
  padding-inline-start: 0;
  padding-inline-end: var(--space-page-x);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.highlights__heading {
  /* Larger than default section-heading — overrides global clamp */
  font-size: clamp(3.5rem, 12vw, 11rem);
  color: var(--color-cream);
}

.highlights__view-all {
  flex-shrink: 0;
  margin-bottom: 0.4rem; /* optically align with heading baseline */
}

/* Carousel wrapper — clips the scrolling track */
.carousel-wrapper {
  overflow: hidden;
}

/* Track — flex row, translated via JS */
.carousel-track {
  display: flex;
  gap: 12px;
  padding-inline: var(--space-page-x);
  will-change: transform;
}

/* Each tile in the carousel */
.carousel-tile {
  flex: 0 0 440px;
  width: 440px;
  aspect-ratio: 2 / 3;
}

@media (max-width: 767px) {
  .highlights__header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
    padding-inline-start: var(--space-page-x);
  }

  .highlights__heading {
    font-size: clamp(2.5rem, 14vw, 5rem);
  }

  .carousel-tile {
    flex: 0 0 200px;
    width: 200px;
  }
}


/* ----------------------------------------------------------
   Our Clients
   ---------------------------------------------------------- */

.clients {
  background: var(--color-cream);
  padding-top: clamp(1.5rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
}

/* Large heading — flush to left edge, deep slate on cream */
.clients__heading {
  font-size: clamp(3.5rem, 12vw, 11rem);
  color: var(--color-deep-slate);
  margin-bottom: clamp(1rem, 2.5vw, 2rem);
}

/* Dark panel — inset from viewport edges, dark slate bg */
.clients-panel {
  background: var(--color-deep-slate);
  /* Mirrors .container logic: gutter at small viewports, centred cap at large */
  width: calc(100% - 2 * var(--space-page-x));
  max-width: calc(var(--max-width) - 2 * var(--space-page-x));
  margin-inline: auto;
  padding: clamp(1.75rem, 3.5vw, 3rem);
}

/* Logo strip — white logos on dark bg */
.client-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem 2.25rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.client-logos img {
  height: 30px;
  width: auto;
  object-fit: contain;
  opacity: 0.85;
}

.client-logos img:hover {
  opacity: 1;
}

/* Two-column split */
.clients-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.clients-col__heading {
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  font-size: 1.0625rem;
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.clients-col__body {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-white);
  opacity: 0.7;
  margin-bottom: 1.25rem;
  max-width: 46ch;
}

@media (max-width: 767px) {
  .logo-desktop {
    display: none;
  }

  .clients-panel {
    padding: clamp(1.25rem, 5vw, 1.75rem);
  }

  .client-logos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem 1rem;
    align-items: center;
    margin-bottom: clamp(1.25rem, 4vw, 2rem);
  }

  .client-logos li {
    display: flex;
    justify-content: center;
  }

  .client-logos img {
    height: 24px;
  }

  .clients-split {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    padding-top: clamp(1.25rem, 4vw, 2rem);
  }
}


/* ----------------------------------------------------------
   Who We Are
   ---------------------------------------------------------- */

.who-we-are {
  background: var(--color-undergrowth);
  padding-top: clamp(1.5rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
  color: var(--color-white);
}

/* Heading: flush-left above the grid, same oversized pattern */
.wwa-heading {
  font-size: clamp(3.5rem, 12vw, 11rem);
  color: var(--color-cream);
  margin-bottom: clamp(1rem, 3vw, 2rem);
}

/* Two-column grid: narrow text left, wide image right */
.wwa-inner {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end; /* anchor text to bottom of image */
}

.wwa-body {
  font-size: clamp(0.9375rem, 1.25vw, 1.0625rem);
  line-height: 1.7;
  color: var(--color-white);
  opacity: 0.85;
  max-width: 40ch;
  margin-bottom: var(--space-xl);
}

.wwa-photo img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

@media (max-width: 767px) {
  .wwa-inner {
    grid-template-columns: 1fr;
  }

  .wwa-photo {
    order: -1; /* image above text on mobile */
  }
}
