/**
 * Audit Process page — editorial system (audit-process.html only)
 * Matches portfolio proof band + ledger aesthetic
 */

.page-audit-process {
    --ap-pad: clamp(4rem, 8vw, 6.5rem);
    --ap-border: rgba(255, 255, 255, 0.09);
    --ap-border-soft: rgba(255, 255, 255, 0.05);
    --ap-muted: rgba(255, 255, 255, 0.55);
}

.page-audit-process .container {
    max-width: 1180px;
    padding-left: clamp(1.25rem, 4vw, 2rem);
    padding-right: clamp(1.25rem, 4vw, 2rem);
}

/* ── Intro band ── */

.page-audit-process .process-intro {
    padding: calc(112px + env(safe-area-inset-top, 0px)) 0 clamp(2.5rem, 5vw, 3.5rem);
    background:
        radial-gradient(ellipse 85% 50% at 20% 0%, rgba(239, 35, 35, 0.07) 0%, transparent 55%),
        #000;
    border-bottom: 1px solid var(--ap-border-soft);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.page-audit-process .process-intro::before {
    content: 'SUITE';
    position: absolute;
    top: calc(88px + env(safe-area-inset-top, 0px));
    right: clamp(0.5rem, 3vw, 2rem);
    font-family: var(--font-display);
    font-size: clamp(4.5rem, 13vw, 9rem);
    font-weight: 500;
    line-height: 0.85;
    letter-spacing: -0.06em;
    color: rgba(239, 35, 35, 0.045);
    pointer-events: none;
    user-select: none;
}

.page-audit-process .process-intro::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, transparent 70%);
    pointer-events: none;
}

.page-audit-process .process-intro .container {
    position: relative;
    z-index: 1;
}

.page-audit-process .process-intro-header {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(280px, 1.05fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: end;
    margin-bottom: clamp(2rem, 3.5vw, 2.75rem);
}

.page-audit-process .process-intro-main {
    padding-left: 1.35rem;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.page-audit-process .process-intro-main::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 0.15rem;
    width: 2px;
    height: 2.25rem;
    background: var(--brand-red);
}

.page-audit-process .process-label {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brand-red);
    margin-bottom: 1.25rem;
}

.page-audit-process .process-label::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--brand-red);
    flex-shrink: 0;
}

.page-audit-process .process-title {
    font-family: var(--font-display) !important;
    font-size: clamp(2rem, 4.5vw, 3.25rem) !important;
    font-weight: var(--heading-weight) !important;
    letter-spacing: -0.045em !important;
    line-height: 1.05 !important;
    margin: 0 !important;
    text-align: left;
    max-width: 14ch;
}

.page-audit-process .process-subtitle {
    margin: 0;
    padding: clamp(1.35rem, 2.5vw, 1.75rem) clamp(1.35rem, 2.5vw, 1.85rem);
    border: 1px solid var(--ap-border);
    border-left: 2px solid rgba(239, 35, 35, 0.55);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    position: relative;
}

.page-audit-process .process-subtitle::before {
    content: '\201C';
    position: absolute;
    top: -0.15rem;
    left: 0.85rem;
    font-family: var(--font-display);
    font-size: 3.25rem;
    line-height: 1;
    color: rgba(239, 35, 35, 0.22);
    pointer-events: none;
}

.page-audit-process .process-subtitle p {
    font-family: var(--font-body);
    font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);
    line-height: 1.72;
    color: rgba(255, 255, 255, 0.72);
    margin: 0;
    max-width: 48ch;
    position: relative;
    z-index: 1;
}

/* Step map rail */

.page-audit-process .process-map {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border: 1px solid var(--ap-border);
    position: relative;
}

.page-audit-process .process-map::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(239, 35, 35, 0.55) 50%, transparent);
    pointer-events: none;
}

.page-audit-process .process-map-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: clamp(0.85rem, 1.5vw, 1.1rem) clamp(0.65rem, 1.2vw, 0.85rem);
    text-decoration: none;
    color: inherit;
    border-right: 1px solid var(--ap-border-soft);
    transition: background 0.3s ease;
    min-height: 4.5rem;
}

.page-audit-process .process-map-cell:last-child {
    border-right: none;
}

.page-audit-process .process-map-cell:hover,
.page-audit-process .process-map-cell:focus-visible {
    background: rgba(239, 35, 35, 0.06);
    outline: none;
}

.page-audit-process .process-map-index {
    font-family: var(--font-display);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: rgba(239, 35, 35, 0.55);
    line-height: 1;
}

.page-audit-process .process-map-label {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.78);
}

/* ── Process ledger (timeline) ── */

.page-audit-process .audit-timeline-section {
    padding: var(--ap-pad) 0;
    background: #050505;
    position: relative;
    z-index: 1;
}

.page-audit-process .audit-timeline-section .container {
    position: relative;
}

.page-audit-process .audit-timeline-section .container::before {
    content: '01';
    position: absolute;
    top: -0.35rem;
    right: 0;
    font-family: var(--font-display);
    font-size: clamp(4rem, 8vw, 6rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.06em;
    color: rgba(239, 35, 35, 0.07);
    pointer-events: none;
    user-select: none;
}

.page-audit-process .audit-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: none;
    border-top: 1px solid var(--ap-border);
    border-bottom: 1px solid var(--ap-border);
}

.page-audit-process .audit-tl-item {
    position: relative;
    border-bottom: 1px solid var(--ap-border-soft);
    scroll-margin-top: calc(96px + env(safe-area-inset-top, 0px));
}

.page-audit-process .audit-tl-item:last-child {
    border-bottom: none;
}

.page-audit-process .audit-tl-card {
    display: grid;
    grid-template-columns: 3.75rem minmax(0, 1fr) minmax(220px, 280px);
    grid-template-areas: "badge main outcomes";
    column-gap: clamp(1rem, 2vw, 1.75rem);
    align-items: start;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: clamp(1.25rem, 2.2vw, 1.65rem) clamp(1.15rem, 2vw, 1.5rem) clamp(1.25rem, 2.2vw, 1.65rem) 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    transition: background 0.35s ease;
}

.page-audit-process .audit-tl-card::before {
    display: none !important;
}

.page-audit-process .audit-tl-item:hover .audit-tl-card {
    background: linear-gradient(90deg, rgba(239, 35, 35, 0.04) 0%, transparent 70%) !important;
}

.page-audit-process .audit-tl-badge {
    grid-area: badge;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 500;
    letter-spacing: -0.04em;
    color: rgba(239, 35, 35, 0.5);
    margin: 0;
    padding-left: clamp(1.15rem, 2vw, 1.5rem);
    line-height: 1.2;
}

.page-audit-process .audit-tl-main {
    grid-area: main;
    min-width: 0;
}

.page-audit-process .audit-tl-card--featured {
    background: linear-gradient(90deg, rgba(255, 122, 26, 0.05) 0%, transparent 55%) !important;
}

.page-audit-process .audit-tl-item:has(.audit-tl-card--featured) {
    border-left: 2px solid rgba(255, 122, 26, 0.55);
}

.page-audit-process .audit-tl-item:has(.audit-tl-card--featured):hover .audit-tl-card {
    background: linear-gradient(90deg, rgba(255, 122, 26, 0.08) 0%, transparent 65%) !important;
}

.page-audit-process .audit-tl-title {
    font-family: var(--font-display) !important;
    font-size: clamp(1.125rem, 1.9vw, 1.35rem) !important;
    font-weight: var(--heading-weight) !important;
    letter-spacing: -0.025em !important;
    color: var(--text-primary) !important;
    margin: 0 0 0.4rem !important;
    line-height: 1.25 !important;
}

.page-audit-process .audit-tl-tag {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 0;
    padding: 0.2rem 0.45rem;
    font-family: var(--font-body);
    vertical-align: middle;
    margin-left: 0.35rem;
}

.page-audit-process .audit-tl-lede {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--ap-muted);
    margin: 0;
    max-width: 42ch;
}

.page-audit-process .audit-tl-bullets {
    grid-area: outcomes;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0;
    padding: 0.7rem 0 0.7rem 0.85rem;
    list-style: none;
    border-left: 1px solid var(--ap-border-soft);
    align-self: stretch;
}

.page-audit-process .audit-tl-bullets li {
    position: relative;
    font-family: var(--font-body);
    font-size: 0.875rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.68);
    padding-left: 0.75rem;
}

.page-audit-process .audit-tl-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 3px;
    height: 3px;
    background: var(--brand-red);
    opacity: 0.7;
}

.page-audit-process .audit-tl-branches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.65rem;
}

.page-audit-process .audit-tl-branch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--ap-border-soft);
    padding: 0.3rem 0.55rem;
}

.page-audit-process .audit-tl-branch i {
    color: var(--brand-red);
    font-size: 0.625rem;
}

/* ── CTA ── */

.page-audit-process .cta-section {
    padding: var(--ap-pad) 0;
    background: #000;
    border-top: 1px solid var(--ap-border-soft);
}

.page-audit-process .cta-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 1180px;
}

.page-audit-process .cta-content > h2 {
    display: none;
}

.page-audit-process .cta-text {
    align-items: flex-start;
    gap: 1.25rem;
    max-width: 520px;
    padding-left: 1.35rem;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.page-audit-process .cta-text::before {
    content: '';
    position: absolute;
    left: -1px;
    top: 0.15rem;
    width: 2px;
    height: 2.25rem;
    background: var(--brand-red);
}

.page-audit-process .cta-heading {
    font-family: var(--font-display) !important;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem) !important;
    font-weight: var(--heading-weight) !important;
    letter-spacing: -0.04em !important;
    line-height: 1.08 !important;
    text-align: left;
    margin: 0 !important;
}

.page-audit-process .cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.page-audit-process .cta-buttons .btn-primary,
.page-audit-process .cta-buttons .audit-trigger {
    background: var(--brand-red) !important;
    border: 1px solid var(--brand-red) !important;
    border-radius: 0 !important;
    color: #fff !important;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.72rem 1.35rem;
    box-shadow: none !important;
}

.page-audit-process .cta-buttons .btn-primary:hover,
.page-audit-process .cta-buttons .audit-trigger:hover {
    background: var(--brand-red-light, #ff5050) !important;
    border-color: var(--brand-red-light, #ff5050) !important;
    transform: none !important;
}

.page-audit-process .cta-buttons .btn-secondary {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 0 !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.9375rem;
    padding: 0.72rem 1.35rem;
}

.page-audit-process .cta-buttons .btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

.page-audit-process .cta-tagline {
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    text-align: left;
    margin: 0;
}

/* ── Responsive ── */

@media (max-width: 1024px) {
    .page-audit-process .process-intro-header {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        align-items: start;
    }

    .page-audit-process .process-subtitle p {
        max-width: none;
    }

    .page-audit-process .process-map {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .page-audit-process .process-map-cell:nth-child(4) {
        border-right: none;
    }

    .page-audit-process .process-map-cell:nth-child(1),
    .page-audit-process .process-map-cell:nth-child(2),
    .page-audit-process .process-map-cell:nth-child(3),
    .page-audit-process .process-map-cell:nth-child(4) {
        border-bottom: 1px solid var(--ap-border-soft);
    }
}

@media (max-width: 900px) {
    .page-audit-process .audit-tl-card {
        grid-template-columns: 3rem 1fr;
        grid-template-areas:
            "badge main"
            "outcomes outcomes";
        row-gap: 0.65rem;
    }

    .page-audit-process .audit-tl-bullets {
        margin-left: clamp(1.15rem, 2vw, 1.5rem);
        padding-left: 0.85rem;
        border-left: none;
        border-top: 1px solid var(--ap-border-soft);
        padding-top: 0.75rem;
    }
}

@media (max-width: 768px) {
    .page-audit-process .process-intro {
        padding-top: calc(100px + env(safe-area-inset-top, 0px));
    }

    .page-audit-process .process-intro-main {
        padding-left: 1rem;
    }

    .page-audit-process .process-map {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-audit-process .process-map-cell {
        border-right: 1px solid var(--ap-border-soft);
        border-bottom: 1px solid var(--ap-border-soft);
    }

    .page-audit-process .process-map-cell:nth-child(2n) {
        border-right: none;
    }

    .page-audit-process .process-map-cell:nth-last-child(-n+2) {
        border-bottom: none;
    }

    .page-audit-process .audit-tl-badge {
        padding-left: 1rem;
        font-size: 1rem;
    }

    .page-audit-process .audit-timeline-section .container::before {
        font-size: clamp(2.5rem, 11vw, 3.5rem);
    }
}

@media (max-width: 480px) {
    .page-audit-process .process-title {
        font-size: clamp(1.65rem, 7vw, 2rem) !important;
        max-width: none;
    }

    .page-audit-process .process-map {
        grid-template-columns: 1fr;
    }

    .page-audit-process .process-map-cell {
        border-right: none !important;
        min-height: 0;
    }

    .page-audit-process .process-map-cell:not(:last-child) {
        border-bottom: 1px solid var(--ap-border-soft) !important;
    }
}
