/* ================================================================
   Macring CTA Banner
   ================================================================ */

.macring-cta-banner {
    --mcb-navy: #001e42;
    --mcb-red:  #e03a1a;
    --mcb-input-bg: rgba(255, 255, 255, 0.15);
    --mcb-input-border: rgba(255, 255, 255, 0.25);
    --mcb-placeholder: rgba(255, 255, 255, 0.5);

    width: 100%;
    padding: 96px 0 0;
    background-color: var(--mcb-navy);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

/* Dim the background image */
.macring-cta-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--mcb-navy);
    opacity: 0.9;
    pointer-events: none;
    z-index: 0;
}

.mcb__container {
    position: relative;
    z-index: 1;
    width: min(100%, 1400px);
    margin: 0 auto;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

/* ── Copy column ─────────────────────────────────────────────── */

.mcb__copy {
    padding-bottom: 96px;
}

.mcb__eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 24px;
    font-family: "Inter", sans-serif;
    font-size: 10.88px;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: 1.958px;
    color: var(--mcb-red);
    text-transform: uppercase;
    white-space: nowrap;
}

.mcb__eyebrow::before {
    content: "";
    flex: 0 0 20px;
    width: 20px;
    height: 1px;
    background: var(--mcb-red);
}

.app-container .macring-cta-banner .mcb__heading {
    margin: 0 0 24px;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 48px;
    font-weight: 600;
    line-height: 52px;
    letter-spacing: 0.48px;
    color: #ffffff;
}

.mcb__heading-main,
.mcb__heading-highlight {
    display: block;
}

.mcb__heading-highlight {
    color: var(--mcb-red);
}

.mcb__desc {
    margin: 0;
    max-width: 400px;
    font-family: "Inter", sans-serif;
    font-size: 13.12px;
    font-weight: 400;
    line-height: 23px;
    color: var(--mcb-placeholder);
}

/* ── Form column ─────────────────────────────────────────────── */

.mcb__form {
    padding-bottom: 96px;
}

.mcb__form-placeholder {
    color: var(--mcb-placeholder);
    font-family: "Inter", sans-serif;
    font-size: 13.12px;
    font-style: italic;
}

/* ── CF7 / form element styling ──────────────────────────────── */

.macring-cta-banner .wpcf7-form,
.macring-cta-banner form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Full-width label by default */
.macring-cta-banner .wpcf7-form label,
.macring-cta-banner form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    font-family: "Inter", sans-serif;
    font-size: 10.88px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--mcb-placeholder);
    text-transform: uppercase;
}

/* Half-width label pair (Name + Company) */
.macring-cta-banner .wpcf7-form label.half,
.macring-cta-banner form label.half {
    width: calc(50% - 6px);
}

/* Wrappers inside CF7 labels — full width */
.macring-cta-banner .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

.macring-cta-banner input[type="text"],
.macring-cta-banner input[type="email"],
.macring-cta-banner input[type="tel"],
.macring-cta-banner textarea {
    display: block;
    width: 100%;
    padding: 13px 17px;
    background: var(--mcb-input-bg);
    border: 1px solid var(--mcb-input-border);
    font-family: "Inter", sans-serif;
    font-size: 13.12px;
    font-weight: 400;
    line-height: 23px;
    color: #ffffff;
    outline: none;
    transition: border-color 180ms ease;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.macring-cta-banner input[type="text"]::placeholder,
.macring-cta-banner input[type="email"]::placeholder,
.macring-cta-banner input[type="tel"]::placeholder,
.macring-cta-banner textarea::placeholder {
    color: var(--mcb-placeholder);
}

.macring-cta-banner input[type="text"]:focus,
.macring-cta-banner input[type="email"]:focus,
.macring-cta-banner input[type="tel"]:focus,
.macring-cta-banner textarea:focus {
    border-color: rgba(255, 255, 255, 0.5);
}

.macring-cta-banner textarea {
    height: 196px;
    resize: vertical;
}

.macring-cta-banner input[type="submit"],
.macring-cta-banner .wpcf7-submit,
.macring-cta-banner button[type="submit"] {
    display: block;
    width: 100%;
    padding: 14px 28px;
    background: var(--mcb-red);
    border: none;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    letter-spacing: 1.2px;
    color: #ffffff;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 180ms ease;
    -webkit-appearance: none;
}

.macring-cta-banner input[type="submit"]:hover,
.macring-cta-banner .wpcf7-submit:hover,
.macring-cta-banner button[type="submit"]:hover {
    background: #c5320f;
}

/* CF7 response messages */
.macring-cta-banner .wpcf7-response-output {
    margin: 8px 0 0;
    padding: 10px 16px;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--mcb-input-border);
}

/* ── Sending animation (overlay, no background) ──────────────── */

.mcb__form {
    position: relative;
}

.mcb__sending {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    /* no background — dimmed form shows through */
    pointer-events: none;
    z-index: 10;
    animation: mcb-fade-in 0.3s ease both;
}

@keyframes mcb-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.mcb__sending-rings {
    position: relative;
    width: 80px;
    height: 80px;
}

.mcb__sending-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(224, 58, 26, 0.85);
    inset: 28px;
    opacity: 0; /* invisible before animation fires — prevents static circle during delay */
    animation: mcb-ripple 1.8s ease-out infinite;
}

.mcb__sending-ring:nth-child(1) { animation-delay: 0s;   }
.mcb__sending-ring:nth-child(2) { animation-delay: 0.6s; }
.mcb__sending-ring:nth-child(3) { animation-delay: 1.2s; }

@keyframes mcb-ripple {
    0%   { inset: 24px;  opacity: 1; }
    100% { inset: -18px; opacity: 0; }
}

.mcb__sending-plane {
    position: absolute;
    inset: 22px;
    fill: #e03a1a;
    animation: mcb-plane-float 1.2s ease-in-out infinite alternate;
}

.mcb__sending-plane line {
    fill: none;
    stroke: #e03a1a;
    stroke-width: 1.5;
    stroke-linecap: round;
}

@keyframes mcb-plane-float {
    from { transform: translateY(1px)  rotate(-6deg); }
    to   { transform: translateY(-3px) rotate( 6deg); }
}

.mcb__sending-label {
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.3px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

.mcb__dot {
    display: inline-block;
    animation: mcb-blink 1.2s ease-in-out infinite;
    opacity: 0;
}

@keyframes mcb-blink {
    0%, 80%, 100% { opacity: 0; }
    40%           { opacity: 1; }
}

/* ── CF7 validation error styling ────────────────────────────── */

/* Field-level error tip */
.macring-cta-banner .wpcf7-not-valid-tip {
    display: block;
    margin-top: 5px;
    font-family: "Inter", sans-serif;
    font-size: 10.4px;
    font-weight: 400;
    letter-spacing: 0.3px;
    color: #e03a1a;
    text-transform: none;
}

/* Invalid input highlight */
.macring-cta-banner input.wpcf7-not-valid,
.macring-cta-banner textarea.wpcf7-not-valid {
    border-color: rgba(224, 58, 26, 0.55);
}

/* Form-level response message */
.macring-cta-banner .wpcf7-response-output {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 0;
    padding: 10px 14px;
    border: none;
    border-left: 3px solid #e03a1a;
    background: rgba(224, 58, 26, 0.08);
    font-family: "Inter", sans-serif;
    font-size: 11.5px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0;
}

/* Hide response-output when mail is sent — our animation handles it */
.macring-cta-banner .wpcf7-mail-sent-ok {
    display: none !important;
}

/* ── Email success animation ─────────────────────────────────── */

.mcb__success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 0 48px;
}

/* Graphic container — fixed size so particles + SVG share the same origin */
.mcb__success-graphic {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 32px;
}

/* Particles container sits behind the SVG */
.mcb__success-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Individual particle line */
.mcb__particle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: var(--p-len, 24px);
    background: var(--p-color, #e03a1a);
    border-radius: 2px;
    /* Offset so the PARTICLE'S TOP sits at graphic center */
    margin-top: -1px;
    margin-left: -1.5px;
    /* Rotation pivots around the particle's top edge (= graphic center) */
    transform-origin: 50% 0;
    opacity: 0;
    animation: mcb-particle 0.75s cubic-bezier(0.22, 0, 0.36, 1) forwards;
}

@keyframes mcb-particle {
    0%   { transform: rotate(var(--p-angle)) translateY(0);      opacity: 0;   }
    8%   { opacity: 1; }
    100% { transform: rotate(var(--p-angle)) translateY(-88px);  opacity: 0;   }
}

/* SVG ring + check */
.mcb__success-svg {
    position: relative;
    z-index: 1;
    width: 120px;
    height: 120px;
    display: block;
    transform-origin: center;
    animation: mcb-svg-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.05s;
}

@keyframes mcb-svg-pop {
    from { transform: scale(0.6); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* Circumference of r=54 circle ≈ 339.3 */
.mcb__success-ring {
    fill: none;
    stroke: #e03a1a;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 339.3;
    stroke-dashoffset: 339.3;
    filter: drop-shadow(0 0 10px rgba(224, 58, 26, 0.7));
    animation: mcb-ring 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards 0.05s;
}

@keyframes mcb-ring {
    to { stroke-dashoffset: 0; }
}

/* Polyline length ≈ 72 (seg1 ≈24.04 + seg2 ≈47.42) */
.mcb__success-check {
    fill: none;
    stroke: #ffffff;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 75;
    stroke-dashoffset: 75;
    animation: mcb-check 0.45s ease forwards 0.65s;
}

@keyframes mcb-check {
    to { stroke-dashoffset: 0; }
}

/* Title & body text */
.app-container .macring-cta-banner .mcb__success-title {
    margin: 0 0 12px;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 40px;
    font-weight: 600;
    line-height: 44px;
    letter-spacing: 0.4px;
    color: #ffffff;
    opacity: 0;
    animation: mcb-fade-up 0.5s ease forwards 1s;
}

.mcb__success-body {
    margin: 0;
    font-family: "Inter", sans-serif;
    font-size: 13.12px;
    font-weight: 400;
    line-height: 23px;
    color: var(--mcb-placeholder);
    opacity: 0;
    animation: mcb-fade-up 0.5s ease forwards 1.2s;
}

@keyframes mcb-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Error state overrides */

/* X mark lines — each ≈ 56.6px long */
.mcb__success-x {
    fill: none;
    stroke: #ffffff;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 58;
    stroke-dashoffset: 58;
    animation: mcb-check 0.4s ease forwards 0.6s;
}

.mcb__success-x--b {
    animation-delay: 0.75s;
}

/* Shake the graphic after the X draws */
.mcb__success-graphic--shake {
    animation: mcb-graphic-shake 0.55s ease forwards 1s;
}

@keyframes mcb-graphic-shake {
    0%, 100% { transform: translateX(0);  }
    15%       { transform: translateX(-7px); }
    30%       { transform: translateX(7px);  }
    45%       { transform: translateX(-5px); }
    60%       { transform: translateX(5px);  }
    75%       { transform: translateX(-2px); }
    90%       { transform: translateX(2px);  }
}

/* Error ring: slightly different glow */
.mcb__success--error .mcb__success-ring {
    filter: drop-shadow(0 0 10px rgba(224, 58, 26, 0.5));
}

/* Error title colour stays white — same rules apply */

/* Retry button */
.mcb__retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 10px 24px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.1px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 180ms ease, color 180ms ease;
    opacity: 0;
    animation: mcb-fade-up 0.5s ease forwards 1.5s;
}

.mcb__retry-btn:hover,
.mcb__retry-btn:focus-visible {
    border-color: rgba(255, 255, 255, 0.45);
    color: #ffffff;
    outline: none;
}

/* ── Responsive: tablet ──────────────────────────────────────── */

@media (max-width: 1024px) {
    .mcb__container {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .mcb__copy {
        padding-bottom: 0;
    }
}

/* ── Responsive: mobile ──────────────────────────────────────── */

@media (max-width: 767px) {
    .macring-cta-banner {
        padding-top: 56px;
    }

    .mcb__container {
        padding: 0 24px;
        gap: 40px;
    }

    .app-container .macring-cta-banner .mcb__heading {
        font-size: 36px;
        line-height: 40px;
    }

    .macring-cta-banner .mcb__row {
        grid-template-columns: 1fr;
    }

    .mcb__form {
        padding-bottom: 56px;
    }
}
