/* ==========================================================================
   ELIOS — Services page (services.html)
   Loaded after styles.css; reuses its tokens and shared components.
   Desktop design reference: 1728px wide (Figma frame 1:934).
   LAYOUT ONLY: every font size comes from the :root type tokens in styles.css
   (fixed px, identical at every desktop width); only spacing and layout scale.
   ========================================================================== */
/* ---------- Hero (full-bleed photo, light text) ---------- */
/* Same height rule as Home: 59.14vw, capped. The photo lives on the 1728px design stage (like the Home art) and, on windows wider than that,
   feathers into the ink so the composition (title above the truck, glass cards below it) never changes. */
.svc-hero { position: relative; height: clamp(640px, 59.14vw, 1047px); overflow: hidden; background: var(--ink); color: var(--white); }
/* Overscan: the motion layer eases this wrapper down by up to 16% of its own height on scroll. Starting it 20% of the hero above the hero (wrapper = 1.2 x hero, 16% of that = 19.2%) means the picture can never leave a gap at the top. */
.svc-hero__bg { position: absolute; top: -20%; bottom: 0; left: max(0px, calc(50% - 864px)); right: max(0px, calc(50% - 864px)); }
@media (min-width: 1741px) {
  /* eased 20rem feather, so on big monitors the photo melts into the ink instead of ending as a framed picture */
  .svc-hero__bg { --edge: linear-gradient(90deg, transparent, rgba(0, 0, 0, .1) 4rem, rgba(0, 0, 0, .4) 10rem, rgba(0, 0, 0, .8) 16rem, #000 20rem, #000 calc(100% - 20rem), rgba(0, 0, 0, .8) calc(100% - 16rem), rgba(0, 0, 0, .4) calc(100% - 10rem), rgba(0, 0, 0, .1) calc(100% - 4rem), transparent); -webkit-mask-image: var(--edge); mask-image: var(--edge); }
}
.svc-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
/* crop from the sky, never from the road: the truck stays above the glass cards */
/* Top scrim: the logo and headline sit on the palest part of the sky (white on it measured 2.5:1). It belongs to the hero, not to the moving photo, so it stays put while the picture eases down. */
.svc-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 16rem; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(19, 18, 17, .66), rgba(19, 18, 17, 0)); }
.svc-hero__inner { position: relative; z-index: 2; height: 100%; }
.svc-hero__title { position: absolute; left: var(--gutter); top: clamp(130px, 10vw, 173px); width: max-content; max-width: 820px; }
/* same top line as the Home headline; two designed lines */
/* The cards are placed from the truck, not from the viewport. The photo is anchored to the hero bottom and scaled with the 1728px stage, so the road under the front tyre is 0.182 x stage width high
   (about 313px at 1728 and up). The bottom offset and the card padding follow the same stage width, so the card top stays at least 24px under the tyre from 1280 to 2560 (measured in the fix log). */
.svc-hero { --card-bottom: clamp(32px, calc(80px - (1728px - 100vw) * .09), 80px); --card-pad: clamp(36px, calc(58px - (1728px - 100vw) * .045), 58px); }
.svc-hero__aside { position: absolute; left: var(--gutter); bottom: var(--card-bottom); width: calc(28.3 * var(--rt)); display: flex; flex-direction: column; gap: 3rem; }
.svc-hero__stats {
  position: absolute; right: var(--gutter); bottom: var(--card-bottom);
  width: 42.1875rem; display: grid; grid-template-columns: 258fr 397fr; gap: 1.25rem;
}
.svc-hero__stats .stat-glass { padding-block: var(--card-pad); }
/* 1025-1279: the 64px headline (two lines, 130px from the top) would reach the trailer roof, because the truck sits at a fixed share of the hero and the type does not shrink. The hero grows by up to 127px towards 1025 (0 at 1280), which moves the truck down with it and keeps the line at least 24px above the roof. */
@media (min-width: 1025px) and (max-width: 1279px) {
  .svc-hero { height: clamp(640px, calc(59.14vw + (1280px - 100vw) * .5), 1047px); }
  .svc-hero__aside { width: min(calc(28.3 * var(--rt)), calc(100vw - 2 * var(--gutter) - 42.1875rem - 2rem)); }
}
/* Secondary hero button: the design has it as a ghost next to the solid one. A faint dark tint (instead of the pale glass fill) keeps the pair from reading as two filled buttons and keeps the label above 4.5:1 on the grass behind it. */
.svc-hero__aside .btn--glass { background: rgba(19, 18, 17, .3); }
@media (hover: hover) {
  .svc-hero__aside .btn--glass:hover { background: rgba(255, 255, 255, .18); }
}
/* The nav pill sits on bright sky here: the shared 8-12% tints gave its white labels about 1.9:1; a dark tint (no blur) keeps them above 4.5:1.
   Once the header is scrolled the shared dark/light pill takes over again. */
.site-header--light .nav { background: rgba(19, 18, 17, .46); }
html.gsap .site-header--light:not(.is-scrolled) .nav { background: rgba(19, 18, 17, .46); }
/* ---------- Services intro statement ---------- */
.svc-intro { display: grid; grid-template-columns: 1fr calc(61.27 * var(--rt)); align-items: start; margin-bottom: 7.5rem; }
/* statement column never narrower than the 1728 design, so the 48px lines break the same everywhere (like Home's About lead) */
.svc-intro__main { display: flex; flex-direction: column; align-items: flex-start; gap: 3rem; }
/* ---------- Service rows (image left, card right; builds on .solution__*) ---------- */
.svc-rows { display: flex; flex-direction: column; gap: 1.25rem; }
.service { display: grid; grid-template-columns: 675fr 953fr; gap: 1.25rem; min-height: min(41.25rem, 642px); }
/* 675 x 642 at 1728; rem growth above that only adds padding, never a taller row */
.service__media { min-height: 0; }
.service__media .stat-glass { position: absolute; left: 1.25rem; top: 0; bottom: 0; margin-block: auto; height: fit-content; width: 19.5625rem; max-width: calc(100% - 2.5rem); }
/* centred without a transform: GSAP tilts this card and would overwrite one */
.service__card { gap: 0; justify-content: flex-start; }
.service__card .solution__top { margin-bottom: 5rem; }
.service__card .solution__copy { margin-top: auto; }
/* spare height opens the gap above the title, like the design */
.service__features { grid-template-columns: repeat(3, minmax(0, 1fr)); display: grid; gap: 1.5rem 2.5rem; margin-top: 3rem; min-height: calc(54px + 0.625rem); }
/* room for a title and two detail lines, so every row has the same height */
@media (min-width: 1025px) and (max-width: 1500px) {
  .service__features { column-gap: 1.5rem; }
}
/* narrower windows: keep the detail lines on one or two balanced lines */
.service__features .feature p { text-wrap: pretty; }
.service__foot { margin-top: 3rem; }
/* Glass card on a sunlit photo: a darker tint (still tint only, no blur) so the white 12px label stays above 4.5:1 on the palest 10% of the pixels behind it. Selector is one class heavier than the shared motion rule on purpose. */
.service .service__media .stat-glass { background: rgba(24, 22, 20, .62); }
.service:nth-child(1) .service__media .stat-glass { top: 1.25rem; bottom: auto; margin-block: 0; }
/* road: the card sits on the sky; centred it covered the rear of the trailer, the logo and both rear axles */
.service__media img { object-position: 50% 50%; }
.service:nth-child(1) .service__media img { object-position: 50% 8%; }
/* road: the truck, not the empty tarmac */
.service:nth-child(2) .service__media img { object-position: 50% 35%; }
/* sea: cranes and the ship's bow */
.service:nth-child(3) .service__media img { object-position: 40% 50%; }
/* air: wing, engine and pallet */
.service:nth-child(4) .service__media img { object-position: 45% 40%; }
/* >= 4.5:1 on the grey chip (.5 was 4.1:1) */
/* ---------- Shared blocks: page-level spacing from the design ---------- */
.testimonial { padding-top: 10rem; padding-bottom: 10rem; }
/* ==========================================================================
   Responsive (tablet and phone keep their own rules)
   ========================================================================== */
@media (max-width: 1200px) {
  .svc-intro { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-bottom: 80px; }
  /* stacked from 1200 down: the 953px statement column plus the eyebrow did not fit (it ran 51px past the window at 1025) */
  .service__features { grid-template-columns: 1fr; gap: 20px; }
  .service__features .feature div { display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .service__features .feature p + p { margin-top: 0; }
  .testimonial { padding-top: var(--section-y); padding-bottom: var(--section-y); }
}
@media (max-width: 1024px) {
  /* Hero → photo band on top (title over the sky, truck visible), copy + stats below on a fade to ink */
  .svc-hero { --band: 760px; height: auto; }
  .svc-hero__bg { top: 0; left: 0; right: 0; bottom: auto; height: var(--band); }
  .svc-hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .4) 0%, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, 0) 64%, var(--ink) 94%); }
  .svc-hero__bg img { object-position: 42% center; }
  .svc-hero__inner {
    height: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    column-gap: 32px; row-gap: 40px; align-items: end; padding-top: 150px; padding-bottom: 64px;
  }
  .svc-hero__title, .svc-hero__aside, .svc-hero__stats { position: static; }
  .svc-hero__title { grid-column: 1 / -1; align-self: start; width: auto; max-width: 640px; min-height: calc(var(--band) - 150px - 140px); }
  .svc-hero__aside { width: auto; gap: 32px; }
  .svc-hero__aside .btn--dark { background: var(--yellow); color: var(--ink); }
  .svc-hero__stats { width: auto; grid-template-columns: 1fr 1fr; }
  .svc-intro { grid-template-columns: 1fr; gap: 32px; margin-bottom: 64px; }
  .svc-intro__main { gap: 32px; }
  .service { grid-template-columns: 1fr; min-height: 0; }
  .service__media { aspect-ratio: 3 / 2; }
  /* glass card: compact, at the foot of the photo (it was 310 x 173 and hid the wing and the forklift) */
  .service__media .stat-glass { padding: 24px 16px; }
  .service__media .stat-glass__label { margin-top: 12px; padding-top: 12px; }
  .service .service__media .stat-glass, .service:nth-child(1) .service__media .stat-glass { left: 10px; right: auto; top: auto; bottom: 10px; margin-block: 0; width: min(240px, calc(100% - 20px)); }
  .service__card .solution__top { margin-bottom: 0; }
  .service__card .solution__copy { margin-top: 48px; }
  .service__features { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .service__features .feature div { display: block; }
  .service__features .feature p + p { margin-top: 10px; }
}
@media (max-width: 760px) {
  .svc-hero { --band: 660px; }
  .svc-hero__inner { display: flex; flex-direction: column; align-items: stretch; gap: 32px; padding-top: 120px; padding-bottom: 48px; }
  .svc-hero__title { min-height: calc(var(--band) - 120px - 110px); }
  .svc-hero__stats { gap: 10px; }
  .svc-hero__stats .stat-glass { padding: 32px 16px; }
  .svc-hero__stats .stat-glass__label { margin-top: 14px; padding-top: 14px; }
  /* sizes come from the tokens (stat-sm 32, mono 12) */
  .service__media { aspect-ratio: 1 / 1; }
  .service__card { padding: 56px 20px; }
  .service__features { grid-template-columns: 1fr; gap: 20px; }
  .solution__top { flex-direction: column; gap: 16px; }
}
