/* =========================================================
   TOWA AI Business Proposal
   Scoped styles for /{lang}/ai-proposal/* only.
   Visual direction is based on the supplied legacy SaaS flow.
========================================================= */

.ai-proposal-flow {
    --ap-blue: #2563eb;
    --ap-blue-dark: #1d4ed8;
    --ap-indigo: #4f46e5;
    --ap-teal: #14b8a6;
    --ap-ink: #0f172a;
    --ap-text: #334155;
    --ap-muted: #64748b;
    --ap-border: rgba(148, 163, 184, .28);
    --ap-card: rgba(255, 255, 255, .88);
    --ap-shadow: 0 24px 70px rgba(15, 23, 42, .09);
    position: relative;
    overflow: clip;
    color: var(--ap-ink);
    background: #fff;
}

.ai-proposal-flow *,
.ai-proposal-flow *::before,
.ai-proposal-flow *::after {
    box-sizing: border-box;
}

.ai-proposal-flow .container {
    position: relative;
    z-index: 2;
}

.ap-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(70px, 8vw, 118px) 0 74px;
    background:
        radial-gradient(circle at 88% 18%, rgba(37, 99, 235, .17), transparent 34%),
        radial-gradient(circle at 10% 78%, rgba(20, 184, 166, .12), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #f6fbff 52%, #eef7ff 100%);
}

.ap-bg-orb {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(82px);
    opacity: .58;
}

.ap-bg-orb--one {
    width: 420px;
    height: 420px;
    right: -110px;
    top: 40px;
    background: rgba(59, 130, 246, .24);
}

.ap-bg-orb--two {
    width: 340px;
    height: 340px;
    left: -120px;
    bottom: -80px;
    background: rgba(20, 184, 166, .18);
}

.ap-hero__inner {
    text-align: center;
}

.ap-eyebrow,
.ap-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 900;
    letter-spacing: .055em;
}

.ap-eyebrow {
    max-width: 100%;
    padding: 11px 20px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--ap-blue), var(--ap-teal));
    box-shadow: 0 18px 40px rgba(37, 99, 235, .20);
}

.ap-kicker {
    color: #0f766e;
    font-size: .88rem;
}

.ap-hero__title {
    max-width: 1200px;
    margin: 30px auto 22px;
    color: #111827;
    font-size: clamp(2.8rem, 5.4vw, 5.45rem);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -.065em;
    text-wrap: balance;
}

.ap-hero__lead {
    max-width: 980px;
    margin: 0 auto;
    color: #5b6472;
    font-size: clamp(1rem, 1.3vw, 1.18rem);
    line-height: 2;
}

.ap-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 32px;
}

.ap-btn {
    min-height: 50px;
    padding: 13px 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 900;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}

.ap-btn--primary {
    border: 0;
    color: #fff !important;
    background: linear-gradient(135deg, var(--ap-blue), var(--ap-teal));
    box-shadow: 0 18px 36px rgba(37, 99, 235, .22);
}

.ap-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 44px rgba(37, 99, 235, .30);
}

.ap-btn--outline {
    color: var(--ap-blue-dark) !important;
    border: 1px solid rgba(37, 99, 235, .30);
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(12px);
}

.ap-btn--outline:hover {
    transform: translateY(-1px);
    background: #eff6ff;
}

.ap-trust-row {
    max-width: 1180px;
    margin: 36px auto 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.ap-trust-item {
    min-height: 116px;
    padding: 17px 14px;
    border: 1px solid var(--ap-border);
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .055);
    backdrop-filter: blur(14px);
}

.ap-trust-item__icon {
    width: 38px;
    height: 38px;
    margin-bottom: 8px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--ap-blue);
    background: #eff6ff;
}

.ap-trust-item strong {
    display: block;
    font-size: .98rem;
    font-weight: 900;
}

.ap-trust-item small {
    display: block;
    margin-top: 4px;
    color: var(--ap-muted);
    font-size: .76rem;
    line-height: 1.5;
}

.ap-section {
    position: relative;
    padding: 82px 0;
}

.ap-section--soft {
    background:
        radial-gradient(circle at 12% 18%, rgba(20, 184, 166, .08), transparent 28%),
        radial-gradient(circle at 88% 12%, rgba(37, 99, 235, .10), transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, #eef7ff 100%);
}

.ap-section--white {
    background: #fff;
}

.ap-section-heading {
    max-width: 850px;
    margin: 0 auto 42px;
}

.ap-section-heading h1,
.ap-section-heading h2 {
    margin: 10px 0 12px;
    color: var(--ap-ink);
    font-weight: 950;
    letter-spacing: -.045em;
    line-height: 1.18;
}

.ap-section-heading h1 {
    font-size: clamp(2.35rem, 4.2vw, 4.5rem);
}

.ap-section-heading h2 {
    font-size: clamp(2rem, 3.4vw, 3.35rem);
}

.ap-section-heading p {
    margin: 0;
    color: var(--ap-muted);
    font-size: 1.02rem;
    line-height: 1.9;
}

.ap-card-grid {
    display: grid;
    gap: 14px;
}

.ap-card-grid--six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ap-info-card,
.ap-domain-card,
.ap-step-card,
.ap-summary-card,
.ap-complete-card {
    border: 1px solid var(--ap-border);
    background:
        radial-gradient(circle at 100% 0%, rgba(37, 99, 235, .065), transparent 32%),
        var(--ap-card);
    box-shadow: var(--ap-shadow);
    backdrop-filter: blur(14px);
}

.ap-info-card {
    min-height: 220px;
    padding: 24px 20px;
    border-radius: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ap-info-card__icon,
.ap-domain-card__icon {
    display: grid;
    place-items: center;
    color: var(--ap-blue);
    background: #eff6ff;
}

.ap-info-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    margin-bottom: 18px;
    font-size: 1.75rem;
}

.ap-info-card h3,
.ap-domain-card h3 {
    color: var(--ap-ink);
    font-weight: 950;
    letter-spacing: -.025em;
}

.ap-info-card h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
    line-height: 1.42;
}

.ap-info-card p,
.ap-domain-card p {
    margin: 0;
    color: var(--ap-muted);
    line-height: 1.72;
}

.ap-info-card p {
    font-size: .86rem;
}

.ap-domain-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.ap-domain-card {
    min-height: 190px;
    padding: 24px;
    border-radius: 24px;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.ap-domain-card:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, .42);
    box-shadow: 0 26px 64px rgba(15, 23, 42, .10);
}

.ap-domain-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 17px;
    margin-bottom: 18px;
    font-size: 1.4rem;
}

.ap-domain-card h3 {
    margin: 0 0 8px;
    font-size: 1.08rem;
}

.ap-domain-card p {
    font-size: .88rem;
}

.ap-selector-section,
.ap-form-page,
.ap-complete-page {
    background:
        radial-gradient(circle at 84% 8%, rgba(124, 58, 237, .08), transparent 26%),
        radial-gradient(circle at 10% 18%, rgba(37, 99, 235, .08), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, #edf7ff 48%, #ffffff 100%);
}

.ap-step-card,
.ap-summary-card {
    border-radius: 30px;
}

.ap-step-card {
    padding: 28px;
}

.ap-step-title {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.ap-step-title > span {
    flex: 0 0 auto;
    padding: 8px 11px;
    border-radius: 999px;
    color: var(--ap-blue-dark);
    background: #dbeafe;
    font-size: .76rem;
    font-weight: 950;
}

.ap-step-title h2,
.ap-step-title h3 {
    margin: 0;
    color: var(--ap-ink);
    font-size: 1.5rem;
    font-weight: 950;
    letter-spacing: -.035em;
}

.ap-step-title p {
    margin: 6px 0 0;
    color: var(--ap-muted);
    line-height: 1.65;
}

.ap-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ap-plan-option {
    position: relative;
    min-height: 205px;
    padding: 22px;
    border: 1px solid rgba(203, 213, 225, .88);
    border-radius: 24px;
    display: grid;
    align-content: start;
    gap: 10px;
    background: rgba(255, 255, 255, .86);
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.ap-plan-option:hover,
.ap-plan-option.is-active {
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, .62);
    background: linear-gradient(180deg, rgba(239, 246, 255, .96), rgba(255, 255, 255, .96));
    box-shadow: 0 24px 52px rgba(37, 99, 235, .14);
}

.ap-plan-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ap-plan-tag {
    width: fit-content;
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--ap-blue-dark);
    background: #dbeafe;
    font-size: .74rem;
    font-weight: 950;
}

.ap-plan-option strong {
    color: var(--ap-ink);
    font-size: 1.08rem;
    font-weight: 950;
    line-height: 1.4;
}

.ap-plan-option small {
    color: var(--ap-muted);
    font-size: .84rem;
    line-height: 1.72;
    font-weight: 700;
}

.ap-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ap-feature-option {
    position: relative;
    min-height: 116px;
    padding: 18px;
    border: 1px solid rgba(203, 213, 225, .80);
    border-radius: 22px;
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 12px;
    align-items: flex-start;
    background: rgba(255, 255, 255, .84);
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.ap-feature-option:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, .46);
    box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
}

.ap-feature-option:has(input:checked) {
    border-color: rgba(37, 99, 235, .52);
    background: linear-gradient(145deg, rgba(239, 246, 255, .92), rgba(255, 255, 255, .92));
}

.ap-feature-option input {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-top: 4px;
    accent-color: var(--ap-blue);
}

.ap-feature-option__icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--ap-blue);
    background: #eff6ff;
}

.ap-feature-option__copy strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ap-ink);
    font-size: .96rem;
    font-weight: 950;
}

.ap-feature-option__copy small {
    display: block;
    color: var(--ap-muted);
    font-size: .82rem;
    line-height: 1.62;
    font-weight: 700;
}

.ap-summary-card {
    position: sticky;
    top: 100px;
    padding: 28px;
}

.ap-summary-card h3 {
    margin: 10px 0 18px;
    color: var(--ap-ink);
    font-size: 1.45rem;
    font-weight: 950;
    letter-spacing: -.03em;
}

.ap-summary-box {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

.ap-summary-box > div {
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, .92);
    border-radius: 22px;
    background: rgba(248, 250, 252, .90);
}

.ap-summary-box small {
    display: block;
    margin-bottom: 6px;
    color: var(--ap-muted);
    font-weight: 850;
}

.ap-summary-box strong {
    color: var(--ap-ink);
    font-weight: 950;
}

.ap-summary-box ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 1.1rem;
    color: var(--ap-text);
    font-weight: 750;
}

.ap-summary-note {
    margin: 0 0 22px;
    color: var(--ap-muted);
    line-height: 1.8;
    font-size: .92rem;
}

.ap-form-hero {
    min-height: calc(100vh - 160px);
    padding: 72px 0 70px;
}

.ap-summary-card--sticky {
    top: 100px;
}

.ap-form-card {
    padding: 30px;
}

.ap-form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--ap-ink);
    font-weight: 900;
    line-height: 1.45;
}

.ap-required {
    color: #dc2626;
}

.ap-form-control {
    display: block;
    width: 100%;
    min-height: 58px;
    padding: 14px 17px;
    border: 1px solid rgba(203, 213, 225, .95);
    border-radius: 18px;
    outline: none;
    color: var(--ap-text);
    background: rgba(248, 250, 252, .80);
    box-shadow: none;
    font: inherit;
    line-height: 1.55;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.ap-form-control:focus {
    border-color: rgba(37, 99, 235, .62);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

textarea.ap-form-control,
.ap-form-textarea {
    min-height: 155px;
    resize: vertical;
}

.ap-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(226, 232, 240, .92);
}

.ap-form-footer p {
    max-width: 430px;
    margin: 0;
    color: var(--ap-muted);
    font-size: .9rem;
    line-height: 1.75;
}

.ap-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ap-blue);
    font-weight: 900;
    text-decoration: none;
}

.ap-back-link:hover {
    color: var(--ap-blue-dark);
    text-decoration: underline;
}

.ap-honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.ai-proposal-flow .validation-summary-valid {
    display: none;
}

.ai-proposal-flow .field-validation-error {
    display: block;
    margin-top: 6px;
    font-size: .85rem;
}

.ap-complete-hero {
    min-height: calc(100vh - 160px);
    padding: 80px 0;
    display: flex;
    align-items: center;
}

.ap-complete-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 50px;
    border-radius: 32px;
    text-align: center;
}

.ap-complete-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--ap-blue), var(--ap-teal));
    box-shadow: 0 22px 48px rgba(37, 99, 235, .24);
    font-size: 2.4rem;
}

.ap-complete-card h1 {
    margin: 12px 0 14px;
    color: var(--ap-ink);
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.14;
    font-weight: 950;
    letter-spacing: -.055em;
}

.ap-complete-card > p {
    max-width: 720px;
    margin: 0 auto;
    color: var(--ap-muted);
    font-size: 1.03rem;
    line-height: 1.9;
}

.ap-reference {
    width: fit-content;
    max-width: 100%;
    margin: 24px auto 0;
    padding: 13px 20px;
    border: 1px solid rgba(37, 99, 235, .20);
    border-radius: 999px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--ap-blue-dark);
    background: #eff6ff;
}

.ap-reference span {
    color: var(--ap-muted);
    font-weight: 800;
}

.ap-reference strong {
    font-weight: 950;
    letter-spacing: .03em;
}

.ap-complete-flow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 32px 0 0;
}

.ap-complete-flow > div {
    min-height: 116px;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, .92);
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(248, 250, 252, .90);
}

.ap-complete-flow strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ap-blue);
    font-weight: 950;
}

.ap-complete-flow span {
    color: var(--ap-text);
    font-weight: 800;
    line-height: 1.55;
}

.ap-complete-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 32px;
}

@media (max-width: 1199.98px) {
    .ap-trust-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ap-card-grid--six {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ap-plan-grid {
        grid-template-columns: 1fr;
    }

    .ap-plan-option {
        min-height: 0;
    }

    .ap-summary-card {
        position: relative;
        top: auto;
    }
}

@media (max-width: 991.98px) {
    .ap-hero {
        padding-top: 64px;
        padding-bottom: 60px;
    }

    .ap-domain-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ap-section {
        padding: 64px 0;
    }

    .ap-form-hero,
    .ap-complete-hero {
        padding: 58px 0;
    }

    .ap-form-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 767.98px) {
    .ai-proposal-flow .container {
        width: min(100% - 24px, 720px);
    }

    .ap-hero__title {
        font-size: clamp(2.4rem, 10vw, 3.8rem);
        letter-spacing: -.052em;
    }

    .ap-card-grid--six {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ap-feature-grid {
        grid-template-columns: 1fr;
    }

    .ap-complete-flow {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .ap-hero {
        padding: 48px 0 48px;
    }

    .ap-eyebrow {
        padding: 10px 14px;
        font-size: .8rem;
        line-height: 1.5;
    }

    .ap-hero__title {
        margin-top: 24px;
        font-size: clamp(2.05rem, 11vw, 2.9rem);
        line-height: 1.12;
    }

    .ap-hero__lead {
        font-size: .98rem;
        line-height: 1.85;
    }

    .ap-hero__actions .ap-btn,
    .ap-form-footer .ap-btn,
    .ap-complete-actions .ap-btn {
        width: 100%;
    }

    .ap-trust-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .ap-trust-item {
        min-height: 110px;
        padding: 14px 10px;
    }

    .ap-trust-item small {
        font-size: .72rem;
    }

    .ap-section {
        padding: 54px 0;
    }

    .ap-section-heading {
        margin-bottom: 30px;
    }

    .ap-section-heading h1,
    .ap-section-heading h2 {
        font-size: clamp(1.85rem, 8.5vw, 2.55rem);
    }

    .ap-section-heading p {
        font-size: .95rem;
        line-height: 1.75;
    }

    .ap-card-grid--six,
    .ap-domain-grid {
        grid-template-columns: 1fr;
    }

    .ap-info-card {
        min-height: 0;
        text-align: left;
        align-items: flex-start;
    }

    .ap-step-card,
    .ap-summary-card,
    .ap-form-card,
    .ap-complete-card {
        padding: 24px;
        border-radius: 26px;
    }

    .ap-step-title {
        margin-bottom: 20px;
    }

    .ap-step-title h2,
    .ap-step-title h3 {
        font-size: 1.28rem;
    }

    .ap-plan-option {
        padding: 20px;
    }

    .ap-feature-option {
        grid-template-columns: auto 1fr;
    }

    .ap-feature-option input {
        grid-row: span 2;
    }

    .ap-feature-option__icon {
        display: none;
    }

    .ap-form-hero,
    .ap-complete-hero {
        padding: 44px 0;
    }

    .ap-complete-card h1 {
        font-size: 2.25rem;
    }

    .ap-reference {
        border-radius: 20px;
    }
}
