/*
 * The service page template since the pivot of 2026-11-24, shared by AI Automations, Website Services and
 * Software Engineering: the hero, the promise, the depth cards, the steps, the principles or the rate block,
 * AI Automations' purpose, security lines and proposal card, the use-case selector, the Website Services
 * package and add-ons, AI Automations' invitations, and the next step. Each page sets its
 * service's hue (data-service), and every accent on the page reads from it.
 * Spec: Design/pivot-2026-11-24/DESIGN.md, sections 8, 9 and 10.
 */

/* ---------- Every section ---------- */

.service-section {
    position: relative;
    padding: var(--section-padding) 0;
}

.service-section-heading {
    display: grid;
    gap: var(--space-4);
    align-content: start;
}

.service-section-title {
    font-size: var(--text-heading-2);
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.service-section-intro {
    max-width: var(--measure);
    color: var(--color-text-muted);
}

/* ---------- Hero: the same split as the home sections, so a visitor from home recognises the scene ---------- */

.service-hero {
    display: grid;
    align-items: center;
    min-height: 88vh;
    min-height: 88svh;
    padding-top: calc(var(--header-height) + var(--space-7));
    padding-bottom: var(--space-9);
    overflow: hidden;
    isolation: isolate;
}

.service-hero-inner {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-6);
    align-items: center;
}

.service-hero-copy {
    position: relative;
    z-index: 1;
    grid-column: 1 / span 5;
    grid-row: 1;
    display: grid;
    gap: var(--space-5);
    align-content: start;
}

.service-hero .service-visual {
    grid-column: 6 / span 7;
    grid-row: 1;
}

.service-hero-title {
    font-size: var(--text-heading-1);
    line-height: 1;
    letter-spacing: -0.03em;
}

.service-hero-lead {
    max-width: 34em;
    color: var(--color-text-muted);
    font-size: var(--text-lead);
    line-height: 1.55;
}

.service-hero-support {
    max-width: 34em;
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-line);
    color: var(--color-text-muted);
}

.service-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3) var(--space-5);
    margin-top: var(--space-3);
}

.service-note {
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: var(--text-label);
    letter-spacing: 0.02em;
}

/* Phone: the visual becomes a band under the header, then the copy, with the note under the button */
@media (max-width: 1023px) {
    .service-hero {
        min-height: 0;
        padding-top: var(--header-height);
        padding-bottom: var(--section-padding);
    }

    .service-hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-hero-copy {
        grid-column: 1;
        grid-row: 2;
    }

    .service-hero .service-visual {
        grid-column: 1;
        grid-row: 1;
    }
}

@media (max-width: 767px) {
    .service-hero-actions {
        display: grid;
        justify-items: stretch;
    }
}

/* ---------- Promise: one statement, centred, with a ribbon hairline under it ---------- */

.service-promise-inner {
    display: grid;
    justify-items: center;
    gap: var(--space-6);
    text-align: center;
}

.service-promise .service-section-title {
    max-width: 20ch;
}

.service-promise-rule {
    width: 120px;
    height: 1px;
    background: var(--gradient-ribbon);
}

.service-promise-body {
    display: grid;
    gap: var(--space-4);
    max-width: var(--measure);
    color: var(--color-text-muted);
}

/* ---------- Depth: the heading on the left, the cards on the right ---------- */

.service-depth-layout {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-7) var(--space-6);
    align-items: start;
}

.service-depth-layout > .service-section-heading {
    grid-column: 1 / span 4;
}

.service-card-grid {
    grid-column: 5 / span 8;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5);
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-card {
    display: grid;
    gap: var(--space-3);
    align-content: start;
    padding: var(--space-6);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-medium);
    background: var(--color-raised);
    transition: border-color var(--duration-standard) var(--ease-out);
}

/* Cards are not links, so hovering only lightens the edge */
.service-card:hover {
    border-color: var(--color-line-strong);
}

.service-card-index {
    color: var(--service-hue);
    font-family: var(--font-mono);
    font-size: var(--text-label);
    font-weight: 500;
    letter-spacing: 0.1em;
}

.service-card-title {
    font-size: var(--text-heading-3);
    line-height: 1.25;
}

.service-card-body {
    color: var(--color-text-muted);
}

/* AI Automations' purpose: the Owner's words in the lead size, then what is sold, then the range under a hairline */
.service-purpose-body {
    grid-column: 5 / span 8;
    display: grid;
    gap: var(--space-5);
    align-content: start;
    max-width: var(--measure);
    color: var(--color-text-muted);
}

.service-purpose-lead {
    color: var(--color-text);
    font-size: var(--text-lead);
    line-height: 1.55;
}

.service-purpose-range {
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-line);
}

/*
 * Below 1024 px every piece spans the full width, so the layout drops to one column: twelve columns
 * would keep eleven gaps, wider than a 320 px phone, and push the page sideways.
 */
@media (max-width: 1023px) {
    .service-depth-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-depth-layout > .service-section-heading,
    .service-card-grid,
    .service-purpose-body {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .service-card-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-card {
        padding: var(--space-5);
    }
}

/* ---------- How it works: a sticky heading beside steps joined by a rail ---------- */

.service-steps-layout {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-7) var(--space-6);
    align-items: start;
}

.service-steps-layout > .service-section-heading {
    grid-column: 1 / span 4;
    position: sticky;
    top: calc(var(--header-height) + 48px);
}

.service-steps {
    grid-column: 5 / span 8;
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-step {
    position: relative;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: var(--space-2) var(--space-5);
    padding-bottom: var(--space-7);
}

.service-step:last-child {
    padding-bottom: 0;
}

/* The rail joining one circle to the next */
.service-step::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 40px;
    bottom: 0;
    width: 1px;
    background: var(--color-line);
}

.service-step:last-child::before {
    display: none;
}

.service-step-number {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--service-hue);
    border-radius: 50%;
    background: var(--color-ink);
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: var(--text-label);
    font-weight: 500;
}

.service-step-title {
    align-self: center;
    font-size: var(--text-heading-3);
    line-height: 1.25;
}

.service-step-body {
    grid-column: 2;
    max-width: var(--measure);
    color: var(--color-text-muted);
}

/* Below 1024 px the heading sits above the steps and never sticks */
@media (max-width: 1023px) {
    .service-steps-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-steps-layout > .service-section-heading {
        grid-column: 1 / -1;
        position: static;
    }

    .service-steps {
        grid-column: 1 / -1;
    }
}

/* ---------- Principles: a quiet two-by-two grid, each under a hairline ---------- */

.service-principles-layout {
    display: grid;
    gap: var(--space-7);
}

.service-principles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-7) var(--space-6);
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-principle {
    display: grid;
    gap: var(--space-3);
    align-content: start;
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-line);
}

.service-principle-title {
    font-size: var(--text-heading-3);
    line-height: 1.25;
}

.service-principle-body {
    max-width: var(--measure);
    color: var(--color-text-muted);
}

/* Three items sit in one row on a wide screen, so none is left alone on a second row */
.service-principles-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1023px) {
    .service-principles-three {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-6);
    }
}

@media (max-width: 767px) {
    .service-principles {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- AI Automations' security lines: the heading on the left, five numbered lines on the right ---------- */

.service-security-layout {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-7) var(--space-6);
    align-items: start;
}

.service-security-layout > .service-section-heading {
    grid-column: 1 / span 4;
}

.service-security-rules {
    grid-column: 5 / span 8;
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-security-rule {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: var(--space-4);
    align-items: baseline;
    padding: var(--space-5) 0;
    border-top: 1px solid var(--color-line);
}

.service-security-rule:last-child {
    border-bottom: 1px solid var(--color-line);
}

.service-security-rule p {
    max-width: var(--measure);
    color: var(--color-text-muted);
}

/* The scenario diagrams span the section under the five lines, so the wide drawing has the room it needs */
.service-security-figure {
    grid-column: 1 / -1;
}

/*
 * The scenario selector: the legend, a row of four tabs, then one stage. It reuses the use-case tabs and
 * their script; the drawings themselves are styled by data-scenarios.css, the Brand Designer's file.
 */
.data-scenario-selector {
    display: grid;
    gap: var(--space-6);
}

.data-scenario-legend {
    --diagram-text: var(--color-text);
    --diagram-muted: var(--color-text-muted);
    --diagram-hue: var(--service-hue);

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: var(--space-3) var(--space-6);
    margin: 0;
    padding: 0;
    color: var(--color-text-muted);
    font-size: var(--text-small);
    list-style: none;
}

.data-scenario-legend li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
}

.data-scenario-legend-icon,
.data-scenario-legend-swatch {
    flex: none;
    width: 28px;
    height: 28px;
}

.data-scenario-legend-swatch {
    border: 1.5px solid var(--color-line-strong);
    border-radius: 6px;
}

.data-scenario-legend-swatch-client {
    background: var(--color-raised);
}

.data-scenario-legend-swatch-team {
    background: var(--color-surface);
}

.data-scenario-legend .diagram-node-outside {
    stroke-dasharray: 4 3;
}

/* Four tabs in one row, each name centred, with the hue bar along the selected tab's lower edge */
.use-case-tabs.data-scenario-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-3);
}

.use-case-tab.data-scenario-tab {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    align-content: center;
    height: 100%;
    min-height: 72px;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-small);
    text-align: center;
}

.use-case-tab.data-scenario-tab[aria-selected="true"]::after {
    left: 24px;
    right: 24px;
    top: auto;
    bottom: -1px;
    width: auto;
    height: 2px;
}

.data-scenario-panels {
    display: grid;
    gap: var(--space-8);
}

/* Without the script every scenario shows, one after another; with it, they share one cell so the page never changes height */
.data-scenario-selector.is-enhanced .data-scenario-panel {
    grid-area: 1 / 1;
}

.data-scenario-panel {
    display: grid;
    gap: var(--space-5);
    align-content: start;
    min-width: 0;
    transition: opacity var(--duration-standard) var(--ease-out), visibility var(--duration-standard);
}

.data-scenario-panel.is-inactive {
    visibility: hidden;
    opacity: 0;
}

.data-scenario-heading {
    display: flex;
    align-items: baseline;
    gap: var(--space-3);
    font-size: var(--text-heading-3);
    line-height: 1.25;
}

@media (max-width: 767px) {
    .use-case-tabs.data-scenario-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-2);
    }

    .use-case-tab.data-scenario-tab {
        min-height: 64px;
        padding: var(--space-3) var(--space-2);
    }
}

@media (prefers-reduced-motion: reduce) {
    .data-scenario-panel {
        transition: none;
    }
}

@media (max-width: 1023px) {
    .service-security-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-security-layout > .service-section-heading,
    .service-security-rules {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .service-security-rule {
        grid-template-columns: 32px minmax(0, 1fr);
        gap: var(--space-3);
    }
}

/* ---------- Software Engineering's rate block: a raised panel in two columns ---------- */

.service-rate-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-7);
    padding: var(--space-7);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-large);
    background: var(--color-raised);
    box-shadow: var(--shadow-raised);
}

.service-rate-heading {
    display: grid;
    gap: var(--space-5);
    align-content: start;
}

.service-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-3);
    margin: 0;
}

.service-price-amount {
    font-family: var(--font-display);
    font-stretch: 108%;
    font-weight: 620;
    font-size: var(--text-heading-1);
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.service-price-unit {
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: var(--text-small);
}

.service-rate-body {
    display: grid;
    gap: var(--space-4);
    align-content: start;
    color: var(--color-text-muted);
}

/* Request Quote keeps its own width under the paragraphs, as the site's other primary buttons do */
.service-rate-action {
    justify-self: start;
    margin-top: var(--space-2);
}

@media (max-width: 767px) {
    .service-rate-panel {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-5);
        padding: var(--space-5);
    }
}

/* ---------- Website Services: the redesign explanation beside the package card ---------- */

.service-package-layout {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-7) var(--space-6);
    align-items: start;
}

.service-package-explanation {
    grid-column: 1 / span 5;
    display: grid;
    gap: var(--space-5);
    align-content: start;
}

.service-package-explanation p {
    max-width: var(--measure);
    color: var(--color-text-muted);
}

/* One card, never shown beside another */
.service-package-card {
    grid-column: 6 / span 7;
    display: grid;
    gap: var(--space-5);
    padding: var(--space-7);
    border: 1px solid color-mix(in srgb, var(--service-hue) 35%, transparent);
    border-radius: var(--radius-large);
    background:
        radial-gradient(90% 60% at 50% 0%, color-mix(in srgb, var(--service-hue) 10%, transparent), transparent 70%),
        var(--color-raised);
    box-shadow: var(--shadow-raised);
}

.service-package-title {
    font-size: var(--text-heading-3);
    line-height: 1.25;
}

.service-package-billing {
    color: var(--color-text-muted);
}

.service-package-included {
    display: grid;
    gap: var(--space-3);
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-line);
}

.service-package-included-title {
    margin: 0;
    font-family: var(--font-display);
    font-stretch: 108%;
    font-weight: 620;
    font-size: clamp(1.0625rem, 1rem + 0.2667vw, 1.1875rem);
    line-height: 1.3;
}

/* Scannable selling list (list type tokens in design-tokens.css); available-options.css copies it, so change them together */
.service-dot-list {
    display: grid;
    gap: var(--list-item-gap);
    max-width: var(--list-measure);
    margin: 0;
    padding: 0;
    font-size: var(--text-list);
    line-height: var(--leading-list);
    list-style: none;
}

.service-dot-list li {
    display: grid;
    grid-template-columns: var(--list-mark-size) minmax(0, 1fr);
    column-gap: var(--list-mark-gap);
    align-items: start;
}

/* The tick, centred on the item's first line */
.service-dot-list li::before {
    content: "";
    width: var(--list-mark-size);
    height: var(--list-mark-size);
    margin-top: calc((var(--leading-list) * 1em - var(--list-mark-size)) / 2);
    background: var(--service-hue);
    -webkit-mask: var(--list-mark-tick) center / contain no-repeat;
    mask: var(--list-mark-tick) center / contain no-repeat;
}

.service-package-extra-work {
    color: var(--color-text-faint);
    font-size: var(--text-small);
}

.service-package-card .button {
    width: 100%;
}

/* AI Automations' proposal uses the same card: what the free proposal shows, one item under each hairline */
.service-proposal-contents {
    display: grid;
    gap: var(--space-5);
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-proposal-item {
    display: grid;
    gap: var(--space-2);
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-line);
}

.service-proposal-item:first-child {
    padding-top: 0;
    border-top: 0;
}

.service-proposal-item-title {
    margin: 0;
    font-family: var(--font-display);
    font-stretch: 108%;
    font-weight: 620;
    font-size: 1.0625rem;
    line-height: 1.4;
}

.service-proposal-item p {
    color: var(--color-text-muted);
}

@media (max-width: 1023px) {
    .service-package-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-package-explanation,
    .service-package-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .service-package-card {
        padding: var(--space-5);
    }
}

/* Small phones: the plan card gives its text 16 px more width */
@media (max-width: 479px) {
    .service-package-card {
        padding: var(--space-5) var(--space-4);
    }
}

/* ---------- Website Services: reports and recommendations ---------- */

.service-reporting {
    padding-top: 0;
}

/* ---------- Website Services: add-ons, built from a list, so a future add-on is one more card ---------- */

.service-add-ons-layout {
    display: grid;
    gap: var(--space-7);
}

.service-add-on-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-5);
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-add-on {
    display: grid;
    gap: var(--space-3);
    align-content: start;
    min-height: 320px;
    padding: var(--space-6);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-medium);
    background: var(--color-raised);
}

.service-add-on-title {
    font-size: var(--text-heading-3);
    line-height: 1.25;
}

.service-add-on-price {
    color: var(--service-hue);
    font-family: var(--font-mono);
    font-size: var(--text-small);
    font-variant-numeric: tabular-nums;
}

.service-add-on-requirement {
    justify-self: start;
    padding: 2px 10px;
    border: 1px solid var(--color-line-strong);
    border-radius: var(--radius-pill);
    color: var(--color-text-muted);
    font-size: var(--text-label);
}

.service-add-on-body {
    display: grid;
    gap: var(--space-3);
    margin-top: var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--text-small);
}

.service-add-ons-action {
    display: grid;
    justify-items: center;
}

@media (max-width: 1023px) {
    .service-add-on-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-add-on {
        min-height: 0;
    }
}

@media (max-width: 767px) {
    .service-add-on-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-add-on {
        padding: var(--space-5);
    }

    .service-add-ons-action .button {
        width: 100%;
    }
}

/* ---------- Use-case selector: industries as tabs, one story at a time ---------- */

.service-use-cases-layout {
    display: grid;
    gap: var(--space-7);
}

.use-case-layout {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: var(--space-7);
    align-items: start;
}

.use-case-tabs {
    display: grid;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

.use-case-tab {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
    gap: var(--space-4);
    width: 100%;
    min-height: 80px;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-medium);
    background: var(--color-raised);
    color: var(--color-text-muted);
    font: 600 1rem / 1.3 var(--font-body);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--duration-standard) var(--ease-out),
        border-color var(--duration-standard) var(--ease-out),
        color var(--duration-standard) var(--ease-out);
}

.use-case-tab-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-small);
    background: var(--color-surface);
    transition: border-color var(--duration-standard) var(--ease-out), box-shadow var(--duration-gentle) var(--ease-out);
}

.use-case-tab-icon svg {
    width: 32px;
    height: 32px;
}

.use-case-tab:hover {
    border-color: var(--color-line-strong);
    color: var(--color-text);
}

.use-case-tab[aria-selected="true"] {
    background: var(--color-raised-high);
    border-color: color-mix(in srgb, var(--service-hue) 55%, transparent);
    color: var(--color-text);
}

.use-case-tab[aria-selected="true"] .use-case-tab-icon {
    color: var(--service-hue);
    border-color: color-mix(in srgb, var(--service-hue) 45%, transparent);
    box-shadow: 0 0 28px -6px color-mix(in srgb, var(--service-hue) 55%, transparent);
}

/* A short bar in the hue on the selected tab's inner edge */
.use-case-tab[aria-selected="true"]::after {
    content: "";
    position: absolute;
    left: -1px;
    top: 18px;
    bottom: 18px;
    width: 2px;
    border-radius: 2px;
    background: var(--service-hue);
}

.use-case-stories {
    display: grid;
    gap: var(--space-5);
}

/* Without the script every story shows, one after another; with it, the stories share one cell so the page never changes height */
.use-case-selector.is-enhanced .use-case-story {
    grid-area: 1 / 1;
}

.use-case-story {
    display: grid;
    gap: var(--space-5);
    align-content: start;
    padding: var(--space-7);
    border: 1px solid var(--color-line);
    border-radius: var(--radius-large);
    background:
        radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--service-hue) 9%, transparent), transparent 60%),
        var(--color-raised);
    box-shadow: var(--shadow-raised);
    transition: opacity var(--duration-standard) var(--ease-out), transform var(--duration-standard) var(--ease-out), visibility var(--duration-standard);
}

.use-case-story.is-inactive {
    visibility: hidden;
    opacity: 0;
    transform: translateY(6px);
}

.use-case-story-tag {
    justify-self: start;
    padding: 4px 10px;
    border: 1px solid var(--color-line-strong);
    border-radius: var(--radius-pill);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.use-case-story-title {
    font-size: var(--text-heading-3);
    line-height: 1.25;
}

.use-case-story-parts {
    display: grid;
    gap: var(--space-5);
}

.use-case-story-parts dt {
    margin-bottom: var(--space-2);
    color: var(--service-hue);
    font-family: var(--font-mono);
    font-size: var(--text-label);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.use-case-story-parts dd {
    max-width: var(--measure);
    color: var(--color-text-muted);
}

/* Below 1024 px the tabs become one row of three tiles, the story under them */
@media (max-width: 1023px) {
    .use-case-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-5);
    }

    .use-case-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--space-2);
    }

    .use-case-tab {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        align-content: center;
        gap: var(--space-2);
        height: 100%;
        min-height: 112px;
        padding: var(--space-3) var(--space-2);
        font-size: 0.875rem;
        line-height: 1.25;
        text-align: center;
        overflow-wrap: anywhere;
        hyphens: auto;
    }

    .use-case-tab-icon {
        width: 48px;
        height: 48px;
    }

    .use-case-tab[aria-selected="true"]::after {
        left: 24px;
        right: 24px;
        top: auto;
        bottom: -1px;
        width: auto;
        height: 2px;
    }

    .use-case-story {
        padding: var(--space-5);
    }
}

@media (prefers-reduced-motion: reduce) {
    .use-case-story.is-inactive {
        transform: none;
    }
}

/*
 * ---------- Invitations: a lead line and the inquiry button, closing a section in that section's own manner ----------
 * AI Automations has four (the Copywriter's selling copy of 2026-12-01, section 5). Each one borrows the look of the section
 * it closes, so the page gains ways to reach us without four identical blocks.
 */

.service-invitation {
    display: grid;
    gap: var(--space-5);
    align-items: center;
}

.service-invitation-lead {
    max-width: 34em;
    color: var(--color-text);
    text-wrap: balance;
}

/* Centred under the pictured week, set off from the statement by a short hairline */
.service-invitation-centred {
    justify-items: center;
    margin-top: var(--space-3);
    padding-top: var(--space-7);
    background: linear-gradient(var(--color-line), var(--color-line)) top center / 48px 1px no-repeat;
    text-align: center;
}

/* An open card after the seven problems: a dashed edge in the hue, waiting for the visitor's own work */
.service-card-invitation {
    align-content: space-between;
    gap: var(--space-6);
    border: 1px dashed color-mix(in srgb, var(--service-hue) 45%, transparent);
    background:
        radial-gradient(80% 70% at 100% 100%, color-mix(in srgb, var(--service-hue) 9%, transparent), transparent 70%),
        transparent;
}

.service-card-invitation:hover {
    border-color: color-mix(in srgb, var(--service-hue) 70%, transparent);
}

.service-card-invitation .service-invitation-lead {
    font-size: var(--text-lead);
    line-height: 1.5;
}

.service-card-invitation .button {
    justify-self: start;
}

/* A closing line under the use-case story column, the line and the button side by side above a hairline */
.service-invitation-footnote {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-4) var(--space-6);
    margin-left: calc((100% - var(--space-7)) * 4 / 12 + var(--space-7));
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-line);
}

.service-invitation-footnote .service-invitation-lead {
    color: var(--color-text-muted);
}

/* A lit panel under the four places an automation can run: the line in the lead size, the one primary button beside it */
.service-invitation-panel {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-5) var(--space-7);
    padding: var(--space-6) var(--space-7);
    border: 1px solid color-mix(in srgb, var(--service-hue) 30%, var(--color-line));
    border-radius: var(--radius-large);
    background:
        radial-gradient(60% 140% at 0% 50%, color-mix(in srgb, var(--service-hue) 11%, transparent), transparent 70%),
        var(--color-raised);
}

.service-invitation-panel .service-invitation-lead {
    font-size: var(--text-lead);
    line-height: 1.5;
}

@media (max-width: 1023px) {
    .service-invitation-footnote {
        margin-left: 0;
    }
}

/* Phone: every invitation stacks, and its button spans the width, as the next step's does */
@media (max-width: 767px) {
    .service-invitation-footnote,
    .service-invitation-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-invitation-panel {
        padding: var(--space-5);
    }

    .service-invitation .button,
    .service-card-invitation .button {
        justify-self: stretch;
        width: 100%;
    }
}

/* ---------- Next step: a full-width band with a glow of the hue from the top right ---------- */

.service-next-step {
    background:
        radial-gradient(70% 90% at 100% 0%, color-mix(in srgb, var(--service-hue) 9%, transparent), transparent 70%),
        var(--color-surface);
    border-top: 1px solid var(--color-line);
}

.service-next-step-inner {
    display: grid;
    justify-items: center;
    gap: var(--space-5);
    text-align: center;
}

.service-next-step-body {
    max-width: var(--measure);
    color: var(--color-text-muted);
}

.service-next-step .button {
    margin-top: var(--space-3);
}

@media (max-width: 767px) {
    .service-next-step .button {
        width: 100%;
    }
}
