/* Services overview: richer rows, a connected "handover" flow, and "ways to work" cards. Scoped to services.html. */

/* 1. the six service rows */
.service-rows { border-top: 0; display: grid; gap: .6rem; }
.service-row { position: relative; grid-template-columns: 4.5rem 1.1fr 1.6fr 1fr 3.4rem; gap: 1.6rem; padding: 1.7rem 1.4rem; border: 1px solid var(--line-light); border-radius: 22px; background: #fff; overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s, background .4s; }
.service-row::before { content: ""; position: absolute; left: 0; top: 14%; bottom: 14%; width: 4px; border-radius: 0 4px 4px 0; background: var(--purple); transform: scaleY(0); transition: transform .5s var(--ease); }
.service-row:hover { background: #fbf7ff; padding-inline: 1.4rem; transform: translateY(-3px); border-color: rgba(144,15,255,.35); box-shadow: 0 26px 50px -30px rgba(144,15,255,.55); }
.service-row:hover::before { transform: scaleY(1); }
.service-row__num { font-size: 1.5rem; font-weight: 600; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1.2px var(--purple); padding-top: .1rem; transition: color .35s; }
.service-row:hover .service-row__num { color: var(--purple); }
.service-row h2 { transition: transform .5s var(--ease), color .3s; }
.service-row:hover h2 { transform: translateX(8px); color: var(--ink-2); }
.service-row .chip { background: transparent; transition: border-color .3s, color .3s; }
.service-row:hover .chip { border-color: rgba(144,15,255,.4); color: var(--ink-2); }
.service-row__go { align-self: center; justify-self: end; display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; border: 1px solid var(--line-light); color: var(--ink-2); transition: background .35s var(--ease), color .35s, border-color .35s, transform .5s var(--ease); }
.service-row__go svg { width: 20px; height: 20px; }
.service-row:hover .service-row__go { background: var(--purple); border-color: var(--purple); color: #fff; transform: rotate(-45deg); }
@media (max-width: 960px) { .service-row { grid-template-columns: 3rem 1fr; padding: 1.3rem 1.1rem; } .service-row__go { display: none; } }

/* 2. "the handover" as three connected cards with arrows between them */
.cap-list--flow { border-top: 0; gap: 2.2rem; margin-top: clamp(2rem, 4vw, 3.5rem); counter-reset: step; }
.cap-list--flow .cap { position: relative; padding: 1.6rem 1.5rem 1.8rem; border: 1px solid var(--line-dark); border-radius: 22px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); transition: transform .5s var(--ease), border-color .4s, box-shadow .5s var(--ease); }
.cap-list--flow .cap:hover { transform: translateY(-5px); border-color: rgba(178,102,255,.55); box-shadow: 0 30px 60px -30px rgba(144,15,255,.7); }
.cap-list--flow .cap::before { counter-increment: step; content: "0" counter(step); position: absolute; right: 1.2rem; top: 1rem; font-family: var(--ff-mono); font-size: .78rem; color: rgba(255,255,255,.35); }
.cap-list--flow .cap:not(:last-child)::after { content: ""; position: absolute; z-index: 2; right: -1.9rem; top: 50%; width: 1.6rem; height: 1.6rem; margin-top: -.8rem; border-radius: 50%; background: var(--purple) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12h12M13 7l5 5-5 5'/%3E%3C/svg%3E") center / 62% no-repeat; box-shadow: 0 0 0 5px rgba(144,15,255,.18); }
@media (max-width: 860px) { .cap-list--flow { gap: 1.8rem; } .cap-list--flow .cap:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -1.7rem; margin: 0 0 0 -.8rem; transform: rotate(90deg); } }

/* 3. "ways to work together" as four cards */
.ways { border-top: 0; gap: 1rem; margin-top: clamp(2rem, 4vw, 3.5rem); }
.ways > div, .ways > div + div { position: relative; padding: 1.5rem 1.4rem 1.8rem; border: 1px solid var(--line-light); border-radius: 22px; background: #fff; overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s; }
.ways > div::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--purple), #ff4fa3); transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s var(--ease); }
.ways > div:hover { transform: translateY(-5px); border-color: rgba(144,15,255,.3); box-shadow: 0 26px 50px -30px rgba(144,15,255,.5); }
.ways > div:hover::before { transform: scaleX(1); }
.ways small { display: inline-grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: #f3eaff; font-weight: 700; }
.ways h3 { margin-top: 1rem; }
@media (max-width: 960px) { .ways > div:nth-child(3) { padding-left: 1.4rem; border-left: 1px solid var(--line-light); } }
@media (max-width: 560px) { .cols4.ways { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .service-row, .service-row h2, .service-row__go, .cap-list--flow .cap, .ways > div, .ways > div::before { transition: none; } .service-row:hover, .cap-list--flow .cap:hover, .ways > div:hover { transform: none; } }
.service-row__num { color: var(--purple); -webkit-text-stroke: 0; font-size: 1.1rem; font-weight: 600; opacity: .55; padding-top: .35rem; }
.service-row:hover .service-row__num { opacity: 1; }

/* Hero: six disciplines orbiting the N (html + css transforms only, so it runs on the compositor; the section pauses it when off-screen via .is-off) */
@media (min-width: 1101px) { .page-hero--fx .h1 { max-width: calc(100% - 470px); } .page-hero--fx .lead { max-width: min(56ch, calc(100% - 470px)); } }
.hero-orbit { position: absolute; right: clamp(1rem, 4vw, 4.5rem); top: clamp(.5rem, 3vw, 3rem); width: 400px; height: 400px; display: none; }
@media (min-width: 1101px) { .hero-orbit { display: block; } }
.hero-orbit__ring { position: absolute; border-radius: 50%; inset: 0; border: 1px solid rgba(255,255,255,.14); }
.hero-orbit__ring--a { border-style: dashed; border-color: rgba(178,102,255,.35); animation: orbitSpin 90s linear infinite reverse; }
.hero-orbit__ring--b { inset: 22%; border-color: rgba(255,255,255,.1); }
.hero-orbit__core { position: absolute; left: 50%; top: 50%; width: 118px; height: 118px; margin: -59px 0 0 -59px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #b266ff, #900fff 60%, #4b0a8a); box-shadow: 0 0 60px rgba(144,15,255,.7), inset 0 0 20px rgba(255,255,255,.18); display: grid; place-items: center; }
.hero-orbit__core::before { content: ""; width: 56%; height: 38%; background: url("../images/brand/novva-n-light.svg") center / contain no-repeat; }
.hero-orbit__core::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px solid rgba(178,102,255,.4); animation: orbitPulse 3.2s ease-out infinite; }
.hero-orbit__spin { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; animation: orbitSpin 64s linear infinite; }
.hero-orbit:hover .hero-orbit__spin, .hero-orbit:hover .hero-orbit__spin a { animation-play-state: paused; }
.hero-orbit__spin li { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotate(var(--a)) translateX(200px) rotate(calc(var(--a) * -1)); }
.hero-orbit__spin a { position: absolute; left: 0; top: 0; display: block; transform: translate(-50%, -50%); animation: orbitSpin 64s linear infinite reverse; }
.hero-orbit__spin a span { display: block; padding: .55rem 1rem; border-radius: 99px; border: 1px solid rgba(255,255,255,.22); background: rgba(14,10,22,.9); color: var(--on-dark); font-size: .85rem; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; transition: background .3s var(--ease), border-color .3s, color .3s, transform .4s var(--ease), box-shadow .4s; }
.hero-orbit__spin a:hover span, .hero-orbit__spin a:focus-visible span { background: var(--purple); border-color: var(--purple); color: #fff; transform: scale(1.12); box-shadow: 0 0 30px rgba(144,15,255,.7); }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes orbitPulse { from { transform: scale(.92); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.js .hero-orbit { opacity: 0; transition: opacity 1.2s var(--ease) 1.2s; }
.js.is-ready .hero-orbit { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .hero-orbit__ring--a, .hero-orbit__spin, .hero-orbit__spin a, .hero-orbit__core::after { animation: none; } .js .hero-orbit { opacity: 1; transition: none; } }
/* labels counter-rotate with their own keyframes: a bare rotate() would be blended with the translate(-50%,-50%) centring as a matrix and not cancel the ring's turn */
.hero-orbit__spin a { animation: orbitCounter 64s linear infinite; }
@keyframes orbitCounter { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) { .hero-orbit__spin a { animation: none; } }
@media (min-width: 1101px) { .page-hero--fx .h1 { font-size: clamp(2.8rem, .8rem + 4.2vw, 5.2rem); } }

/* Section header for the six rows, and an "Explore" cue that slides out beside each arrow */
.sx-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: end; margin-top: clamp(1.5rem, 3vw, 3rem); }
.sx-head__lead { color: var(--ink-3); font-size: clamp(1rem, .95rem + .3vw, 1.2rem); letter-spacing: -.02em; line-height: 1.5; max-width: 44ch; padding-bottom: .6rem; }
.sx-head + .service-rows { margin-top: clamp(1.8rem, 3.5vw, 3rem); }
.service-row__go { position: relative; width: auto; min-width: 3.2rem; padding: 0; overflow: hidden; }
.service-row__go b { max-width: 0; opacity: 0; white-space: nowrap; font-size: .85rem; font-weight: 600; letter-spacing: -.01em; padding-left: 0; transition: max-width .55s var(--ease), opacity .35s, padding .55s var(--ease); }
.service-row__go svg { flex: none; }
.service-row__go { display: inline-flex; align-items: center; justify-content: center; border-radius: 99px; height: 3.2rem; }
.service-row:hover .service-row__go { transform: none; }
.service-row:hover .service-row__go b { max-width: 6rem; opacity: 1; padding-left: 1.1rem; }
.service-row:hover .service-row__go svg { transform: rotate(-45deg); }
.service-row__go svg { margin: 0 .55rem; transition: transform .5s var(--ease); }
@media (max-width: 960px) { .sx-head { grid-template-columns: 1fr; } }
.sx-head .h2 { font-size: clamp(2.2rem, 1rem + 3.4vw, 4.4rem); max-width: 16ch !important; line-height: 1; }

/* ===== Services: pinned horizontal gallery. The section stays put while vertical scrolling slides six wide panels sideways. =====
   With scroll-driven animations (Chrome/Edge 115+) the movement and the progress bar are pure css on the compositor; other browsers get the js fallback. */
.gal { --n: 6; position: relative; height: calc(100svh + (var(--n) - 1) * 64vh); margin: clamp(1.5rem, 3vw, 2.5rem) calc(50% - 50vw) 0; width: 100vw; }
.gal__stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding-top: calc(var(--bar-h, 72px) + 1rem); padding-bottom: 5rem; }
.gal__track { display: flex; gap: clamp(1rem, 2.4vw, 2.2rem); width: max-content; padding-inline: var(--gutter); will-change: transform; }
.gal__panel { flex: none; width: min(78vw, 1040px); height: min(62vh, 540px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); border-radius: 30px; overflow: hidden; background: #f5f1ea; border: 1px solid var(--line-light); }
.gal__copy { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(1.4rem, 2.6vw, 2.4rem); min-width: 0; }
.gal__no { font-family: var(--ff-mono); font-size: .85rem; color: var(--purple); letter-spacing: .1em; }
.gal__panel h3 { margin-top: .8rem; font-size: clamp(1.9rem, 1rem + 2.6vw, 3.6rem); font-weight: 700; letter-spacing: -.06em; line-height: .98; color: var(--ink-2); }
.gal__panel p { margin-top: 1rem; max-width: 40ch; color: var(--ink-3); font-size: clamp(.95rem, .9rem + .2vw, 1.08rem); line-height: 1.5; }
.gal__chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: auto; padding-top: 1.2rem; }
.gal__chips .chip { background: #fff; }
.gal__cta { margin-top: 1.2rem; }
.gal__cta svg { width: 18px; height: 18px; margin-left: .5rem; vertical-align: -3px; transition: transform .4s var(--ease); }
.gal__cta:hover svg { transform: translateX(4px); }
.gal__art { position: relative; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(70% 60% at 85% 0%, rgba(255,255,255,.28), transparent 65%), linear-gradient(160deg, var(--g1, #6a00d6), var(--g2, #1a0638)); }
.gal__art svg { width: min(100%, 420px); max-height: 100%; transition: transform .8s var(--ease); }
.gal__panel:hover .gal__art svg { transform: scale(1.06) rotate(-2deg); }
.gal__art--1 { --g1: #6a00d6; --g2: #1a0638; } .gal__art--2 { --g1: #ff4fa3; --g2: #55098a; } .gal__art--3 { --g1: #4f46e5; --g2: #160d46; }
.gal__art--4 { --g1: #900fff; --g2: #2a0a55; } .gal__art--5 { --g1: #2f3590; --g2: #0a0a18; } .gal__art--6 { --g1: #ff7a59; --g2: #74189c; }
.gal__ui { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 1.6rem; display: flex; align-items: center; gap: 1.2rem; }
.gal__count { font-family: var(--ff-mono); font-size: .85rem; color: var(--ink-3); white-space: nowrap; } .gal__count b { color: var(--ink-2); font-size: 1.05rem; }
.gal__bar { flex: 1; height: 3px; background: rgba(0,0,0,.1); position: relative; border-radius: 2px; overflow: hidden; }
.gal__bar i { position: absolute; inset: 0; background: var(--purple); transform-origin: 0 50%; transform: scaleX(var(--hp, 0)); }
.gal__hint { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
@supports (animation-timeline: view()) {
  .gal { view-timeline: --gal block; }
  .gal__track { animation: galSlide linear both; animation-timeline: --gal; animation-range: cover 100svh cover calc(100% - 100svh); }
  .gal__bar i { transform: scaleX(0); animation: galBar linear both; animation-timeline: --gal; animation-range: cover 100svh cover calc(100% - 100svh); }
  @keyframes galSlide { 0%, 14% { transform: translateX(0); } 86%, 100% { transform: translateX(calc(-100% + 100vw)); } }
  @keyframes galBar { 0%, 14% { transform: scaleX(0); } 86%, 100% { transform: scaleX(1); } }
}
@media (max-width: 760px) { .gal__panel { grid-template-columns: 1fr; grid-template-rows: auto 150px; width: 84vw; height: min(70vh, 560px); } .gal__art { order: 2; } .gal__hint { display: none; } .gal { height: calc(100svh + (var(--n) - 1) * 56vh); } }
@media (prefers-reduced-motion: reduce) { .gal { height: auto; } .gal__stage { position: static; height: auto; padding-bottom: 1rem; overflow-x: auto; } .gal__track { animation: none !important; width: max-content; } .gal__ui { display: none; } }
.gal__stage { background: #fff; }
.gal__hint { color: var(--ink-3); }

/* ===== Gallery, smoother and richer: the panel in view comes forward, the art drifts against the slide, buttons glide ===== */
.js .gal__panel { opacity: .5; transform: scale(.96); transition: opacity .7s var(--ease), transform .9s var(--ease), box-shadow .7s var(--ease); }
.js .gal__panel.is-active { opacity: 1; transform: none; box-shadow: 0 50px 90px -55px rgba(60, 10, 130, .55); }
.gal__art svg { will-change: translate; }
.gal__nav { display: flex; gap: .5rem; }
.gal__btn { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 50%; border: 1px solid var(--line-light); color: var(--ink-2); background: #fff; transition: background .35s var(--ease), color .35s, border-color .35s, transform .5s var(--ease), opacity .3s; }
.gal__btn svg { width: 18px; height: 18px; }
.gal__btn--prev svg { transform: rotate(180deg); }
.gal__btn:hover { background: var(--purple); border-color: var(--purple); color: #fff; transform: scale(1.08); }
.gal__btn:disabled { opacity: .35; pointer-events: none; }
.gal__bar i { transition: none; }
@supports (animation-timeline: view()) {
  .gal__art svg { animation: galPar linear both; animation-timeline: --gal; animation-range: cover 100svh cover calc(100% - 100svh); }
  @keyframes galPar { 0%, 14% { translate: 56px 0; } 86%, 100% { translate: -56px 0; } }
}
@media (prefers-reduced-motion: reduce) { .js .gal__panel { opacity: 1; transform: none; transition: none; } .gal__art svg { animation: none !important; } }

/* ===== Gallery fixes: panels grow to fit their content (all the same height), tighter type, grab cursor ===== */
.gal__panel { height: auto; min-height: min(60vh, 520px); }
.gal__copy { padding: clamp(1.2rem, 2.2vw, 2rem); }
.gal__panel h3 { font-size: clamp(1.7rem, .6rem + 2.3vw, 3.1rem); margin-top: .6rem; }
.gal__panel p { font-size: .98rem; margin-top: .8rem; line-height: 1.45; }
.gal__chips { padding-top: 1rem; gap: .35rem; }
.gal__chips .chip { font-size: .76rem; }
.gal__cta { margin-top: 1rem; padding: .75rem 1.2rem; font-size: .95rem; }
.gal__stage { cursor: grab; touch-action: pan-y; }
.gal__stage.is-drag { cursor: grabbing; user-select: none; }
.gal__stage a, .gal__stage button { cursor: pointer; }
@media (max-width: 760px) { .gal__panel { min-height: min(64vh, 540px); } }

/* ===== Gallery, trackpad mode (html.trackpad, set by js when the scroll input looks like a trackpad):
   no pinning and no vertical-scroll driving; the cards are a sideways strip you swipe left / right. A mouse wheel keeps the pinned behaviour. ===== */
html.trackpad .gal { height: auto; margin-top: clamp(1.5rem, 3vw, 2.5rem); }
html.trackpad .gal__stage { position: static; height: auto; overflow-x: auto; overflow-y: hidden; padding: 1rem 0 1rem; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; cursor: auto; }
html.trackpad .gal__stage::-webkit-scrollbar { display: none; }
html.trackpad .gal__track { animation: none !important; transform: none !important; scroll-padding-inline: var(--gutter); }
html.trackpad .gal__panel { scroll-snap-align: center; }
html.trackpad .gal__art svg { animation: none !important; translate: none; }
html.trackpad .gal__ui { position: static; padding: 1rem var(--gutter) 0; }
html.trackpad .gal__bar i { animation: none !important; }
/* trackpad strip: free scrolling, no snapping (snap pulled the strip back toward the first card and fought the swipe) */
html.trackpad .gal__stage { scroll-snap-type: none; }
html.trackpad .gal__panel { scroll-snap-align: none; }
/* trackpad strip: the counter, line and arrows sit inside the scrolling strip, so they scrolled away with the first card. Pin them to the visible left edge. */
html.trackpad .gal__ui { position: sticky; left: 0; width: 100%; align-self: flex-start; box-sizing: border-box; padding: 1rem var(--gutter) 0; }
/* more air between the cards and the counter / line / arrows (trackpad strip) */
html.trackpad .gal__stage { padding-bottom: 2rem; }
html.trackpad .gal__ui { padding-top: 2.4rem; padding-bottom: .6rem; }
/* even more air between the cards and the controls (trackpad strip) */
html.trackpad .gal__stage { padding-bottom: 3rem; }
html.trackpad .gal__ui { padding-top: 4rem; padding-bottom: 1rem; }
