/* Home page: photographic hero + editorial "chapter" sections.
 *
 * Loaded after site.css, so rules here intentionally win over the shared
 * defaults. Palette, typography and spacing tokens all come from site.css —
 * nothing new is introduced here.
 *
 * Mobile-first: the hero stacks (photo above copy) by default and only
 * becomes an overlay at 64rem, where there is room for the copy to sit clear
 * of Troy and Regina. See the note above the 64rem media query.
 */

/* ---------------------------------------------------------------- hero -- */

.hero--home {
  display: block;
  min-height: 0;
  overflow: hidden;
  background: var(--navy-900);
}

/* site.css draws a decorative ring on .hero; it only muddies the photo here. */
.hero--home::after {
  content: none;
}

.hero--home .hero__media {
  position: relative;
  display: block;
}

.hero--home .hero__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  /* Keeps Troy and Regina inside the crop on narrow screens. */
  object-position: 58% 44%;
}

/* Softens the seam between the photo and the copy beneath it. */
.hero--home .hero__media::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 28%;
  background: linear-gradient(transparent, var(--navy-900));
  content: "";
}

.hero--home .hero__content {
  width: min(100% - 2rem, 34rem);
  margin-inline: auto;
  padding-block: 2.25rem 3rem;
}

.hero--home .eyebrow {
  margin: 0 0 0.9rem;
}

.hero--home h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.6rem, 9vw, 4.9rem);
}

.hero__welcome {
  display: block;
  font-size: clamp(2.5rem, 7vw, 4rem);
  white-space: nowrap;
}

.hero__boat-name {
  display: inline-block;
  margin-top: 0.18em;
  font-family: "Great Vibes", cursive;
  font-size: 1.25em;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.82;
}

.hero__body {
  max-width: 34rem;
  margin-top: 1.5rem;
}

.hero__body p {
  margin: 0 0 1.05rem;
  color: #dbebf1;
  font-size: clamp(1rem, 2.1vw, 1.1rem);
  line-height: 1.7;
}

.hero__body p:last-child {
  margin-bottom: 0;
}

.hero--home .button-group .button {
  flex: 1 1 12rem;
}

/* ------------------------------------------------------------ chapters -- */

/* With five sections instead of seven, the old rhythm left close to 300px of
   empty ground between them on a wide screen, which read as the page having
   run out of things to say. Tightened, not cramped. */
.chapter {
  padding-block: clamp(3.75rem, 9vw, 7rem);
  /* Clears the sticky header when a section is reached via an in-page link. */
  scroll-margin-top: 5.5rem;
}

.chapter__inner {
  width: min(100% - 2rem, 46rem);
  margin-inline: auto;
}

.chapter__inner--after {
  margin-top: clamp(2rem, 5vw, 3rem);
}

.chapter .eyebrow {
  /* Slightly more room than the shared .eyebrow (0.8rem), because chapter
     headings sit against much larger display type. */
  margin: 0 0 0.85rem;
}

.chapter h2 {
  max-width: 22ch;
  margin: 0 0 2rem;
  font-size: clamp(2rem, 5.4vw, 3.3rem);
  letter-spacing: -0.035em;
}

.chapter__body > * {
  margin: 0 0 1.4em;
}

.chapter__body > *:last-child {
  margin-bottom: 0;
}

.chapter__body p {
  max-width: 42rem;
  color: var(--muted);
  font-size: clamp(1.03rem, 2.1vw, 1.18rem);
  line-height: 1.78;
}

/* Opening line of a chapter — brighter and a step larger. */
.chapter__body .chapter__lede {
  color: #dceff5;
  font-size: clamp(1.18rem, 2.9vw, 1.45rem);
  line-height: 1.62;
}

/* A single line that should land on its own. */
.chapter__body .chapter__statement {
  color: var(--foam);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3.8vw, 2rem);
  line-height: 1.35;
}

/* Short, list-like runs of copy, set as verse against a rule. */
.verse {
  margin: 0 0 1.4em;
  padding: 0 0 0 1.3rem;
  border-left: 2px solid rgba(77, 197, 230, 0.5);
  list-style: none;
}

.verse li {
  margin: 0 0 0.6rem;
  color: #d7e9ee;
  font-size: clamp(1.02rem, 2.1vw, 1.14rem);
  line-height: 1.62;
}

.verse li:last-child {
  margin-bottom: 0;
}

.closing-line {
  margin: clamp(3rem, 8vw, 4.5rem) 0 0;
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--line);
  color: var(--foam);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3.6vw, 2.1rem);
  line-height: 1.35;
  text-align: center;
}

/* -------------------------------------------------- text + photo split -- */

.split {
  display: grid;
  gap: clamp(2.25rem, 5vw, 3.5rem);
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.split h2 {
  max-width: 18ch;
}

.split__media,
.split__text {
  min-width: 0;
}

/* ---------------------------------------------- photography primitives -- */

.figure {
  margin: 0;
}

.figure__img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(154, 231, 244, 0.16);
  border-radius: 0.85rem;
  background: rgba(10, 42, 75, 0.7);
}

/* Full-bleed section photographs sit in a consistent 16:9 frame. */
.figure__img--wide {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ------------------------------------------------- spirit of regina ----- */

/* The hull artwork, shown as part of the boat's story rather than as a logo.
   It was drawn for a white ground, so it sits on a light disc to keep the
   black linework legible against the navy page. */
.spirit {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-top: clamp(1.75rem, 4vw, 2.25rem);
  padding: 1rem 1.15rem;
  border: 1px solid rgba(154, 231, 244, 0.22);
  border-radius: 0.7rem;
  background: rgba(6, 19, 38, 0.42);
}

.spirit__mark {
  display: grid;
  width: 4.75rem;
  height: 4.75rem;
  flex: none;
  place-items: center;
  padding: 0.55rem;
  border-radius: 50%;
  background: var(--foam);
}

.spirit__mark img {
  display: block;
  width: 100%;
  height: auto;
}

.spirit p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.spirit strong {
  color: var(--foam);
  font-weight: 700;
}

/* ----------------------------------------------------------- image pair -- */

/* Two photographs side by side, carrying an idea the copy no longer has to
   spell out. Replaces the old alternating photo/copy bands, which were the
   single largest thing on the page. */
.duo {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  margin-top: clamp(2rem, 5vw, 3rem);
  margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
}

/* -------------------------------------------------------- season cards -- */

.chapter .season-grid {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
}

/* site.css bottom-aligns card content, which staggers the dates and headings
   when one card's copy runs a line longer. Top-align instead and float the
   Explore link down, so all three line up at both ends. */
.season-link {
  justify-content: flex-start;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.season-link b {
  margin-top: auto;
}

/* Matches the shared .season-link p spacing in site.css. Kept explicit so the
   season cards keep their spacing if the shared rule is ever retuned. */
.season-link p {
  margin: 0 0 1.25rem;
}

/* The date is the primary wayfinding cue, so it gets weight and a rule.
   min-height reserves two lines, keeping the three headings on one baseline
   at widths where the longest range wraps. */
.season-link .season-link__dates {
  display: block;
  /* the card is align-items:flex-start, so stretch keeps the rule full width */
  align-self: stretch;
  min-height: 2.5em;
  margin-bottom: 0.85rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(154, 231, 244, 0.28);
  color: var(--ocean-light);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.season-link h3 {
  margin: 0 0 0.55rem;
}

/* ----------------------------------------------------------- responsive - */

@media (min-width: 56rem) {
  .split {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  /* Let the photograph fill its half of the spread so the two columns read
     as a pair rather than a small plate floating beside a tall column. */
  .split__media,
  .split__media .figure {
    display: flex;
  }

  .split__media .figure__img {
    height: 100%;
    min-height: 26rem;
    object-fit: cover;
  }

  /* Photo on the right, copy on the left. */
  .split--reverse .split__media {
    order: 2;
  }
}

/* The pair goes side by side earlier than the text splits do — two 16:9
   plates stacked is a lot of scrolling on a phone for one idea. */
@media (min-width: 44rem) {
  .duo {
    grid-template-columns: 1fr 1fr;
  }
}

/* Closing photograph. Identical to .container on a phone, so the mobile
   ending is unchanged; on a wide screen a full 76rem plate rendered about
   684px tall and made the last section nearly two screens on its own.
   Narrowing it also tapers the ending: 76rem pair, 54rem plate, 46rem line. */
.closing-plate {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

@media (min-width: 56rem) {
  .closing-plate {
    width: min(100% - 4rem, 54rem);
  }
}

/*
 * Overlay hero.
 *
 * Only from 64rem up. Troy and Regina sit at roughly 55-65% across the
 * photograph; the copy column is capped at 32rem and pinned left, so at these
 * widths it always ends well before them. Below 64rem the stacked layout
 * above applies instead, which keeps the photo completely unobstructed.
 */
@media (min-width: 64rem) {
  .hero--home {
    display: grid;
    min-height: 42rem;
    min-height: min(100svh, 52rem);
    place-items: center start;
    background: #09243e;
  }

  .hero--home .hero__media {
    position: absolute;
    z-index: 0;
    inset: 0;
  }

  .hero--home .hero__media::after {
    content: none;
  }

  .hero--home .hero__image {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-position: 62% 50%;
  }

  .hero--home::before {
    position: absolute;
    z-index: 1;
    inset: 0;
    background:
      linear-gradient(
        90deg,
        rgba(3, 14, 29, 0.93) 0%,
        rgba(3, 14, 29, 0.8) 32%,
        rgba(3, 14, 29, 0.34) 52%,
        rgba(3, 14, 29, 0.04) 74%
      ),
      linear-gradient(0deg, rgba(3, 14, 29, 0.3), transparent 46%);
    content: "";
  }

  .hero--home .hero__content {
    position: relative;
    z-index: 2;
    width: min(38%, 32rem);
    margin-right: auto;
    margin-left: clamp(1rem, calc((100vw - var(--max)) / 2), 2rem);
    padding-block: clamp(3.5rem, 8vw, 5.5rem);
  }

  .hero--home h1 {
    max-width: 11.5ch;
    font-size: clamp(2.75rem, 4.6vw, 4.9rem);
  }

  .hero__welcome {
    font-size: clamp(2.5rem, 3.8vw, 4rem);
  }

  .hero--home .eyebrow,
  .hero--home h1,
  .hero__body p {
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.55);
  }

  .hero--home .button-group .button {
    flex: 0 0 auto;
  }
}
