/* ==========================================================================
   Private AI page (solutions/private-ai.html)
   Built on site.css; only what is unique to this page lives here.
   Section paging and the scroll cue are driven by private-ai.js.
   (The previous design's stylesheet, custom-ai.css, is kept but unused.)
   ========================================================================== */

/* ---- Content pieces ------------------------------------------------------- */

.private-ai .pai-heading {
    max-width: 24ch;
    margin-bottom: var(--spacing-10);
}

.private-ai .pai-lead {
    margin-top: calc(var(--spacing-10) * -0.4);
    margin-bottom: var(--spacing-10);
}

/* Two-column ruled list (constraints, audience) */
.pai-cols {
    columns: 2;
    column-gap: var(--spacing-12);
}

.pai-cols li {
    break-inside: avoid;
}

/* Five items split 3 + 2: close off the first column too */
.pai-cols li:nth-child(3) {
    border-bottom: 1px solid var(--border-color);
}

/* Closing line under a list - same treatment as the homepage */
.pai-closing {
    margin: var(--spacing-10) 0 0;
    padding-top: var(--spacing-8);
    border-top: 1px solid var(--border-color);
    font-size: var(--font-size-lg);
    line-height: 1.6;
    color: rgba(var(--ink), 0.6);
}

.pai-closing-strong {
    display: block;
    margin-top: var(--spacing-2);
    color: rgb(var(--ink));
}

/* Numbered steps */
.pai-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: pai-step;
}

.pai-steps li {
    counter-increment: pai-step;
    display: grid;
    grid-template-columns: 3rem 1fr;
    align-items: baseline;
    padding: var(--spacing-4) 0;
    border-top: 1px solid var(--border-color);
    font-size: var(--font-size-lg);
    line-height: 1.5;
    color: rgba(var(--ink), 0.8);
}

.pai-steps li:last-child {
    border-bottom: 1px solid var(--border-color);
}

.pai-steps li::before {
    content: counter(pai-step, decimal-leading-zero);
    font-size: var(--font-size-sm);
    color: rgba(var(--ink), 0.4);
    font-variant-numeric: tabular-nums;
}

.pai-note {
    margin: var(--spacing-6) 0 0;
    font-size: var(--font-size-base);
    color: rgba(var(--ink), 0.55);
}

/* Engagement phases */
.pai-phase {
    padding-top: var(--spacing-6);
    border-top: 1px solid var(--border-color);
}

.pai-phase-num {
    font-size: var(--font-size-sm);
    color: rgba(var(--ink), 0.4);
    font-variant-numeric: tabular-nums;
    margin-bottom: var(--spacing-4);
}

.pai-phase .item-title {
    font-size: var(--font-size-xl);
}

/* Typical engagements - large rows, like "What we're building" */
.pai-rows {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pai-rows li {
    padding: var(--spacing-5) 0;
    border-top: 1px solid var(--border-color);
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.4;
    color: rgba(var(--ink), 0.8);
}

.pai-rows li:last-child {
    border-bottom: 1px solid var(--border-color);
}

/* Small label above each column */
.pai-col-label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: rgba(var(--ink), 0.45);
    margin-bottom: var(--spacing-4);
}

@media (max-width: 700px) {
    .pai-cols {
        columns: 1;
    }

    .pai-cols li:nth-child(3) {
        border-bottom: 0;
    }
}

/* ---- Subtle scroll reveal (private-ai.js adds .is-visible) ---------------- */

.custom-ai-reveal-item {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.custom-ai-reveal-item.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .custom-ai-reveal-item {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==========================================================================
   Section-by-section scrolling (desktop only - phones scroll normally).
   Each section fills one screen with its content centred vertically;
   spacing scales with the screen height so content fits. A section that
   still can't fit grows taller and private-ai.js scrolls through it.
   The last stop shows the closing section and the footer together:
   private-ai.js sets --custom-ai-footer-h.
   ========================================================================== */
@media (min-width: 769px) {
    html {
        scroll-snap-type: y mandatory;
    }

    html.custom-ai-paged {
        scroll-snap-type: none;
        scroll-behavior: auto;
    }

    .private-ai > section {
        scroll-snap-align: start;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding-top: max(96px, 12vh);
        padding-bottom: max(48px, 7vh);
        border-top: 0;
    }

    .private-ai > section > .container {
        width: 100%;
    }

    .private-ai > section.pai-cta {
        min-height: calc(100vh - var(--custom-ai-footer-h, 0px));
        padding-top: max(88px, 10vh);
        padding-bottom: max(32px, 5vh);
    }

    #footer-placeholder {
        scroll-snap-align: end;
    }

    /* Height-aware spacing */
    .private-ai .section-label {
        margin-bottom: clamp(1rem, 3.5vh, 3rem);
    }

    .private-ai .pai-heading {
        margin-bottom: clamp(1.25rem, 4.5vh, 2.5rem);
    }

    .private-ai .pai-lead {
        margin-top: 0;
        margin-bottom: clamp(1.25rem, 4.5vh, 2.5rem);
    }

    .pai-steps li,
    .private-ai .rule-list li {
        padding: clamp(0.55rem, 1.8vh, 1rem) 0;
    }

    .pai-rows li {
        padding: clamp(0.75rem, 2.4vh, 1.25rem) 0;
    }

    .pai-closing {
        margin-top: clamp(1.5rem, 5vh, 2.5rem);
        padding-top: clamp(1rem, 3.5vh, 2rem);
    }
}

/* Shorter laptop screens: step the type down a little */
@media (min-width: 769px) and (max-height: 760px) {
    .private-ai .section-heading {
        font-size: clamp(1.5rem, 4.6vh, 2.1rem);
    }

    .private-ai .page-title {
        font-size: clamp(2rem, 7vh, 3rem);
    }

    .private-ai .lead,
    .pai-steps li,
    .pai-closing {
        font-size: var(--font-size-base);
    }

    .pai-rows li {
        font-size: var(--font-size-lg);
    }
}

@media (min-width: 769px) and (max-height: 680px) {
    .private-ai > section {
        padding-top: 84px;
        padding-bottom: 24px;
    }

    .private-ai > section.pai-cta {
        padding-top: 76px;
        padding-bottom: 16px;
    }
}

/* Footer shares the last screen with the closing section - slim it so
   both fit on shorter laptop screens */
@media (min-width: 769px) and (max-height: 800px) {
    .cosmos-footer {
        padding-top: 1.75rem;
    }

    .footer-statement {
        margin-bottom: 1.25rem;
        font-size: var(--font-size-lg);
    }

    .footer-column li {
        margin-bottom: 0.1rem;
    }

    .footer-bottom {
        margin-top: 1rem;
        padding: 0.9rem 0;
    }
}

/* ---- "Scroll" cue: bottom centre, desktop paging only --------------------- */

.custom-ai-scroll-cue {
    display: none;
}

html.custom-ai-paged .custom-ai-scroll-cue {
    position: fixed;
    left: 50%;
    bottom: clamp(12px, 2.5vh, 24px);
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: none;
    border: none;
    color: rgba(var(--ink), 0.45);
    font-family: inherit;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.4s ease, color var(--transition-fast);
}

html.custom-ai-paged .custom-ai-scroll-cue:hover,
html.custom-ai-paged .custom-ai-scroll-cue:focus-visible {
    color: rgba(var(--ink), 0.85);
}

html.custom-ai-paged .custom-ai-scroll-cue:focus-visible {
    outline: 1px solid rgba(var(--ink), 0.4);
    outline-offset: 2px;
    border-radius: 6px;
}

html.custom-ai-paged .custom-ai-scroll-cue.is-moving,
html.custom-ai-paged .custom-ai-scroll-cue.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.custom-ai-scroll-cue-mouse {
    position: relative;
    width: 20px;
    height: 30px;
    border: 1.5px solid currentColor;
    border-radius: 10px;
}

.custom-ai-scroll-cue-wheel {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 3px;
    height: 6px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: currentColor;
    animation: paiScrollCueWheel 1.8s ease-in-out infinite;
}

@keyframes paiScrollCueWheel {
    0% { transform: translateY(0); opacity: 0; }
    20% { opacity: 1; }
    70% { transform: translateY(9px); opacity: 0; }
    100% { transform: translateY(9px); opacity: 0; }
}

.custom-ai-scroll-cue-label {
    font-size: var(--font-size-xs);
    font-weight: 400;
    letter-spacing: 0.04em;
}

@media (max-height: 680px) {
    html.custom-ai-paged .custom-ai-scroll-cue {
        gap: 4px;
    }

    .custom-ai-scroll-cue-mouse {
        width: 16px;
        height: 24px;
    }

    .custom-ai-scroll-cue-label {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .custom-ai-scroll-cue-wheel {
        animation: none;
        opacity: 1;
    }
}
