/*
 * Road Observer — Collage Hero 1.2.0
 * Automatically enqueued on the website and in the block editor.
 * All selectors are scoped to the reusable collage pattern.
 */

.ro-collage-hero {
  --roc-paper: #f7f7f2;
  --roc-ink: #142d34;
  --roc-slate: #526970;
  --roc-amber: #efb746;
  --roc-sage: #e1e8e2;
  box-sizing: border-box;
  padding: 24px clamp(24px, 3.5vw, 64px) 28px;
  margin-block: 0;
  background: var(--roc-paper);
  color: var(--roc-ink);
  font-family: var(--wp--preset--font-family--body, "Source Sans 3", system-ui, sans-serif);
}

.ro-collage-hero *,
.ro-collage-hero *::before,
.ro-collage-hero *::after {
  box-sizing: border-box;
}

.ro-collage-hero .ro-collage__layout {
  display: grid;
  grid-template-columns: 46% minmax(0, 54%);
  grid-template-rows: 1fr auto;
  gap: 0;
  width: 100%;
  max-width: 1648px;
  margin: 0 auto;
  position: relative;
  isolation: isolate;
}

.ro-collage-hero .ro-collage__copy {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  min-width: 0;
  padding-block: clamp(48px, 5vw, 90px);
  margin: 0;
  position: relative;
  z-index: 3;
}

.ro-collage-hero .ro-collage__eyebrow {
  margin: 0 0 22px;
  font-size: clamp(12px, 1.2vw, 18px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .21em;
  text-transform: uppercase;
  color: var(--roc-ink);
}

.ro-collage-hero .ro-collage__title {
  margin: 0 0 24px;
  font-family: var(--wp--preset--font-family--heading, "Manrope", system-ui, sans-serif);
  font-size: clamp(40px, 5.4vw, 92px);
  font-weight: 800;
  letter-spacing: -.065em;
  line-height: 1.055;
  color: var(--roc-ink);
  overflow-wrap: normal;
  word-break: normal;
}

.ro-collage-hero .ro-collage__description {
  margin: 0 0 30px;
  max-width: 44ch;
  padding-right: 24px;
  font-size: clamp(18px, 1.75vw, 26px);
  line-height: 1.4;
  font-weight: 400;
  color: var(--roc-slate);
}

.ro-collage-hero .ro-collage__actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 18px;
  width: 76%;
  margin: 0;
}

.ro-collage-hero .ro-collage__actions::after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  min-width: 18px;
  background: var(--roc-amber);
}

.ro-collage-hero .ro-collage__button {
  flex: 0 0 auto;
  margin: 0;
}

.ro-collage-hero .ro-collage__button .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 54px;
  padding: 15px 24px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--roc-amber);
  color: #12282e;
  font-family: inherit;
  font-size: clamp(17px, 1.35vw, 22px);
  line-height: 1.25;
  font-weight: 600;
  text-decoration: none;
  box-shadow: none;
}

.ro-collage-hero .ro-collage__button .wp-block-button__link:hover {
  background: #f5c868;
  color: #12282e;
}

.ro-collage-hero .ro-collage__button .wp-block-button__link:focus-visible {
  outline: 3px solid var(--roc-ink);
  outline-offset: 4px;
}

.ro-collage-hero .ro-collage__arrow {
  font-family: system-ui, sans-serif;
  font-size: 1.22em;
  line-height: 1;
}

.ro-collage-hero .ro-collage__art {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
  position: relative;
  isolation: isolate;
  aspect-ratio: 1.07;
  min-width: 0;
  min-height: 0;
  margin: 0;
  background: linear-gradient(var(--roc-sage), var(--roc-sage)) left 0 top 15% / 34% 61% no-repeat;
}

.ro-collage-hero .ro-collage__art::before,
.ro-collage-hero .ro-collage__art::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 5px;
  background: var(--roc-sage);
  pointer-events: none;
}

.ro-collage-hero .ro-collage__art::before {
  top: 0;
  right: 8%;
  width: 51%;
  height: 82%;
}

.ro-collage-hero .ro-collage__art::after {
  left: -20%;
  bottom: 0;
  width: 24%;
  height: 24%;
}

.ro-collage-hero .ro-collage__photo {
  position: absolute;
  margin: 0 !important;
  max-width: none;
  border-radius: 7px;
  overflow: hidden;
  line-height: 0;
  background: var(--roc-sage);
}

.ro-collage-hero .ro-collage__photo img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: cover;
  border-radius: inherit;
}

.ro-collage-hero .ro-collage__photo--street {
  left: 8%;
  top: 2.7%;
  width: 79%;
  height: 97.3%;
  z-index: 1;
}

.ro-collage-hero .ro-collage__photo--street img {
  object-position: 52% 50%;
}

.ro-collage-hero .ro-collage__photo--arrows {
  right: 0;
  top: 8.6%;
  width: 37%;
  height: 34%;
  z-index: 2;
  border: 2px solid var(--roc-paper);
}

.ro-collage-hero .ro-collage__photo--mirror {
  left: -15%;
  bottom: 5.6%;
  width: 39%;
  height: 30%;
  z-index: 2;
  border: 2px solid var(--roc-paper);
}

.ro-collage-hero .ro-collage__identifier {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  margin: 0;
  padding: 0 0 24px;
  font-size: clamp(11px, 1vw, 15px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .21em;
  color: var(--roc-ink);
}

/* Keep Gutenberg's editor wrappers from changing the grid and absolute layout. */
.editor-styles-wrapper .ro-collage-hero .ro-collage__art .ro-collage__photo {
  position: absolute;
}

.editor-styles-wrapper .ro-collage__layout > .block-editor-inner-blocks,
.editor-styles-wrapper .ro-collage__layout > .block-editor-inner-blocks > .block-editor-block-list__layout {
  display: contents;
}

.editor-styles-wrapper .ro-collage__art > .block-editor-inner-blocks,
.editor-styles-wrapper .ro-collage__art > .block-editor-inner-blocks > .block-editor-block-list__layout {
  position: static;
  height: 100%;
}

.editor-styles-wrapper .ro-collage__photo > figure,
.editor-styles-wrapper .ro-collage__photo .components-placeholder {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
}

/* Empty Image blocks stay easy to fill before the collage is complete. */
.editor-styles-wrapper .ro-collage__photo:has(.components-placeholder) {
  overflow: visible;
  line-height: 1.4;
}

.editor-styles-wrapper .ro-collage__art:has(.components-placeholder) {
  aspect-ratio: auto;
  align-self: center;
  background: none;
}

.editor-styles-wrapper .ro-collage__art:has(.components-placeholder)::before,
.editor-styles-wrapper .ro-collage__art:has(.components-placeholder)::after {
  display: none;
}

.editor-styles-wrapper .ro-collage-hero .ro-collage__art:has(.components-placeholder) .ro-collage__photo {
  position: relative;
  inset: auto;
  width: 100%;
  height: 180px;
  margin-bottom: 16px !important;
  border: 0;
}

.editor-styles-wrapper .ro-collage__photo.is-selected {
  z-index: 5;
}

@media (max-width: 959px) {
  .ro-collage-hero {
    padding: clamp(38px, 7vw, 64px) 24px 26px;
  }

  .ro-collage-hero .ro-collage__layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    max-width: 680px;
  }

  .ro-collage-hero .ro-collage__copy {
    grid-column: 1;
    grid-row: 1;
    padding: 0;
  }

  .ro-collage-hero .ro-collage__eyebrow {
    margin-bottom: 18px;
    font-size: 13px;
    letter-spacing: .22em;
  }

  .ro-collage-hero .ro-collage__title {
    margin-bottom: 20px;
    font-size: clamp(39px, 12.7vw, 72px);
    line-height: 1.045;
  }

  .ro-collage-hero .ro-collage__description {
    max-width: 34ch;
    margin-bottom: 22px;
    padding-right: 0;
    font-size: clamp(19px, 4.7vw, 25px);
    line-height: 1.4;
  }

  .ro-collage-hero .ro-collage__actions,
  .ro-collage-hero .ro-collage__button {
    width: 100%;
  }

  .ro-collage-hero .ro-collage__actions::after {
    display: none;
  }

  .ro-collage-hero .ro-collage__button .wp-block-button__link {
    width: 100%;
    min-height: 48px;
    padding: 13px 20px;
    font-size: 19px;
    border-radius: 6px;
  }

  .ro-collage-hero .ro-collage__art {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    aspect-ratio: .96;
    margin-top: 30px;
    background: linear-gradient(var(--roc-sage), var(--roc-sage)) left 0 top 40% / 30% 52% no-repeat;
  }

  .ro-collage-hero .ro-collage__art::before {
    right: 0;
    top: 0;
    width: 44%;
    height: 64%;
  }

  .ro-collage-hero .ro-collage__art::after {
    left: 0;
    bottom: 0;
    width: 31%;
    height: 28%;
  }

  .ro-collage-hero .ro-collage__photo--street {
    left: 7%;
    top: 5.5%;
    width: 85%;
    height: 91%;
  }

  .ro-collage-hero .ro-collage__photo--arrows {
    right: -2.5%;
    top: 9.5%;
    width: 39%;
    height: 30%;
  }

  .ro-collage-hero .ro-collage__photo--mirror {
    left: -2%;
    bottom: 5.5%;
    width: 44%;
    height: 29%;
  }

  .ro-collage-hero .ro-collage__identifier {
    grid-column: 1;
    grid-row: 3;
    padding: 0;
    margin-top: 14px;
    font-size: 12px;
  }

  .ro-collage-hero .ro-collage__identifier::before {
    content: "";
    display: block;
    width: 48%;
    height: 1px;
    margin: 0 0 18px 5px;
    background: var(--roc-amber);
  }
}

@media (max-width: 359px) {
  .ro-collage-hero {
    padding-inline: 20px;
  }

  .ro-collage-hero .ro-collage__title {
    font-size: clamp(31px, 12.2vw, 41px);
  }

  .ro-collage-hero .ro-collage__eyebrow {
    font-size: 11px;
  }

  .ro-collage-hero .ro-collage__button .wp-block-button__link {
    font-size: 18px;
    padding-inline: 16px;
  }
}
