/* --------------------------------------------- */
/* Builder hero                                  */
/* --------------------------------------------- */

.builder-hero {
    padding-bottom: 48px;
}

.builder-hero h1 {
    max-width: 880px;
}

.builder-hero .hero-lead {
    max-width: 720px;
}

/* --------------------------------------------- */
/* Solution builder                              */
/* --------------------------------------------- */

.solution-builder {
    padding-top: 36px;
}

.solution-builder .section-heading {
    max-width: 760px;
}

.builder-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
    gap: 30px;
    align-items: start;
}

/* --------------------------------------------- */
/* Builder flow                                  */
/* --------------------------------------------- */

.builder-flow {
    padding-top: 18px;
    padding-bottom: 34px;
}

.builder-flow-card {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(125, 211, 252, 0.10), rgba(255, 255, 255, 0.045));
    box-shadow: var(--shadow-soft);
}

.builder-flow-card article {
    position: relative;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 22px;
    background: rgba(8, 13, 24, 0.34);
}

.builder-flow-card span {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.12em;
}

.builder-flow-card h3 {
    margin-bottom: 8px;
    font-size: 21px;
}

.builder-flow-card p {
    margin: 0;
    font-size: 15px;
}

.mail-preview {
    display: block;
    border-color: rgba(125, 211, 252, 0.28);
    background:
        linear-gradient(180deg, rgba(125, 211, 252, 0.08), rgba(8, 13, 24, 0.72));
}

.mail-preview strong {
    color: var(--accent);
}

@media (max-width: 820px) {
    .builder-flow-card {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------- */
/* Builder choices                               */
/* --------------------------------------------- */

.accordion-list {
    display: grid;
    gap: 12px;
}

.service-accordion {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.052);
    box-shadow: var(--shadow-soft);
    transition:
        border-color 180ms ease,
        background 180ms ease,
        transform 180ms ease;
}

.service-accordion:hover {
    transform: translateY(-1px);
    border-color: rgba(125, 211, 252, 0.28);
    background: rgba(255, 255, 255, 0.07);
}

.service-accordion[open] {
    border-color: rgba(125, 211, 252, 0.38);
    background:
        linear-gradient(135deg, rgba(125, 211, 252, 0.105), rgba(255, 255, 255, 0.052));
}

.service-accordion summary {
    position: relative;
    display: grid;
    grid-template-columns: 42px 1fr 24px;
    gap: 16px;
    align-items: center;
    padding: 20px 22px;
    cursor: pointer;
    list-style: none;
}

.service-accordion summary::-webkit-details-marker {
    display: none;
}

.service-accordion summary::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    color: var(--accent);
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
}

.service-accordion[open] summary::after {
    content: "−";
}

.service-accordion summary span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--dark-text);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.04em;
}

.service-accordion summary strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 19px;
    letter-spacing: -0.025em;
}

.service-accordion summary p {
    max-width: 62ch;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}


/* --------------------------------------------- */
/* Builder options                               */
/* --------------------------------------------- */

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 0 22px 22px 80px;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted-strong);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    transition:
        color 160ms ease,
        background 160ms ease,
        border-color 160ms ease,
        transform 160ms ease;
}

.checkbox-grid label:hover {
    transform: translateY(-1px);
    border-color: rgba(125, 211, 252, 0.38);
    background: rgba(125, 211, 252, 0.075);
    color: var(--text);
}

.checkbox-grid label:has(input:checked) {
    border-color: rgba(125, 211, 252, 0.55);
    background: rgba(125, 211, 252, 0.12);
    color: var(--text);
}

.checkbox-grid input {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
}

/* --------------------------------------------- */
/* Builder actions                               */
/* --------------------------------------------- */

.preview-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin: 4px 0 14px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.075);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        background 160ms ease,
        color 160ms ease;
}

.preview-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(125, 211, 252, 0.42);
    background: rgba(125, 211, 252, 0.09);
    color: var(--accent);
}

.mail-button {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    padding: 0 22px;
    border: 1px solid rgba(125, 211, 252, 0.58);
    border-radius: 999px;
    background:
        linear-gradient(135deg, var(--accent), #a5f3fc);
    color: var(--dark-text);
    font-size: 15px;
    font-weight: 950;
    text-decoration: none;
    box-shadow:
        0 14px 34px rgba(125, 211, 252, 0.18),
        0 0 0 0 rgba(125, 211, 252, 0.28);
    overflow: hidden;
    animation: mailButtonPulse 2.8s ease-in-out infinite;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        filter 160ms ease;
}

.mail-button::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(
            110deg,
            transparent 0%,
            rgba(255, 255, 255, 0.36) 42%,
            transparent 68%
        );
    transform: translateX(-120%);
    animation: mailButtonShine 4.2s ease-in-out infinite;
}

.mail-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow:
        0 18px 44px rgba(125, 211, 252, 0.28),
        0 0 0 6px rgba(125, 211, 252, 0.11);
}

.mail-button:active {
    transform: translateY(0);
}

@keyframes mailButtonPulse {
    0%,
    100% {
        box-shadow:
            0 14px 34px rgba(125, 211, 252, 0.18),
            0 0 0 0 rgba(125, 211, 252, 0.22);
    }

    50% {
        box-shadow:
            0 18px 42px rgba(125, 211, 252, 0.28),
            0 0 0 7px rgba(125, 211, 252, 0.055);
    }
}

@keyframes mailButtonShine {
    0% {
        transform: translateX(-120%);
    }

    42%,
    100% {
        transform: translateX(130%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mail-button,
    .mail-button::before {
        animation: none;
    }
}


/* --------------------------------------------- */
/* Request panel                                 */
/* --------------------------------------------- */

.request-panel {
    position: sticky;
    top: 106px;
}

.request-panel-inner {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.055));
    box-shadow: var(--shadow-strong);
}

.request-summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.request-summary h3 {
    margin: 0;
    font-size: 25px;
    letter-spacing: -0.035em;
}

.request-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(125, 211, 252, 0.34);
    border-radius: 999px;
    background: rgba(125, 211, 252, 0.09);
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
}


/* --------------------------------------------- */
/* Form fields                                   */
/* --------------------------------------------- */

.field-group {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.field-group label {
    color: var(--muted-strong);
    font-size: 13px;
    font-weight: 800;
}

.field-group input,
.field-group select,
.field-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(8, 13, 24, 0.58);
    color: var(--text);
    font: inherit;
    outline: none;
}

.field-group textarea {
    min-height: 118px;
    resize: vertical;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
    border-color: rgba(125, 211, 252, 0.65);
    box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.1);
}


/* --------------------------------------------- */
/* Mail preview                                  */
/* --------------------------------------------- */

.mail-preview {
    display: none;
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(125, 211, 252, 0.08), rgba(8, 13, 24, 0.72));
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.mail-preview.is-open {
    display: block;
}

.mail-preview strong {
    display: block;
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 14px;
}

.mail-preview pre {
    max-height: 260px;
    margin: 0;
    overflow: auto;
    white-space: pre-wrap;
    color: var(--muted-strong);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.6;
}


/* --------------------------------------------- */
/* Mobile builder bar                            */
/* --------------------------------------------- */

.builder-mobile-bar {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(8, 13, 24, 0.96));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(18px);
}

.builder-mobile-status {
    padding-left: 6px;
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
}

.builder-mobile-button {
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: var(--dark-text);
    font: inherit;
    font-size: 13px;
    font-weight: 950;
    cursor: pointer;
}


/* --------------------------------------------- */
/* Responsive builder                            */
/* --------------------------------------------- */

@media (max-width: 1040px) {
    .builder-layout {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
        gap: 22px;
    }

    .request-panel-inner {
        padding: 20px;
    }

    .request-summary h3 {
        font-size: 23px;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
        padding-left: 80px;
    }
}

@media (max-width: 820px) {
    .builder-layout {
        grid-template-columns: 1fr;
    }

    .request-panel {
        position: relative;
        top: auto;
        scroll-margin-top: 96px;
    }

    .builder-mobile-bar {
        display: flex;
    }

    .solution-builder {
        padding-bottom: 92px;
    }
}

@media (max-width: 560px) {
    .service-accordion summary {
        grid-template-columns: 36px 1fr 22px;
        gap: 12px;
        padding: 18px;
    }

    .service-accordion summary span {
        width: 34px;
        height: 34px;
        font-size: 11px;
    }

    .service-accordion summary strong {
        font-size: 17px;
    }

    .service-accordion summary p {
        font-size: 13px;
    }

    .checkbox-grid {
        padding: 0 18px 18px 18px;
    }

    .request-panel-inner {
        padding: 18px;
    }
}