/* Our Services (/services/), ported from the site concept v3 (parts/pages/services.css). Seven services from one team,
   in the order a customer meets them. A photo-led head (the workshop, allowed on this page only), then the lifecycle: a
   sticky index carrying the survey line vertically beside seven chapters in four families (cutout shelves for 01 and 07,
   compact rows for 02 to 04, real workshop photos for 05 and 06), then the navy end box. Below 1024px the index becomes
   a chip row and the line is hidden. Prefix sv-.
   Port notes: sticky offsets add the admin bar (--wp-bar); a product without a photo shows its model mark (.ptile-mark). */

/* ---------- Head: copy and the workshop photo ---------- */
.sv-head .ph-grid { align-items: center; }
.sv-hero { justify-self: end; width: min(100%, 460px); }
.sv-hero .frame { aspect-ratio: 4 / 5; border-radius: 24px; box-shadow: var(--shadow-card); }
.sv-hero img { object-position: 42% 38%; }
.sv-hero figcaption { margin-top: 14px; }

/* ---------- The lifecycle: index + chapters ---------- */
.sv-life { padding-top: 0; }
.sv-life-grid { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 0 clamp(48px, 6vw, 104px); align-items: start; }
.sv-life-grid::before { content: ""; grid-column: 1 / -1; height: 1px; margin-bottom: clamp(48px, 5vw, 72px); background: var(--line); }

/* The index: number + name per service, the survey line through the stations */
.sv-index { position: sticky; top: calc(104px + var(--wp-bar)); }
.sv-ix-label { margin-bottom: 12px; padding-left: 48px; font: 500 12px/1.3 var(--font-sub); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.sv-ix { --sline-x: 17px; --sline-top: 26px; --sline-bottom: 26px; }
.sv-ix ol { display: grid; grid-auto-rows: minmax(52px, auto); }
.sv-ix a { position: relative; display: grid; grid-template-columns: 34px 26px minmax(0, 1fr); gap: 0 12px; align-items: center; min-height: 52px; padding-block: 6px; color: var(--muted); transition: color var(--t-fast) var(--ease); }
.sv-ix .sline-station { left: var(--sline-x); top: 50%; }
.sv-ix-no { grid-column: 2; font: 500 13px/1 var(--font-sub); letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.sv-ix-name { grid-column: 3; font: 600 16px/1.25 var(--font-display); letter-spacing: -0.005em; }
.sv-ix a:hover { color: var(--ink); }
.sv-ix a.is-on { color: var(--ink); }
.sv-ix a.is-on .sv-ix-no { color: var(--accent-ink); }
.sv-ix a:focus-visible { outline-offset: 0; }
.sv-ix-wa { margin: 24px 0 0 46px; }
.sv-ix-wa svg { flex: none; }

/* Chapters: one grid, one type scale, three families */
.sv-ch { padding-block: clamp(56px, 6vw, 88px); border-top: 1px solid var(--line); }
.sv-ch:first-child { padding-top: 0; border-top: 0; }
.sv-ch:last-child { padding-bottom: 0; }
.sv-mark { display: flex; align-items: center; gap: 14px; }
.sv-mark .ico { width: 44px; height: 44px; border-radius: var(--radius); display: grid; place-items: center; background: var(--tint); color: var(--brand); transition: background-color var(--t-med) var(--ease), color var(--t-med) var(--ease); }
.sv-mark .ico svg { width: 22px; height: 22px; }
.sv-ch.lit .sv-mark .ico { background: var(--brand); color: var(--on-brand); }
.sv-no { font: 500 13px/1 var(--font-sub); letter-spacing: 0.12em; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.sv-ch h2 { margin-top: 20px; font-size: clamp(1.8rem, 2.6vw, 2.35rem); letter-spacing: -0.02em; line-height: 1.08; max-width: 20ch; }
.sv-sum { font-size: 17.5px; line-height: 1.65; color: var(--ink); max-width: 36em; text-wrap: pretty; }
.sv-pts { display: grid; gap: 12px; }
.sv-pts li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; font-size: 15.5px; line-height: 1.5; color: var(--ink); }
.sv-pts svg { width: 20px; height: 20px; margin-top: 1px; color: var(--accent-ink); }
.sv-ch .pcta { margin-top: 20px; }
.sv-ch .pcta:hover { color: var(--accent-ink); }
.sv-cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px clamp(28px, 4vw, 56px); align-items: start; margin-top: 22px; }
.sv-cols .sv-pts { padding-top: 4px; }

/* Family 1, compact rows (02 to 04): the name left, the substance right */
.sv-ch--row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px clamp(28px, 4vw, 56px); align-items: start; padding-block: clamp(44px, 5vw, 68px); }
.sv-ch--row h2 { margin-top: 18px; font-size: clamp(1.5rem, 2vw, 1.85rem); max-width: 14ch; }
.sv-row-body { padding-top: 58px; }
.sv-row-body .sv-pts { margin-top: 20px; }
.sv-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.sv-actions + .pcta { margin-top: 10px; }
.sv-tel svg { color: var(--brand); }

/* Family 2, cutout shelves (01, 07): real product cutouts standing on one baseline */
.sv-shelf { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; margin-top: clamp(32px, 4vw, 48px); padding: clamp(22px, 2.6vw, 34px) clamp(10px, 1.6vw, 20px) 18px; border-radius: 24px; background: radial-gradient(80% 90% at 50% 30%, var(--surface) 0%, var(--tint) 100%); border: 1px solid var(--line); }
.sv-item { display: flex; flex-direction: column; align-items: center; height: 100%; padding: 6px 4px 10px; border-radius: var(--radius); text-align: center; }
.sv-cut { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: clamp(150px, 15vw, 204px); }
.sv-cut img { width: auto; height: auto; max-width: 86%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 16px 16px rgba(11, 31, 58, 0.16)); transform-origin: 50% 100%; transition: transform 600ms var(--ease); }
.sv-k { margin-top: 18px; font: 500 12px/1.2 var(--font-sub); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-ink); }
.sv-item b { margin-top: 6px; font: 600 16px/1.25 var(--font-display); letter-spacing: -0.005em; color: var(--brand); }
.sv-cut + b { margin-top: 18px; }
a.sv-item { transition: background-color var(--t-fast) var(--ease); }
a.sv-item:hover { background: rgba(255, 255, 255, 0.7); }
a.sv-item:hover .sv-cut img { transform: translateY(-4px) scale(1.04); }
a.sv-item:hover b { color: var(--accent-ink); }

/* Family 3, workshop photos (05, 06) */
.sv-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); margin-top: clamp(32px, 4vw, 48px); }
.sv-photos .frame { aspect-ratio: 3 / 4; }
.sv-photos figure:nth-child(1) img { object-position: 45% 45%; }
.sv-photos figure:nth-child(2) img { object-position: 55% 35%; }
.sv-photos figure:nth-child(3) img { object-position: 45% 30%; }
.sv-photos:focus-visible { outline-offset: 6px; }
.sv-hook { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 32px; align-items: center; margin-top: clamp(28px, 3vw, 40px); padding: clamp(22px, 2.6vw, 32px) clamp(22px, 3vw, 36px); border-radius: var(--radius-lg); background: var(--tint); }
.sv-hook h3 { font-size: clamp(1.3rem, 1.8vw, 1.55rem); letter-spacing: -0.01em; }
.sv-hook p { margin-top: 8px; font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 34em; }
.sv-hook-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.sv-split { display: grid; gap: 32px clamp(32px, 4vw, 64px); align-items: center; }
.sv-split--media-left { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.sv-split--media-left .sv-split-media { grid-column: 1; grid-row: 1; }
.sv-split--media-left .sv-split-body { grid-column: 2; grid-row: 1; }
.sv-split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); }
.sv-split-body .sv-sum { margin-top: 18px; }
.sv-split-body .sv-pts { margin-top: 20px; }
.sv-split-media .frame { aspect-ratio: 4 / 5; }
.sv-split-media img { object-position: 40% 45%; }
.sv-shelf--col { margin-top: 0; align-self: center; }
.sv-shelf--col .sv-cut { height: clamp(130px, 12vw, 176px); }
.sv-shelf--col .sv-item b { font-size: 15px; text-wrap: balance; }

/* Accessory tiles under the spares copy */
.sv-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; max-width: 460px; }
.sv-tile { display: block; }
.sv-tile-img { position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius); background: var(--tint); overflow: hidden; transition: box-shadow var(--t-med) var(--ease), transform var(--t-med) var(--ease); }
.sv-tile-img img { position: absolute; inset: 0; margin: auto; width: 80%; height: 80%; object-fit: contain; transition: transform 600ms var(--ease); }
.sv-tile-l { display: block; margin-top: 10px; font: 500 14px/1.3 var(--font-sub); color: var(--ink); transition: color var(--t-fast) var(--ease); }
.sv-tile:hover .sv-tile-img { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.sv-tile:hover .sv-tile-img img { transform: scale(1.06); }
.sv-tile:hover .sv-tile-l { color: var(--accent-ink); }

/* Port: a product without a photo yet shows its model mark in the cutout slot (never a stand-in image) */
.sv-cut .ptile-mark { align-self: center; }
.sv-tile-img .ptile-mark { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(1.4rem, 2vw, 1.8rem); }

/* ---------- End band ---------- */
.sv-end { padding-top: 0; }
.cta-box .sv-end-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; margin-top: 16px; font: 500 16px/1.4 var(--font-sub); color: var(--on-brand-muted); }
.sv-end-contact a { display: inline-block; padding-block: 10px; color: var(--on-brand); text-decoration: underline; text-decoration-color: rgba(238, 242, 248, 0.28); text-underline-offset: 5px; transition: color var(--t-fast) var(--ease), text-decoration-color var(--t-fast) var(--ease); }
.sv-end-contact a:hover { color: var(--surface); text-decoration-color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .sv-life-grid { grid-template-columns: 236px minmax(0, 1fr); }
  .sv-ix-label { padding-left: 0; }
  .sv-ix-wa { margin-left: 0; }
  .sv-split--media-left { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
/* Below 1024px: no sticky column; the index becomes a chip row under the head and the line is hidden */
@media (max-width: 1023px) {
  .sv-life-grid { grid-template-columns: minmax(0, 1fr); }
  .sv-life-grid::before { margin-bottom: 28px; }
  .sv-index { position: static; margin-bottom: clamp(40px, 6vw, 56px); }
  .sv-ix-label { padding-left: 0; }
  .sv-ix .sline-track, .sv-ix .sline-fill, .sv-ix .beacon, .sv-ix .sline-station, .sv-ix-wa { display: none; }
  .sv-ix ol { display: flex; gap: 8px; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; scroll-padding-inline: var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain; -webkit-mask-image: linear-gradient(90deg, var(--ink) 86%, transparent); mask-image: linear-gradient(90deg, var(--ink) 86%, transparent); }
  .sv-ix ol::-webkit-scrollbar { display: none; }
  .sv-ix li { flex: none; }
  .sv-ix li:last-child { padding-right: 32px; }
  .sv-ix a { display: inline-flex; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); white-space: nowrap; touch-action: manipulation; transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
  .sv-ix a:hover { border-color: var(--muted); transform: translateY(-1px); }
  .sv-ix a.is-on .sv-ix-no { color: var(--accent-ink); }
  .sv-ix-no { color: var(--accent-ink); }
  .sv-ix-name { font: 500 14.5px/1 var(--font-sub); letter-spacing: 0; }
  .sv-ix a:focus-visible { border-radius: 999px; }
}
@media (max-width: 900px) {
  .sv-hero { justify-self: stretch; width: 100%; }
  .sv-hero .frame { aspect-ratio: 5 / 4; }
}
@media (max-width: 760px) {
  .sv-cols, .sv-ch--row, .sv-split--media-left, .sv-split--even, .sv-hook { grid-template-columns: minmax(0, 1fr); }
  .sv-split--media-left .sv-split-media, .sv-split--media-left .sv-split-body { grid-column: auto; grid-row: auto; }
  .sv-row-body { padding-top: 0; }
  .sv-ch--row h2 { max-width: none; }
  .sv-shelf--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .sv-cut { height: 150px; }
  .sv-shelf--col .sv-cut { height: 112px; }
  .sv-shelf--col .sv-item b { font-size: 14.5px; }
  .sv-split-media .frame { aspect-ratio: 4 / 5; }
  .sv-photos { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(74%, 300px); overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 8px; scroll-padding-inline: var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain; }
  .sv-photos::-webkit-scrollbar { display: none; }
  .sv-photos figure { scroll-snap-align: start; }
  .sv-hook-actions .btn { flex: 1 1 auto; }
  .sv-actions .btn { flex: 1 1 auto; }
  .cta-box .sv-end-contact { flex-direction: column; align-items: flex-start; }
  .sv-end-contact span[aria-hidden] { display: none; }
  .sv-end-contact a { padding-block: 8px; }
}
