/* ============================================================================
   Sea Cross V2: Services
   The working side of the operation. Cool steel, fog, harbour ink and painted
   deck green; warm paper only where the requisition is written up.
   Type is heavy and tight at plain width (the homepage speaks expanded, About
   speaks at book weight). Rails are steel flat bar, not hairlines.

   Rhythm: a quiet contents sheet; Ship Supply as a loading scene; Technical &
   Repair as the peak (a deck hatch opens onto the engine room); Safety as the
   quiet reading stop; Crew & Logistics as the last movement, running sideways
   along a quay to the visitor's own requisition.

   Build order: the static layouts below are the page. The scenes (pinned
   stages, scroll-linked movement) are layered on only where they can run well:
   wide and tall enough, scroll timelines supported, motion not reduced.
   ========================================================================== */

.page-services {
  --svc-fog: #dbded9;        /* fog: the ground of the page                   */
  --svc-fog-2: #cfd3cd;      /* fog, a plate down                             */
  --svc-fog-3: #e6e8e3;      /* fog, lifted                                   */
  --svc-rail: #2b353e;       /* steel flat bar                                */
  --svc-steel: #4f5b63;      /* weathered steel text on fog (5.1:1)           */
  --svc-deck: #3f5549;       /* painted deck green                            */
  --svc-on-dark: #e4e7e1;    /* type on ink and deck                          */
  --svc-on-dark-2: #b9c0ba;  /* secondary type on ink                         */
  --svc-on-deck-2: #c7cdc7;  /* secondary type on deck (5.0:1)                */
  --svc-topside: #1d252c;    /* a hull's topside                              */
  --svc-bottom: #7d3a24;     /* a hull's red bottom, weathered                */
  --svc-heavy: 800;
  --svc-grade: saturate(.42) contrast(1.06) brightness(.98);
  --svc-tread: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30'%3E%3Cg stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M4.5 10.5l6-6M19.5 25.5l6-6' stroke='rgba(255,255,255,.13)'/%3E%3Cpath d='M19.5 4.5l6 6M4.5 19.5l6 6' stroke='rgba(255,255,255,.13)'/%3E%3Cpath d='M5.5 11.5l6-6M20.5 26.5l6-6M20.5 5.5l6 6M5.5 20.5l6 6' stroke='rgba(0,0,0,.28)'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 30px 30px;
  background: var(--svc-fog);
}
html:has(.page-services) { background: var(--svc-fog); }

/* ------------------------------------------------------------ shared marks */
.svc-crumbs { font-size: .84rem; color: var(--svc-steel); }
.svc-crumbs ol { display: flex; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.svc-crumbs li + li::before { content: "/"; margin-right: .5rem; color: rgba(21, 27, 33, .35); }
.svc-crumbs a { text-decoration: none; }
.svc-crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }

.svc-rail { display: block; height: 6px; background: var(--svc-rail); }
.svc-h { font-size: var(--sx-t-1); font-weight: var(--svc-heavy); letter-spacing: -.045em; line-height: .94; text-wrap: balance; }
.svc-sub { margin-top: .9rem; font-size: var(--sx-t-3); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.svc-sum { margin-top: .8rem; max-width: 44ch; color: var(--svc-steel); line-height: 1.55; }
/* A company photograph, kept near the size it was taken at (410px originals). */
.svc-print { margin: 0; }
.svc-print img { width: 100%; height: auto; aspect-ratio: 410 / 300; object-fit: cover; filter: var(--svc-grade); background: var(--svc-fog-2); }
.svc-print figcaption { margin-top: .45rem; font-size: .8rem; color: var(--svc-steel); }

/* One service line: a title and what the service covers. */
.svc-line { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; align-content: start; scroll-margin-top: calc(var(--header-h) + 4rem); }
.svc-line__title { grid-column: 1; grid-row: 1; font-size: var(--sx-t-3); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.svc-line__text { grid-column: 1; grid-row: 2; margin-top: .4rem; max-width: 52ch; font-size: .98rem; line-height: 1.5; color: var(--svc-steel); }
.svc-line__print { grid-column: 1; grid-row: 2; margin-top: .9rem; width: min(100%, 15rem); height: auto; aspect-ratio: 410 / 300; object-fit: cover; filter: var(--svc-grade); }
.svc-line.has-print .svc-line__text { grid-row: 3; }

/* The chapter marker: phones only, it holds the group's name while its lines pass. */
.svc-marker { display: none; }
.svc-scene, .svc-bay { position: relative; overflow-x: clip; }
.svc-stage { position: relative; }

/* ------------------------------------------------------------------ opening */
.svc-open { padding-block: calc(var(--header-h) + clamp(2rem, 5vh, 3.5rem)) clamp(3rem, 7vh, 5rem); background: var(--svc-fog); }
.svc-open__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sx-gap); }
.svc-crumbs { grid-column: 1 / -1; }
.svc-open__title {
  grid-column: 1 / span 10; margin-top: clamp(1.5rem, 4vh, 2.5rem);
  font-size: clamp(2.6rem, 1.2rem + 3.6vw, 5.1rem); font-weight: var(--svc-heavy); letter-spacing: -.05em; line-height: .92; text-wrap: balance; max-width: 21ch;
}
.svc-open__lede { grid-column: 1 / span 6; margin-top: 1.4rem; max-width: 46ch; font-size: var(--sx-t-lede); line-height: 1.45; color: var(--svc-steel); }
.svc-contents { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--sx-gap); margin-top: clamp(2.5rem, 6vh, 4rem); }
.svc-contents__head { display: block; margin-top: .9rem; font-size: 1.15rem; font-weight: var(--svc-heavy); letter-spacing: -.025em; text-decoration: none; }
.svc-contents ol { margin-top: .8rem; display: grid; gap: .1rem; }
.svc-contents li a { display: block; padding-block: .3rem; font-size: .95rem; line-height: 1.35; text-decoration: none; color: var(--sx-ink-2); }
@media (hover: hover) and (pointer: fine) {
  .svc-contents a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
}
.svc-open__std { grid-column: 7 / -1; margin-top: clamp(1.75rem, 4vh, 2.5rem); font-size: .86rem; line-height: 1.5; color: var(--svc-steel); }

/* ============================================================ 01 ship supply
   Static: the head at the left, the stores units stacked on a tread-plate deck. A load,
   not a list: big units, uneven as real stowage is, standing on the deck edge. */
.svc-supply { background: var(--svc-fog-2); border-top: 6px solid var(--svc-rail); }
.svc-supply__stage { padding-top: clamp(5rem, 11vh, 8rem); }
.svc-supply__grid { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sx-gap); align-items: end; }
.svc-supply__head { grid-column: 1 / span 4; grid-row: 1; align-self: start; position: relative; z-index: 1; }
.svc-supply__head .svc-h { font-size: clamp(2.6rem, 1.2rem + 3.4vw, 5rem); }
/* Loaded first, sits lowest: the first line is the bottom of the stack. */
.svc-supply__stack { grid-column: 4 / -1; grid-row: 1; display: flex; flex-direction: column-reverse; }
.svc-supply__stack .svc-line {
  grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(1.25rem, 2.4vw, 2.5rem);
  padding: clamp(1.25rem, 2.8vh, 2rem) clamp(1.5rem, 2.8vw, 2.75rem);
  background: linear-gradient(180deg, #eef0eb, var(--svc-fog-3)); border-top: 8px solid var(--svc-rail);
  box-shadow: 0 26px 26px -22px rgba(21, 27, 33, .62), 0 2px 0 rgba(21, 27, 33, .12);
}
.svc-supply__stack .svc-line:nth-child(2) { margin: 0 6vw 0 -9vw; }
.svc-supply__stack .svc-line:nth-child(3) { margin: 0 0 0 7vw; }
.svc-supply__stack .svc-line__title { font-size: clamp(1.6rem, .85rem + 1.9vw, 2.75rem); font-weight: var(--svc-heavy); letter-spacing: -.04em; line-height: 1; }
.svc-supply__stack .svc-line__text { max-width: 46ch; }
/* Evidence slotted into the unit: the company's own photograph, never larger than it was taken. */
.svc-supply__stack .svc-line__print { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: clamp(130px, 13vw, 200px); margin: 0; box-shadow: 0 0 0 4px #eef0eb, 0 0 0 5px rgba(21, 27, 33, .2); }
.svc-supply__stack .svc-line.has-print .svc-line__text { grid-row: 2; }
/* The deck: tread plate behind a raised steel coaming, the edge the load stands on. */
.svc-deck__word { display: none; }
.svc-deck { position: relative; z-index: 1; height: clamp(4rem, 13vh, 7.5rem); background: var(--svc-tread), linear-gradient(180deg, #3b4750, #2b353e); border-top: 12px solid #56626a; box-shadow: inset 0 7px 0 rgba(0, 0, 0, .28); }

/* ====================================================== 02 technical & repair
   Static: the engine room on the left, the lines on the right, ink ground. */
.svc-tech { background: var(--sx-night); color: var(--svc-on-dark); }
.svc-tech :is(.svc-sum, .svc-line__text, figcaption) { color: var(--svc-on-dark-2); }
.svc-tech figcaption a { color: inherit; }
.svc-tech__stage {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sx-gap); align-items: start;
  max-width: var(--sx-maxw); margin-inline: auto; padding: clamp(5rem, 11vh, 8rem) var(--sx-gutter);
}
.svc-tech__room { grid-column: 1 / span 7; grid-row: 1 / span 2; margin: 0 0 0 calc(-1 * var(--sx-gutter)); }
.svc-tech__img { position: relative; height: min(70svh, 42rem); overflow: hidden; background: var(--svc-rail); }
.svc-tech__img picture, .svc-tech__img img { width: 100%; height: 100%; }
.svc-tech__img img { object-fit: cover; object-position: 50% 45%; filter: saturate(.55) contrast(1.08) brightness(.9); }
.svc-tech__room figcaption { margin-top: .7rem; padding-left: var(--sx-gutter); font-size: .8rem; }
.svc-hatch { display: none; }
.svc-tech__diver { grid-column: 1 / span 3; grid-row: 3; margin-top: 2rem; width: min(100%, 240px); }
.svc-tech__info { grid-column: 9 / -1; grid-row: 1 / span 3; }
.svc-tech__lines { margin-top: clamp(2rem, 5vh, 3rem); }
.svc-tech__lines .svc-line { padding-block: 1.25rem; border-top: 2px solid var(--sx-line-dark); }
.svc-tech__lines .svc-line:last-child { border-bottom: 2px solid var(--sx-line-dark); }

/* ================================================== 03 safety & compliance
   The quiet stop, run as an inspection. No boxes: each line is a measured zone marked by four
   corner brackets on the deck paint, with a dimension line over it. A measuring rule runs down
   the margin. The zones sit on a diagonal, the way marked areas sit on a deck. */
.svc-safe { position: relative; padding-block: clamp(5rem, 12vh, 8rem); background: var(--svc-deck); color: var(--svc-on-dark); }
.svc-safe::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--sx-gutter) * .42); width: 16px;
  background:
    linear-gradient(90deg, rgba(233, 236, 229, .4) 0 2px, transparent 2px),
    repeating-linear-gradient(180deg, rgba(233, 236, 229, .4) 0 2px, transparent 2px 24px) 0 0 / 8px 100% no-repeat,
    repeating-linear-gradient(180deg, rgba(233, 236, 229, .55) 0 2px, transparent 2px 120px);
}
.svc-safe :is(.svc-sum, .svc-line__text) { color: var(--svc-on-deck-2); }
.svc-safe__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sx-gap); row-gap: clamp(3rem, 7vh, 4.5rem); }
.svc-safe__head { grid-column: 1 / span 5; }
.svc-h--quiet { font-size: var(--sx-t-2); letter-spacing: -.03em; }
.svc-safe__zones { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sx-gap); row-gap: clamp(3.5rem, 9vh, 6rem); }
.svc-zone { padding: clamp(1.75rem, 3.2vw, 2.75rem); }
.svc-zone:nth-child(1) { grid-column: 2 / span 6; }
.svc-zone:nth-child(2) { grid-column: 6 / -1; }
.svc-zone .svc-line__title { font-size: clamp(1.9rem, 1.1rem + 2.3vw, 3.5rem); font-weight: var(--svc-heavy); letter-spacing: -.045em; line-height: .95; color: #e9ece5; }
.svc-zone .svc-line__text { margin-top: .75rem; font-size: 1.02rem; max-width: 44ch; }
/* The safety photograph is docked beside the first zone as evidence, at its own size. */
.svc-zone .svc-line__print { position: absolute; left: calc(100% + 2rem); top: .5rem; width: min(15vw, 220px); margin: 0; }
.svc-zone.has-print .svc-line__text { grid-row: 2; }
.svc-zone__corner { position: absolute; width: clamp(26px, 2.6vw, 40px); height: clamp(26px, 2.6vw, 40px); border: 0 solid rgba(233, 236, 229, .88); }
.svc-zone__corner--tl { top: 0; left: 0; border-width: 4px 0 0 4px; }
.svc-zone__corner--tr { top: 0; right: 0; border-width: 4px 4px 0 0; }
.svc-zone__corner--bl { bottom: 0; left: 0; border-width: 0 0 4px 4px; }
.svc-zone__corner--br { bottom: 0; right: 0; border-width: 0 4px 4px 0; }
/* A dimension line over the zone, with end stops. */
.svc-zone__measure {
  position: absolute; left: 0; right: 0; top: -1.6rem; height: 12px;
  border-inline: 2px solid rgba(233, 236, 229, .7);
  background: linear-gradient(rgba(233, 236, 229, .7), rgba(233, 236, 229, .7)) 0 50% / 100% 2px no-repeat;
}

/* ===================================================== 04 crew & logistics
   Static: the head and print, the four stops along a rail, then the requisition. */
.svc-route { background: var(--svc-fog-3); }
.svc-route__stage { padding-block: clamp(5rem, 11vh, 8rem); }
.svc-route__head { max-width: var(--sx-maxw); margin: 0 auto clamp(2rem, 5vh, 3rem); padding-inline: var(--sx-gutter); }
.svc-route__track { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sx-gap); row-gap: clamp(3rem, 7vh, 4.5rem); max-width: var(--sx-maxw); margin-inline: auto; padding-inline: var(--sx-gutter); }
.svc-route__intro { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sx-gap); align-items: end; }
.svc-route__intro > :not(.svc-route__print) { grid-column: 1 / span 6; grid-row: 1; align-self: start; }
.svc-route__print { grid-column: 9 / span 4; grid-row: 1 / span 3; justify-self: end; width: min(100%, 280px); }
.svc-route__lines { grid-column: 1 / -1; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--sx-gap); padding-top: 2.75rem; }
.svc-route__lines::before { content: ""; position: absolute; left: 0; right: 0; top: 1.1rem; height: 6px; background: var(--svc-rail); }
.svc-stop { padding-top: 1.4rem; }
.svc-stop::before { content: ""; position: absolute; left: 0; top: -2.75rem; width: 6px; height: 2.6rem; background: var(--svc-rail); }
.svc-stop .svc-line__title { font-size: 1.3rem; font-weight: var(--svc-heavy); letter-spacing: -.03em; }
.svc-stop .svc-line__text { font-size: .95rem; }
.svc-route__water, .svc-route__end { display: none; }

/* =============================================================== MOTION
   Short local motion that works at every size: the mark's tick (above), the zones being walked,
   a newly marked line written onto the requisition. */
@media (prefers-reduced-motion: no-preference) {
  .svc-contents .svc-rail { transform-origin: 0 50%; animation: svc-rule .55s cubic-bezier(.6, 0, .2, 1) both; }
  .svc-contents__group:nth-child(2) .svc-rail { animation-delay: .07s; }
  .svc-contents__group:nth-child(3) .svc-rail { animation-delay: .14s; }
  .svc-contents__group:nth-child(4) .svc-rail { animation-delay: .21s; }
  @keyframes svc-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }


  @supports (animation-timeline: view()) {
    /* 03: the inspection. The brackets come in from wide and lock on the zone; once they hold,
       the dimension line is drawn across it. Nothing fades. */
    .svc-zone { view-timeline: --zone block; }
    .svc-zone__corner { animation: linear both; animation-timeline: --zone; animation-range: entry 25% cover 40%; }
    .svc-zone__corner--tl { animation-name: svc-lock-tl; }
    .svc-zone__corner--tr { animation-name: svc-lock-tr; }
    .svc-zone__corner--bl { animation-name: svc-lock-bl; }
    .svc-zone__corner--br { animation-name: svc-lock-br; }
    @keyframes svc-lock-tl { from { transform: translate(-3.5rem, -3rem); animation-timing-function: cubic-bezier(.3, 0, .1, 1); } to { transform: none; } }
    @keyframes svc-lock-tr { from { transform: translate(3.5rem, -3rem); animation-timing-function: cubic-bezier(.3, 0, .1, 1); } to { transform: none; } }
    @keyframes svc-lock-bl { from { transform: translate(-3.5rem, 3rem); animation-timing-function: cubic-bezier(.3, 0, .1, 1); } to { transform: none; } }
    @keyframes svc-lock-br { from { transform: translate(3.5rem, 3rem); animation-timing-function: cubic-bezier(.3, 0, .1, 1); } to { transform: none; } }
    .svc-zone__measure { transform-origin: 0 50%; animation: svc-measure linear both; animation-timeline: --zone; animation-range: cover 38% cover 52%; }
    @keyframes svc-measure { from { transform: scaleX(0); } to { transform: scaleX(1); } }
    .svc-zone .svc-line__print { animation: svc-dock linear both; animation-timeline: --zone; animation-range: cover 30% cover 50%; }
    @keyframes svc-dock { from { transform: translateX(4rem); animation-timing-function: cubic-bezier(.3, 0, .1, 1); } to { transform: none; } }
  }
}

/* =============================================================== SCENES
   Pinned stages on screens that can hold them. Each scene's timeline is its own
   section; "contain" is exactly the time its stage is held. */
@media (prefers-reduced-motion: no-preference) and (min-width: 900px) and (min-height: 600px) {
  @supports (animation-timeline: view()) {
    .svc-scene { view-timeline-axis: block; }
    .svc-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; overflow: clip; }

    /* -------- opening: Ship Supply's lines drop out of the sheet, into the scene below */
    .svc-open { view-timeline: --open block; view-timeline-inset: 0; }
    /* Ship Supply's lines are held back as the sheet leaves; the scene they belong to slides up over them. */
    .svc-contents__group:first-child > :not(.svc-rail) { animation: svc-hold linear both; animation-timeline: --open; animation-range: exit-crossing 0% exit-crossing 100%; }
    @keyframes svc-hold { from { transform: none; } to { transform: translateY(55vh); } }
    .svc-supply { z-index: 1; }

    /* -------- 01 ship supply: units lowered and stacked on the deck, then the deck closes over the load */
    .svc-supply { height: 300vh; view-timeline-name: --supply; }
    .svc-supply__stage { --deck-h: 15svh; padding: 0; }
    .svc-supply__grid { position: absolute; inset: calc(var(--header-h) + 1.25rem) 0 var(--deck-h) 0; margin-inline: auto; }
    .svc-supply__stack { align-self: end; }
    .svc-supply__stack .svc-line { animation: svc-lower-unit linear both; animation-timeline: --supply; }
    .svc-supply__stack .svc-line:nth-child(1) { z-index: 1; animation-range: contain 2% contain 22%; }
    .svc-supply__stack .svc-line:nth-child(2) { z-index: 2; animation-range: contain 18% contain 38%; }
    .svc-supply__stack .svc-line:nth-child(3) { z-index: 3; animation-range: contain 34% contain 54%; }
    /* Lowered on the crane: travelling fast, braked hard over the last metre, set down dead. */
    @keyframes svc-lower-unit {
      from { transform: translateY(-115svh); animation-timing-function: cubic-bezier(.25, 0, .08, 1); }
      to { transform: none; }
    }
    /* The sling it hangs from, released and hauled up once the unit is down. */
    .svc-supply__stack .svc-line::before {
      content: ""; position: absolute; left: 22%; right: 22%; bottom: calc(100% + 8px); height: 120svh;
      border-inline: 2px solid var(--svc-rail);
      animation: svc-release linear both; animation-timeline: --supply;
    }
    .svc-supply__stack .svc-line:nth-child(1)::before { animation-range: contain 22% contain 30%; }
    .svc-supply__stack .svc-line:nth-child(2)::before { animation-range: contain 38% contain 46%; }
    .svc-supply__stack .svc-line:nth-child(3)::before { animation-range: contain 54% contain 62%; }
    @keyframes svc-release { from { transform: none; } to { transform: translateY(-130svh); } }
    /* Stowed: the deck plate rises over the load and fills the frame, and is the closed hatch of the next scene. */
    .svc-deck {
      position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; height: 100svh;
      transform: translateY(calc(100svh - var(--deck-h)));
      animation: svc-stow linear both; animation-timeline: --supply; animation-range: contain 82% contain 100%;
    }
    @keyframes svc-stow { from { transform: translateY(calc(100svh - var(--deck-h))); animation-timing-function: cubic-bezier(.6, 0, .3, 1); } to { transform: none; } }
    /* As it rises the deck takes on the hatch's exact face (two cover plates, the seam between them) and carries
       the next scene's lettering, so when it fills the frame it is the closed hatch. Technical overlaps the last
       screen of this scene and pins at that same moment: no anonymous frame of plate in between. */
    .svc-deck {
      background:
        linear-gradient(90deg, transparent calc(50% - 17px), #56626a calc(50% - 17px) calc(50% - 3px), #1b2228 calc(50% - 3px) calc(50% + 3px), #56626a calc(50% + 3px) calc(50% + 17px), transparent calc(50% + 17px)),
        var(--svc-tread),
        linear-gradient(105deg, #46535c, #36424b 45%, #2b353e) 0 0 / 50% 100% no-repeat,
        linear-gradient(105deg, #46535c, #36424b 45%, #2b353e) 100% 0 / 50% 100% no-repeat;
    }
    .svc-deck__word {
      display: block; position: absolute; left: 0; top: 50%; width: 100vw; transform: translateY(-50%); text-align: center; white-space: nowrap;
      font-weight: var(--svc-heavy); font-size: clamp(3.4rem, 8.6vw, 9.5rem); letter-spacing: -.05em; line-height: 1; color: rgba(228, 231, 225, .86);
      text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
    }
    .svc-tech { margin-top: -100vh; margin-top: -100svh; z-index: 2; background: transparent; }
    /* While it overlaps that last screen the hatch stays out of sight, and appears only as it pins, on exactly
       the frame the deck has become. A hard switch to identical pixels, never a fade. */
    .svc-tech__stage { background: var(--sx-night); animation: svc-on-pin linear both; animation-timeline: --tech; animation-range: entry 0% entry 100%; }
    /* Opacity, not visibility, so the photo credit link inside stays reachable by keyboard. */
    @keyframes svc-on-pin { 0%, 99.5% { opacity: 0; } 100% { opacity: 1; } }

    /* -------- 02 technical & repair: the hatch, the drop, the window */
    .svc-tech { height: 400vh; view-timeline-name: --tech; }
    .svc-tech__stage { display: block; max-width: none; margin: 0; padding: 0; }
    .svc-tech__room { position: absolute; inset: 0; margin: 0; }
    .svc-tech__img {
      position: absolute; inset: 0; height: auto;
      transform-origin: 0 50%;
      animation: svc-window linear both; animation-timeline: --tech; animation-range: contain 44% contain 74%;
    }
    @keyframes svc-window {
      from { transform: none; animation-timing-function: cubic-bezier(.5, 0, .15, 1); }
      to { transform: translateX(var(--sx-gutter)) scale(.55); }
    }
    /* One camera move from the hatch to the window: it keeps pushing down into the room while the covers part
       and after, and is still easing when the room starts to pull back. It never holds still. */
    .svc-tech__img img { transform-origin: 50% 62%; animation: svc-descend linear both; animation-timeline: --tech; animation-range: contain 8% contain 76%; }
    @keyframes svc-descend {
      0% { transform: scale(1.04) translateY(-3%); animation-timing-function: cubic-bezier(.3, 0, .6, 1); }
      52% { transform: scale(1.3) translateY(2.5%); animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
      100% { transform: none; }
    }
    .svc-tech__room figcaption {
      position: absolute; left: var(--sx-gutter); top: calc(50% + 27.5svh + .8rem); width: 55vw; padding: 0;
      animation: svc-under linear both; animation-timeline: --tech; animation-range: contain 70% contain 86%;
    }
    @keyframes svc-under { from { transform: translateY(26svh); } to { transform: none; } }

    .svc-hatch { display: block; position: absolute; inset: 0; z-index: 3; }
    .svc-hatch__cover {
      position: absolute; top: 0; bottom: 0; width: 50%; overflow: hidden;
      background: var(--svc-tread), linear-gradient(105deg, #46535c, #36424b 45%, #2b353e);
      animation: linear both; animation-timeline: --tech; animation-range: contain 12% contain 40%;
    }
    .svc-hatch__cover--l { left: 0; border-right: 3px solid #1b2228; box-shadow: inset -14px 0 0 #56626a; animation-name: svc-part-l; }
    .svc-hatch__cover--r { right: 0; border-left: 3px solid #1b2228; box-shadow: inset 14px 0 0 #56626a; animation-name: svc-part-r; }
    @keyframes svc-part-l { from { transform: none; animation-timing-function: cubic-bezier(.6, 0, .2, 1); } to { transform: translateX(-101%); } }
    @keyframes svc-part-r { from { transform: none; animation-timing-function: cubic-bezier(.6, 0, .2, 1); } to { transform: translateX(101%); } }
    /* One line of lettering painted across both covers; it splits when they part. */
    .svc-hatch__word {
      position: absolute; top: 50%; width: 100vw; transform: translateY(-50%); text-align: center; white-space: nowrap;
      font-weight: var(--svc-heavy); font-size: clamp(3.4rem, 8.6vw, 9.5rem); letter-spacing: -.05em; line-height: 1; color: rgba(228, 231, 225, .86);
      text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
    }
    .svc-hatch__cover--l .svc-hatch__word { left: 0; }
    .svc-hatch__cover--r .svc-hatch__word { left: -50vw; }

    .svc-tech__diver {
      position: absolute; z-index: 2; margin: 0; width: min(15vw, 220px);
      left: calc(var(--sx-gutter) + 55vw - min(15vw, 220px) + 2.5rem); top: calc(50% + 27.5svh - 7rem);
      animation: svc-surface linear both; animation-timeline: --tech; animation-range: contain 64% contain 84%;
    }
    @keyframes svc-surface { from { transform: translateY(60svh); animation-timing-function: cubic-bezier(.3, 0, .12, 1); } to { transform: none; } }
    .svc-tech__info {
      position: absolute; z-index: 1; top: 0; bottom: 0; left: calc(var(--sx-gutter) + 55vw + 5vw); right: var(--sx-gutter);
      display: flex; flex-direction: column; justify-content: center; padding-top: calc(var(--header-h) * .6);
      animation: svc-slide-in linear both; animation-timeline: --tech; animation-range: contain 50% contain 76%;
    }
    @keyframes svc-slide-in { from { transform: translateX(42vw); animation-timing-function: cubic-bezier(.5, 0, .15, 1); } to { transform: none; } }
    .svc-tech__info .svc-h { font-size: clamp(2rem, 1rem + 2.4vw, 3.4rem); }
    .svc-tech__info .svc-sub { margin-top: .6rem; font-size: 1.15rem; }
    .svc-tech__info .svc-sum { font-size: .95rem; }
    .svc-tech__lines { margin-top: clamp(1rem, 3vh, 2rem); }
    .svc-tech__lines .svc-line { padding-block: clamp(.7rem, 1.8vh, 1.1rem); }
    .svc-tech__lines .svc-line__text { font-size: .92rem; }

    /* -------- 04 crew & logistics: sideways along an operational quay.
       Depth in layers: the water drifts slowest, the tanker moves at well under the quay's pace, the quay and its
       painted berth numbers move with the scroll, and each stop grows a little as it comes level with you. */
    .svc-route { height: 330vh; view-timeline-name: --route; --edge: 60svh; --face: 8svh; --below: calc(100svh - var(--edge)); }
    .svc-route__stage {
      padding: 0;
      background: linear-gradient(180deg, var(--svc-fog-3) 0 var(--edge), #3a454d var(--edge) calc(var(--edge) + var(--face)), #20292f calc(var(--edge) + var(--face)), var(--sx-night) 100%);
    }
    .svc-route__water {
      display: block; position: absolute; z-index: 0; left: 0; top: calc(var(--edge) + var(--face)); bottom: 0; width: 140vw;
      background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='90'%3E%3Cg stroke='rgba(200,203,198,.13)' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 14h46M150 9h28M236 22h58M70 38h34M188 47h40M18 63h26M118 70h54M262 78h30M300 52h14'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 320px 90px;
      animation: svc-drift linear both; animation-timeline: --route; animation-range: contain 0% contain 100%;
    }
    @keyframes svc-drift { from { transform: none; } to { transform: translateX(-16vw); } }
    .svc-route__track {
      --stop: 33vw; --intro: 32vw; --end: 12vw;
      --track: calc(var(--intro) + 4 * var(--stop) + var(--end) + var(--sx-gutter));
      position: relative; z-index: 1;
      display: flex; align-items: stretch; width: var(--track); max-width: none; height: 100%; margin: 0; padding: 0 0 0 var(--sx-gutter); gap: 0;
      animation: svc-pan linear both; animation-timeline: --route; animation-range: contain 10% contain 94%;
    }
    @keyframes svc-pan { from { transform: none; } to { transform: translateX(calc(100vw - var(--track))); } }
    /* The scene's own header holds still at the top while the quay moves under it. */
    .svc-route__head { position: absolute; z-index: 2; left: 0; right: 0; top: calc(var(--header-h) + 3svh); margin: 0 auto; }
    .svc-route__head .svc-h { font-size: clamp(2.6rem, 1.1rem + 3.6vw, 5.4rem); }
    .svc-route__intro { position: relative; flex: none; width: var(--intro); display: flex; flex-direction: column; justify-content: flex-end; padding: 0 6vw calc(var(--below) + 3rem) 0; }
    .svc-route__intro .svc-sum { max-width: 34ch; margin: 0; font-size: 1.05rem; }
    /* The tanker is in the water, not on the quay. */
    .svc-route__print {
      position: absolute; z-index: 1; left: calc(64vw - var(--sx-gutter)); top: calc(var(--edge) + var(--face) + 4svh); width: min(20vw, 300px); margin: 0;
      animation: svc-transit linear both; animation-timeline: --route; animation-range: contain 0% contain 100%;
    }
    .svc-route__print img { box-shadow: 0 24px 30px -16px rgba(0, 0, 0, .7); }
    .svc-route__print figcaption { color: var(--svc-on-dark-2); }
    @keyframes svc-transit { from { transform: none; } to { transform: translateX(calc(var(--track) - 100vw - 30vw)); } }
    .svc-route__lines { flex: none; display: flex; width: calc(4 * var(--stop)); padding: 0; column-gap: 0; }
    /* The quay edge and its bollards. */
    .svc-route__lines::before { top: calc(var(--edge) - 10px); height: 10px; right: 0; }
    .svc-route__lines::after {
      content: ""; position: absolute; left: 0; right: 0; top: calc(var(--edge) - 34px); height: 24px;
      background: repeating-linear-gradient(90deg, transparent 0 calc(16.5vw - 20px), var(--svc-rail) calc(16.5vw - 20px) calc(16.5vw + 14px), transparent calc(16.5vw + 14px) 33vw);
    }
    .svc-stop {
      flex: none; width: var(--stop); display: grid; align-content: end; padding: 0 3vw calc(var(--below) + 3rem) 0;
      transform-origin: 0 var(--edge); transform: scale(calc(.9 + .1 * var(--near, 1)));
    }
    .svc-stop::before { top: auto; bottom: var(--below); height: 3rem; }
    .svc-stop .svc-line__title { font-size: clamp(1.6rem, .9rem + 1.5vw, 2.5rem); line-height: 1.05; }
    .svc-stop .svc-line__text { font-size: 1.02rem; max-width: 34ch; }
    /* The quay face between the edge and the water: plain concrete, with an expansion joint every few metres. */
    .svc-route__lines { background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .3) 0 3px, transparent 3px 11vw) 0 var(--edge) / 100% var(--face) no-repeat; }
    /* The quay ends at a stop block, and the page hands over to the footer. */
    .svc-route__end { display: block; position: relative; flex: none; width: var(--end); align-self: stretch; }
    .svc-route__end::before { content: ""; position: absolute; left: 0; top: calc(var(--edge) - 10px); width: 4vw; height: 10px; background: var(--svc-rail); }
    .svc-route__end::after { content: ""; position: absolute; left: 4vw; top: calc(var(--edge) - 52px); width: 18px; height: 62px; background: var(--svc-rail); }
  }
}

/* --------------------------------------------------------------- tablet */
@media (max-width: 1080px) {
  .svc-open__title { grid-column: 1 / -1; }
  .svc-contents { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .svc-open__std { grid-column: 1 / -1; }
  .svc-supply__head { grid-column: 1 / -1; grid-row: 1; margin-bottom: 2rem; }
  .svc-supply__stack { grid-column: 1 / -1; grid-row: 2; }
  .svc-zone:nth-child(1) { grid-column: 1 / span 8; }
  .svc-zone:nth-child(2) { grid-column: 4 / -1; }
  .svc-zone .svc-line__print { position: static; grid-column: 1; grid-row: 3; margin-top: 1rem; width: min(100%, 220px); }
  .svc-tech__room { grid-column: 1 / span 6; }
  .svc-tech__info { grid-column: 7 / -1; }
  .svc-route__lines { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 3rem; }
  .svc-route__lines .svc-stop:nth-child(n + 3)::before { display: none; }
  .svc-route__end { grid-column: 1 / span 11; }
}
@media (max-width: 1080px) and (min-width: 900px) and (min-height: 600px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .svc-supply__head { grid-column: 1 / span 5; grid-row: 1; margin: 0; }
    .svc-supply__stack { grid-column: 5 / -1; grid-row: 1; }
    .svc-route__track { --stop: 34vw; --intro: 50vw; }
    .svc-route__lines .svc-stop:nth-child(n + 3)::before { display: block; }
  }
}

/* ---------------------------------------------------------------- phone
   Rebuilt, not stacked. The hatch still opens over the engine room; everything
   else is a plain run of lines under a chapter marker that holds while they pass. */
@media (max-width: 760px) {
  .svc-open__grid, .svc-supply__grid, .svc-safe__grid { grid-template-columns: minmax(0, 1fr); }
  .svc-open__grid > *, .svc-supply__grid > *, .svc-safe__grid > * { grid-column: 1; grid-row: auto; }
  .svc-open { padding-bottom: 3rem; }
  .svc-open__title { font-size: clamp(2.3rem, 10.5vw, 3rem); max-width: none; }
  .svc-open__lede { font-size: 1rem; }
  .svc-contents { grid-template-columns: minmax(0, 1fr); row-gap: 1.75rem; }
  .svc-contents li a { min-height: 40px; align-items: center; padding-block: .2rem; }
  .svc-open__std { margin-top: 1rem; }

  .svc-marker {
    display: flex; align-items: baseline; gap: .6rem; position: sticky; top: 0; z-index: 5; transition: top .2s var(--sx-ease);
    padding: .8rem var(--sx-gutter); font-size: 1rem; font-weight: var(--svc-heavy); letter-spacing: -.02em;
    color: var(--sx-ink); border-bottom: 2px solid var(--svc-rail);
  }
  /* It sits under the bar while the bar is shown, and takes the top edge when the bar slides away. */
  html:has(.site-header:not(.is-hidden)) .svc-marker { top: var(--header-h); }
  .svc-supply .svc-marker { background: var(--svc-fog-2); }
  .svc-route .svc-marker { background: var(--svc-fog-3); }
  .svc-tech .svc-marker { background: var(--sx-night); color: var(--svc-on-dark); border-color: rgba(228, 231, 225, .3); }
  .svc-safe .svc-marker { background: var(--svc-deck); color: var(--svc-on-dark); border-color: rgba(228, 231, 225, .5); }
  .svc-safe { padding-top: 0; }
  .svc-safe__grid { padding-top: 2.25rem; }
  .svc-scene .svc-h, .svc-bay .svc-h { font-size: clamp(2.1rem, 9.5vw, 2.7rem); }
  .svc-safe .svc-h--quiet { font-size: clamp(1.8rem, 8vw, 2.2rem); }

  .svc-line__print { grid-row: auto; }
  .svc-line.has-print .svc-line__text { grid-row: auto; }

  .svc-supply__stage { padding-top: 2.25rem; }
  .svc-supply__head { margin-bottom: 1.75rem; }
  .svc-supply__stack { flex-direction: column; }
  .svc-supply__stack .svc-line, .svc-supply__stack .svc-line:nth-child(n) { grid-template-columns: minmax(0, 1fr); margin: 0; padding: 1.25rem 1.1rem; }
  .svc-supply__stack .svc-line__title { font-size: 1.45rem; }
  .svc-supply__stack .svc-line__print { grid-column: 1; grid-row: auto; margin-top: .9rem; width: min(100%, 220px); }
  .svc-supply__stack .svc-line.has-print .svc-line__text { grid-row: auto; }
  .svc-deck { height: 3.5rem; border-top-width: 8px; }

  .svc-tech__stage { grid-template-columns: minmax(0, 1fr); padding: 0 0 3.5rem; }
  .svc-tech__stage > * { grid-column: 1; grid-row: auto; }
  .svc-tech__room { margin: 0; }
  .svc-tech__img { height: auto; aspect-ratio: 4 / 5; }
  .svc-tech__diver, .svc-tech__info { margin-inline: var(--sx-gutter); }
  .svc-tech__info { margin-top: 2.25rem; }
  .svc-tech__diver { width: min(60%, 220px); }

  .svc-safe::before { display: none; }
  .svc-safe__zones { grid-template-columns: minmax(0, 1fr); row-gap: 3.5rem; }
  .svc-zone:nth-child(n) { grid-column: 1; padding: 1.75rem 1.25rem; }
  .svc-zone .svc-line__print { position: static; grid-column: 1; grid-row: auto; margin-top: .9rem; width: min(100%, 220px); }
  .svc-zone .svc-line__title { font-size: clamp(1.8rem, 9vw, 2.4rem); }

  .svc-route__stage { padding-block: 2.25rem 3.5rem; }
  .svc-route__track { grid-template-columns: minmax(0, 1fr); }
  .svc-route__intro { grid-template-columns: minmax(0, 1fr); }
  .svc-route__intro > *, .svc-route__intro > .svc-route__print { grid-column: 1; grid-row: auto; justify-self: start; }
  .svc-route__print { width: min(78%, 280px); margin-top: 1.25rem; }
  .svc-route__lines { grid-template-columns: minmax(0, 1fr); row-gap: 0; padding-top: 0; padding-left: 2rem; }
  .svc-route__lines::before { left: 0; right: auto; top: 0; bottom: 0; width: 6px; height: auto; }
  .svc-stop { padding-block: 1.4rem; border-bottom: 2px solid var(--sx-line); }
  .svc-stop::before, .svc-route__lines .svc-stop:nth-child(n + 3)::before { display: block; left: -2rem; top: 2.05rem; width: 1.4rem; height: 6px; }
}
/* Narrow or short screens keep the peak: two tread-plate covers part over the engine room as it comes up the screen. */
@media (prefers-reduced-motion: no-preference) and (max-width: 899px), (prefers-reduced-motion: no-preference) and (max-height: 599px) {
  @supports (animation-timeline: view()) {
    .svc-tech__img { view-timeline: --room block; }
    .svc-tech__img::before, .svc-tech__img::after {
      content: ""; position: absolute; top: 0; bottom: 0; width: 50%; z-index: 2;
      background: var(--svc-tread), linear-gradient(105deg, #46535c, #36424b 45%, #2b353e);
      animation: linear both; animation-timeline: --room; animation-range: entry 70% cover 55%;
    }
    .svc-tech__img::before { left: 0; border-right: 3px solid #1b2228; animation-name: svc-part-l-s; }
    .svc-tech__img::after { right: 0; border-left: 3px solid #1b2228; animation-name: svc-part-r-s; }
    @keyframes svc-part-l-s { from { transform: none; animation-timing-function: cubic-bezier(.6, 0, .2, 1); } to { transform: translateX(-101%); } }
    @keyframes svc-part-r-s { from { transform: none; animation-timing-function: cubic-bezier(.6, 0, .2, 1); } to { transform: translateX(101%); } }
    .svc-tech__img img { animation: svc-descend-s linear both; animation-timeline: --room; animation-range: entry 70% cover 60%; }
    @keyframes svc-descend-s { from { transform: scale(1.25); } to { transform: none; } }
    .svc-supply__stack .svc-line { animation: svc-hoist-s linear both; animation-timeline: view(); animation-range: entry 0% entry 75%; }
    @keyframes svc-hoist-s { from { transform: translateY(3.5rem); animation-timing-function: cubic-bezier(.35, 0, .1, 1); } to { transform: none; } }
  }
}
