/* Current homepage only: reduce the fixed desktop composition by a further 5%.
   The creek, its motion layer, type and notch coordinates use this same scale. */
.homepage--calm {
  --hero-scale: .855;
  --header-gutter: var(--copy-gutter);
}

/* Share the hero's centered frame instead of the former 1557px header frame.
   Grid gives the expanding brand name room without moving the other controls. */
.homepage--calm .site-header {
  position: absolute;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 172px minmax(480px, 1.9fr) 44px;
  align-items: center;
  column-gap: 32px;
  width: min(100%, var(--hero-width));
  min-height: 140px;
  padding: 0 var(--header-gutter);
  margin-inline: auto;
}
.homepage--calm .brand-disclosure {
  position: relative;
  inset: auto;
  justify-self: start;
  transform: none;
}
.homepage--calm .site-header > .search-display {
  position: static;
  width: 172px;
  min-width: 0;
  margin: 0;
  padding-inline: 16px 6px;
}
.homepage--calm .desktop-nav {
  position: static;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.homepage--calm .desktop-nav .nav-item {
  position: static;
  flex: none;
  transform: none;
  white-space: nowrap;
}
.homepage--calm .user-button {
  position: static;
  justify-self: end;
  margin: 0;
  transform: none;
}

/* Compact navigation retains every desktop action before the existing fold. */
@media (max-width: 1199px) {
  .homepage--calm .site-header {
    position: relative;
    inset: auto;
    grid-template-columns: minmax(144px, 1fr) clamp(148px, 16cqw, 176px) minmax(340px, 1.9fr) 44px;
    column-gap: clamp(12px, 2cqw, 24px);
    min-height: 88px;
    padding-block: 20px;
  }
  .homepage--calm .site-header > .search-display { width: 100%; }
  .homepage--calm .desktop-nav { gap: clamp(6px, 1cqw, 12px); }
}

/* Once the hero reflows, use its existing readable content gutters. */
@media (max-width: 959px) {
  .homepage--calm { --header-gutter: clamp(24px, 4cqw, 48px); }
}
@media (max-width: 899px) {
  .homepage--calm .site-header {
    grid-template-columns: minmax(44px, 1fr) 168px 44px;
    column-gap: 16px;
  }
  .homepage--calm .desktop-nav { display: none; }
}
@media (max-width: 639px) {
  .homepage--calm { --header-gutter: 24px; }
  .homepage--calm .site-header {
    min-height: 76px;
    padding-block: 16px;
    column-gap: 12px;
  }
}
@media (max-width: 479px) {
  .homepage--calm .site-header {
    grid-template-columns: minmax(44px, 1fr) clamp(120px, 42cqw, 168px) 44px;
  }
}
@media (max-width: 359px) {
  .homepage--calm { --header-gutter: 18px; }
}

/* Narrow composition: keep the identity upper-left and give only the slogan
   its own lower-right row. The creek rises into the space formerly occupied
   by the slogan; its illustration and motion layers share one canvas. */
@media (max-width: 639px) {
  .homepage--calm .hero {
    --slogan-overlap: clamp(0px, calc((100cqw - 360px) * .25), 56px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    align-items: start;
    gap: 0;
  }
  /* This role-free wrapper can flatten without duplicating semantic text. */
  .homepage--calm .hero-copy { display: contents; }
  .homepage--calm .hero-title,
  .homepage--calm .company {
    position: relative;
    inset: auto;
    grid-column: 1;
    z-index: 3;
    text-align: left;
  }
  .homepage--calm .hero-title {
    grid-row: 1;
    margin: 28px var(--header-gutter) 0;
  }
  .homepage--calm .company {
    grid-row: 2;
    margin: 14px var(--header-gutter) 12px;
  }
  .homepage--calm .river-stage {
    grid-column: 1;
    grid-row: 3;
  }
  /* Enlarge the art and its water details together from the lower-left anchor.
     The scene row stays the same height, so the identity and slogan stay put. */
  .homepage--calm .river-canvas {
    --unit: calc(min(108cqw, 561.6px) / 1557);
    width: min(108%, 561.6px);
  }
  .homepage--calm .tagline {
    position: relative;
    inset: auto;
    grid-column: 1;
    grid-row: 4;
    justify-self: end;
    z-index: 3;
    max-width: calc(100% - var(--header-gutter) - var(--header-gutter));
    margin: calc(0px - var(--slogan-overlap)) var(--header-gutter) 20px;
    text-align: right;
  }
  /* Keep it in normal flow, including when text wraps or is enlarged. */
  .homepage--calm .tagline span { white-space: normal; }
}
