/*
 * /ai-pilot/ and /case-studies/* -- additions on top of cases.css and audit.css.
 *
 * Logical properties only (margin-inline, inset-inline-start, ...): these pages are
 * built to get an Arabic version, and with dir="rtl" on <html> everything here
 * mirrors without a second stylesheet. The cases.css rules reused here that still
 * use physical left/right get an [dir="rtl"] override at the bottom.
 */

.offer-page {
    --offer-blue: #6375E4;
    --offer-blue-light: #CED3F2;
    --offer-black: #121212;
    --offer-gray-text: #615F5F;
    --offer-gray-bg: #EAEAEA;
    --offer-line: #DFDFDF;
}

/* ----------------------------------------------------- unfilled placeholders */

mark.todo-placeholder {
    background: #FFF1B8;
    color: #6B4E00;
    border-radius: 4px;
    padding: 0 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85em;
}

/* --------------------------------------------------------------- hero */

.offer-hero {
    margin-top: 40px;
}

.offer-hero-label,
.offer-label {
    font-size: 14px;
    letter-spacing: 0.08em;
}

.offer-hero h1 {
    font-size: 36px;
    line-height: 105%;
    margin-top: 10px;
    max-width: 20ch;
}

.offer-hero-subtitle {
    font-size: 22px;
    line-height: 120%;
    margin-top: 12px;
}

.offer-hero-text {
    font-size: 17px;
    line-height: 155%;
    margin-top: 18px;
    max-width: 62ch;
}

.offer-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 24px;
    margin-top: 28px;
}

.offer-button {
    display: inline-block;
    padding: 16px 36px;
    border-radius: 100px;
    background-color: var(--offer-blue);
    color: #FFFFFF;
    font-size: 15px;
    letter-spacing: 0.04em;
    transition: transform .15s ease;
}

.offer-button:hover {
    transform: translateY(-2px);
}

.offer-link {
    color: var(--offer-blue);
    font-size: 15px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ------------------------------------------------------------ card grids */

.offer-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 20px;
}

.offer-card {
    border-radius: 15px;
    padding: 25px;
    background-color: var(--offer-gray-bg);
}

.offer-card h3 {
    font-size: 18px;
    line-height: 120%;
    color: var(--offer-black);
}

.offer-card p {
    font-size: 15px;
    line-height: 150%;
    margin-top: 8px;
    color: var(--offer-gray-text);
}

.offer-card .offer-week {
    font-size: 13px;
    letter-spacing: 0.08em;
    color: var(--offer-blue);
    margin-bottom: 6px;
}

/* ---------------------------------------------------------------- timeline */

.offer-timeline .offer-card {
    position: relative;
    border-block-start: 4px solid var(--offer-blue);
}

/* --------------------------------------------------------------- checklist */

.offer-checklist {
    margin-top: 20px;
    max-width: 75ch;
}

.offer-checklist li {
    position: relative;
    font-size: 16px;
    line-height: 150%;
    padding-inline-start: 30px;
    margin-top: 12px;
    color: var(--offer-gray-text);
}

.offer-checklist li::before {
    content: "";
    position: absolute;
    inset-inline-start: 2px;
    top: 5px;
    width: 14px;
    height: 8px;
    border-inline-start: 2px solid var(--offer-blue);
    border-block-end: 2px solid var(--offer-blue);
    transform: rotate(-45deg);
}

[dir="rtl"] .offer-checklist li::before {
    transform: rotate(45deg) scaleX(-1);
}

/* ------------------------------------------------------------------ price */

.offer-price {
    border-radius: 20px;
    padding: 30px 25px;
    background-color: #FFFFFF;
    border: 1px solid var(--offer-line);
    max-width: 640px;
}

.offer-price-amount {
    font-size: 34px;
    line-height: 110%;
    color: var(--offer-blue);
    margin-top: 6px;
}

.offer-price p {
    font-size: 15px;
    line-height: 150%;
    margin-top: 12px;
    color: var(--offer-gray-text);
}

/* ------------------------------------------------------- partners block */

.offer-partners {
    margin-top: 60px;
    border-radius: 20px;
    padding: 35px 25px;
    background-color: var(--offer-blue-light);
}

.offer-partners h2 {
    font-size: 26px;
    line-height: 115%;
    margin-top: 8px;
    max-width: 30ch;
    color: var(--offer-black);
}

.offer-partners > p {
    font-size: 16px;
    line-height: 155%;
    margin-top: 12px;
    max-width: 65ch;
    color: var(--offer-black);
}

.offer-partners .offer-card {
    background-color: #FFFFFF;
}

/* -------------------------------------------------- architecture diagram */

.arch {
    margin-top: 25px;
    border-radius: 20px;
    padding: 20px;
    background-color: #FFFFFF;
}

.arch-flow {
    display: grid;
    grid-template-columns: 1fr;
    gap: 34px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.arch-col {
    position: relative;
}

/* Arrow between columns: downwards when stacked, sideways from 1024px. */
.arch-col + .arch-col::before {
    content: "";
    position: absolute;
    top: -26px;
    inset-inline-start: 50%;
    width: 12px;
    height: 12px;
    margin-inline-start: -6px;
    border-inline-end: 2px solid var(--offer-blue);
    border-block-end: 2px solid var(--offer-blue);
    transform: rotate(45deg);
}

.arch-col-title {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--offer-gray-text);
    margin-bottom: 8px;
}

.arch-node {
    border-radius: 12px;
    padding: 14px 16px;
    background-color: var(--offer-gray-bg);
}

.arch-node + .arch-node {
    margin-top: 8px;
}

.arch-col.is-core .arch-node {
    background-color: var(--offer-blue-light);
}

.arch-col.is-agents .arch-node {
    background-color: var(--offer-blue);
    color: #FFFFFF;
}

.arch-node-name {
    font-size: 15px;
    font-weight: 600;
    line-height: 125%;
}

.arch-node-note {
    font-size: 13px;
    line-height: 140%;
    margin-top: 4px;
    opacity: .8;
}

.arch-caption {
    font-size: 13px;
    line-height: 145%;
    margin-top: 16px;
    color: var(--offer-gray-text);
}

/* ------------------------------------------------------------ breakpoints */

@media (min-width: 640px) {
    .offer-hero h1 { font-size: 52px; }
    .offer-cards { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .offer-partners { padding: 50px 40px; }
    .offer-partners h2 { font-size: 32px; }
    .offer-price { padding: 40px; }
}

@media (min-width: 1024px) {
    .offer-hero { margin-top: 60px; }
    .offer-hero h1 { font-size: 64px; }
    .offer-hero-subtitle { font-size: 28px; }
    .offer-timeline.offer-cards { grid-template-columns: repeat(4, 1fr); }
    .offer-cards.is-three { grid-template-columns: repeat(3, 1fr); }

    .arch { padding: 30px; }
    .arch-flow { grid-template-columns: repeat(4, 1fr); gap: 36px; }
    .arch-col + .arch-col::before {
        top: 50%;
        inset-inline-start: -24px;
        margin-inline-start: 0;
        transform: rotate(-45deg);
    }
    [dir="rtl"] .arch-col + .arch-col::before { transform: rotate(135deg); }
}

@media (min-width: 1280px) {
    .offer-hero h1 { font-size: 76px; }
    .offer-partners { padding: 60px 50px; }
}

/* ------------------------------------- RTL fixes for reused cases.css rules */

[dir="rtl"] .case-impact li {
    padding-left: 0;
    padding-right: 22px;
}

[dir="rtl"] .case-impact li::before {
    left: auto;
    right: 0;
}

/* ------------------------------------------------------------------- faq */
/* The accordion reuses the audit page's .audit-faq-* rules (Preline overflow fix
   included), which read --audit-* variables that only .audit-page defines. */

.offer-page {
    --audit-line: var(--offer-line);
    --audit-blue: var(--offer-blue);
}

.offer-faq .audit-faq-list {
    margin-top: 24px;
}

.offer-faq .audit-faq-question {
    padding: 22px 0;
    font-size: 18px;
    line-height: 1.35;
    text-align: start;
    color: var(--offer-black);
    transition: color 0.15s ease;
}

.offer-faq .audit-faq-question:hover,
.offer-faq .audit-faq-item.active .audit-faq-question {
    color: var(--offer-blue);
}

.offer-faq .audit-faq-question:focus-visible {
    outline: 2px solid var(--offer-blue);
    outline-offset: 4px;
    border-radius: 4px;
}

.offer-faq .audit-faq-sign {
    margin-inline-end: 6px;
}

.offer-faq .audit-faq-answer p {
    margin-top: 0;
    padding-bottom: 24px;
    max-width: 70ch;
    color: var(--offer-gray-text);
}

@media (max-width: 639px) {
    .offer-faq .audit-faq-question { padding: 18px 0; font-size: 16px; }
}

.offer-price .offer-price-note {
    margin-top: 10px;
    font-size: 13px;
    color: var(--offer-gray-text);
}

/* ---------------------------------------------------------- /services/ */

.services-page .offer-hero h1 { max-width: 24ch; }

.service-offers {
    margin-top: 20px;
    border-block-start: 1px solid var(--offer-line);
}

.service-offer {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 16px;
    padding: 26px 0;
    border-block-end: 1px solid var(--offer-line);
}

.service-offer.is-lead {
    margin-block: 14px;
    padding: 26px 22px;
    border-radius: 15px;
    border: 0;
    background-color: var(--offer-blue);
    color: #FFFFFF;
}

.service-offer-number {
    font-size: 26px;
    line-height: 100%;
    color: var(--offer-blue);
}

.service-offer.is-lead .service-offer-number { color: var(--offer-blue-light); }

.service-offer h3 {
    font-size: 22px;
    line-height: 120%;
}

.service-offer-price {
    font-size: 16px;
    margin-top: 6px;
    color: var(--offer-blue-light);
}

.service-offer p {
    font-size: 15px;
    line-height: 155%;
    margin-top: 10px;
    max-width: 70ch;
    color: var(--offer-gray-text);
}

.service-offer.is-lead p { color: #FFFFFF; opacity: .9; }

.service-offer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin-top: 16px;
    font-size: 14px;
}

.service-offer.is-lead .offer-button {
    background-color: #FFFFFF;
    color: var(--offer-blue);
}


.services-page .audit-checklist-cta { margin-top: 60px; }

@media (min-width: 1024px) {
    .service-offer { grid-template-columns: 80px 1fr; padding: 34px 0; }
    .service-offer.is-lead { padding: 34px 30px; }
    .service-offer-number { font-size: 36px; }
    .service-offer h3 { font-size: 28px; }
}

/* ------------------------------------- /services/: dark lead offer (as the home hero) */

.service-offer.is-lead {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: 22px;
    padding: 30px 26px;
    background-color: #0f1020;
    color: #FFFFFF;
}
.service-offer.is-lead::before {
    content: "";
    position: absolute;
    inset: -30%;
    z-index: -1;
    filter: blur(30px);
    background:
        radial-gradient(40% 45% at 92% 0%, rgba(99,117,228,.65), transparent 70%),
        radial-gradient(35% 45% at 0% 100%, rgba(60,170,220,.22), transparent 70%);
    animation: case-cta-drift 18s ease-in-out infinite alternate;
}
.service-offer.is-lead .service-offer-number,
.service-offer.is-lead .service-offer-price { color: #AAB4FF; }
.service-offer.is-lead p { color: rgba(255,255,255,.7); opacity: 1; }
.service-offer.is-lead .offer-button { color: #111216; }
@media (prefers-reduced-motion: reduce) { .service-offer.is-lead::before { animation: none; } }
