@charset "UTF-8";

/* ============================================================================
   Button System
   ============================================================================ */

/* Editor Customizer colours are scoped to these controls, leaving other previews alone. */
:root,
.editor-styles-wrapper :is(.site-btn, .wp-block-button__link, .wp-element-button, .adst-generic-cta--inverted) {
    --button-font-family: var(--adst-font-heading, var(--wp--preset--font-family--montserrat, "Montserrat", "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif)); /* Montserrat is binding: ADR 0002; ticket #33 production measurements. */
    --button-letter-spacing: 2px; /* Prod submit at both widths: ticket #33 production measurements. */
    --button-padding-y: 14px; /* Fixed-point theme.json CTA padding: ticket #33 baseline. */
    --button-padding-x: 32px; /* Fixed-point theme.json CTA padding: ticket #33 baseline. */
    --button-gap: 12px; /* Fixed-point unified CTA gap: ticket #33 baseline. */
    --button-border-width: 2px; /* Existing form-contract perimeter benchmark: ticket #32 contrast calculations. */
    --button-radius: 100px; /* Prod footer submit and brand pill: ticket #33 production measurements. */
    --button-transition: color var(--adst-transition, 220ms ease), background-color var(--adst-transition, 220ms ease), border-color var(--adst-transition, 220ms ease), transform var(--adst-transition, 220ms ease); /* 220ms is the fixed-point --adst-transition token; ticket #33 production measurements. */
    --button-primary-bg: var(--adst-editor-accent, var(--adst-accent, #fcd21d)); /* Prod CTA fill: ticket #33 production measurements. */
    --button-primary-text: var(--adst-editor-primary, var(--adst-primary, #2d2d2d)); /* 9.43:1 on yellow: ticket #33 contrast calculations. */
    --button-primary-bg-hover: var(--adst-editor-primary, var(--adst-primary, #2d2d2d)); /* Accessible inversion: ticket #33 production measurements. */
    --button-primary-text-hover: var(--adst-surface, #ffffff); /* 13.77:1 on charcoal: ticket #33 contrast calculations. */
    --button-secondary-bg: var(--adst-editor-primary, var(--adst-primary, #2d2d2d)); /* Live header charcoal: ticket #33 production measurements. */
    --button-secondary-text: var(--adst-surface, #ffffff); /* 13.77:1 on charcoal: ticket #33 contrast calculations. */
    --button-secondary-bg-hover: var(--adst-editor-accent, var(--adst-accent, #fcd21d)); /* Measured dark-control inversion: ticket #33 production measurements. */
    --button-secondary-text-hover: var(--adst-editor-primary, var(--adst-primary, #2d2d2d)); /* 9.43:1 on yellow: ticket #33 contrast calculations. */
    --button-tertiary-text: var(--adst-editor-primary, var(--adst-primary, #2d2d2d)); /* 13.77:1 on white, 9.43:1 on yellow: ticket #33 contrast calculations. */
    --button-tertiary-text-dark: var(--adst-surface, #ffffff); /* 13.77:1 on charcoal: ticket #33 contrast calculations. */
    --button-tertiary-underline: var(--adst-editor-accent, var(--adst-accent, #fcd21d)); /* Brand hover cue; ticket #33 production measurements. */
    --button-focus-ring: #0076e0; /* 4.50:1 white, 3.08:1 yellow, 3.06:1 charcoal: ticket #33 contrast calculations. */
    --button-disabled-bg: #dddddd; /* Solid neutral from the brand palette; disabled controls are exempt under WCAG 1.4.3. */
    --button-disabled-text: #747d88; /* Brand muted neutral; disabled controls are exempt under WCAG 1.4.3. */
}

/* Later editor global styles must not replace the shared line box or mobile inset. */
.editor-styles-wrapper .wp-block-button > .wp-block-button__link {
    line-height: 1.2;
    padding-block: var(--button-padding-y);
}

/* Core's later editor border rule must not override the button's front-end perimeter. */
.editor-styles-wrapper .wp-block-button:not(.is-style-tertiary) > .wp-block-button__link {
    border-width: var(--button-border-width);
    border-color: var(--btn-border);
    padding-inline: var(--button-padding-x);
}

.editor-styles-wrapper .wp-block-button:not(.is-style-tertiary) > .wp-block-button__link:hover {
    border-color: var(--btn-hover-border);
}

/* Unified rule shape, including CF7 Secondary submits. */
.site-btn:where(:not(.adst-btn-bestia, .adst-btn-stroke)),
.wp-block-button__link:where(:not(.adst-btn-bestia, .adst-btn-stroke)),
.wp-element-button:where(:not(.adst-btn-bestia, .adst-btn-stroke)),
.wpcf7 input[type="submit"],
.wpcf7 .wpcf7-submit {
    --btn-bg: var(--button-primary-bg);
    --btn-hover-bg: var(--button-primary-bg-hover);
    --btn-text: var(--button-primary-text);
    --btn-hover-text: var(--button-primary-text-hover);
    --btn-border: transparent;
    --btn-hover-border: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--button-gap);
    padding: var(--button-padding-y) var(--button-padding-x);
    min-height: var(--space-12, 48px);
    font-family: var(--button-font-family);
    font-size: var(--wp--preset--font-size--medium); /* Fixed-point unified CTA size: ticket #33 baseline. */
    font-weight: var(--adst-font-bold, 700);
    letter-spacing: var(--button-letter-spacing);
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    color: var(--btn-text);
    background: var(--btn-bg);
    border: var(--button-border-width) solid var(--btn-border);
    border-radius: var(--button-radius);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: var(--adst-z-base, 0);
    box-shadow: none; /* Prod CTA has no shadow: ticket #33 production measurements. */
    transition: var(--button-transition);
}

.site-btn:where(:not(.adst-btn-bestia, .adst-btn-stroke))::before,
.wp-block-button__link:where(:not(.adst-btn-bestia, .adst-btn-stroke))::before,
.wp-element-button:where(:not(.adst-btn-bestia, .adst-btn-stroke))::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--btn-hover-bg);
    border-radius: inherit;
    transform: scaleY(0);
    transform-origin: top center;
    transition: transform 380ms cubic-bezier(0.4, 0, 0.2, 1); /* Fixed-point overlay timing: components.css at 7152106. */
    z-index: var(--adst-z-behind, -1);
}

.site-btn:where(:not(.adst-btn-bestia, .adst-btn-stroke)):hover,
.wp-block-button__link:where(:not(.adst-btn-bestia, .adst-btn-stroke)):hover,
.wp-element-button:where(:not(.adst-btn-bestia, .adst-btn-stroke)):hover,
.wpcf7 input[type="submit"]:hover,
.wpcf7 .wpcf7-submit:hover {
    color: var(--btn-hover-text);
    background: var(--btn-hover-bg);
    border-color: var(--btn-hover-border);
    box-shadow: none;
    transform: translateY(-2px); /* Fixed-point hover lift: components.css at 7152106. */
}

.site-btn:where(:not(.adst-btn-bestia, .adst-btn-stroke)):hover::before,
.wp-block-button__link:where(:not(.adst-btn-bestia, .adst-btn-stroke)):hover::before,
.wp-element-button:where(:not(.adst-btn-bestia, .adst-btn-stroke)):hover::before {
    transform: scaleY(1);
}

.site-btn:where(:not(.adst-btn-bestia, .adst-btn-stroke)):focus-visible,
.wp-block-button__link:where(:not(.adst-btn-bestia, .adst-btn-stroke)):focus-visible,
.wp-element-button:where(:not(.adst-btn-bestia, .adst-btn-stroke)):focus-visible,
.wpcf7 input[type="submit"]:focus-visible,
.wpcf7 .wpcf7-submit:focus-visible {
    outline: 3px solid var(--button-focus-ring); /* 3px ring passes on all surfaces: ticket #33 contrast calculations. */
    outline-offset: 3px; /* Fixed-point separation, retained for visible focus: components.css at 7152106. */
    box-shadow: none;
}

/* Keep :focus (not :focus-visible) in these colour rules to beat base.css's a:focus on mouse clicks. */
.site-btn:where(:not(.adst-btn-bestia, .adst-btn-stroke)):focus:not(:hover):not(:disabled, [disabled], [aria-disabled="true"]),
.wp-block-button__link:where(:not(.adst-btn-bestia, .adst-btn-stroke)):focus:not(:hover):not(:disabled, [disabled], [aria-disabled="true"]),
.wp-element-button:where(:not(.adst-btn-bestia, .adst-btn-stroke)):focus:not(:hover):not(:disabled, [disabled], [aria-disabled="true"]) {
    color: var(--btn-text);
}

.site-btn:where(:not(.adst-btn-bestia, .adst-btn-stroke)):active,
.wp-block-button__link:where(:not(.adst-btn-bestia, .adst-btn-stroke)):active,
.wp-element-button:where(:not(.adst-btn-bestia, .adst-btn-stroke)):active,
.wpcf7 input[type="submit"]:active,
.wpcf7 .wpcf7-submit:active {
    transform: translateY(0);
    box-shadow: none;
}

.site-btn__label {
    position: relative;
    z-index: var(--adst-z-content, 10);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: color var(--adst-transition, 220ms ease); /* Fixed-point 220ms transition token. */
    white-space: nowrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: none;
    max-width: 100%;
    width: 100%;
}

.site-btn--primary {
    --btn-bg: var(--button-primary-bg);
    --btn-hover-bg: var(--button-primary-bg-hover);
    --btn-text: var(--button-primary-text);
    --btn-hover-text: var(--button-primary-text-hover);
}

.has-primary-background-color :where(.site-btn--primary, .wp-block-button:not(.is-style-secondary, .is-style-tertiary) > .wp-block-button__link),
.hero-split__panel .site-btn--primary,
.contact-form-panel--yellow .site-btn--primary {
    --btn-border: var(--button-primary-text); /* 9.43:1 charcoal boundary on yellow: ticket #33 contrast calculations. */
}

.site-btn--secondary,
.wp-block-button.is-style-secondary > .wp-block-button__link,
.wpcf7 input[type="submit"],
.wpcf7 .wpcf7-submit {
    --btn-bg: var(--button-secondary-bg);
    --btn-hover-bg: var(--button-secondary-bg-hover);
    --btn-text: var(--button-secondary-text);
    --btn-hover-text: var(--button-secondary-text-hover);
}

.wp-block-button__link.has-secondary-background-color:not(.has-text-color) {
    --btn-text: var(--button-secondary-text);
}

.editor-styles-wrapper .wp-block-button:not(.is-style-secondary, .is-style-tertiary) > .wp-block-button__link.has-secondary-background-color:not(.has-text-color) {
    color: var(--button-secondary-text);
}

.site-btn--tertiary,
.wp-block-button.is-style-tertiary > .wp-block-button__link {
    --btn-bg: transparent;
    --btn-hover-bg: transparent;
    --btn-text: var(--button-tertiary-text);
    --btn-hover-text: var(--button-tertiary-text);
    min-height: 44px; /* WCAG 2.5.5 target-size basis requested by the ticket. */
    padding-inline: 0; /* Text-link geometry has no pill inset; ticket #33 Tertiary definition. */
    overflow: visible;
    border: 0; /* Tertiary is deliberately not a pill; ticket #33 Tertiary definition. */
    border-radius: 0; /* Tertiary is deliberately not a pill; ticket #33 Tertiary definition. */
    box-shadow: none;
    text-decoration-line: underline;
    text-decoration-color: currentColor;
    text-decoration-thickness: 2px; /* Chosen for a visible underline at the measured 16px label size. */
    text-underline-offset: 5px; /* Chosen to clear Montserrat descenders without detaching the underline. */
}

.site-btn--tertiary::before,
.wp-block-button.is-style-tertiary > .wp-block-button__link::before {
    content: none;
}

.site-btn--tertiary::after,
.wp-block-button.is-style-tertiary > .wp-block-button__link::after {
    content: '→';
    position: static;
    /* #130: a margin (not a trailing space) separates arrow from label — a space
       would sit inside the underline and read as the same trailing-underline defect. */
    margin-left: 0.4em;
    font-size: var(--wp--preset--font-size--large); /* Chosen to give the arrow optical parity with the 16px uppercase label. */
    line-height: 1; /* Unit line box keeps the 1.2em arrow centred with the label. */
    opacity: 1; /* The arrow is a permanent Tertiary affordance, not a hover reveal. */
    transform: none;
}

.site-btn--tertiary:hover,
.wp-block-button.is-style-tertiary > .wp-block-button__link:hover {
    color: var(--btn-hover-text);
    background: transparent;
    text-decoration-color: var(--button-tertiary-underline);
    transform: none;
}

.has-secondary-background-color :where(.site-btn--secondary, .wp-block-button.is-style-secondary > .wp-block-button__link),
.adst-generic-cta--inverted :where(.site-btn--secondary, .wp-block-button.is-style-secondary > .wp-block-button__link) {
    --btn-border: var(--button-secondary-text); /* 13.77:1 white boundary on charcoal: ticket #33 contrast calculations. */
}

.has-secondary-background-color :where(.site-btn--tertiary, .wp-block-button.is-style-tertiary > .wp-block-button__link),
.adst-generic-cta--inverted :where(.site-btn--tertiary, .wp-block-button.is-style-tertiary > .wp-block-button__link),
.adst-inline-cta--inverted :where(.site-btn--tertiary, .wp-block-button.is-style-tertiary > .wp-block-button__link) {
    --btn-text: var(--button-tertiary-text-dark);
    --btn-hover-text: var(--button-tertiary-text-dark);
}

/* Outrank the theme's base Tertiary variable rule for block buttons on dark surfaces. */
.has-secondary-background-color .wp-block-button.is-style-tertiary > .wp-block-button__link,
.adst-generic-cta--inverted .wp-block-button.is-style-tertiary > .wp-block-button__link {
    --btn-text: var(--button-tertiary-text-dark);
    --btn-hover-text: var(--button-tertiary-text-dark);
}

.editor-styles-wrapper :is(.has-secondary-background-color, .adst-generic-cta--inverted) .wp-block-button.is-style-tertiary > .wp-block-button__link:not(:hover) {
    color: var(--button-tertiary-text-dark);
}

/* A solid state avoids translucent olive over yellow. Inactive controls are exempt from WCAG 1.4.3. */
.site-btn:where(:not(.adst-btn-bestia, .adst-btn-stroke))[disabled],
.site-btn:where(:not(.adst-btn-bestia, .adst-btn-stroke))[aria-disabled="true"],
.wp-block-button__link:where(:not(.adst-btn-bestia, .adst-btn-stroke))[disabled],
.wp-block-button__link:where(:not(.adst-btn-bestia, .adst-btn-stroke))[aria-disabled="true"],
.wp-element-button:where(:not(.adst-btn-bestia, .adst-btn-stroke))[disabled],
.wp-element-button:where(:not(.adst-btn-bestia, .adst-btn-stroke))[aria-disabled="true"],
.wpcf7 input[type="submit"]:disabled,
.wpcf7 .wpcf7-submit:disabled,
.wpcf7-form.submitting input[type="submit"],
.wpcf7-form.submitting .wpcf7-submit {
    background: var(--button-disabled-bg);
    color: var(--button-disabled-text);
    border-color: transparent;
    opacity: 1; /* Solid disabled state; inactive controls are exempt under WCAG 1.4.3. */
    cursor: not-allowed; /* Pointer events stay on so this cursor is actually shown; hover/active cannot restyle a disabled control because this rule is later in the cascade at equal specificity. */
    box-shadow: none;
    transform: none;
}

.site-btn:where(:not(.adst-btn-bestia, .adst-btn-stroke))[disabled]::before,
.site-btn:where(:not(.adst-btn-bestia, .adst-btn-stroke))[aria-disabled="true"]::before,
.wp-block-button__link:where(:not(.adst-btn-bestia, .adst-btn-stroke))[disabled]::before,
.wp-block-button__link:where(:not(.adst-btn-bestia, .adst-btn-stroke))[aria-disabled="true"]::before,
.wp-element-button:where(:not(.adst-btn-bestia, .adst-btn-stroke))[disabled]::before,
.wp-element-button:where(:not(.adst-btn-bestia, .adst-btn-stroke))[aria-disabled="true"]::before {
    transform: scaleY(0);
}

.site-btn--full {
    width: 100%;
    display: inline-flex;
    justify-content: center;
}

@media (max-width: 768px) {
    .editor-styles-wrapper .wp-block-button > .wp-block-button__link {
        --button-padding-y: 12px; /* Both editor insets mirror the front-end padding: 12px 28px rule directly below in this media query. */
        --button-padding-x: 28px;
    }

    .site-btn:where(:not(.adst-btn-bestia, .adst-btn-stroke)),
    .wp-block-button__link:where(:not(.adst-btn-bestia, .adst-btn-stroke)),
    .wp-element-button:where(:not(.adst-btn-bestia, .adst-btn-stroke)) {
        padding: 12px 28px; /* Fixed-point mobile CTA baseline: ticket #33 baseline. */
        font-size: var(--wp--preset--font-size--medium); /* Keep the desktop token size; ticket #33 contrast calculations. */
        letter-spacing: 2px; /* Prod submit tracking at both widths: ticket #33 production measurements. */
        white-space: normal;
        text-wrap: balance;
    }

    .site-btn--tertiary,
    .wp-block-button.is-style-tertiary > .wp-block-button__link {
        padding-inline: 0; /* Preserve the text-link, no-pill geometry on mobile. */
    }

    .site-btn__label {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    /* Keep wrapping CTA labels and their arrows in the same text flow. */
    :is(.adst-generic-cta:not(.adst-generic-cta-editor), .adst-inline-cta) .site-btn--tertiary {
        display: inline-block;
    }

    :is(.adst-generic-cta:not(.adst-generic-cta-editor), .adst-inline-cta) .site-btn--tertiary .site-btn__label {
        display: inline;
    }

    /* Inline flow loses the flex gap; preserve the front-end arrow spacing. */
    :is(.adst-generic-cta:not(.adst-generic-cta-editor), .adst-inline-cta) .site-btn--tertiary::after {
        margin-left: calc(var(--button-gap) + 0.4em);
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-btn:where(:not(.adst-btn-bestia, .adst-btn-stroke)),
    .wp-block-button__link:where(:not(.adst-btn-bestia, .adst-btn-stroke)),
    .wp-element-button:where(:not(.adst-btn-bestia, .adst-btn-stroke)),
    .wpcf7 input[type="submit"],
    .wpcf7 .wpcf7-submit {
        transition: none;
        transform: none;
    }

    .site-btn::before,
    .wp-block-button__link::before,
    .wp-element-button::before {
        transition: none;
    }

    .site-btn:hover,
    .wp-block-button__link:hover,
    .wp-element-button:hover,
    .wpcf7 input[type="submit"]:hover,
    .wpcf7 .wpcf7-submit:hover {
        transform: none;
    }
}
