/* Curated photographs: load after phase2.css. Originals retain their native pixels. */

/* Reversible focal points from photo-curation-20260918/selection.json. */
.photo-open-deck-fjord { --mf-photo-position: 50% 53%; }
.photo-fjord-from-the-ridge { --mf-photo-position: 50% 55%; }
.photo-winter-fjord-wake { --mf-photo-position: 50% 60%; }
.photo-electric-reel-at-sea { --mf-photo-position: 50% 62%; }
.photo-quiet-evening-fishing { --mf-photo-position: 50% 53%; }
.photo-rainbow-at-the-jetty { --mf-photo-position: 50% 60%; }
.photo-boats-at-the-pontoons { --mf-photo-position: 50% 68%; }
.photo-northern-lights-ashore { --mf-photo-position: 50% 60%; }
.photo-coastal-road { --mf-photo-position: 50% 55%; }
.photo-waterfront-base { --mf-photo-position: 50% 63%; }
.photo-fjord-panorama { --mf-photo-position: 50% 50%; }
.photo-halibut-beside-the-boat { --mf-photo-position: 50% 50%; }
.photo-fishing-in-action { --mf-photo-position: 50% 50%; }
.photo-cod-catch-at-sea { --mf-photo-position: 50% 50%; }
.photo-cabin-boat-fishing { --mf-photo-position: 50% 50%; }
.photo-flotation-suits-ashore { --mf-photo-position: 50% 48%; }
.photo-a-day-with-the-crew { --mf-photo-position: 50% 48%; }

:is(.mf-editable, .editor-styles-wrapper) figure.mf-photo {
  width: 100%;
  min-width: 0;
  margin: 0;
}

:is(.mf-editable, .editor-styles-wrapper) .mf-photo img,
:is(.mf-editable, .editor-styles-wrapper) img.mf-photo {
  display: block;
  width: 100%;
  max-width: 100%;
  object-position: var(--mf-photo-position, 50% 50%);
}

/* Classes work on the figure itself or a surrounding section. */
:is(.mf-editable, .editor-styles-wrapper) .mf-photo-intro-copy > p:not(.eyebrow) {
  margin-top: 24px;
}

:is(.mf-editable, .editor-styles-wrapper) .mf-photo-intro-copy > .wp-block-buttons {
  margin-top: 28px;
}

:is(.mf-editable, .editor-styles-wrapper) .guide-section > figure.mf-photo {
  margin-bottom: 36px;
}

:is(.mf-editable, .editor-styles-wrapper) .mf-photo-banner img,
:is(.mf-editable, .editor-styles-wrapper) img.mf-photo-banner {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

:is(.mf-editable, .editor-styles-wrapper) .mf-photo-panorama img,
:is(.mf-editable, .editor-styles-wrapper) img.mf-photo-panorama {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 1;
  object-fit: cover;
}

:is(.mf-editable, .editor-styles-wrapper) .mf-photo-choice,
:is(.mf-editable, .editor-styles-wrapper) figure.mf-photo-choice {
  width: 100%;
  margin-bottom: 24px;
}

:is(.mf-editable, .editor-styles-wrapper) .mf-photo-choice img,
:is(.mf-editable, .editor-styles-wrapper) img.mf-photo-choice {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Unequal image heights are deliberate: the portrait retains the whole moment. */
:is(.mf-editable, .editor-styles-wrapper) .mf-photo-triptych,
:is(.mf-editable, .editor-styles-wrapper) .wp-block-gallery.mf-photo-triptych {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
}

:is(.mf-editable, .editor-styles-wrapper) .mf-photo-triptych > * {
  min-width: 0;
  align-self: start;
}

:is(.mf-editable, .editor-styles-wrapper) .mf-photo-triptych figure.wp-block-image {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  margin: 0;
  flex: none;
}

:is(.mf-editable, .editor-styles-wrapper) .mf-photo-triptych figure.wp-block-image img,
:is(.mf-editable, .editor-styles-wrapper) .mf-photo-triptych figure.wp-block-image.mf-photo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

:is(.mf-editable, .editor-styles-wrapper) :is(.mf-photo-story, .mf-photo-intro, .mf-photo-drying) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
}

:is(.mf-editable, .editor-styles-wrapper) :is(.mf-photo-story, .mf-photo-intro, .mf-photo-drying) > * {
  min-width: 0;
}

:is(.mf-editable, .editor-styles-wrapper) :is(.mf-photo-story, .mf-photo-intro, .mf-photo-drying) figure.wp-block-image {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  margin: 0;
}

:is(.mf-editable, .editor-styles-wrapper) :is(.mf-photo-story, .mf-photo-intro, .mf-photo-drying) figure.wp-block-image img {
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
}

/* A story consists of a figure and a copy group; mobile follows the source order. */
:is(.mf-editable, .editor-styles-wrapper) .mf-photo-story-reverse > figure {
  order: 2;
}

:is(.mf-editable, .editor-styles-wrapper) .mf-photo-story-reverse > .wp-block-group {
  order: 1;
}

/* Override the commerce hero's 4:3 frame to retain both the reel and rod tip. */
:is(.mf-editable, .editor-styles-wrapper) .commerce-hero figure.mf-rental-photo,
:is(.mf-editable, .editor-styles-wrapper) figure.mf-rental-photo.wp-block-image {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  background: transparent;
}

:is(.mf-editable, .editor-styles-wrapper) .commerce-hero figure.mf-rental-photo img,
:is(.mf-editable, .editor-styles-wrapper) figure.mf-rental-photo.wp-block-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* commerce.css fixes this editor image height with !important. */
.editor-styles-wrapper .commerce-hero figure.mf-rental-photo img {
  height: auto !important;
}

/* Home desktop keeps its existing layout and uses the new image's focal point. */
:is(.mf-editable, .editor-styles-wrapper) .hero-catch-photo .mf-photo img,
:is(.mf-editable, .editor-styles-wrapper) figure.hero-catch-photo.mf-photo img {
  height: 100%;
  object-fit: cover;
  object-position: var(--mf-photo-position, 50% 53%);
}

/* The copy sizes the row; the portrait must not contribute its intrinsic height. */
@media (min-width: 1001px) {
  :is(.mf-editable, .editor-styles-wrapper) .hero-catch {
    min-height: clamp(620px, 50vw, 720px);
  }

  :is(.mf-editable, .editor-styles-wrapper) .hero-catch-photo {
    position: relative;
    align-self: stretch;
    min-height: 0;
    height: auto;
  }

  :is(.mf-editable, .editor-styles-wrapper) .hero-catch-photo > .wp-block-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  :is(.mf-editable, .editor-styles-wrapper) .hero-catch-photo > .wp-block-image img,
  :is(.mf-editable, .editor-styles-wrapper) figure.hero-catch-photo.mf-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
  }
}

/* Full portraits stay visible without overwhelming a short adjacent paragraph. */
@media (min-width: 851px) {
  :is(.mf-editable, .editor-styles-wrapper) :is(.mf-photo-story, .mf-photo-intro, .mf-photo-drying) figure.wp-block-image img,
  :is(.mf-editable, .editor-styles-wrapper) .commerce-hero figure.mf-rental-photo img,
  :is(.mf-editable, .editor-styles-wrapper) figure.mf-rental-photo.wp-block-image img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 660px;
    margin-inline: auto;
    object-fit: contain;
  }
}

/* Avoid the narrow vertical crop created by two columns at tablet widths. */
@media (min-width: 601px) and (max-width: 1000px) {
  :is(.mf-editable, .editor-styles-wrapper) .hero-catch {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  :is(.mf-editable, .editor-styles-wrapper) .hero-catch-copy {
    order: 0;
  }

  :is(.mf-editable, .editor-styles-wrapper) .hero-catch-photo {
    order: 1;
    min-height: 0;
    height: auto;
  }

  :is(.mf-editable, .editor-styles-wrapper) .hero-catch-photo > .wp-block-image {
    height: auto;
    min-height: 0;
  }

  :is(.mf-editable, .editor-styles-wrapper) .hero-catch-photo > .wp-block-image img,
  :is(.mf-editable, .editor-styles-wrapper) figure.hero-catch-photo.mf-photo img {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: var(--mf-photo-position, 50% 53%);
  }
}

@media (max-width: 850px) {
  :is(.mf-editable, .editor-styles-wrapper) :is(.mf-photo-story, .mf-photo-intro, .mf-photo-drying) {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  :is(.mf-editable, .editor-styles-wrapper) .mf-photo-story-reverse > figure,
  :is(.mf-editable, .editor-styles-wrapper) .mf-photo-story-reverse > .wp-block-group {
    order: initial;
  }
}

@media (max-width: 600px) {
  :is(.mf-editable, .editor-styles-wrapper) .mf-photo-banner img,
  :is(.mf-editable, .editor-styles-wrapper) img.mf-photo-banner {
    aspect-ratio: 4 / 3;
  }

  :is(.mf-editable, .editor-styles-wrapper) .mf-photo-panorama img,
  :is(.mf-editable, .editor-styles-wrapper) img.mf-photo-panorama {
    aspect-ratio: 16 / 9;
  }

  :is(.mf-editable, .editor-styles-wrapper) .mf-photo-triptych,
  :is(.mf-editable, .editor-styles-wrapper) .wp-block-gallery.mf-photo-triptych {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  /* Retain the existing mobile full-frame photo below the primary actions. */
  :is(.mf-editable, .editor-styles-wrapper) .hero-catch-photo .mf-photo img,
  :is(.mf-editable, .editor-styles-wrapper) figure.hero-catch-photo.mf-photo img {
    height: auto;
    min-height: 0;
    object-fit: contain;
  }
}
