/* Services page motion: a hero scene that builds a website and an app, plus hover and entrance polish.
   Decorative only (aria-hidden), paused when off screen, and shown finished for reduced-motion users. */
.hero.has-scene { position: relative; overflow-x: clip; overflow-y: visible; isolation: isolate; }
.x-band b { font-size: clamp(22px, 2.6vw, 30px); }
.hero.has-scene > .container { position: relative; z-index: 2; }

.sv-scene {
  position: absolute; z-index: 1; right: max(2vw, calc((100% - var(--max-width, 1120px)) / 2 - 40px)); top: 50%;
  width: min(560px, 48vw); height: 400px; margin-top: -200px; pointer-events: none;
}
/* the website being built */
.sv-browser {
  position: absolute; left: 0; top: 24px; width: 86%; height: 300px; border-radius: 14px; overflow: hidden;
  background: #1a1812; border: 1px solid #34301f; box-shadow: 0 30px 60px rgba(23, 21, 15, 0.28);
  opacity: 0; transform: translateY(18px) scale(0.97); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sv-bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: #23211a; }
.sv-bar i { width: 9px; height: 9px; border-radius: 50%; background: #4b463a; }
.sv-bar i:nth-child(1) { background: #e0673f; } .sv-bar i:nth-child(2) { background: #e8b84b; } .sv-bar i:nth-child(3) { background: #5aa96a; }
.sv-url { margin-left: 10px; height: 12px; flex: 1; max-width: 55%; border-radius: 6px; background: #2f2c22; position: relative; overflow: hidden; }
.sv-url::after { content: ""; position: absolute; inset: 0; width: 0; background: #4b4430; transition: width 1.4s ease 0.3s; }
.sv-scene.is-on .sv-url::after { width: 100%; }
.sv-page { padding: 14px 16px; display: grid; gap: 12px; }
.sv-b { background: #2b2820; border-radius: 6px; opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s ease; }
.sv-b.on { opacity: 1; transform: none; }
.sv-nav { display: flex; align-items: center; gap: 10px; height: 14px; }
.sv-nav .sv-logo { width: 22px; height: 14px; background: #e8b84b; border-radius: 4px; }
.sv-nav .sv-link { width: 38px; height: 6px; border-radius: 3px; background: #3e3a2c; }
.sv-nav .sv-link:first-of-type { margin-left: auto; }
.sv-hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 14px; align-items: center; }
.sv-lines { display: grid; gap: 8px; }
.sv-h1 { height: 16px; width: 92%; } .sv-h1.s { width: 64%; }
.sv-p { height: 7px; width: 80%; background: #35311f; }
.sv-btn { height: 24px; width: 90px; background: #e8b84b; }
.sv-img { height: 96px; border-radius: 10px; background: linear-gradient(135deg, #4a3d1a, #2a2415 60%, #5b4a1c); position: relative; overflow: hidden; }
.sv-img::after { content: ""; position: absolute; left: -40%; top: 0; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.18), transparent); transform: skewX(-18deg); }
.sv-img.on::after { animation: sv-glint 2.6s ease-in-out 0.4s infinite; }
@keyframes sv-glint { 0% { left: -45%; } 60%, 100% { left: 130%; } }
.sv-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sv-card { height: 52px; border: 1px solid #3a3626; background: #231f16; }
.sv-cursor {
  position: absolute; left: 0; top: 0; width: 16px; height: 16px; opacity: 0; z-index: 4;
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}
.sv-cursor svg { width: 100%; height: 100%; fill: #fff; stroke: #17150f; stroke-width: 1.4; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4)); }
.sv-scene.is-on .sv-cursor { opacity: 1; }
.sv-browser.on { opacity: 1; transform: none; }

/* the app being built */
.sv-phone {
  position: absolute; right: 0; top: 70px; width: 150px; height: 300px; border-radius: 26px; padding: 8px;
  background: #221f17; border: 1px solid #3a3626; box-shadow: 0 30px 60px rgba(23, 21, 15, 0.3);
  opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sv-phone.on { opacity: 1; transform: none; }
.sv-screen { height: 100%; border-radius: 19px; background: #141209; padding: 14px 10px; display: grid; align-content: start; gap: 9px; overflow: hidden; }
.sv-notch { width: 44px; height: 8px; margin: 0 auto 4px; border-radius: 6px; background: #2b2820; }
.sv-ring { width: 54px; height: 54px; margin: 2px auto 4px; }
.sv-ring circle { fill: none; stroke-width: 7; }
.sv-ring .bg { stroke: #2b2820; }
.sv-ring .fg { stroke: #e8b84b; stroke-linecap: round; stroke-dasharray: 126; stroke-dashoffset: 126; transform: rotate(-90deg); transform-origin: center; transition: stroke-dashoffset 1.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sv-ring.on .fg { stroke-dashoffset: 34; }
.sv-row { height: 26px; background: #2a271c; border-radius: 8px; opacity: 0; transform: translateX(22px); transition: opacity 0.5s ease, transform 0.5s ease; position: relative; }
.sv-row::before { content: ""; position: absolute; left: 7px; top: 7px; width: 12px; height: 12px; border-radius: 4px; background: #e8b84b; opacity: 0.85; }
.sv-row::after { content: ""; position: absolute; left: 26px; top: 10px; width: 46%; height: 6px; border-radius: 3px; background: #4b4430; }
.sv-row.on { opacity: 1; transform: none; }

/* the code that powers it */
.sv-code {
  position: absolute; left: 6%; bottom: 0; width: 56%; padding: 12px 14px; border-radius: 12px; background: #0f0e09; border: 1px solid #34301f;
  font: 600 11px/1.7 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; color: #8a8368; box-shadow: 0 20px 40px rgba(23, 21, 15, 0.28);
  opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease;
}
.sv-code.on { opacity: 1; transform: none; }
.sv-code b { color: #e8b84b; font-weight: 600; } .sv-code u { text-decoration: none; color: #7fb58a; } .sv-code em { font-style: normal; color: #d8d2bd; }
.sv-code div { white-space: nowrap; overflow: hidden; max-width: 0; transition: max-width 0.9s steps(26, end); }
.sv-code div.on { max-width: 100%; }
.sv-live {
  position: absolute; right: 18px; bottom: 22px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 99px;
  background: #fff; border: 1px solid #e2dac4; font-size: 12px; font-weight: 700; color: #17150f; box-shadow: 0 14px 30px rgba(23, 21, 15, 0.16);
  opacity: 0; transform: translateY(12px) scale(0.94); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.9, 0.2, 1.2);
}
.sv-live.on { opacity: 1; transform: none; }
.sv-live i { width: 9px; height: 9px; border-radius: 50%; background: #2fa56a; box-shadow: 0 0 0 0 rgba(47, 165, 106, 0.6); }
.sv-live.on i { animation: sv-ping 1.8s ease-out infinite; }
@keyframes sv-ping { 70% { box-shadow: 0 0 0 9px rgba(47, 165, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 165, 106, 0); } }
/* the whole scene softly fades at the end of each cycle before it rebuilds */
.sv-scene.is-reset .sv-browser, .sv-scene.is-reset .sv-phone, .sv-scene.is-reset .sv-code, .sv-scene.is-reset .sv-live { opacity: 0; transition-duration: 0.5s; }

/* text sits on the left on wide screens to leave the scene room */
@media (min-width: 1000px) {
  .hero.has-scene .hero-inner { max-width: var(--max-width, 1120px); }
  .hero.has-scene .hero-inner > * { max-width: 560px; }
}
@media (max-width: 999px) {
  .sv-scene { position: relative; right: auto; top: auto; margin: 8px auto 0; width: min(430px, calc(100% - 32px)); height: 300px; }
  .sv-browser { height: 240px; top: 0; width: 100%; }
  .sv-phone, .sv-code { display: none; }
  .sv-live { right: 10px; bottom: 6px; }
  .hero.has-scene { padding-bottom: 8px; }
}

/* cards, steps, chips and work cards */
.service-card { transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.service-card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(23, 21, 15, 0.12); border-color: var(--amber-dark, #d9a52f); }
.service-card .service-icon { transition: transform 0.4s ease; }
.service-card:hover .service-icon { transform: scale(1.14) rotate(-5deg); }
.x-step { transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
.x-step:hover { transform: translateY(-5px); border-color: var(--amber-dark, #d9a52f); box-shadow: 0 18px 36px rgba(23, 21, 15, 0.1); }
.x-step::before { transition: transform 0.4s ease; transform-origin: left bottom; }
.x-step:hover::before { transform: scale(1.18); }
.work-card { transform-style: preserve-3d; will-change: transform; }
.tech-chips span { animation: sv-bob 6s ease-in-out infinite; }
.tech-chips span:nth-child(3n) { animation-delay: -2s; } .tech-chips span:nth-child(3n+1) { animation-delay: -4s; }
@keyframes sv-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) {
  .tech-chips span { animation: none; }
  .sv-browser, .sv-phone, .sv-code, .sv-live, .sv-b, .sv-row { opacity: 1; transform: none; transition: none; }
  .sv-code div { max-width: 100%; transition: none; }
  .sv-ring .fg { stroke-dashoffset: 34; transition: none; }
  .sv-img::after { display: none; }
}
