/* Defaults have zero specificity so WordPress per-block color classes win. */
:where(.d33-section,.d33-heading,.d33-button) {
    color: var(--d33-text, #382d32);
    font-family: var(--d33-font, inherit);
    box-sizing: border-box;
}
.d33-section {
    padding: clamp(24px, 5vw, 64px) clamp(16px, 4vw, 40px);
}
.d33-section.is-style-soft:not(.has-background) { background: var(--d33-surface); }
.d33-section.is-style-frame { border: 1px solid var(--d33-primary); }
.d33-section > .d33-section__inner { width: 100%; max-width: 1120px; margin-inline: auto; }
.d33-heading { line-height: 1.5; font-weight: 600; font-size: 28px; }
.d33-heading.d33-heading.is-style-line { padding-bottom: .5em; border-bottom: 1px solid var(--d33-primary); }
.d33-heading.d33-heading.is-style-center { text-align: center; padding-bottom: .7em; }
.d33-heading.d33-heading.is-style-center::after {
    content: ''; display: block; position: static; width: 2em; height: 2px;
    margin: .6em auto 0; background: var(--d33-primary); border: 0;
}
:where(.d33-button) { color: #fff; background-color: var(--d33-primary); }
.d33-button { display: inline-block; border-radius: 4px; padding: 0; max-width: 100%; }
.d33-button > .d33-button__link {
    display: inline-block; padding: .85em 1.8em; color: inherit; background: transparent;
    border: 1px solid transparent; border-radius: inherit; text-decoration: none;
    font: inherit; line-height: 1.5; overflow-wrap: anywhere; box-sizing: border-box;
}
.d33-button.is-style-outline:not(.has-background) { background: transparent; }
.d33-button.is-style-outline:not(.has-text-color) { color: var(--d33-primary); }
.d33-button.is-style-outline > .d33-button__link { border-color: currentColor; }
.d33-button > a.d33-button__link:hover { color: inherit; }
.d33-button > a.d33-button__link:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.d33-heading.d33-heading:not(.has-text-color),.d33-section:not(.has-text-color) { color: var(--d33-text); }
.d33-heading.d33-heading:not([style*="font-family"]),.d33-section:not([style*="font-family"]),.d33-button:not([style*="font-family"]) { font-family: var(--d33-font, inherit); }

/* Fullwide section: all selectors stay within Design Blocks blocks. */
.d33-section.d33-section--fullwide {
    position: relative;
    isolation: isolate;
    padding-block: var(--d33-padding-desktop, 60px);
    padding-inline: clamp(16px, 4vw, 40px);
}
.d33-section--fullwide:not(.has-background) { background-color: var(--d33-surface, #faf3f5); }
.d33-section--fullwide > .d33-section__inner { position: relative; z-index: 1; }
.d33-section--fullwide > .d33-section__inner[data-d33-width="article"] { max-width: var(--wp--style--global--content-size, 800px); }
.d33-section--fullwide > .d33-section__inner[data-d33-width="wide"] { max-width: var(--wp--style--global--wide-size, 1120px); }
.d33-section--fullwide > .d33-section__inner[data-d33-width="full"] { max-width: none; }
.d33-section--fullwide > .d33-section__inner > :first-child:not(.d33-heading) { margin-block-start: 0; }
.d33-section--fullwide > .d33-section__inner > :last-child:not(.d33-heading) { margin-block-end: 0; }
.d33-section__background { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; border-radius: inherit; }
.d33-section__image,.d33-section__overlay { position: absolute; inset: 0; }
.d33-section__image { background-repeat: no-repeat; background-size: cover; }
.d33-section__overlay:not(.has-background) { background-color: var(--d33-overlay-color, transparent); }
.d33-section--fullwide[data-d33-effect="parallax"] > .d33-section__background > .d33-section__image {
    inset-block: -80px;
    transform: translate3d(0, var(--d33-parallax-offset, 0px), 0);
}
.d33-section__divider {
    position: absolute; left: 0; width: 100%; max-width: none; z-index: 2;
    display: block; pointer-events: none; fill: var(--d33-divider-color, #fff);
}
.d33-section__divider--top { top: -1px; }
.d33-section__divider--bottom { bottom: -1px; transform: rotate(180deg); }
.d33-section__divider--top.d33-section__divider--reverse { transform: scaleX(-1); }
.d33-section__divider--bottom.d33-section__divider--reverse { transform: rotate(180deg) scaleX(-1); }
@media (min-width: 783px) and (prefers-reduced-motion: no-preference) {
    .d33-section--fullwide[data-d33-effect="fixed"] > .d33-section__background > .d33-section__image { background-attachment: fixed; }
}
@media (max-width: 782px) {
    .d33-section.d33-section--fullwide { padding-block: var(--d33-padding-mobile, 40px); }
}
@media (prefers-reduced-motion: reduce) {
    .d33-section--fullwide[data-d33-effect="parallax"] > .d33-section__background > .d33-section__image { transform: none; inset: 0; }
}
/* The editor previews a static background so selection and typing stay stable. */
.editor-styles-wrapper .d33-section__image { background-attachment: scroll !important; transform: none !important; }

/* Existing saved SVGs remain in the HTML for block validation compatibility.
   Boundary shapes now clip the section, revealing the actual backdrop. */
.d33-section--fullwide > svg.d33-section__divider { display: none; }

/* Paired headings: layout and decoration can be selected independently. */
.d33-heading.d33-heading--paired {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    position: relative;
    box-sizing: border-box;
    min-width: 0;
    margin-block: 2rem;
    line-height: 1.5;
    font-size: 1rem;
}
.d33-heading.d33-heading--paired[data-d33-heading-space="narrow"] { margin-block: 1rem; }
.d33-heading.d33-heading--paired[data-d33-heading-space="tight"] { margin-block: .5rem; }
.d33-heading.d33-heading--paired[data-d33-heading-space="wide"] { margin-block: 3rem; }
.d33-heading.d33-heading--paired[data-d33-heading-space="none"] { margin-block: 0; }
.d33-heading--paired > .d33-heading__main {
    margin: 0;
    min-width: 0;
    font-family: inherit;
    font-size: var(--d33-main-size, 28px);
    font-weight: 600;
    line-height: 1.35;
    color: inherit;
    overflow-wrap: anywhere;
}
.d33-heading--paired > .d33-heading__sub {
    margin: 0;
    min-width: 0;
    font-family: inherit;
    font-size: var(--d33-sub-size, 1.25rem);
    font-weight: 400;
    line-height: 1.8;
    color: inherit;
    overflow-wrap: anywhere;
}
.d33-heading.d33-heading--inline,.d33-heading.d33-heading--inline-reverse {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    column-gap: 1.25rem;
    justify-content: var(--d33-heading-justify, flex-start);
}
.d33-heading.d33-heading--paired.is-style-line { padding-block-end: 1rem; border-bottom: 1px solid var(--d33-primary); }
.d33-heading.d33-heading--paired.is-style-center {
    text-align: center;
    --d33-heading-justify: center;
    padding-block-end: 1.6rem;
}
.d33-heading.d33-heading--paired.is-style-center::after {
    content: ''; position: absolute; bottom: 0; left: calc(50% - 1.75rem);
    width: 3.5rem; height: 2px; margin: 0; background: var(--d33-primary);
}
.d33-heading.d33-heading--paired.is-style-double-line { padding-block: 1.25rem; border-block: 3px double var(--d33-primary); }
.d33-heading.d33-heading--paired.is-style-side-line { padding-inline-start: 1.25rem; border-inline-start: 3px solid var(--d33-primary); }
.d33-heading.d33-heading--paired.is-style-frame { padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--d33-primary); }
.d33-heading.d33-heading--paired.is-style-soft-card { padding: clamp(1.25rem, 3vw, 2rem); border-radius: 8px; }
.d33-heading.d33-heading--paired.is-style-soft-card:not(.has-background) { background: var(--d33-surface); }
.d33-heading.d33-heading--paired.is-style-ribbon { padding: 1.25rem 1.5rem; border-inline-start: 6px solid var(--d33-primary); }
.d33-heading.d33-heading--paired.is-style-ribbon:not(.has-background) { background: var(--d33-surface); }
.d33-heading.d33-heading--paired.is-style-ornament { text-align: center; --d33-heading-justify: center; padding-block-end: 2rem; }
.d33-heading.d33-heading--paired.is-style-ornament::after {
    content: ''; position: absolute; bottom: .25rem; left: calc(50% - 5px);
    width: 10px; height: 10px; border: 1px solid var(--d33-primary); transform: rotate(45deg);
}
.d33-heading--paired.is-style-editorial > .d33-heading__main { font-weight: 400; }
.d33-heading--paired.is-style-editorial > .d33-heading__sub { padding-inline-start: .9rem; border-inline-start: 1px solid var(--d33-primary); }
.d33-heading--paired.is-style-pill > .d33-heading__sub { align-self: flex-start; padding: .25em 1em; border: 1px solid var(--d33-primary); border-radius: 999px; }
@media (max-width: 600px) {
    .d33-heading.d33-heading--inline,.d33-heading.d33-heading--inline-reverse { column-gap: clamp(.4rem, 2.5vw, 1rem); }
}

/* Button designs share the same saved link markup and honor per-block colors. */
.d33-button { position: relative; vertical-align: middle; }
.d33-button > .d33-button__link { position: relative; max-width: 100%; text-align: center; }
.d33-button[data-d33-size="small"] > .d33-button__link { padding: .65em 1.4em; font-size: .875rem; }
.d33-button[data-d33-size="large"] > .d33-button__link { padding: 1em 2em; font-size: 1.125rem; }
.d33-button[data-d33-width="full"] { display: block; width: 100%; }
.d33-button[data-d33-width="full"] > .d33-button__link { display: block; width: 100%; }
.d33-button.aligncenter { display: table; margin-inline: auto; }
.d33-button:is(.is-style-fill,.is-style-outline),.d33-button:not([class*="is-style-"]){border-radius:var(--d33-button-radius,4px)}
.d33-button.is-style-pill { border-radius: 999px; }
.d33-button.is-style-soft:not(.has-background) { background: var(--d33-surface); }
.d33-button.is-style-soft:not(.has-text-color),
.d33-button.is-style-double-line:not(.has-text-color),
.d33-button.is-style-underline:not(.has-text-color),
.d33-button.is-style-frame:not(.has-text-color),
.d33-button.is-style-corner:not(.has-text-color),
.d33-button.is-style-glass:not(.has-text-color) { color: var(--d33-primary); }
.d33-button.is-style-gradient:not(.has-background) { background: linear-gradient(125deg, var(--d33-primary), #623d50); }
.d33-button.is-style-shadow { box-shadow: 0 4px 0 color-mix(in srgb, var(--d33-primary), #000 25%), 0 8px 18px #00000012; }
.d33-button.is-style-double-line { border: 3px double currentColor; }
.d33-button.is-style-double-line:not(.has-background),
.d33-button.is-style-underline:not(.has-background),
.d33-button.is-style-frame:not(.has-background),
.d33-button.is-style-corner:not(.has-background) { background: transparent; }
.d33-button.is-style-underline { border-radius: 0; }
.d33-button.is-style-underline > .d33-button__link { padding-inline: .25em; border-bottom: 1px solid currentColor; border-radius: 0; }
.d33-button.is-style-frame { border: 1px solid currentColor; border-radius: 0; }
.d33-button.is-style-frame::after {
    content: ''; position: absolute; inset: 5px -5px -5px 5px; border: 1px solid currentColor;
    opacity: .4; pointer-events: none;
}
.d33-button.is-style-corner { border-radius: 0; }
.d33-button.is-style-corner::before,.d33-button.is-style-corner::after {
    content: ''; position: absolute; width: 14px; height: 14px; pointer-events: none; border-color: currentColor;
}
.d33-button.is-style-corner::before { top: 0; left: 0; border-top: 1px solid; border-left: 1px solid; }
.d33-button.is-style-corner::after { bottom: 0; right: 0; border-bottom: 1px solid; border-right: 1px solid; }
.d33-button.is-style-glass { border: 1px solid color-mix(in srgb, var(--d33-primary), transparent 55%); backdrop-filter: blur(10px); }
.d33-button.is-style-glass:not(.has-background) { background: color-mix(in srgb, var(--d33-surface), transparent 20%); }
.d33-button:is(.is-style-arrow,[data-d33-icon],[data-d33-hover="arrow"]) > .d33-button__link::after {
    content: ''; display: inline-block; width: 1em; height: 1em; margin-inline-start: 1em;
    vertical-align: -.12em; background: currentColor;
    clip-path: polygon(0 44%, 75% 44%, 49% 17%, 58% 8%, 100% 50%, 58% 92%, 49% 83%, 75% 56%, 0 56%);
}
.d33-button[data-d33-icon="chevron"] > .d33-button__link::after { clip-path: polygon(30% 5%, 75% 50%, 30% 95%, 20% 85%, 55% 50%, 20% 15%); }
.d33-button[data-d33-icon="external"] > .d33-button__link::after { clip-path: polygon(55% 0,100% 0,100% 45%,85% 45%,85% 25%,45% 65%,35% 55%,75% 15%,55% 15%,55% 0,25% 25%,25% 85%,85% 85%,85% 60%,100% 60%,100% 100%,10% 100%,10% 25%); }
.d33-button > a.d33-button__link:focus-visible { outline: 2px solid var(--d33-primary); outline-offset: 5px; }

/* Phosphor spans keep the label's stored HTML separate from decorative icons. */
.d33-button > .d33-button__link { display: inline-flex; align-items: center; justify-content: center; gap: var(--d33-button-icon-gap, 12px); }
.d33-button[data-d33-width="full"] > .d33-button__link { display: flex; }
.d33-button > .d33-button__link > .d33-button__text { min-width: 0; overflow-wrap: anywhere; text-align: center; }
.d33-button > .d33-button__link > .d33-button__icon { font-size: var(--d33-button-icon-size, 1.1em); }
/* Explicit Phosphor choices replace the old generated trailing arrow. */
.d33-button[data-d33-phosphor] > .d33-button__link::after { content: none; display: none; }
.d33-button[data-d33-hover="arrow"] > .d33-button__link > .d33-button__icon--after { transition: transform var(--d33-motion-duration, 650ms); }
.d33-button[data-d33-hover="arrow"]:is(:hover,:focus-within) > .d33-button__link > .d33-button__icon--after { transform: translateX(5px); }
@media (prefers-reduced-motion: reduce) {
    .d33-button[data-d33-hover="arrow"] > .d33-button__link > .d33-button__icon--after { transition: none !important; transform: none !important; }
}

/* A custom background must not add theme-provided box padding around a button. */
.d33-button.d33-button { padding: 0; }
.d33-heading.d33-heading--paired.has-background { padding: clamp(1.25rem, 3vw, 2rem); }

/* Keep soft masks within empty edge space, independent of theme markup. */
.d33-section--fullwide { --d33-current-section-padding: var(--d33-padding-desktop, 60px); }
.d33-section.d33-section--fullwide[style*="--d33-soft-top-height"] { padding-block-start: max(var(--d33-current-section-padding), var(--d33-soft-top-height)); }
.d33-section.d33-section--fullwide[style*="--d33-soft-bottom-height"] { padding-block-end: max(var(--d33-current-section-padding), var(--d33-soft-bottom-height)); }
@media (max-width: 782px) {
    .d33-section--fullwide { --d33-current-section-padding: var(--d33-padding-mobile, 40px); }
}

/* A transparent gradient stop reveals the underlying page, not the default surface. */
.d33-section.d33-section--gradient,
.d33-section.d33-section--gradient > .d33-section__background > .d33-section__overlay{background-color:transparent!important}

/* Remove the default block gap only where two Ballet sections meet. Explicit margins still win. */
.d33-section.d33-section:has(+ .d33-section){margin-block-end:0}
.d33-section.d33-section + .d33-section.d33-section{margin-block-start:0}

/* Optional section-level expansion. With JavaScript disabled, all content stays visible. */
.d33-section.d33-section--expandable[data-d33-more-state="collapsed"] > .d33-section__inner{min-height:var(--d33-more-height,400px);max-height:var(--d33-more-height,400px);overflow:hidden;mask-image:linear-gradient(to bottom,#000 0%,#000 calc(100% - var(--d33-more-fade-height,120px)),transparent 100%)}
.d33-section--expandable > .d33-section__more-button{position:absolute;z-index:3;left:50%;bottom:max(var(--d33-current-section-padding,60px),var(--d33-soft-bottom-height,0px));transform:translateX(-50%);display:inline-flex;align-items:center;justify-content:center;min-width:150px;min-height:46px;max-width:calc(100% - 32px);padding:10px 28px;border:0;border-radius:999px;background:var(--d33-more-button-bg,var(--d33-primary,#9b5269));color:var(--d33-more-button-color,#fff);font:inherit;font-size:14px;font-weight:600;line-height:1.5;letter-spacing:.04em;cursor:pointer;box-shadow:0 5px 18px rgba(56,45,50,.16);transition:filter .25s ease,box-shadow .25s ease}
.d33-section--expandable > .d33-section__more-button:hover{filter:brightness(.92);box-shadow:0 7px 22px rgba(56,45,50,.21)}
.d33-section--expandable > .d33-section__more-button:focus-visible{outline:2px solid currentColor;outline-offset:3px}
.d33-section--expandable > .d33-section__more-button[hidden]{display:none}
@media(max-width:782px){.d33-section--expandable > .d33-section__more-button{bottom:max(var(--d33-current-section-padding,40px),var(--d33-soft-bottom-height,0px))}}
/* Gutenberg may wrap aligned blocks in separate .wp-block containers. */
.editor-styles-wrapper .wp-block:has(> .d33-section):has(+ .wp-block > .d33-section){margin-block-end:0}
.editor-styles-wrapper .wp-block:has(> .d33-section) + .wp-block:has(> .d33-section){margin-block-start:0}

/* Heading ornaments use the same scoped styling in the editor and on the site.
   Retired styles above remain solely for previously saved pages. */
.d33-heading.d33-heading--paired.is-style-vertical-line {
    text-align: center; --d33-heading-justify: center; padding-block-end: 3rem;
}
.d33-heading.d33-heading--paired.is-style-vertical-line::before {
    content: ''; position: absolute; inset-block-end: 0; left: calc(50% - .5px);
    width: 1px; height: 2rem; background: var(--d33-primary);
}
.d33-heading.d33-heading--paired:is(.is-style-icon-leading,.is-style-icon-top)::before {
    content: var(--d33-heading-icon, none); position: absolute;
    display: flex; align-items: center; justify-content: center;
    width: var(--d33-heading-icon-size,32px); height: var(--d33-heading-icon-size,32px);
    font-family: var(--d33-heading-icon-family,"D33 Phosphor")!important;
    font-size: var(--d33-heading-icon-size,32px); font-weight: normal; font-style: normal;
    line-height: 1; color: var(--d33-heading-icon-color,var(--d33-primary));
    speak: never; -webkit-font-smoothing: antialiased; pointer-events: none;
}
.d33-heading.d33-heading--paired.is-style-icon-leading { padding-inline-start: calc(var(--d33-heading-icon-size,32px) + 1rem); }
.d33-heading.d33-heading--paired.is-style-icon-leading::before { inset-inline-start: 0; top: 0; }
.d33-heading.d33-heading--paired.is-style-icon-top {
    text-align: center; --d33-heading-justify: center;
    padding-block-start: calc(var(--d33-heading-icon-size,32px) + 1rem);
}
.d33-heading.d33-heading--paired.is-style-icon-top::before {
    top: 0; left: calc(50% - var(--d33-heading-icon-size,32px)/2);
}

/* Decorative subtitle behind the main title; saved text markup stays unchanged. */
.d33-heading.d33-heading--paired:is(.is-style-backdrop-center,.is-style-backdrop-high,.is-style-backdrop-right,.is-style-backdrop-left) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    justify-items: var(--d33-heading-backdrop-justify, center);
    isolation: isolate;
    min-height: clamp(110px, 12vw, 160px);
    padding-block: 1rem;
    padding-inline: clamp(16px, 3vw, 32px);
    text-align: center;
}
.d33-heading.d33-heading--paired:is(.is-style-backdrop-center,.is-style-backdrop-high,.is-style-backdrop-right,.is-style-backdrop-left) > :is(.d33-heading__main,.d33-heading__sub) {
    grid-column: 1;
    grid-row: 1;
    width: fit-content;
    max-width: 100%;
    text-align: inherit;
}
.d33-heading.d33-heading--paired:is(.is-style-backdrop-center,.is-style-backdrop-high,.is-style-backdrop-right,.is-style-backdrop-left) > .d33-heading__main {
    position: relative;
    z-index: 1;
}
.d33-heading.d33-heading--paired:is(.is-style-backdrop-center,.is-style-backdrop-high,.is-style-backdrop-right,.is-style-backdrop-left) > .d33-heading__sub {
    position: relative;
    z-index: 0;
    font-size: var(--d33-sub-size, clamp(60px, 6.7vw, 96px));
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    line-height: 1.15;
    color: var(--d33-primary, #d9a6b7);
    opacity: .22;
}
.d33-heading.d33-heading--paired.is-style-backdrop-high > .d33-heading__sub { transform: translateY(-.35em); }
.d33-heading.d33-heading--paired.is-style-backdrop-right > .d33-heading__sub {
    transform: translate(clamp(10px, 2vw, 24px), .12em);
}
.d33-heading.d33-heading--paired.is-style-backdrop-left > .d33-heading__sub {
    transform: translate(calc(-1 * clamp(10px, 2vw, 24px)), .12em);
}
@media (max-width: 600px) {
    .d33-heading.d33-heading--paired:is(.is-style-backdrop-center,.is-style-backdrop-high,.is-style-backdrop-right,.is-style-backdrop-left) {
        min-height: 94px;
        padding-block: .75rem;
    }
    .d33-heading.d33-heading--paired:is(.is-style-backdrop-center,.is-style-backdrop-high,.is-style-backdrop-right,.is-style-backdrop-left) > .d33-heading__sub {
        font-size: var(--d33-sub-size, clamp(52px, 13vw, 76px));
    }
}
