/* Unlayered: wins over @layer blocks and Core heading defaults in post content. */

/*
 * Standalone pages (core / plugin blocks only): match Conxious section gutters.
 * Skip marketing shells that carry their own --pad-x (hero, canvas, page-curtain).
 */
body:not(.starts-with-hero) #main > .entry-content.is-layout-constrained:not(
  :has(> .page-curtain, > .hero, > section.canvas, > section[class*="wp-block-conxious"])
) {
  --wp--style--root--padding-left: var(--pad-x);
  --wp--style--root--padding-right: var(--pad-x);
  padding-inline: var(--pad-x);
  box-sizing: border-box;
}

/* Wide/full blocks break back out of the entry-content gutter; inner copy keeps --pad-x. */
body:not(.starts-with-hero) #main > .entry-content.is-layout-constrained:not(
  :has(> .page-curtain, > .hero, > section.canvas, > section[class*="wp-block-conxious"])
) > :is(.alignfull, .alignwide) {
  margin-inline: calc(-1 * var(--pad-x));
  width: calc(100% + 2 * var(--pad-x));
  max-width: none;
  padding-inline: var(--pad-x);
  --wp--style--root--padding-left: 0;
  --wp--style--root--padding-right: 0;
  box-sizing: border-box;
}

body:not(.starts-with-hero) #main > .entry-content.is-layout-constrained:not(
  :has(> .page-curtain, > .hero, > section.canvas, > section[class*="wp-block-conxious"])
) > .alignwide {
  max-width: min(var(--wp--style--global--wide-size, var(--layout-max-main)), 100vw);
}

:is(main#main, .editor-styles-wrapper) :is(h1, h2, h3, h4, h5, h6, .wp-block-heading) {
  text-wrap: balance;
}

:is(main#main, .editor-styles-wrapper) h2:where(
    :not(.primary-cta__h):not(.primary-cta__h):not(.scroll-split__prefix):not(.exists__statement)
  ),
:is(main#main, .editor-styles-wrapper) .wp-block-heading:where(h2) {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: var(--fs-heading-section);
  line-height: 0.98;
  letter-spacing: -0.022em;
  color: var(--ink);
  margin-inline: 0;
  font-synthesis: none;
  font-variation-settings: "opsz" 38;
}

@media (min-width: 782px) {
  :is(main#main, .editor-styles-wrapper) h2:where(
      :not(.primary-cta__h):not(.primary-cta__h):not(.scroll-split__prefix):not(.exists__statement)
    ),
  :is(main#main, .editor-styles-wrapper) .wp-block-heading:where(h2) {
    font-variation-settings: "opsz" 44;
  }
}

:is(main#main, .editor-styles-wrapper) h2:where(
    :not(.primary-cta__h):not(.scroll-split__prefix):not(.exists__statement)
  ) em,
:is(main#main, .editor-styles-wrapper) .wp-block-heading:where(h2) em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-em);
  font-variation-settings: normal;
}

@media (max-width: 900px) {
  :is(main#main, .editor-styles-wrapper) h2:where(
      :not(.primary-cta__h):not(.primary-cta__h):not(.scroll-split__prefix):not(.exists__statement)
    ),
  :is(main#main, .editor-styles-wrapper) .wp-block-heading:where(h2) {
    line-height: 1.04;
  }
}

/* Centred editorial lead (legacy .exists__statement) — distinct from section h2 */
:is(main#main, .editor-styles-wrapper) h2.exists__statement {
  font-style: italic;
  font-size: var(--fs-heading-lead);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-variation-settings: normal;
}

:is(main#main, .editor-styles-wrapper) h2.exists__statement em {
  color: var(--accent-em);
}

/* CTA seat display headline — block-specific line break on <em> */
:is(main#main, .editor-styles-wrapper) .primary-cta__h em {
  display: block;
}

/* Seat ticket line — unlayered so it wins over base em (--accent-em-body) */
:is(main#main, .editor-styles-wrapper) .primary-cta__ticket-line em,
:is(main#main, .editor-styles-wrapper) .primary-cta__ticket-obj em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-em);
}

:is(main#main, .editor-styles-wrapper) h3:where(:not(.cta-cards__title)),
:is(main#main, .editor-styles-wrapper) .wp-block-heading:where(h3) {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 400;
  font-size: var(--fs-heading-accent);
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin-inline: 0;
  margin-block-end: 14px;
  font-synthesis: none;
}

:is(main#main, .editor-styles-wrapper) h3:where(:not(.cta-cards__title)) em,
:is(main#main, .editor-styles-wrapper) .wp-block-heading:where(h3) em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent-em);
}

@media (max-width: 900px) {
  :is(main#main, .editor-styles-wrapper) h3:where(:not(.cta-cards__title)),
  :is(main#main, .editor-styles-wrapper) .wp-block-heading:where(h3) {
    line-height: 1.16;
  }
}

:is(main#main, .editor-styles-wrapper) :is(p, .wp-block-paragraph) {
  line-height: 1.62;
  letter-spacing: -0.005em;
  color: var(--ink-soft);
}

:is(main#main, .editor-styles-wrapper) .hero :is(p, .wp-block-paragraph):not(.hero__micro),
:is(main#main, .editor-styles-wrapper) .primary-cta.primary-cta--large-photo :is(p, .wp-block-paragraph):not(.primary-cta__micro),
:is(main#main, .editor-styles-wrapper) .primary-cta--ticket :is(p, .wp-block-paragraph):not(.primary-cta__micro),
:is(main#main, .editor-styles-wrapper) .cta-cards :is(p, .wp-block-paragraph),
:is(main#main, .editor-styles-wrapper) .people__card :is(p, .wp-block-paragraph),
:is(main#main, .editor-styles-wrapper) .rich-list.rich-list--membership-band :is(p, .wp-block-paragraph),
:is(main#main, .editor-styles-wrapper) .scroll-split :is(p, .wp-block-paragraph),
:is(main#main, .editor-styles-wrapper) .photo-carousel :is(p, .wp-block-paragraph),
:is(main#main, .editor-styles-wrapper) .rich-list :is(p, .wp-block-paragraph),
:is(main#main, .editor-styles-wrapper) .quote-hero :is(p, .wp-block-paragraph),
:is(main#main, .editor-styles-wrapper) .btn :is(p, .wp-block-paragraph),
:is(main#main, .editor-styles-wrapper) .masthead :is(p, .wp-block-paragraph),
:is(main#main, .editor-styles-wrapper) .primary-cta__ticket :is(p, .wp-block-paragraph) {
  color: revert;
  line-height: revert;
  letter-spacing: revert;
}

/* Scroll-split sentence line — unlayered so prefix (h2) + step share one cap-height band */
:is(main#main, .editor-styles-wrapper) :is(.scroll-split__prefix, .scroll-split__step) {
  display: block;
  margin: 0;
  padding: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-heading-section);
  line-height: 0.98;
  letter-spacing: -0.022em;
  font-synthesis: none;
  text-wrap: wrap;
}

@media (min-width: 782px) {
  :is(main#main, .editor-styles-wrapper) :is(.scroll-split__prefix, .scroll-split__step) {
    font-variation-settings: "opsz" 44;
  }
}

@media (max-width: 900px) {
  :is(main#main, .editor-styles-wrapper) :is(.scroll-split__prefix, .scroll-split__step) {
    line-height: 1.04;
  }
}

/* Microcopy — after section p revert; p.class beats .section p on specificity */
:is(main#main, .editor-styles-wrapper) .hero p.hero__micro,
:is(main#main, .editor-styles-wrapper) .primary-cta.primary-cta--large-photo p.primary-cta__micro,
:is(main#main, .editor-styles-wrapper) .primary-cta.primary-cta--button p.primary-cta__micro {
  margin: 0;
  font-size: var(--fs-micro);
  color: var(--wp--preset--color--ink-muted, var(--ink-muted));
  letter-spacing: 0.02em;
}

:is(main#main, .editor-styles-wrapper) p.exists__bridge {
  max-width: var(--layout-max-prose);
  margin: clamp(28px, 4.5vh, 48px) auto 0;
}

:is(main#main, .editor-styles-wrapper) svg.lucide :is(path, circle, line, polyline, polygon, rect, ellipse) {
  vector-effect: non-scaling-stroke;
}

:is(main#main, .editor-styles-wrapper)
  :is(.principle__icon, .exists__principles .lucide-icon)
  svg.lucide {
  width: clamp(36px, 3.6vw, 52px);
  height: clamp(36px, 3.6vw, 52px);
  flex-shrink: 0;
  stroke: var(--accent-light);
  stroke-width: 1.25;
  color: var(--accent-light);
}

:is(main#main, .editor-styles-wrapper) .wp-block-column > .lucide-icon:first-child svg.lucide {
  width: clamp(36px, 3.6vw, 52px);
  height: clamp(36px, 3.6vw, 52px);
  stroke: var(--accent-light);
  stroke-width: 1.25;
  color: var(--accent-light);
}

/* Legacy exists / principles markup (imported home section) */
:is(main#main, .editor-styles-wrapper) .exists {
  padding: var(--section-v-flow) var(--pad-x);
  min-height: auto;
}

:is(main#main, .editor-styles-wrapper) .exists__lead {
  text-align: center;
}

/* Quiet editorial rule — legacy .exists__rule + Core separator (default style) */
:is(main#main, .editor-styles-wrapper)
  :is(.exists__rule, hr.wp-block-separator:not(.is-style-wide):not(.is-style-dots)) {
  display: block;
  box-sizing: content-box;
  width: 100%;
  max-width: 88px;
  height: 1px;
  border: none;
  border-bottom: none;
  background: color-mix(in srgb, var(--accent-light) 22%, rgba(14, 23, 38, 0.08));
  background-color: color-mix(in srgb, var(--accent-light) 22%, rgba(14, 23, 38, 0.08));
  margin: clamp(56px, 10vh, 120px) auto;
  opacity: 1;
}

:is(main#main, .editor-styles-wrapper) .exists__principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--layout-gap-three);
}

:is(main#main, .editor-styles-wrapper) .principle {
  display: flex;
  flex-direction: column;
  text-align: left;
}

:is(main#main, .editor-styles-wrapper) .principle__icon {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  color: var(--accent-light);
  margin: 0 0 clamp(18px, 2.2vh, 28px);
  opacity: 0.92;
}

:is(main#main, .editor-styles-wrapper) .principle__d {
  max-width: 32ch;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 900px) {
  :is(main#main, .editor-styles-wrapper) .exists {
    padding: var(--section-v-slide) var(--pad-x) 10vh;
  }

  :is(main#main, .editor-styles-wrapper)
    :is(.exists__rule, hr.wp-block-separator:not(.is-style-wide):not(.is-style-dots)) {
    margin: clamp(40px, 7vh, 72px) auto;
  }

  :is(main#main, .editor-styles-wrapper) .exists__principles {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 32rem;
  }

  :is(main#main, .editor-styles-wrapper) .principle__icon svg.lucide {
    width: 56px;
    height: 56px;
  }

  :is(main#main, .editor-styles-wrapper) .principle__d {
    max-width: none;
  }
}
