/* Consistent vertical rhythm for the mirrored Squarespace pages.
   The original pages stack "spacer" blocks of many different sizes (51 to 272px on desktop, 65 to
   126px on phones), which gave uneven, sometimes huge gaps. Every spacer block now has a fixed
   total height of one of two sizes: a normal gap between items and a larger gap between sections
   (the tall ratio-based spacers the designer used to separate sections). */
:root {
  --awa-gap: 40px;
  --awa-gap-section: 72px;
}
@media (max-width: 767px) {
  :root {
    --awa-gap: 24px;
    --awa-gap-section: 48px;
  }
}

/* Item gap: every spacer block. Fixing the block's own height means Squarespace's per-block
   padding rules can no longer add to it. */
body .sqs-block.sqs-block-spacer.spacer-block {
  box-sizing: border-box !important;
  height: var(--awa-gap) !important;
  min-height: 0 !important;
  max-height: var(--awa-gap) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important; /* the template gives every block 17px of padding */
  overflow: hidden !important;
}
body .sqs-block.sqs-block-spacer.spacer-block .sqs-block-content {
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

/* Section gap: the tall ratio-based spacers (padding-bottom of 1% or more) */
body .sqs-block.sqs-block-spacer.spacer-block:has(> .sqs-block-content.sqs-intrinsic[style*="padding-bottom: 1"]),
body .sqs-block.sqs-block-spacer.spacer-block:has(> .sqs-block-content.sqs-intrinsic[style*="padding-bottom: 2"]),
body .sqs-block.sqs-block-spacer.spacer-block:has(> .sqs-block-content.sqs-intrinsic[style*="padding-bottom: 3"]),
body .sqs-block.sqs-block-spacer.spacer-block:has(> .sqs-block-content.sqs-intrinsic[style*="padding-bottom: 4"]),
body .sqs-block.sqs-block-spacer.spacer-block:has(> .sqs-block-content.sqs-intrinsic[style*="padding-bottom: 5"]),
body .sqs-block.sqs-block-spacer.spacer-block:has(> .sqs-block-content.sqs-intrinsic[style*="padding-bottom: 6"]),
body .sqs-block.sqs-block-spacer.spacer-block:has(> .sqs-block-content.sqs-intrinsic[style*="padding-bottom: 7"]),
body .sqs-block.sqs-block-spacer.spacer-block:has(> .sqs-block-content.sqs-intrinsic[style*="padding-bottom: 8"]),
body .sqs-block.sqs-block-spacer.spacer-block:has(> .sqs-block-content.sqs-intrinsic[style*="padding-bottom: 9"]) {
  height: var(--awa-gap-section) !important;
  max-height: var(--awa-gap-section) !important;
}

/* The template stretches every section to 68% of the screen height and centres its content
   (".tweak-index-page-fullscreen-all-pages .Index-page { min-height: 68vh }"). On tall screens, in
   full-page captures and on phones that leaves large empty bands above and below short sections.
   Sections now take the height of their content; only a hero banner keeps a minimum height. */
body .Index-page {
  min-height: 0 !important;
}
body .Index-page.Index-page--has-image:first-child {
  min-height: clamp(360px, 60vh, 560px) !important;
}

/* Blank paragraphs / text blocks collapsed by awa-layout.js */
body .awa-blank,
body .awa-blank-block {
  display: none !important;
}

/* The "scroll" arrow under a hero banner took its own row in the page; overlay it instead */
body .Index-page .Index-page-scroll-indicator {
  position: absolute !important;
  left: 50%;
  bottom: 12px;
  margin: 0 !important;
  transform: translateX(-50%);
}
body .Index-page {
  position: relative;
}

/* Section boundaries: the previous section already ends with a spacer, so a spacer that opens the
   next section is dropped (otherwise two spacers stack into a gap of 100px or more). */
body .Index-page + .Index-page .sqs-layout > .sqs-row:first-child .sqs-block-spacer:first-child,
body .Index-page + .Index-page .sqs-layout > .sqs-row:first-child .sqs-col > .sqs-block-spacer:first-child {
  height: 0 !important;
  max-height: 0 !important;
}
