/* What we build (services, 2026-11-15). The page comes out of the dark wine chapter into a daylight sky: the ground
   starts as the work section's dark wine (no seam at all), its line of light carries on down and dissolves as the
   sky arrives, and a real sky with a bank of soft cloud (generated in Figma, toned to our sky) drifts a few px with
   the scroll. Over it: a heading with three of our own pictures set into its line (awsmd's idea, used once on the
   site), then the fan of real screens from Hero B, split into what we make, each beside its proof.
   Layout, in one word: lineup. Three things we make stand on one baseline, the main one widest; care follows. */

.svc {
  --seam: clamp(220px, 21vw, 320px);            /* dark wine to sky */
  --soft: #3F2A33;                              /* secondary text on the sky: 7.3:1 on #A5C4E6, 12:1 on the page */
  position: relative; isolation: isolate; overflow: hidden;
  padding: 0 0 clamp(104px, 8.5vw, 150px);
  scroll-margin-top: calc(64px - var(--seam));  /* the menu's Services link lands on the heading, not the dusk */
  background: var(--cold);
  color: var(--ink);
}

/* the ground: dark wine, through a short dusk, into the sky; the cloud picture sits on it and fades in and out */
.svc-sky {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: linear-gradient(in oklab,
    var(--ink) 0,
    #301823 calc(var(--seam) * 0.16),
    #534a5e calc(var(--seam) * 0.5),
    #7f9ec3 calc(var(--seam) * 0.84),
    #97b7dd var(--seam),
    #a9c7ea calc(var(--seam) + 34%),
    #cfe1f2 calc(100% - 22%),
    var(--cold) 100%);
}
.svc-clouds {
  position: absolute; left: 0; top: var(--seam); width: 100%; height: min(860px, 64%);
  max-width: none; object-fit: cover; object-position: 50% 78%;
  -webkit-mask-image: linear-gradient(transparent 0, #000 18%, #000 64%, transparent 100%);
  mask-image: linear-gradient(transparent 0, #000 18%, #000 64%, transparent 100%);
  transform: translate3d(calc((var(--svc-p, 0.5) - 0.5) * -36px), calc((var(--svc-p, 0.5) - 0.5) * 72px), 0) scale(1.08);
  transform-origin: 50% 40%;
  will-change: transform;
}


/* ---------- the heading, with our pictures set into its line ---------- */
.svc-head {
  position: relative; z-index: 2;
  padding: calc(var(--seam) + var(--s7)) var(--pad) 0;
  text-align: center;
}
.svc-head h2 {
  margin: 0 auto; max-width: 11.4em;
  font: 500 clamp(40px, min(5.3vw, 9.8svh), 80px)/1.06 var(--sans);
  letter-spacing: -0.03em; text-wrap: balance;
}
.svc-w { white-space: nowrap; }                 /* a picture never leaves its word when the line wraps */
.svc-pill {
  position: relative; display: inline-block; overflow: hidden;
  width: 2.1em; height: 0.8em; margin-left: 0.2em; vertical-align: -0.075em;
  border-radius: 0.4em;
  background: #d9e6f2;
  box-shadow: 0 0.14em 0.32em -0.16em rgba(42, 14, 22, 0.42);
}
.svc-pill::after {                              /* a fine light edge, like the hero's glass */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.svc-pill img {
  position: absolute; left: -8%; top: -6%; width: 116%; height: 112%; max-width: none; object-fit: cover;
  transform: translate3d(calc((var(--svc-p, 0.5) - 0.5) * var(--d, 7%)), 0, 0);
}
.svc-w:nth-of-type(2) .svc-pill img { --d: -7%; }

/* ---------- the lineup: what we make, in words (11-19, Jeet: the fan of screens repeated the work section, and was
   "not properly built"; the pictures now live only in the heading) ---------- */
.svc-line {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(32px, 4.4vw, 72px);
  max-width: 1120px; margin: clamp(56px, 5vw, 80px) auto 0; padding: 0 var(--pad);
}
.svc-item { display: flex; flex-direction: column; min-width: 0; padding-top: var(--s5); border-top: 1px solid rgba(42, 14, 22, 0.14); }
.svc-text { max-width: 21em; }
.svc-text h3 { margin: 0; font: 500 var(--t-lead)/1.3 var(--sans); letter-spacing: -0.01em; }
.svc-text p { margin-top: var(--s2); font-size: var(--t-body); line-height: 1.5; color: var(--soft); }

/* ---------- tablet and phone: the main thing first and largest, the other two as compact rows ---------- */
@media (max-width: 1023px) {
  .svc { --seam: clamp(200px, 48vw, 260px); }
  .svc-clouds { height: min(1100px, 58%); object-position: 30% 80%; }
  .svc-head { padding-top: calc(var(--seam) + var(--s5)); }
  .svc-head h2 { font-size: clamp(30px, 9.4vw, 52px); line-height: 1.08; max-width: 10.5em; }
  .svc-br { display: none; }
  .svc-sub { margin-top: var(--s4); font-size: var(--t-body); max-width: 26em; }
  .svc-line { display: flex; flex-direction: column; gap: var(--s6); max-width: 600px; margin-top: 48px; }
}
@media (max-width: 720px) {
  .svc { padding-bottom: 120px; }               /* clear of the phone's action bar */
}

/* ---------- reduced motion: the sky and the pictures stay put ---------- */
@media (prefers-reduced-motion: reduce) {
  .svc-clouds, .svc-pill img { transform: none; }
  .svc-clouds { transform: scale(1.08); }
}
