/* =============================================================================
   Service pages (template-service.php), body.ca-svc. The five service pages and Selected Engagements.
   A split hero, what we arrange as a card grid, a sticky "Begin a conversation" card, the questions as
   an accordion, engagements as a sideways case rail, the other services as the hub's tiles in a row.
   Same language as services-hub.css and tour.css; frame and tokens (--ui-*) from ui.css. House tokens only.
   Modern parts degrade: container queries, :has(), scroll-snap, scroll-driven reveal inside @supports.
   ============================================================================= */
body.ca-svc { background: var(--ui-bg); --sv-gutter: clamp(1.25rem, 5vw, 3rem); --sv-top: 84px; }
/* The theme puts overflow-x: hidden on html and body, which stops position: sticky. clip does not. */
html:has(body.ca-svc), body.ca-svc { overflow-x: clip; }
body.ca-svc .sv { display: block; color: var(--ui-ink); background: var(--ui-bg); font-family: 'Jost', sans-serif; font-weight: 400; font-size: 17px; line-height: 1.6; }
body.ca-svc .sv *, body.ca-svc .sv *::before, body.ca-svc .sv *::after { box-sizing: border-box; }
body.ca-svc .sv-wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--sv-gutter); }
body.ca-svc .sv h1, body.ca-svc .sv h2, body.ca-svc .sv h3 { font-family: 'Jost', sans-serif; font-style: normal; text-transform: none; letter-spacing: -.005em; color: var(--ui-ink); text-align: left; }
body.ca-svc .sv :where(p) { margin: 0; }
body.ca-svc .sv a { color: inherit; }
body.ca-svc .sv p a, body.ca-svc .sv .sv-a a, body.ca-svc .sv .sv-rest a { color: var(--ui-ink); text-decoration: underline; text-decoration-color: var(--ui-accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
body.ca-svc .sv p a:hover { text-decoration-thickness: 2px; }
body.ca-svc .sv :focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 3px; }

/* Labels */
body.ca-svc .sv-label { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ui-accent); line-height: 1.4; margin: 0 0 .4rem; }
body.ca-svc .sv-n { font-variant-numeric: tabular-nums; color: var(--ui-ink-2); margin-right: .6rem; }

/* Hero: words on paper, the photograph beside them */
body.ca-svc .sv-hero { padding: clamp(1.25rem, 3vw, 2rem) 0 0; }
body.ca-svc .sv-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: center; }
body.ca-svc .sv-crumb { display: flex; flex-wrap: wrap; gap: .4rem; font-size: 14px; color: var(--ui-ink-2); margin: 0 0 1rem; }
body.ca-svc .sv-crumb a { color: var(--ui-ink-2); text-decoration: none; }
body.ca-svc .sv-crumb a:hover { color: var(--ui-ink); text-decoration: underline; }
body.ca-svc .sv-crumb [aria-current] { color: var(--ui-ink); }
body.ca-svc .sv-h1 { font-weight: 600; font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.6rem); line-height: 1.1; margin: 0 0 .9rem; letter-spacing: -.015em; }
body.ca-svc .sv-tagline { font-size: clamp(1.2rem, 1.05rem + .7vw, 1.55rem); line-height: 1.35; font-weight: 500; color: var(--ui-ink); margin: 0 0 1rem; max-width: 30em; }
body.ca-svc .sv-desc { margin: 0 0 .25rem; color: var(--ui-ink-2); font-size: 17px; line-height: 1.65; max-width: 36em; }
body.ca-svc .sv-desc p + p { margin-top: .75rem; }
body.ca-svc .sv-sub { margin-top: 1rem; padding-left: .9rem; border-left: 2px solid var(--ui-accent); color: var(--ui-ink); font-size: 16px; max-width: 36em; }
body.ca-svc .sv-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
body.ca-svc .sv-hero-media { margin: 0; border-radius: var(--ui-radius); overflow: hidden; background: var(--ui-tint); aspect-ratio: 4 / 3; }
body.ca-svc .sv-hero-media img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
@media (min-width: 900px) {
    body.ca-svc .sv-hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); }
    body.ca-svc .sv-hero-media { aspect-ratio: 5 / 6; max-height: min(640px, calc(100vh - 140px)); min-height: 420px; }
}

/* Note under the hero (a loose line in the content) */
body.ca-svc .sv-note { margin: clamp(2.5rem, 6vw, 4.5rem) 0 0; padding: 1rem 1.2rem; border-radius: var(--ui-radius-sm); background: var(--ui-tint); color: var(--ui-ink); font-size: 16px; }

/* Buttons: ghost, and the one green WhatsApp */
body.ca-svc .sv-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 1.4rem; border-radius: var(--ui-radius-sm); font: 600 16px/1.2 'Jost', sans-serif; text-decoration: none; text-transform: none; letter-spacing: .01em; transition: background var(--ca-transition), border-color var(--ca-transition); }
body.ca-svc .sv-btn-wa { background: var(--wa-green); color: var(--ivory); border: 1px solid var(--wa-green); }
body.ca-svc .sv-btn-wa:hover { background: var(--wa-green-lt); border-color: var(--wa-green-lt); color: var(--ivory); }
body.ca-svc .sv-btn-ghost { background: transparent; color: var(--ui-ink); border: 1px solid color-mix(in srgb, var(--obsidian) 35%, transparent); }
body.ca-svc .sv-btn-ghost:hover { border-color: var(--ui-ink); color: var(--ui-ink); }

/* Sections */
body.ca-svc .sv-sec { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
body.ca-svc .sv-h2 { font-weight: 600; font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.25rem); line-height: 1.15; margin: 0 0 .75rem; }
body.ca-svc .sv-h2 a { text-decoration: none; }
body.ca-svc .sv-h3 { font-weight: 600; font-size: 19px; line-height: 1.3; margin: 0 0 .45rem; }
body.ca-svc .sv-intro { color: var(--ui-ink-2); max-width: 40em; margin: 0 0 1.5rem; }

/* Layout: main column, sticky card, questions */
body.ca-svc .sv-layout { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side" "faq"; gap: 2rem; }
body.ca-svc .sv-main { grid-area: main; scroll-margin-top: calc(var(--sv-top) + 16px); }
body.ca-svc .sv-side { grid-area: side; }
body.ca-svc .sv-faq { grid-area: faq; }
@media (min-width: 1024px) {
    body.ca-svc .sv-layout { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "main side" "faq side"; gap: 2.5rem clamp(2rem, 4vw, 3.5rem); align-items: start; }
    body.ca-svc .sv-side { align-self: stretch; }
    body.ca-svc .sv-side .sv-card { position: sticky; top: calc(var(--sv-top) + 24px); }
}

/* What we arrange: a card grid, icon free, scannable */
body.ca-svc .sv-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 640px) { body.ca-svc .sv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; } }
body.ca-svc .sv-item { margin: 0; display: flex; flex-direction: column; background: var(--ui-paper); border: 1px solid var(--ui-line); border-radius: var(--ui-radius); overflow: hidden; container-type: inline-size; }
body.ca-svc .sv-item-media { aspect-ratio: 16 / 9; background: var(--ui-tint); overflow: hidden; }
body.ca-svc .sv-item-media img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
body.ca-svc .sv-item-body { padding: 1.1rem 1.2rem 1.3rem; }
body.ca-svc .sv-item-desc { font-size: 16px; line-height: 1.6; color: var(--ui-ink-2); }
body.ca-svc .sv-item-text { background: var(--ui-tint); justify-content: center; }
body.ca-svc .sv-item-text .sv-item-body { padding: 1.5rem 1.4rem; }
/* An odd last card spans the row so the grid closes square */
@media (min-width: 640px) {
    body.ca-svc .sv-grid > .sv-item:last-child:nth-child(odd) { grid-column: 1 / -1; flex-direction: row; }
    body.ca-svc .sv-grid > .sv-item:last-child:nth-child(odd) .sv-item-media { flex: 1 1 0; aspect-ratio: auto; min-height: 220px; }
    body.ca-svc .sv-grid > .sv-item:last-child:nth-child(odd) .sv-item-body { flex: 1 1 0; align-self: center; padding: 1.5rem; }
}

/* The card that stays with you */
body.ca-svc .sv-card { display: grid; gap: .75rem; padding: 1.5rem; background: var(--ui-paper); border: 1px solid var(--ui-line); border-radius: var(--ui-radius); box-shadow: var(--ui-shadow); }
body.ca-svc .sv-card .sv-label { margin: 0; }
body.ca-svc .sv-card-title { font-weight: 600; font-size: 1.3rem; line-height: 1.3; color: var(--ui-ink); }
body.ca-svc .sv-card-for { font-size: 15px; color: var(--ui-ink-2); padding: .5rem .8rem; border-radius: var(--ui-radius-sm); background: var(--ui-tint); }
body.ca-svc .sv-card .sv-btn { width: 100%; }
body.ca-svc .sv-card-wide { grid-template-columns: minmax(0, 1fr); align-items: center; gap: 1.25rem 2rem; background: var(--ui-tint); box-shadow: none; padding: clamp(1.5rem, 4vw, 2.5rem); }
body.ca-svc .sv-card-wide .sv-card-title { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); max-width: 28em; margin-top: .4rem; }
body.ca-svc .sv-card-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (min-width: 900px) {
    body.ca-svc .sv-card-wide { grid-template-columns: minmax(0, 1fr) auto; }
    body.ca-svc .sv-card-wide .sv-btn { width: auto; }
}

/* Questions as an accordion */
body.ca-svc .sv-acc { border-top: 1px solid var(--ui-line); }
body.ca-svc .sv-q { border-bottom: 1px solid var(--ui-line); }
body.ca-svc .sv-q summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 56px; padding: .9rem 0; cursor: pointer; font-weight: 600; font-size: 17px; line-height: 1.4; color: var(--ui-ink); }
body.ca-svc .sv-q summary::-webkit-details-marker { display: none; }
body.ca-svc .sv-plus { flex: none; color: var(--ui-accent); transition: transform var(--ca-transition); }
body.ca-svc .sv-q[open] .sv-plus { transform: rotate(45deg); }
body.ca-svc .sv-a { padding: 0 0 1.1rem; color: var(--ui-ink-2); font-size: 16px; line-height: 1.65; max-width: 44em; }
body.ca-svc .sv-a p + p { margin-top: .6rem; }

/* Anything in the content the layout did not recognise: printed, readable, light */
body.ca-svc .sv-rest { margin-top: 2rem; }
body.ca-svc .sv-rest, body.ca-svc .sv-rest * { background: transparent !important; color: var(--ui-ink) !important; font-family: 'Jost', sans-serif !important; font-style: normal !important; text-transform: none !important; letter-spacing: 0 !important; text-shadow: none !important; }
body.ca-svc .sv-rest img { max-width: 100%; height: auto; border-radius: var(--ui-radius-sm); }

/* Rails: case rail and the other services */
body.ca-svc .sv-sec-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin: 0 0 1rem; }
body.ca-svc .sv-sec-head .sv-h2 { margin: 0; }
body.ca-svc .sv-rail-nav { display: none; align-items: center; gap: .5rem; }
body.ca-svc .sv-count { font-size: 14px; font-weight: 500; color: var(--ui-ink-2); font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: center; }
body.ca-svc .sv-step { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--ui-line); background: var(--ui-paper); color: var(--ui-ink); cursor: pointer; transition: border-color var(--ca-transition); }
body.ca-svc .sv-step:hover { border-color: var(--ui-ink); }
body.ca-svc .sv-step[disabled] { opacity: .35; cursor: default; border-color: var(--ui-line); }
body.ca-svc.sv-js .sv-rail-nav { display: flex; }
body.ca-svc.sv-js .sv-rail-nav[hidden] { display: none; }
body.ca-svc .sv-rail { list-style: none; margin: 0; display: grid; grid-auto-flow: column; gap: 1rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: max(var(--sv-gutter), calc((100vw - 1200px) / 2 + var(--sv-gutter))); padding: .25rem max(var(--sv-gutter), calc((100vw - 1200px) / 2 + var(--sv-gutter))) 1rem; scrollbar-width: thin; scrollbar-color: var(--ui-line) transparent; }
body.ca-svc .sv-rail > li { margin: 0; scroll-snap-align: start; }

/* Engagements */
body.ca-svc .sv-case-rail { grid-auto-columns: min(86vw, 440px); }
body.ca-svc .sv-case { display: flex; flex-direction: column; background: var(--ui-paper); border: 1px solid var(--ui-line); border-radius: var(--ui-radius); overflow: hidden; height: 100%; }
body.ca-svc .sv-case-media { aspect-ratio: 3 / 2; background: var(--ui-tint); overflow: hidden; }
body.ca-svc .sv-case-media img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
body.ca-svc .sv-case-body { padding: 1.2rem 1.3rem 1.4rem; }
body.ca-svc .sv-case-body .sv-label { letter-spacing: .04em; text-transform: none; }
body.ca-svc .sv-case-body p:not(.sv-label) { font-size: 16px; line-height: 1.65; color: var(--ui-ink-2); }
body.ca-svc .sv-case-body p:not(.sv-label) + p { margin-top: .7rem; }
body.ca-svc .sv-begin-band { padding-top: 0; }

/* The other services: the hub's tiles in a row */
body.ca-svc .sv-others { background: var(--ui-tint); }
body.ca-svc .sv-tile-rail { grid-auto-columns: min(78vw, 300px); }
body.ca-svc .sv-tile { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ui-ink); background: var(--ui-paper); border: 1px solid var(--ui-line); border-radius: var(--ui-radius); overflow: hidden; transition: box-shadow var(--ca-transition), transform var(--ca-transition); }
body.ca-svc .sv-tile:hover { box-shadow: var(--ui-shadow); transform: translateY(-2px); color: var(--ui-ink); }
body.ca-svc .sv-tile-media { aspect-ratio: 16 / 10; background: var(--ui-tint); overflow: hidden; }
body.ca-svc .sv-tile-media img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; transition: transform 600ms ease; }
body.ca-svc .sv-tile:hover .sv-tile-media img { transform: scale(1.03); }
body.ca-svc .sv-tile-body { display: flex; flex-direction: column; flex: 1; padding: 1.1rem 1.2rem 1.25rem; }

/* Flights and hotels (2026-10-10): no photograph of ours yet. The hero's right column is a panel of key points,
   how it works is a numbered row under the cards, and their tiles in the rail are words on tint. */
body.ca-svc .sv-keys { list-style: none; margin: 0; padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 0; background: var(--ui-tint); border: 1px solid var(--ui-line); border-radius: var(--ui-radius); align-self: center; }
body.ca-svc .sv-keys li { margin: 0; padding: .95rem 0 .95rem 2rem; position: relative; font-weight: 500; font-size: 17px; line-height: 1.45; color: var(--ui-ink); border-top: 1px solid var(--ui-line); }
body.ca-svc .sv-keys li:first-child { border-top: 0; padding-top: .2rem; }
body.ca-svc .sv-keys li:last-child { padding-bottom: .2rem; }
body.ca-svc .sv-keys li::before { content: ""; position: absolute; left: 0; top: calc(.95rem + .5em); width: .7rem; height: .38rem; border-left: 2px solid var(--ui-accent); border-bottom: 2px solid var(--ui-accent); transform: rotate(-45deg); }
body.ca-svc .sv-keys li:first-child::before { top: calc(.2rem + .5em); }
body.ca-svc .sv-how-h { margin-top: 2.5rem; }
body.ca-svc .sv-how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 640px) { body.ca-svc .sv-how { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body.ca-svc .sv-how li { margin: 0; padding: 1.2rem 1.2rem 1.3rem; background: var(--ui-paper); border: 1px solid var(--ui-line); border-radius: var(--ui-radius); }
body.ca-svc .sv-how-n { display: block; font-weight: 600; font-size: 14px; letter-spacing: .08em; color: var(--ui-accent); margin-bottom: .5rem; font-variant-numeric: tabular-nums; }
body.ca-svc .sv-how p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ui-ink-2); }
body.ca-svc .sv-tile-text { background: var(--ui-tint); }
body.ca-svc .sv-tile-text .sv-tile-body { justify-content: flex-start; padding-top: 1.5rem; }
body.ca-svc .sv-tile-body p { font-size: 16px; line-height: 1.55; color: var(--ui-ink); }
body.ca-svc .sv-num { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--ui-accent); font-variant-numeric: tabular-nums; margin: 0 0 .35rem; }
body.ca-svc .sv-cta { display: inline-flex; align-items: center; gap: .4rem; margin-top: auto; padding-top: .9rem; font-weight: 600; font-size: 16px; }
body.ca-svc .sv-arrow { flex: none; color: var(--ui-accent); transition: transform var(--ca-transition); }
body.ca-svc .sv-tile:hover .sv-arrow { transform: translateX(3px); }
@media (hover: hover) {
    body.ca-svc .sv-tile-rail:has(.sv-tile:hover) .sv-tile:not(:hover) img { filter: saturate(.55); }
}

/* Phones */
@media (max-width: 639px) {
    body.ca-svc .sv-actions .sv-btn { flex: 1 1 100%; }
    body.ca-svc .sv-card-actions .sv-btn { flex: 1 1 100%; }
}

/* Scroll-driven reveal, only where supported and motion is welcome */
@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        @keyframes sv-rise { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
        body.ca-svc .sv-item { animation: sv-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    }
    @view-transition { navigation: auto; }
}
@media (prefers-reduced-motion: reduce) {
    body.ca-svc .sv-tile, body.ca-svc .sv-tile-media img, body.ca-svc .sv-arrow, body.ca-svc .sv-plus { transition: none; }
    body.ca-svc .sv-tile:hover, body.ca-svc .sv-tile:hover .sv-tile-media img { transform: none; }
}

/* The customizer prints h1:not(.entry-title):not(.page-title):not(.site-title) { font-size: 24px } inline
   (specificity 0,3,1) and the same for h2 and h3. These outrank it so the scale above holds. */
body.ca-svc main.sv h1.sv-h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.6rem) !important; line-height: 1.1 !important; }
body.ca-svc main.sv h2.sv-h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.25rem); }
body.ca-svc main.sv h3.sv-h3 { font-size: 19px; }
@media (max-width: 639px) { body.ca-svc main.sv h3.sv-h3 { font-size: 18px; } }

/* The content's own <picture> wrappers (WebP beside JPEG) must not break the cover-fit boxes */
body.ca-svc .sv-hero-media picture, body.ca-svc .sv-item-media picture, body.ca-svc .sv-case-media picture { display: contents; }
body.ca-svc .sv-hero-media img, body.ca-svc .sv-item-media img, body.ca-svc .sv-case-media img { height: 100% !important; }

/* Phones: the rail head never pushes its arrows off the edge */
body.ca-svc .sv-sec-head { flex-wrap: wrap; }
body.ca-svc .sv-sec-head .sv-h2 { min-width: 0; flex: 1 1 auto; }
@media (max-width: 639px) {
    body.ca-svc .sv-count { display: none; }
}

/* Named partner (ca-services.php, 2026-10-15: Nursing & Consulting Switzerland on /services/private-nursing/).
   Under the begin card in the side column: who provides the service, in their own line, with a link out. */
body.ca-svc .sv-partner { margin-top: 1.25rem; padding: 1.25rem 1.4rem; border: 1px solid var(--ui-line); border-radius: var(--ui-radius); background: var(--ui-paper); }
body.ca-svc .sv-partner .sv-label { margin: 0 0 .6rem; }
body.ca-svc .sv-partner-logo { display: block; height: 48px; width: auto; max-width: 100%; margin: 0 0 .75rem; }
body.ca-svc .sv-partner-name { margin: 0 0 .35rem; font-weight: 600; font-size: 18px; color: var(--ui-ink); }
body.ca-svc .sv-partner-line { margin: 0 0 .8rem; font-size: 15px; line-height: 1.55; color: var(--ui-ink-2); }
body.ca-svc .sv-partner-link { font-size: 15px; color: var(--ui-ink); text-decoration: none; border-bottom: 1px solid var(--ui-accent); }
body.ca-svc .sv-partner-link:hover { color: var(--ui-accent); }
