/*
 * Higher Realms approved-document layout layer.
 * Deliberately scoped to imported pages; the source documents retain their
 * approved copy, imagery, typography and section order.
 */
.hr-page {
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.hr-page,
.hr-page * {
  box-sizing: border-box;
}

.hr-page img,
.hr-page svg {
  max-width: 100%;
}

.hr-page img {
  height: auto;
}

.hr-page > header nav,
.hr-page header nav {
  width: min(100%, 1280px);
  min-width: 0;
}

.hr-page header nav > a:first-child img {
  width: clamp(112px, 12vw, 140px) !important;
  height: auto !important;
}

.hr-page header nav > div {
  min-width: 0;
  gap: clamp(12px, 2vw, 28px) !important;
}

.hr-page .navlinks {
  display: flex !important;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(10px, 1.7vw, 24px) !important;
  font-size: clamp(10px, .78vw, 12px) !important;
  letter-spacing: .12em !important;
}

.hr-page .navlinks a {
  white-space: nowrap;
}

.hr-page .btn {
  max-width: 100%;
  min-width: 0;
  padding-left: clamp(18px, 2.8vw, 40px) !important;
  padding-right: clamp(18px, 2.8vw, 40px) !important;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
}

.hr-page .hr-grid {
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: start;
}

.hr-page .hr-grid > * {
  min-width: 0;
}

.hr-page h1,
.hr-page h2,
.hr-page h3,
.hr-page p,
.hr-page li,
.hr-page label {
  overflow-wrap: anywhere;
}

.hr-home section[id="top"],
.hr-poland section[id="top"] {
  min-height: clamp(560px, 67vw, 850px) !important;
}

.hr-home section[id="top"] > div:last-child,
.hr-poland section[id="top"] > div:last-child {
  padding-top: clamp(96px, 12vw, 160px) !important;
  padding-bottom: clamp(48px, 7vw, 88px) !important;
}

.hr-home section[id="top"] h1,
.hr-poland section[id="top"] h1 {
  max-width: 900px;
  font-size: clamp(40px, 5.6vw, 76px) !important;
  text-wrap: balance;
}

.hr-home section[id="top"] p,
.hr-poland section[id="top"] p {
  max-width: min(100%, 650px);
}

.hr-home section[id="top"] > div:last-child > div,
.hr-poland section[id="top"] > div:last-child > div {
  flex-wrap: wrap;
}

.hr-home section[id="what"] .hr-grid,
.hr-home section[id="events"] > .hr-grid:first-of-type,
.hr-poland .hr-section-timeline .hr-grid {
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr) !important;
}

.hr-home .hr-section-creed-band,
.hr-poland .hr-section-why {
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr) !important;
}

.hr-home section[id="believe"] .hr-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: clamp(18px, 3vw, 40px) !important;
}

.hr-home section[id="events"] > .hr-grid:nth-of-type(2) {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.hr-home section[id="events"] > .hr-grid:nth-of-type(2) img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hr-home .hr-section-private-retreats .hr-grid:nth-of-type(2) {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.hr-home .hr-section-testimonials .hr-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.hr-poland .hr-section-included-strip .hr-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 32px !important;
}

.hr-poland #phases .hr-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: clamp(20px, 3vw, 36px) !important;
}

.hr-poland #phases article {
  display: grid !important;
  grid-template-rows: auto auto 1fr auto;
  align-content: stretch;
  min-width: 0;
  gap: 14px !important;
}

.hr-poland #phases article img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  align-self: end;
}

.hr-poland .hr-section-timeline .hr-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
}

/* Comfortable section rhythm rather than exported preview-sized empty space. */
.hr-home > section[style*="max-width"],
.hr-home > section > div[style*="max-width"],
.hr-poland > section[style*="max-width"],
.hr-poland > section > div[style*="max-width"] {
  padding-top: clamp(56px, 6vw, 88px) !important;
  padding-bottom: clamp(56px, 6vw, 88px) !important;
}

.hr-page h2 {
  text-wrap: balance;
}

.hr-home .hr-section-creed-band img {
  height: 460px !important;
  object-fit: cover;
}

.hr-home .hr-section-founder img {
  width: 100%;
  max-width: 440px;
  justify-self: center;
}

.hr-poland .hr-section-proof .hr-grid:has(> blockquote) {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.hr-poland .hr-section-proof .hr-grid:has(> img) {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.hr-poland #weekend {
  padding-bottom: 0 !important;
}

.hr-page section {
  scroll-margin-top: 100px;
}

.hr-form main {
  width: min(100%, 840px) !important;
  max-width: 840px !important;
}

.hr-form main > p,
.hr-form main > h1 {
  max-width: 720px;
}

.hr-form main form {
  width: 100%;
  min-width: 0;
  gap: clamp(40px, 6vw, 64px) !important;
}

.hr-form main form > section {
  min-width: 0;
  gap: clamp(20px, 3vw, 28px) !important;
}

.hr-form main form .hr-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 20px !important;
}

.hr-form .fld,
.hr-form sc-raw-select,
.hr-form textarea,
.hr-form input {
  max-width: 100%;
}

.hr-form .fld {
  font-size: 18px !important;
}

.hr-form .opt {
  min-width: 0;
  align-items: flex-start;
  padding-block: 4px;
  line-height: 1.4;
}

.hr-form .opt input {
  margin-top: .25em;
}

@media (max-width: 1000px) {
  .hr-page header nav {
    gap: 14px !important;
  }

  .hr-page .navlinks {
    gap: 8px 14px !important;
  }

  .hr-home section[id="believe"] .hr-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .hr-home section[id="events"] > .hr-grid:nth-of-type(2),
  .hr-home .hr-section-private-retreats .hr-grid:nth-of-type(2) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .hr-poland .hr-section-included-strip .hr-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .hr-poland #phases .hr-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .hr-poland #phases article img {
    max-height: 400px;
  }

  .hr-poland .hr-section-proof .hr-grid:has(> blockquote),
  .hr-poland .hr-section-proof .hr-grid:has(> img) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767px) {
  .hr-page header nav {
    flex-wrap: wrap !important;
    padding: 12px 20px !important;
    gap: 10px 16px !important;
  }

  .hr-page header nav > div {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px !important;
  }

  .hr-page .navlinks {
    display: flex !important;
    order: 2;
    width: 100%;
    justify-content: flex-start;
    gap: 8px 16px !important;
    padding-top: 4px;
    font-size: 10px !important;
  }

  .hr-page header nav > div > .btn {
    order: 1;
    min-height: 40px !important;
  }

  .hr-home header nav,
  .hr-poland header nav {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .hr-home header nav > div,
  .hr-poland header nav > div {
    display: contents !important;
  }

  .hr-page .navlinks {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-block: 6px 2px;
  }

  .hr-page header nav > div > .btn {
    grid-column: 2;
    grid-row: 1;
  }

  .hr-page .hr-grid,
  .hr-home section[id="what"] .hr-grid,
  .hr-home .hr-section-creed-band,
  .hr-home section[id="events"] > .hr-grid:first-of-type,
  .hr-home section[id="believe"] .hr-grid,
  .hr-home section[id="events"] > .hr-grid:nth-of-type(2),
  .hr-home .hr-section-private-retreats .hr-grid:nth-of-type(2),
  .hr-home .hr-section-testimonials .hr-grid,
  .hr-poland .hr-section-why,
  .hr-poland .hr-section-included-strip .hr-grid,
  .hr-poland #phases .hr-grid,
  .hr-poland .hr-section-timeline .hr-grid,
  .hr-form main form .hr-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .hr-poland .hr-section-proof .hr-grid:has(> blockquote),
  .hr-poland .hr-section-proof .hr-grid:has(> img) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .hr-home section[id="events"] > .hr-grid:nth-of-type(2) img {
    aspect-ratio: 16 / 10;
  }

  .hr-home .hr-section-creed-band img {
    height: auto !important;
    aspect-ratio: 4 / 3;
  }

  .hr-poland #phases article {
    grid-template-rows: auto auto auto auto;
  }

  .hr-poland #phases article img {
    aspect-ratio: 16 / 10;
  }

  .hr-form main {
    padding: 52px 22px 76px !important;
  }

  .hr-form main form .hr-grid {
    gap: 18px !important;
  }

  .hr-form .btn,
  .hr-page .btn {
    letter-spacing: 2px;
  }

  .hr-home section[id="top"] h1,
  .hr-poland section[id="top"] h1 {
    font-size: clamp(36px, 9vw, 54px) !important;
  }
}

@media (max-width: 420px) {
  .hr-page header nav {
    padding-inline: 16px !important;
  }

  .hr-page .navlinks {
    column-gap: 11px !important;
    letter-spacing: .08em !important;
  }

  .hr-page .btn {
    padding-inline: 16px !important;
    font-size: 11px !important;
  }

  .hr-home section[id="top"] > div:last-child,
  .hr-poland section[id="top"] > div:last-child {
    gap: 20px !important;
  }
}

/* Expedition 01 content refresh: keep the approved two-column section rhythm. */
.hr-poland .hr-section-what .hr-grid {
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr) !important;
}

.hr-poland .hr-section-included-strip .hr-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 767px) {
  .hr-poland .hr-section-what .hr-grid,
  .hr-poland .hr-section-included-strip .hr-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
