/* ============================================================================
   Service Offering page - Figma 3378 (DFMA / Urban Planning / XR)
   Design viewport: 1728px wide
   Layout reference points from Figma:
     - page padding: 129px left  → handled by arpm-container (clamps to ~86px)
     - main content column: 963px wide
     - right rail / sidebar:  290-360px wide, starts at ~67-78% of viewport
   ========================================================================= */

.svc {
    --svc-rail-width: clamp(13rem, 18vw, 18.125rem);   /* 208–290px (Figma 290px) */
    --svc-section-gap: clamp(4rem, 12vw, 13.75rem);    /* between major sections */
    --svc-block-gap: clamp(2rem, 4vw, 4rem);           /* between blocks inside a section */
    --svc-col-gap: clamp(2.5rem, 7vw, 9.125rem);       /* gap between main + rail */
    --svc-text-heading: #4b4135;
    --svc-text-body: #615a51;
    --svc-text-muted: #968b7e;
    --svc-text-caption: #afa393;
    --svc-step-card-bg: #f7f7f7;
    --svc-step-card-bg-highlight: #fff6eb;
    --svc-step-num: rgba(75, 65, 53, 0.5);
    --svc-step-num-highlight: rgba(255, 157, 40, 0.65);
    background: var(--color-bg);
    color: var(--svc-text-body);
    padding-bottom: clamp(4rem, 10vw, 8rem);
}

.svc--loading {
    padding-block: clamp(3rem, 8vw, 5rem);
}

.svc__status {
    margin: 0;
    font-size: var(--text-body);
}

/* ---- Dark theme (XR) overrides ---- */
.svc--dark {
    --svc-text-heading: #fff1e0;
    --svc-text-body: #f3e7d8;
    --svc-text-muted: #f3e7d8;
    --svc-text-caption: #fff1e0;
    --svc-step-num: rgba(255, 241, 224, 0.85);
    --svc-step-num-highlight: #ff9d28;
    background: #000;
    color: var(--svc-text-body);
}

/* ============================================================================
   HERO
   ========================================================================= */

.svc-hero {
    --svc-hero-visual-opacity: clamp(
        0.1,
        calc(0.1 + 0.4 * ((100vw - 20rem) / (64rem - 20rem))),
        0.5
    );
    padding-top: clamp(1.5rem, 3vw, 2.5rem);
    padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
    position: relative;
    overflow: hidden;
}

.svc--dark .svc-hero {
    --svc-hero-visual-opacity: clamp(
        0.1,
        calc(0.1 + 0.3 * ((100vw - 20rem) / (64rem - 20rem))),
        0.4
    );
}

.svc-hero__shell {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.svc-hero__text {
    display: flex;
    flex-direction: column;
    gap: clamp(1.25rem, 2.5vw, 2.5rem);
    max-width: min(100%, 72rem);
    position: relative;
    z-index: 2;
}

.svc-hero__back {
    margin: 0;
}

.svc-hero__back-link {
    font-family: var(--font-sans);
    font-size: var(--text-body);
    font-weight: 500;
    color: var(--svc-text-muted);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.svc--dark .svc-hero__back-link {
    color: #f3e7d8;
}

.svc-hero__title {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, calc(48 / 1728 * 100vw), 3rem);
    font-weight: var(--font-weight-regular);
    line-height: 1.08;
    color: var(--svc-text-heading);
    max-width: min(100%, 56rem);
}

.svc-hero__taglines {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.svc-hero__tagline {
    margin: 0;
    font-family: var(--font-sans);
    font-size: clamp(1.5rem, calc(64 / 1728 * 100vw), 4rem);
    font-weight: var(--font-weight-semibold);
    line-height: 1.2;
    color: var(--svc-text-heading);
}

.svc-hero__summary {
    margin: 0;
    max-width: 38.8125rem;                  /* Figma 621px */
    font-family: var(--font-sans);
    font-size: clamp(1rem, 1.4vw, 1.5rem);  /* Figma 24px */
    line-height: 1.7;
    color: var(--svc-text-body);
}

.svc-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    align-items: center;
}

.svc-hero__cta {
    min-width: 12rem;
}

/* --- Hero background visual (all offerings with heroImage) --- */
.svc-hero--has-visual {
    min-height: clamp(18rem, 42vw, 30rem);
    padding-bottom: clamp(2rem, 4vw, 3rem);
}

.svc-hero--map.svc-hero--has-visual,
.svc-hero--has-visual {
    padding-top: 0;
}

.svc-hero--has-visual .svc-hero__shell {
    position: relative;
    z-index: 2;
    padding-top: clamp(1.5rem, 3vw, 2.5rem);
    min-height: clamp(16rem, 38vw, 28rem);
}

/* Full viewport width - bleeds to screen edge on 4K (not limited to arpm-container) */
.svc-hero--has-visual .svc-hero__visual {
    position: absolute;
    top: 0;
    left: 28%;
    right: 0;
    bottom: 0;
    width: auto;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.svc-hero--has-visual .svc-hero__visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    opacity: var(--svc-hero-visual-opacity);
    mask-image: linear-gradient(to left, #000 8%, transparent 72%);
    -webkit-mask-image: linear-gradient(to left, #000 8%, transparent 72%);
}

@media (max-width: 48rem) {
    .svc-hero--has-visual::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        background: linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.92) 0%,
            rgba(255, 255, 255, 0.78) 42%,
            rgba(255, 255, 255, 0.55) 100%
        );
    }

    .svc--dark .svc-hero--has-visual::after {
        background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.82) 0%,
            rgba(0, 0, 0, 0.68) 45%,
            rgba(0, 0, 0, 0.45) 100%
        );
    }

    .svc-hero--has-visual .svc-hero__visual {
        left: 0;
        z-index: 0;
    }

    .svc-hero--has-visual .svc-hero__visual img {
        opacity: 0.55;
        mask-image: none;
        -webkit-mask-image: none;
    }

    .svc--dark .svc-hero--has-visual .svc-hero__visual img {
        opacity: 0.45;
    }

    .svc-hero--has-visual .svc-hero__shell {
        min-height: auto;
    }
}

/* ============================================================================
   STORY (lead + intro + testimonial  +  stats rail)
   ========================================================================= */

.svc-story {
    padding-top: var(--svc-section-gap);
}

.svc-story__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--svc-rail-width);
    column-gap: var(--svc-col-gap);
    row-gap: clamp(2.5rem, 5vw, 4rem);
    align-items: start;
}

.svc-story__main {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.625rem);  /* Figma ~42px between paragraphs */
    max-width: 60.1875rem;              /* Figma 963px */
}

.svc-story__lead {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 2.78vw, 3rem);   /* Figma 48px */
    font-weight: var(--font-weight-regular);
    line-height: 1.3;
    color: var(--svc-text-body);
}

.svc--dark .svc-story__lead {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    color: var(--svc-text-heading);
}

.svc-story__lead strong {
    font-weight: 700;
    color: var(--svc-text-heading);
}

.svc-story__intro {
    margin: 0;
    font-family: var(--font-sans);
    font-size: clamp(1.125rem, 1.85vw, 2rem);  /* Figma 32px */
    font-weight: var(--font-weight-regular);
    line-height: 1.7;
    color: var(--svc-text-body);
}

.svc-story__intro strong {
    color: var(--svc-text-heading);
}

/* ---- Stats rail ---- */
.svc-story__rail {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    max-width: 18.125rem;       /* Figma 290px */
    margin-top: 0.5rem;
}

.svc-stats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.625rem);
}

.svc-stat {
    margin: 0;
}

.svc-stat__value {
    margin: 0;
    font-family: var(--font-sans);
    font-size: clamp(2rem, 3.7vw, 4rem);  /* Figma 64px */
    font-weight: var(--font-weight-semibold);
    line-height: 1.2;
    color: var(--svc-text-heading);
}

.svc--dark .svc-stat__value {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.svc-stat__label {
    margin: 0.4rem 0 0;
    font-family: var(--font-sans);
    font-size: clamp(0.875rem, 1.15vw, 1.25rem);  /* Figma 20px */
    line-height: 1.5;
    color: var(--svc-text-muted);
}

/* ---- Testimonial ---- */
.svc-testimonial {
    margin: clamp(1.5rem, 3vw, 2.5rem) 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 9.0625rem minmax(0, 1fr);    /* Figma 145px photo */
    gap: 1.25rem 1.5rem;
    align-items: start;
    max-width: 50.4375rem;       /* Figma 807px */
}

.svc-testimonial__photo {
    width: 9.0625rem;
    height: 11.625rem;           /* Figma 186px */
    object-fit: cover;
    display: block;
}

.svc-testimonial__body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.svc-testimonial__quote {
    margin: 0;
    font-family: var(--font-sans);
    font-style: italic;
    font-size: clamp(1rem, 1.4vw, 1.5rem);  /* Figma 24px */
    line-height: 1.7;
    color: var(--svc-text-body);
}

.svc-testimonial__meta {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.svc-testimonial__name,
.svc-testimonial__role {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--svc-text-body);
}

/* ============================================================================
   SECTION (Why / How)  - title + intro full-width, body + sidebar in 2 cols
   ========================================================================= */

.svc-section {
    padding-top: var(--svc-section-gap);
}

.svc-section__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--svc-rail-width);
    column-gap: var(--svc-col-gap);
    row-gap: clamp(1.5rem, 3vw, 2.5rem);
}

.svc-section__title {
    grid-column: 1 / -1;
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(2rem, 2.78vw, 3rem);    /* Figma 48px */
    font-weight: var(--font-weight-regular);
    line-height: 1.3;
    color: var(--svc-text-body);
    max-width: 60.1875rem;
}

.svc--dark .svc-section__title {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    color: var(--svc-text-heading);
}

.svc-section__intro {
    grid-column: 1 / -1;
    margin: 0;
    max-width: 60.1875rem;
    font-family: var(--font-sans);
    font-size: clamp(1.125rem, 1.85vw, 2rem);  /* Figma 32px */
    line-height: 1.7;
    color: var(--svc-text-body);
}

.svc-section__intro strong {
    color: var(--svc-text-heading);
}

.svc-section__body {
    grid-column: 1;
    min-width: 0;
}

.svc-section .svc-sidebar-figure {
    grid-column: 2;
    grid-row: span 1;
    align-self: start;
}

/* ============================================================================
   BENEFITS LIST (Why section body)
   ========================================================================= */

.svc-benefits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(1.75rem, 3vw, 2.75rem);     /* Figma ~46px */
    max-width: 49.8125rem;                 /* Figma 797px */
}

.svc-benefit {
    margin: 0;
}

.svc-benefit__title {
    margin: 0 0 0.4rem;
    font-family: var(--font-sans);
    font-size: clamp(1.25rem, 2.1vw, 2.25rem);  /* Figma 36px */
    font-weight: var(--font-weight-semibold);
    line-height: 1.3;
    color: var(--svc-text-heading);
}

.svc--dark .svc-benefit__title {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.svc-benefit__body {
    font-family: var(--font-sans);
    font-size: clamp(1rem, 1.4vw, 1.5rem);   /* Figma 24px */
    line-height: 1.7;
    color: var(--svc-text-body);
    max-width: 40.125rem;                    /* Figma 642px */
}

.svc-benefit__body p {
    margin: 0;
}

.svc-benefit__body p + p {
    margin-top: 0.5em;
}

/* ============================================================================
   PROCESS STEPS (How section body)
   ========================================================================= */

.svc-steps-wrap {
    position: relative;
}

.svc-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(1.75rem, 3vw, 2.75rem);
}

.svc-step {
    position: relative;
    display: grid;
    grid-template-columns: clamp(4rem, 7.4vw, 8rem) minmax(0, 24.375rem);
    column-gap: clamp(1rem, 2.5vw, 2.875rem);
    align-items: start;
}

.svc-step__num {
    margin: 0;
    font-family: var(--font-sans);
    font-size: clamp(4rem, 7.4vw, 8rem);   /* Figma 128px */
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    color: var(--svc-step-num);
    text-align: center;
    align-self: start;
}

.svc--dark .svc-step__num {
    font-family: "IBM Plex Sans", system-ui, sans-serif;  /* Figma keeps Plex Sans even on dark */
}

.svc-step--highlight .svc-step__num {
    color: var(--svc-step-num-highlight);
}

.svc-step__card {
    box-sizing: border-box;
    width: 100%;
    max-width: 24.375rem;
    align-self: start;
    background: var(--svc-step-card-bg);
    padding: clamp(1.25rem, 2vw, 1.625rem) clamp(1.5rem, 2.5vw, 2rem);
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.svc-step--highlight .svc-step__card {
    background: var(--svc-step-card-bg-highlight);
}

.svc-step__title {
    margin: 0;
    font-family: var(--font-sans);
    font-size: clamp(1.25rem, 2.1vw, 2.25rem);
    font-weight: var(--font-weight-semibold);
    line-height: 1.25;
    color: #4b4135;
}

.svc-step--highlight .svc-step__title {
    color: #f9a539;
}

.svc--dark .svc-step__title {
    color: #4b4135;        /* explicit override for dark page wrapper */
}

.svc-step__body {
    font-family: var(--font-sans);
    font-size: clamp(1rem, 1.4vw, 1.5rem);
    line-height: 1.55;
    color: #615a51;
}

.svc-step__body p {
    margin: 0;
}

.svc-step__body p + p {
    margin-top: 0.65em;
}

/* Vertical connector - spans the gap between steps (height follows content-sized cards) */
.svc-step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(clamp(2rem, 3.7vw, 4rem));
    top: clamp(4.25rem, 7.75vw, 8.25rem);
    bottom: calc(-1 * clamp(1.75rem, 3vw, 2.75rem) / 2);
    width: 1px;
    background: var(--svc-text-muted);
    opacity: 0.6;
    transform: translateX(-1px);
    pointer-events: none;
}

.svc-step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: calc(clamp(2rem, 3.7vw, 4rem));
    bottom: calc(-1 * clamp(1.75rem, 3vw, 2.75rem) / 2 - 0.35rem);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 9px solid var(--svc-text-muted);
    opacity: 0.7;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 1;
}

/* ============================================================================
   SIDEBAR FIGURE (Why/How right column)
   ========================================================================= */

.svc-sidebar-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 22.5rem;       /* Figma 360px */
}

.svc-sidebar-figure img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 360 / 781;   /* Figma 360x781 */
}

.svc-sidebar-figure--faded img {
    opacity: 0.55;
}

.svc-sidebar-figure__caption {
    margin: 0;
    font-family: var(--font-sans);
    font-style: italic;
    font-size: clamp(1rem, 1.5vw, 2rem);  /* Figma 32px */
    line-height: 1.4;
    color: var(--svc-text-caption);
}

.svc-sidebar-figure__link {
    margin: 0;
}

.svc-sidebar-figure__link a {
    font-family: var(--font-sans);
    font-size: clamp(0.95rem, 1.4vw, 1.5rem);  /* Figma 24px */
    color: var(--svc-text-muted);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.svc--dark .svc-sidebar-figure__link a {
    color: #f3e7d8;
}

/* ============================================================================
   SUPPLEMENTARY MARKDOWN BODY (:::prose, :::highlights on offering pages)
   ========================================================================= */

.svc-body-stream {
    padding-top: var(--svc-section-gap);
    padding-bottom: var(--svc-section-gap);
}

.svc-body-stream .markdown-body {
    max-width: none;
    width: 100%;
    margin: 0;
}

.svc-body-stream .markdown-body > .proj-section {
    width: 100%;
    max-width: none;
}

.svc-body-stream .markdown-body > .proj-section .proj-container {
    max-width: var(--layout-max);
}

/* Dark technology shell - prose/highlights bands inside service pages */
.svc--dark .svc-body-stream .proj-section--prose .proj-highlights__title,
.svc--dark .svc-body-stream .proj-section--highlights .proj-highlights__title {
    font-family: var(--font-serif);
    color: var(--svc-text-heading);
}

.svc--dark .svc-body-stream .proj-highlights__title::after {
    background: var(--accent-orange);
}

.svc--dark .svc-body-stream .proj-prose p,
.svc--dark .svc-body-stream .proj-highlights__body p,
.svc--dark .svc-body-stream .proj-highlights__list li {
    font-family: var(--font-mono);
    font-size: clamp(0.875rem, 1.1vw, 1.125rem);
    line-height: 1.7;
    color: var(--svc-text-body);
}

.svc--dark .svc-body-stream .proj-prose p strong,
.svc--dark .svc-body-stream .proj-highlights__body li strong,
.svc--dark .svc-body-stream .proj-highlights__list li strong {
    color: var(--svc-text-heading);
    font-weight: var(--font-weight-semibold);
}

.svc--dark .svc-body-stream .proj-highlights__list {
    color: var(--svc-text-body);
}

/* ---- Architecture vertical (blue accent) ---- */
.svc--architecture {
    --svc-step-num-highlight: rgba(48, 83, 227, 0.55);
    --svc-step-card-bg-highlight: #e8eeff;
}

.svc--architecture .svc-stat__value {
    color: var(--accent-blue);
}

.svc--architecture .svc-story__lead strong,
.svc--architecture .svc-story__intro strong {
    color: var(--accent-blue);
}

.svc--architecture .svc-step--highlight .svc-step__title {
    color: var(--accent-blue);
}

.svc--architecture .svc-body-stream .proj-highlights__title::after {
    background: var(--accent-blue);
}

.svc--architecture .svc-hero__back-link:hover,
.svc--architecture .svc-hero__back-link:focus-visible {
    color: var(--accent-blue);
}

/* ---- Urban planning vertical (green accent) ---- */
.svc--urban-planning {
    --svc-step-num-highlight: rgba(132, 144, 43, 0.75);
    --svc-step-card-bg-highlight: #f4f8d4;
}

.svc--urban-planning .svc-stat__value {
    color: var(--accent-green-text);
}

.svc--urban-planning .svc-story__lead strong,
.svc--urban-planning .svc-story__intro strong {
    color: var(--accent-green-text);
}

.svc--urban-planning .svc-step--highlight .svc-step__title {
    color: var(--accent-green-text);
}

.svc--urban-planning .svc-body-stream .proj-highlights__title::after {
    background: var(--accent-green);
}

.svc--urban-planning .svc-hero__back-link:hover,
.svc--urban-planning .svc-hero__back-link:focus-visible {
    color: var(--accent-green-text);
}

/* ============================================================================
   PROJECT HIGHLIGHTS
   ========================================================================= */

.svc-highlights {
    padding-top: var(--svc-section-gap);
}

.svc-highlights__title {
    margin: 0 0 clamp(2rem, 4vw, 4rem);
    font-family: var(--font-serif);
    font-size: clamp(2.25rem, 3.7vw, 4rem);   /* Figma 64px */
    font-weight: var(--font-weight-regular);
    line-height: 1.1;
    color: var(--svc-text-heading);
    max-width: 47.625rem;                     /* Figma 762px */
}

.svc--dark .svc-highlights__title {
    /* Highlights title keeps SERIF even on dark theme (Figma) */
    font-family: var(--font-serif);
    color: var(--svc-text-heading);
}

.svc-highlights__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2.5rem, 4.5vw, 4.625rem) clamp(2rem, 4vw, 3.5rem);   /* Figma ~74px row, ~73px col */
}

.svc-highlights__grid .home-project-card__media {
    border-radius: 4px;
}

.svc--dark .svc-highlights__grid .home-project-card__title {
    color: var(--svc-text-heading);
}

.svc--dark .svc-highlights__grid .home-project-card__meta {
    color: var(--svc-text-body);
}

/* ============================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 1100px) {
    .svc-story__grid,
    .svc-section__grid {
        grid-template-columns: minmax(0, 1fr);
        row-gap: clamp(2rem, 5vw, 3.5rem);
    }

    .svc-story__rail,
    .svc-section .svc-sidebar-figure {
        grid-column: 1;
        grid-row: auto;
        max-width: 32rem;
    }
}

@media (max-width: 700px) {
    .svc-hero__ctas {
        flex-direction: column;
        align-items: stretch;
    }

    .svc-hero__cta {
        width: 100%;
    }

    .svc-testimonial {
        grid-template-columns: 1fr;
    }

    .svc-testimonial__photo {
        width: 7rem;
        height: auto;
    }

    .svc-step {
        grid-template-columns: 3rem minmax(0, 1fr);
        column-gap: 1rem;
    }

    .svc-step__num {
        font-size: 3rem;
    }

    .svc-step:not(:last-child)::after {
        left: 1.5rem;
        top: 3.25rem;
        bottom: calc(-1 * clamp(1.75rem, 3vw, 2.75rem) / 2);
    }

    .svc-step:not(:last-child)::before {
        left: 1.5rem;
        bottom: calc(-1 * clamp(1.75rem, 3vw, 2.75rem) / 2 - 0.35rem);
    }

    .svc-step__card {
        max-width: none;
    }

    .svc-highlights__grid {
        grid-template-columns: 1fr;
    }
}
