/* Homepage hero composition.
 *
 * main.css owns the viewport contract: the hero is exactly `100svh -
 * --chrome-h`, and --chrome-h already includes the notice bar when present.
 * This layer owns the composition inside that frame. The flag was removed, so
 * the old desktop two-column template must be explicitly collapsed as well or
 * the copy remains centred inside the abandoned left column rather than the
 * viewport.
 */
.home-hero {
  padding-block: 0;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--bg);
  background-image:
    radial-gradient(
      circle at top left,
      color-mix(in srgb, var(--bg-alt) 34%, transparent),
      transparent 42%
    ),
    radial-gradient(
      circle at bottom right,
      color-mix(in srgb, var(--bg-alt) 48%, transparent),
      transparent 44%
    );
}

/* Architectural linework breaks up the white field without becoming a second
 * focal point. Oversized rotated frames are clipped by the hero, which leaves
 * long straight runs, corners and diagonal crossings at the perimeter. The
 * decorative field stays entirely neutral so brand red remains reserved for
 * intentional foreground accents and actions.
 */
.home-hero::before,
.home-hero::after {
  content: "";
  position: absolute;
  z-index: var(--z-base);
  pointer-events: none;
  border: thin solid color-mix(in srgb, var(--line) 90%, transparent);
}

.home-hero::before {
  inline-size: 58%;
  block-size: 68%;
  inset-block-start: calc(-1 * var(--s-14));
  inset-inline-start: calc(-1 * var(--s-15));
  transform: rotate(34deg);
}

.home-hero::after {
  inline-size: 48%;
  block-size: 62%;
  inset-block-start: calc(-1 * var(--s-13));
  inset-inline-end: calc(-1 * var(--s-14));
  border-color: color-mix(in srgb, var(--line) 90%, transparent);
  transform: rotate(-42deg);
}

.home-hero__upper,
.hero-film {
  position: relative;
  z-index: var(--z-raised);
}

.home-hero__upper {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-block-size: 0;
  inline-size: 100%;
  padding-block: var(--s-4);
}

/* A third clipped frame adds the denser architectural rhythm from the approved
 * direction. The white mask above it creates a deliberate quiet zone around
 * the message: geometry remains visible around the composition, but never
 * travels behind the eyebrow, headline, body copy or actions. */
.home-hero__upper::before,
.home-hero__upper::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.home-hero__upper::before {
  z-index: var(--z-base);
  inline-size: 72%;
  block-size: 84%;
  inset-block-start: calc(-1 * var(--s-10));
  inset-inline-start: calc(-1 * var(--s-11));
  border: thin solid color-mix(in srgb, var(--line) 90%, transparent);
  transform: rotate(-26deg);
}

.home-hero__upper::after {
  z-index: var(--z-raised);
  inline-size: 84%;
  block-size: 78%;
  inset: 50% auto auto 50%;
  background: radial-gradient(
    ellipse at center,
    var(--bg) 0%,
    var(--bg) 48%,
    color-mix(in srgb, var(--bg) 92%, transparent) 62%,
    color-mix(in srgb, var(--bg) 64%, transparent) 76%,
    transparent 100%
  );
  transform: translate(-50%, -50%);
}

.home-hero__copy {
  position: relative;
  z-index: var(--z-float);
  inline-size: 100%;
  max-inline-size: none;
  margin-inline: auto;
  text-align: center;
}

/* The hero headline is the primary visual anchor on every breakpoint. The
 * dedicated hero scale still starts at 40px on a narrow phone, so it remains
 * substantially larger than supporting copy without requiring a second mobile
 * type token. The authored three-line structure is allowed to wrap only when
 * the viewport genuinely cannot hold a line. */
.home-hero__title {
  font-size: var(--fs-hero);
}

.home-hero__eyebrow,
.home-hero__ctas,
.proof-line {
  justify-content: center;
}

.home-hero__intro {
  margin-block-start: var(--s-4);
  margin-inline: auto;
}

.proof-line {
  margin-block-start: var(--s-4);
}

.home-hero__ctas {
  margin-block-start: var(--s-5);
}

/* Keep the film visually connected to the copy without turning its two rows
 * into a dense footer. Image height remains owned by main.css, where it scales
 * from viewport height and has a dedicated short-window fallback. That is what
 * lets a normal desktop show substantial photography while a short viewport or
 * visible notice bar still keeps the complete hero above the fold. */
.hero-film {
  gap: var(--s-2);
  padding-block: var(--s-2);
}

.hero-film__set {
  gap: var(--s-2);
  padding-inline-end: var(--s-2);
}

/* The media pool is split alternately from a 30-image query, so the two rows
 * normally contain the same number of equal-ratio tiles. Matching duration
 * therefore gives both directions the same visible travel speed. */
.has-js .hero-film__row--forward .hero-film__track,
.has-js .hero-film__row--reverse .hero-film__track {
  animation-duration: 72s;
}

@media (min-width: 480px) {
  .home-hero__upper {
    padding-block: var(--s-5);
  }

  .home-hero__upper::after {
    inline-size: 80%;
  }
}

@media (min-width: 768px) {
  .home-hero__upper {
    /* Reset the legacy flag-era two-column geometry from main.css. */
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-block: var(--s-6);
  }

  .home-hero__upper::after {
    inline-size: 76%;
    block-size: 76%;
  }

  .home-hero__title-line {
    white-space: nowrap;
  }
}

@media (min-width: 1024px) {
  .home-hero__upper {
    /* Also beats main.css's later desktop padding treatment while retaining
     * the shared .container side gutters themselves. */
    padding-block: var(--s-7);
  }

  .home-hero__upper::after {
    inline-size: 72%;
    block-size: 74%;
  }
}

/* Shop by Category layout is intentionally owned by
 * home-categories-grid.css + home-categories-right-stack.css. Keeping category
 * geometry here created a second, later source of truth that overrode the
 * right-stack rules and produced broken dividers, mismatched child-card columns
 * and an orphaned arrow row. */

/* Homepage room cards use the original framed-photo treatment: image above,
 * title strip below. Keep the room component isolated from category-card helper
 * classes so its label cannot inherit a second cue or a conflicting colour. */
.room-tiles .room-tile__label {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  background-color: var(--surface);
  background-image: none;
  border-block-start: thin solid var(--ink-900);
  color: var(--ink-900);
  font-size: var(--fs-h3);
  font-weight: var(--fw-subhead);
}

/* The image wrapper preserves the framed-photo structure without adding a
 * visual wash over the room photography. */
.room-tiles .room-tile__media {
  position: relative;
  display: block;
}

.room-tiles .room-tile__label::after {
  content: none;
}

.room-tiles .room-tile__name {
  min-inline-size: 0;
}

.room-tiles .room-tile__cue {
  display: grid;
  place-items: center;
  flex: none;
  color: var(--ink-500);
}

.room-tiles .room-tile__cue .pinnacle-icon {
  vertical-align: 0;
  transition: transform var(--dur-fast) var(--ease);
}

.room-tiles .room-tile:hover .room-tile__cue,
.room-tiles .room-tile:focus-visible .room-tile__cue {
  color: var(--ink-900);
}

.room-tiles .room-tile:hover .room-tile__cue .pinnacle-icon,
.room-tiles .room-tile:focus-visible .room-tile__cue .pinnacle-icon {
  transform: translate(var(--s-1), calc(-1 * var(--s-1)));
}

@media (prefers-reduced-motion: reduce) {
  .room-tiles .room-tile__cue .pinnacle-icon {
    transition: none;
  }
}
