.hero-section {
  --hero-wave-height: clamp(40px, 6vw, 112px);
  --hero-brand-blue: #003399;

  position: relative;
  isolation: isolate;
  height: 96dvh;
  min-height: 480px;
}

body.toolbar-horizontal .hero-section,
body.toolbar-vertical .hero-section {
  height: calc(96dvh - 39px);
}

body.toolbar-tray-open.toolbar-tray-open .hero-section {
  height: calc(96dvh - 79px);
}

.hero-image-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: var(--hero-brand-blue);

  /* The print composition shares the original logo-derived lower contour. */
  mask-image: linear-gradient(#000000 0 0), url('../images/hero-wave-mask.svg');
  mask-size: 100% calc(100% - var(--hero-wave-height) + 1px), 100% var(--hero-wave-height);
  mask-position: top, bottom;
  mask-repeat: no-repeat;
}

.hero-artwork {
  position: absolute;
  top: 9%;
  right: 7%;
  width: 38%;
  height: 84%;
}

.hero-bottle {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-wave-lines {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 26%;
  object-fit: fill;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-image-mask {
    /* Native curve morphing; the solid blue field stays still. */
    mask-image: linear-gradient(#000000 0 0), url('../images/hero-wave-animated.svg');
  }

  .hero-artwork {
    animation: reboat-hero-image-in 850ms ease-out both;
  }

  .hero-bottle {
    animation: reboat-bottle-float 9s ease-in-out 850ms infinite;
  }

  .hero-wave-lines {
    animation: reboat-wave-lines-breathe 7s ease-in-out infinite;
    transform-origin: center bottom;
  }

  .hero-heading-row {
    --hero-text-tilt: -2deg;

    animation: reboat-hero-text-in 600ms ease-out 100ms both;
    transform-origin: 50% 65%;
  }

  .hero-heading > .mask:nth-child(2) .hero-heading-row {
    --hero-text-tilt: 2deg;

    animation-delay: 200ms;
  }

  .hero-heading > .mask:nth-child(3) .hero-heading-row {
    animation-delay: 300ms;
  }

  .hero-social-list-item {
    animation: reboat-hero-content-in 500ms ease-out 500ms both;
  }

  .hero-social-list-item:nth-child(2) {
    animation-delay: 560ms;
  }

  .hero-social-list-item:nth-child(3) {
    animation-delay: 620ms;
  }

  .hero-social-list-item:nth-child(4) {
    animation-delay: 680ms;
  }

}

@keyframes reboat-hero-image-in {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
}

@keyframes reboat-bottle-float {
  0%, 100% {
    transform: translateY(0) rotate(-0.5deg);
  }

  50% {
    transform: translateY(-6px) rotate(0.5deg);
  }
}

@keyframes reboat-wave-lines-breathe {
  0%, 100% {
    transform: scaleY(1);
  }

  50% {
    transform: scaleY(1.08);
  }
}

@keyframes reboat-hero-content-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Match the menu's downward elastic entry, with less tilt for larger text. */
@keyframes reboat-hero-text-in {
  0% {
    opacity: 0;
    transform: translateY(-24px) rotate(var(--hero-text-tilt)) scale(0.97, 1.04);
  }

  55% {
    opacity: 1;
    transform: translateY(5px) rotate(calc(var(--hero-text-tilt) * -0.5)) scale(1.02, 0.98);
  }

  78% {
    transform: translateY(-2px) rotate(calc(var(--hero-text-tilt) * 0.2)) scale(0.995, 1.01);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

.hero-heading {
  color: var(--color-white);
  font-size: clamp(68px, 6.4vw, 96px);
  font-weight: 800;
  line-height: 0.96;
  text-transform: capitalize;
}

/* Keep tight line spacing without clipping rounded ascenders or descenders. */
.hero-heading .mask {
  overflow: visible;
}

.hero-heading .mask,
.hero-heading-row {
  display: block;
}

.hero-heading-row {
  width: fit-content;
  max-width: 100%;
}

.hero-row {
  position: absolute;
  inset: auto 0 25%;
  z-index: 1;
  padding: 0 var(--padding-page);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
}

.hero-social-list {
  position: absolute;
  top: 50%;
  right: var(--padding-page);
  z-index: 1;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--color-white);
  border: 1px solid rgb(248 248 248 / 35%);
  border-radius: 50%;
  background: transparent;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.hero-social-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.hero-social-link:hover,
.hero-social-link:focus-visible {
  background: var(--color-white);
  border-color: var(--color-white);
}

.hero-social-link:hover .hero-social-icon,
.hero-social-link:focus-visible .hero-social-icon {
  /* The source SVGs already use the exact brand blue. */
  filter: none;
}

.mission-section {
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(64px, 7vw, 110px) var(--padding-page);
  padding-bottom: clamp(24px, 3vw, 48px);
  position: relative;
  overflow: clip;
  background: var(--color-background-main);
  color: var(--color-text-main);
}

.mission-copy {
  max-width: 560px;
}

.mission-heading {
  --mission-depth: 120px;
  --mission-tilt: 0deg;

  color: var(--color-text-highlight--1);
  font-size: clamp(40px, 4.2vw, 64px);
  font-weight: 800;
  line-height: 1.06;
  text-transform: none;
  max-width: 12ch;
  margin-bottom: 40px;
}

.mission-lead,
.mission-paragraph {
  --mission-tilt: 0deg;

  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.55;
}

.mission-lead {
  --mission-depth: 88px;
}

.mission-paragraph {
  --mission-depth: 24px;

  margin-top: 48px;
  font-size: clamp(16px, 1.3vw, 19px);
}

.mission-visual {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
}

.mission-materials {
  /* White paper drops out against the page, like overprinted ink. */
  mix-blend-mode: multiply;
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: auto;
}

.mission-materials--bottle {
  --mission-depth: 144px;
  --mission-tilt: 4deg;

  /* Keep the boundary inside the empty gap of this specific source artwork. */
  clip-path: polygon(0 0, 100% 0, 100% 65%, 62% 65%, 43% 51%, 40% 35%, 0 35%);
}

.mission-materials--fabric {
  --mission-depth: 48px;
  --mission-tilt: 1.5deg;

  clip-path: polygon(0 35%, 40% 35%, 43% 51%, 62% 65%, 100% 65%, 100% 100%, 0 100%);
}

.mission-current {
  color: var(--color-yellow);
  position: absolute;
  width: 100%;
  height: 65%;
  top: 13%;
  left: 0;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero-artwork {
    --art-pointer-depth: 30px;

    /* Individual translate composes with the existing scroll/entry transforms. */
    translate: calc(var(--art-pointer-x, 0) * var(--art-pointer-depth)) calc(var(--art-pointer-y, 0) * var(--art-pointer-depth));
    transition: translate 650ms cubic-bezier(0.22, 1, 0.36, 1);
  }

}

/* Animate wrappers on scroll, leaving the inner text's entry animation intact. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-heading > .mask {
      --float-depth: -60px;

      animation: reboat-hero-float 1s linear both;
      animation-timeline: scroll(root block);
      animation-range: 0% 96dvh;
      transform-origin: left center;
    }

    .hero-heading > .mask:nth-child(2) {
      --float-depth: -52px;
    }

    .hero-heading > .mask:nth-child(3) {
      --float-depth: -44px;
    }

    .mission-section {
      view-timeline: --mission-float block;
    }

    .mission-materials,
    .mission-heading,
    .mission-lead,
    .mission-paragraph {
      animation: reboat-mission-drift 1s linear both;
      animation-timeline: --mission-float;
      animation-range: entry 0% exit 100%;
      transform-origin: center;
    }

    .mission-current {
      animation: reboat-mission-current 1s linear both;
      animation-timeline: --mission-float;
      animation-range: entry 0% exit 100%;
    }

    .mission-copy-content {
      animation: reboat-mission-reveal 1s linear both;
      animation-timeline: --mission-float;
      animation-range: entry 0% entry 65%;
    }
  }
}

@keyframes reboat-hero-float {
  0% {
    transform: translate(0, 0) rotate(0);
  }

  50% {
    transform: translate(3px, calc(var(--float-depth) * 0.45)) rotate(0.15deg);
  }

  100% {
    transform: translate(-3px, var(--float-depth)) rotate(-0.2deg);
  }
}

@keyframes reboat-mission-drift {
  from {
    transform: translateY(var(--mission-depth)) rotate(calc(-1 * var(--mission-tilt)));
  }

  to {
    transform: translateY(calc(-1 * var(--mission-depth))) rotate(var(--mission-tilt));
  }
}

@keyframes reboat-mission-current {
  from {
    transform: translateY(-20px);
  }

  to {
    transform: translateY(20px);
  }
}

@keyframes reboat-mission-reveal {
  from {
    opacity: 0.6;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.partners-section {
  padding: clamp(100px, 16.53vw, 250px) 0;
  overflow-x:hidden;
}

.partners-heading {
  color: var(--color-blue);
  padding: 0 var(--padding-page);
}

.partners-subheading-row {
  margin-top: 30px;
  justify-content: space-between;
  margin-bottom: clamp(50px, 7.27vw, 100px);
  padding: 0 var(--padding-page);
}

.partners-carousel-wrapper {
  flex-wrap: nowrap;
  gap: 20px;
  width: fit-content;
  overflow: hidden; /* Hide overflow to prevent visible gaps */
  animation: reboat-partners-scroll 45s linear infinite;
}

@keyframes reboat-partners-scroll {
  to {
    transform: translateX(calc(-50% - 10px));
  }
}

.partners-carousel-wrapper:hover,
.partners-carousel-wrapper:focus-within {
  animation-play-state: paused;
}

.partners-carousel {
  gap: 20px;
  width: 100%;
  flex-wrap: nowrap;
}

#block-reboat-views-block-home-news-events-block-1 {
  padding: 0 var(--padding-page);
  margin-bottom: clamp(50px, 10.6vw, 160px);
}

#block-reboat-views-block-home-news-events-block-1 h2 {
  color: var(--color-text-highlight--1);
  margin-bottom: 80px;
   font-size: clamp(66px, 5vw, 76px);
  line-height: clamp(66px, 5vw, 76px);
  max-width: 69vw;
}

#block-reboat-views-block-home-news-events-block-1 .view-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.news-event-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.news-image-wrapper {
  width: 457px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  margin-right: 20px;
}

.news-image-wrapper img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.news-text-wrapper {
  max-width: 695px;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-read-more {
  flex-shrink: 0;
  align-self: flex-start;
  margin-left: 24px;
}

.news-arrow {
  width: 100px;
  flex-shrink: 0;
}

/* Let the final news section recede behind the rising footer. The footer
 * remains in normal flow, so its full content and page end stay reachable. */
@supports (animation-timeline: view()) and (timeline-scope: --footer-cover) {
  @media (prefers-reduced-motion: no-preference) {
    .page-container:has(.page-footer--home) {
      timeline-scope: --footer-cover;
    }

    .page-footer--home {
      view-timeline: --footer-cover block;
    }

    #block-reboat-views-block-home-news-events-block-1:not(:focus-within) {
      animation: footer-content-recede linear both;
      animation-timeline: --footer-cover;
      animation-range: entry 0% entry 100%;
    }
  }
}

@keyframes footer-content-recede {
  from {
    translate: 0 0;
  }

  to {
    translate: 0 clamp(180px, 30vh, 320px);
  }
}

@media screen and (width <= 1024px) {
  #block-reboat-views-block-news-section-block-1 h2 {
 font-size: clamp(60px, 6.83vw, 70px);
    line-height: clamp(60px, 6.83vw, 70px);
  }
}

@media screen and (width <= 769px) {
  .hero-section {
    min-height: 680px;
  }

  .hero-artwork {
    top: 90px;
    right: 18%;
    width: 65%;

    /* Reserve space for a wrapped headline on short mobile screens. */
    height: min(43%, calc(100% - 440px));
  }

  .hero-wave-lines {
    height: 18%;
  }

  .hero-row {
    bottom: calc(18% + 48px);
  }

  .hero-social-list {
    top: 37%;
    flex-direction: column;
    transform: translateY(-50%);
  }

  .hero-heading {
    font-size: clamp(58px, 8.9vw, 70px);
  }

  .mission-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .mission-heading {
    font-size: clamp(36px, 7vw, 52px);
    max-width: 15ch;
  }

  .mission-visual {
    width: min(100%, 500px);
    justify-self: center;
  }

  .partners-carousel-wrapper, .partners-carousel {
    flex-direction: row!important;
  }

  .partners-subheading-row {
    flex-direction: column;
  }

   #block-reboat-views-block-news-section-block-1 h2 {
    margin-bottom: 40px;
        font-size: clamp(40px, 6.5vw, 50px);
    line-height: clamp(48px, 7.54vw, 58px);
  }

  .news {
    flex-direction: column;
    margin-bottom: 45px;
  }

  .news-event-wrapper {
    flex-direction: column;
  }

  .news-image-wrapper {
    margin-bottom: 20px;
    width: 100%;
    margin-right: 0;
  }

  .news-read-more {
    order: 0;
    align-self: flex-end;
    margin: 16px 0 0;
  }

  .news-left-column {
    margin-bottom: 20px;
    flex-direction: column;
  }

  .news-button {
    align-self: flex-end;
  }
}

/* Continue the floating rhythm without moving interactive card hit areas. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .methodology-step-wrapper {
      view-timeline: --methodology-depth block;
    }

    .methodology-section .methodology-step-image {
      height: 116%;
      animation: home-image-depth linear both;
      animation-timeline: --methodology-depth;
      animation-range: entry 0% exit 100%;
    }

    .methodology-step-wrapper:nth-child(2) .methodology-step-image {
      animation-direction: reverse;
    }

    .partners-section {
      view-timeline: --partners-depth block;
    }

    .partners-section .partner-logo-wrapper {
      --continuity-depth: 16px;

      animation: home-content-depth linear both;
      animation-timeline: --partners-depth;
      animation-range: entry 0% exit 100%;
    }

    .partners-section .partner-wrapper:nth-child(even) .partner-logo-wrapper {
      --continuity-depth: 24px;
    }

    .methodology-heading,
    .partners-heading,
    #block-reboat-views-block-home-news-events-block-1 h2 {
      --continuity-depth: 20px;

      animation: home-content-depth linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }

    .news-event-wrapper {
      view-timeline: --news-depth block;
    }

    .news-image-wrapper img {
      height: 116%;
      animation: home-image-depth linear both;
      animation-timeline: --news-depth;
      animation-range: entry 0% exit 100%;
    }

    .news-event-wrapper:nth-child(even) .news-image-wrapper img {
      animation-direction: reverse;
    }

    .cta-heading {
      --continuity-depth: 22px;

      animation: home-content-depth linear both;
      animation-timeline: --footer-cover;
      animation-range: entry 0% entry 100%;
    }
  }
}

@keyframes home-content-depth {
  from {
    translate: 0 var(--continuity-depth);
  }

  to {
    translate: 0 calc(-1 * var(--continuity-depth));
  }
}

@keyframes home-image-depth {
  from {
    translate: 0 5%;
  }

  to {
    translate: 0 -5%;
  }
}

@media screen and (width >= 770px) and (height <= 700px) {
  .hero-heading {
    font-size: clamp(44px, 5.8vw, 76px);
  }

  .hero-artwork {
    top: 90px;
    height: calc(100% - 110px);
  }
}

@media screen and (width <= 480px) {
  .hero-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .hero-heading {
    font-size: clamp(37px, 11.1vw, 54px);
    max-width: 100%;
    letter-spacing: -0.035em;
  }

  #block-reboat-views-block-home-news-events-block-1 h2 {
    font-size: clamp(36px, 10vw, 49px);
    line-height: clamp(40px, 11vw, 53px);
  }

  .news-button-wrapper {
    align-self: flex-end;
  }

  .news-arrow {
    width: 70px;
  }

  .cta-link-wrapper {
    margin-top: 20px;
  }
}
