/* Hero: nav + hero scene (sky, sun, clouds, copy, the rising paper tide and three boats).
   Ported from claude/canvas/Main.dc.html lines 62-231. */

.hero {
  position: relative;
  overflow: clip;
  background-color: var(--sky);
  display: flex;
  flex-direction: column;
}

/* Sky: sun and paper clouds */
.hero-sun,
.hero-cloud {
  position: absolute;
  z-index: 0;
  height: auto;
}

/* The rays spin in their own svg so the rotation runs on the compositor instead of relaying out the sun every frame */
.hero-sun {
  top: 104px;
  right: 7%;
  width: clamp(84px, 10vw, 150px);
  aspect-ratio: 1;
}

.hero-sun-rays,
.hero-sun-disc {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.hero-cloud-1 {
  top: 200px;
  right: 12%;
  width: clamp(70px, 8vw, 116px);
}

.hero-cloud-2 {
  top: 236px;
  left: 5%;
  width: clamp(90px, 12vw, 176px);
  animation-duration: 34s;
}

.hero-cloud-3 {
  top: 470px;
  left: 11%;
  width: 118px;
}

.hero-cloud-4 {
  top: 420px;
  right: 4%;
  width: 146px;
  animation-duration: 30s;
  animation-direction: alternate-reverse;
}

/* Nav */
.hero-nav {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-block: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-home {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.hero-logo {
  width: 66px;
  height: auto;
  overflow: visible;
}

.hero-wordmark {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.hero-wordmark-accent {
  color: var(--coral-deep);
}

.hero-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.hero-nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hero-nav-btn {
  min-height: 46px;
  padding: 0 20px;
  font-size: 16px;
}

/* Copy */
.hero-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.hero-label {
  color: var(--muted);
}

.hero-title {
  margin: 0;
  font-size: var(--text-h1);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}

.hero-title-nowrap {
  position: relative;
  white-space: nowrap;
}

.hero-underline {
  position: absolute;
  z-index: -1;
  left: -2%;
  bottom: -0.1em;
  width: 104%;
  height: 0.24em;
  overflow: visible;
}

.hero-sub {
  margin: 0;
  max-width: 660px;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

/* The tide: four paper wave layers, boats riding the front one */
.hero-tide {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
}

.hero-wave {
  position: absolute;
  left: -60px;
  right: -60px;
  bottom: -400px;
}

.hero-wave-1 {
  height: 690px;
}

.hero-wave-2 {
  height: 640px;
}

.hero-wave-3 {
  height: 590px;
}

.hero-wave-4 {
  height: 540px;
}

.hero-wave-sway {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.hero-sway-1 {
  animation-duration: 13s;
}

.hero-sway-2 {
  animation-duration: 10s;
  animation-direction: reverse;
}

.hero-sway-3 {
  animation-duration: 8s;
}

.hero-sway-4 {
  animation-duration: 15s;
  animation-direction: reverse;
}

.hero-wave-edge {
  display: block;
  width: 100%;
  height: 140px;
  flex: none;
}

.hero-wave-fill {
  flex: 1;
  margin-top: -1px;
}

/* The scalloped body and the block under it share one token per layer; layer 4 is the next section's navy */
.hero-wave-1 .hero-wave-body,
.hero-wave-1 .hero-wave-fill {
  fill: var(--wave-1);
  background: var(--wave-1);
}

.hero-wave-2 .hero-wave-body,
.hero-wave-2 .hero-wave-fill {
  fill: var(--wave-2);
  background: var(--wave-2);
}

.hero-wave-3 .hero-wave-body,
.hero-wave-3 .hero-wave-fill {
  fill: var(--wave-3);
  background: var(--wave-3);
}

.hero-wave-4 .hero-wave-body,
.hero-wave-4 .hero-wave-fill {
  fill: var(--wave-4);
  background: var(--wave-4);
}

/* Boats */
.hero-boats {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
}

.hero-boat {
  position: absolute;
}

.hero-boat--sail {
  left: 6%;
  bottom: 50px;
  width: clamp(96px, 12vw, 180px);
}

.hero-boat--main {
  left: 41%;
  bottom: 42px;
  width: clamp(112px, 14.5vw, 210px);
}

.hero-boat--row {
  left: 73%;
  bottom: 40px;
  width: clamp(104px, 13vw, 196px);
}

/* The boats shrink with the viewport but the wave does not, so between phone and desktop widths they ride a
   little higher. Phones keep the canvas values; at 1440 and up the clamp floors are the canvas values. */
@media (min-width: 761px) {
  .hero-boat--sail {
    bottom: clamp(50px, calc(50px + (1440px - 100vw) * 0.015), 60px);
  }

  .hero-boat--main {
    bottom: clamp(42px, calc(42px + (1440px - 100vw) * 0.02), 56px);
  }

  .hero-boat--row {
    bottom: clamp(40px, calc(40px + (1440px - 100vw) * 0.02), 54px);
  }
}

.hero-bob-sail {
  animation-duration: 5.2s;
  animation-delay: -0.8s;
}

.hero-bob-main {
  animation-duration: 6.1s;
  animation-delay: -2.6s;
}

.hero-bob-row {
  animation-duration: 4.7s;
  animation-delay: -1.7s;
}

.hero-boat-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* The tide rises as you scroll, back layers less than front. Without scroll-driven
   animation support the tide sits at rest. Reduced motion is handled in base.css. */
@keyframes hero-rise-1 {
  to {
    transform: translateY(-30px);
  }
}

@keyframes hero-rise-2 {
  to {
    transform: translateY(-60px);
  }
}

@keyframes hero-rise-3 {
  to {
    transform: translateY(-95px);
  }
}

@keyframes hero-rise-4 {
  to {
    transform: translateY(-130px);
  }
}

@supports (animation-timeline: scroll()) {
  .hero-rise-1 {
    animation: hero-rise-1 auto linear both;
    animation-timeline: scroll();
    animation-range: 0 640px;
  }

  .hero-rise-2 {
    animation: hero-rise-2 auto linear both;
    animation-timeline: scroll();
    animation-range: 0 640px;
  }

  .hero-rise-3 {
    animation: hero-rise-3 auto linear both;
    animation-timeline: scroll();
    animation-range: 0 640px;
  }

  .hero-rise-4 {
    animation: hero-rise-4 auto linear both;
    animation-timeline: scroll();
    animation-range: 0 640px;
  }
}

/* The four links fit on one row with the logo and the actions only from about 1060px up.
   Below that they are hidden (the canvas hid them below 760px, where the nav had already wrapped). */
@media (max-width: 1060px) {
  .hero-nav-links {
    display: none;
  }
}
