/* Service pages — tile layout matching the /resources design language.
   Builds on style.css (tokens, nav, footer, FAQ), case-study.css (hero-v2)
   and resource-cards.css (proof and essay cards).
   Mobile-first: base styles target phones, then 768px and 992px. */

.sv2 {
    --sv2-border: #e9ecef;
    --sv2-serif: 'Source Serif 4', Georgia, serif;
}

.sv2 section[id] {
    scroll-margin-top: 90px;
}

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

.sv2-section.offwhite {
    background: var(--offwhite);
}

.sv2-section-header {
    margin-bottom: 32px;
}

/* Section titles use the full width; wrap only when they genuinely don't fit. */
.sv2-section-header h2 {
    text-wrap: pretty;
}

.sv2-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 10px;
}

.sv2-section-header h2 {
    font-family: var(--sv2-serif);
    font-size: clamp(1.6rem, 3.2vw, 2.2rem);
    letter-spacing: -0.01em;
    margin-bottom: 10px;
}

.sv2-section-header p {
    font-size: 1.05rem;
    color: var(--text-color);
    margin-bottom: 0;
}

/* ---------- Hero additions (on top of .hero-v2) ---------- */
.sv2 .hero-v2 .hero-tagline {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.15rem;
    line-height: 1.6;
    max-width: none;
    margin: 0 0 22px;
}

/* ---------- Hero: full-width title row, then chips/CTA beside the image ---------- */
.sv2-hero-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: center;
}

.sv2-hero-image {
    display: block;
    width: 100%;
    max-width: 560px;
    height: auto;
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.sv2-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.sv2-hero-chips li {
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 999px;
}

.sv2-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.sv2-hero-link {
    color: var(--white);
    font-weight: 600;
    border-bottom: 2px solid var(--brand-green);
}

.sv2-hero-link:hover {
    color: var(--brand-green);
}

/* ---------- At a glance (overlaps the hero) ---------- */
.sv2-glance {
    position: relative;
    z-index: 3;
    margin-top: -36px;
}

.sv2-glance-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.sv2-glance-tile {
    background: var(--white);
    border: 1px solid var(--sv2-border);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    padding: 18px 20px;
}

.sv2-glance-tile span {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 6px;
}

.sv2-glance-tile strong {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
}

/* ---------- Generic tile grid ---------- */
.sv2-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.sv2-tile {
    background: var(--white);
    border: 1px solid var(--sv2-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: var(--transition);
}

.sv2-tile:hover {
    border-color: var(--brand-green);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.sv2-tile h3 {
    font-family: var(--sv2-serif);
    font-size: 1.2rem;
    line-height: 1.3;
    margin-bottom: 8px;
}

.sv2-tile p {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.sv2-tile-number {
    font-family: var(--sv2-serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--brand-green-hover);
    line-height: 1;
    margin-bottom: 14px;
}

.sv2-tile-pill {
    align-self: flex-start;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--brand-blue);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 14px;
}

/* ---------- Phases ---------- */
.sv2-phase {
    border-top: 5px solid var(--brand-yellow);
}

.sv2-phase:nth-child(2) { border-top-color: var(--brand-green); }
.sv2-phase:nth-child(3) { border-top-color: var(--brand-blue); }
.sv2-phase:nth-child(4) { border-top-color: var(--accent-color); }

.sv2-phase-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 8px;
}

.sv2-phase p {
    margin-bottom: 16px;
}

.sv2-output {
    margin-top: auto;
    background: var(--offwhite);
    border-left: 4px solid var(--brand-yellow);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.9rem;
    color: var(--text-color);
}

.sv2-output strong {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.sv2-more-link {
    margin: 24px 0 0;
}

.sv2-more-link a {
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--brand-yellow);
}

/* ---------- FAQ: reuse style.css accordion, left-aligned ---------- */
.sv2 .faq-list {
    margin-left: 0;
}

/* case-study.css strips the side padding; restore a proper card cushion. */
.sv2 .faq-item {
    padding: 22px 28px;
}

.sv2 .faq-question {
    display: block;
    padding-right: 40px;
    line-height: 1.45;
}

.sv2 .faq-question::after {
    top: 50%;
    transform: translateY(-50%);
}

.sv2 .faq-item[open] .faq-question {
    margin-bottom: 12px;
}

/* ---------- "Sound familiar?" filler tile ---------- */
.sv2-tile-ask {
    background: var(--offwhite);
    border-style: dashed;
    border-color: #cfd4d8;
    justify-content: center;
}

/* Number + "For:" label, tying each outcome to its situation. */
.sv2-tile-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 14px;
}

.sv2-tile-head .sv2-tile-number {
    margin-bottom: 0;
}

.sv2-tile .sv2-tile-for {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-light);
}

/* ---------- Hero lede (longer intro under the tagline) ---------- */
.sv2-hero-lede {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 58ch;
    margin: 0 0 20px;
}

/* ---------- Pairs well with ---------- */
.sv2-tile-ask .sv2-tile-cta,
.sv2-pair .sv2-tile-cta {
    margin-top: 16px;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--brand-yellow);
    align-self: flex-start;
}

/* ---------- Tablet ---------- */
@media (min-width: 768px) {

    .sv2-section {
        padding: 80px 0;
    }

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

/* ---------- Desktop ---------- */
@media (min-width: 992px) {
    /* Title and tagline use the full width and never wrap on desktop. */
    .sv2 .hero-v2 h1,
    .sv2 .hero-v2 .hero-tagline {
        white-space: nowrap;
    }

    .sv2 .hero-v2 h1 {
        font-size: clamp(2rem, 3.4vw, 2.7rem);
    }

    .sv2 .hero-v2 .hero-tagline {
        font-size: clamp(1rem, 1.45vw, 1.15rem);
    }

    .sv2-hero-split {
        grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
        gap: 48px;
    }

    .sv2-hero-image {
        justify-self: end;
    }

    /* Thirds layout: title, copy and CTA in the left 2/3, image centred in the right 1/3. */
    .sv2-hero-split--thirds {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    }

    .sv2-hero-split--thirds .sv2-hero-image {
        justify-self: center;
        max-width: 330px;
    }

    /* Title and tagline wrap inside the 2/3 column rather than overflow it. */
    .sv2 .hero-v2 .sv2-hero-split--thirds h1,
    .sv2 .hero-v2 .sv2-hero-split--thirds .hero-tagline {
        white-space: normal;
        text-wrap: balance;
    }
    .sv2-glance-grid,
    .sv2-grid.cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .sv2-grid.cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* ---------- AI Productivity hero: teamctx terminal in the right third ---------- */
.sv2-hero-split--thirds .hv2-terminal {
    justify-self: center;
    max-width: 380px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.sv2-hero-link--ext {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
