/* Vespera / living studio. Static styling is complete before JavaScript loads. */
:root { --motion-ease: cubic-bezier(.16,1,.3,1); --motion-fast: 220ms; --motion-feedback: 420ms; }
.js .reveal { opacity: 1; transform: none; }
.js.motion-loading [data-motion-pending], .js.motion-ready [data-motion-pending] { opacity: 0; }
.motion-paused [data-motion-pending], .motion-suspended [data-motion-pending], .motion-fallback [data-motion-pending] { opacity: 1 !important; transform: none !important; }
.hero, .page-hero, .cta-section { isolation: isolate; }
.hero::before, .page-hero::before, .cta-section::before { opacity: .55; animation: environment-drift 16s ease-in-out infinite alternate; animation-play-state: paused; }
.hero::after, .page-hero::after, .cta-section::after { transform: translateY(var(--scroll-y, 0px)); transition: transform .15s linear; }
.motion-ready .is-in-view::before { animation-play-state: running; }
.home-page .hero-home { padding-block: 5.2rem 5.8rem; background: radial-gradient(ellipse at 80% 35%, #35205a 0, transparent 48%), linear-gradient(135deg, #11101e, #090b12 65%); }
.home-page .hero-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 2.5rem; }
.home-page .hero h1 { font-size: clamp(2.5rem, 3.8vw, 3.65rem); }
.home-page .gradient-text { color: #c4a7ff; background: linear-gradient(100deg, #b490ff 10%, #eadfff 45%, #9460ff 80%); background-size: 200% auto; background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: title-light 8s ease-in-out infinite alternate; animation-play-state: paused; }
.home-page .hero-kicker::before { content: ''; display: inline-block; width: 7px; height: 7px; margin: 0 10px 2px 0; border-radius: 50%; background: #c4a7ff; box-shadow: 0 0 0 5px #a78bfa15; }

/* The hero is a real layered composition, not a tilted picture of one. */
.delivery-visual { border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; padding: 0; }
.delivery-heading { padding: .6rem 0 1rem 1rem; color: #cfc6e0; font-size: .8rem; letter-spacing: .04em; }
.delivery-heading img { width: 28px; height: 28px; }
.delivery-image { margin: 0; transform: none; }
.delivery-image figcaption { text-align: center; padding: 0 0 1.5rem; font-size: .8rem; color: #b0a6c4; }
.studio-scene { position: relative; width: 100%; aspect-ratio: .99; perspective: 1100px; isolation: isolate; }
.studio-scene::before { content: ''; position: absolute; inset: 0 -15% -5%; background: radial-gradient(ellipse, #8b5cf64d, transparent 66%); z-index: -1; }
.studio-orbit { position: absolute; inset: 7% -2% 8%; border: 1px solid #a78bfa38; border-radius: 50%; transform: rotate(-24deg) scaleY(.75); }
.studio-orbit--two { inset: 0 12% 1%; border-color: #a78bfa25; transform: rotate(36deg) scaleX(.75); }
.studio-orbit::after { content: ''; position: absolute; width: 7px; height: 7px; top: 20%; right: 7%; border-radius: 50%; background: #d4bcff; box-shadow: 0 0 16px #a78bfa; }
.studio-browser { position: absolute; z-index: 2; width: 91%; top: 13%; left: 0; border: 1px solid #a78bfa75; border-radius: 14px; overflow: hidden; background: #10101a; box-shadow: 8px 22px 0 -10px #1a1429, 16px 32px 0 -15px #5b3f8670, 0 32px 65px #0008; transform: rotateX(calc(7deg + var(--rx, 0deg))) rotateY(calc(-9deg + var(--ry, 0deg))) rotate(-3deg); transition: transform .55s var(--motion-ease); }
.studio-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid #ffffff12; background: #201b2c; font: 11px/1.2 ui-monospace, monospace; color: #bdb2cf; }
.studio-dots { display: flex; gap: 5px; }
.studio-dots i { width: 5px; height: 5px; background: #a597bb; border-radius: 50%; }
.studio-dots i:first-child { background: #9e6aff; }
.studio-status { width: 5px; height: 5px; border-radius: 50%; background: #bb92ff; }
.studio-screen { position: relative; overflow: hidden; padding: 5%; background: radial-gradient(ellipse at 85% 45%, #47257999, transparent 60%), #0e0d17; }
.studio-mini-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 7%; }
.studio-mini-nav img { border: 0; border-radius: 5px; width: 24px; height: 24px; box-shadow: none; margin-right: auto; }
.studio-mini-nav > span { height: 3px; width: 24px; background: #ffffff40; border-radius: 2px; }
.studio-layout { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 8%; }
.studio-type strong { display: block; font-size: clamp(21px, 2.1vw, 32px); line-height: 1.12; letter-spacing: -.04em; margin: 10px 0 14px; }
.studio-type em { font-style: normal; color: #c29bff; }
.studio-eyebrow { display: block; width: 35%; height: 3px; background: #a981e6; }
.studio-line { display: block; width: 100%; height: 3px; margin-bottom: 6px; background: #d3c3e84d; border-radius: 2px; }
.studio-line--short { width: 72%; }
.studio-button { display: block; width: 38%; height: 23px; margin-top: 13px; background: #8543e9; color: #fff; border-radius: 4px; font: 15px/23px sans-serif; text-align: right; padding-right: 7px; }
.studio-object { position: relative; aspect-ratio: 1; transform: rotate(-20deg); }
.studio-object span { position: absolute; inset: 12%; border: 1px solid #ceafff; border-radius: 18%; background: linear-gradient(145deg, #ca9bff, #7942d9 50%, #371857); box-shadow: 8px 10px 20px #0005; transform: rotate(30deg); }
.studio-object span:nth-child(2) { inset: 21%; transform: translate(11px, -13px) rotate(30deg); background: linear-gradient(145deg, #e0c8ff, #9e62ed 60%, #522788); }
.studio-object span:nth-child(3) { inset: 30%; transform: translate(22px, -26px) rotate(30deg); background: #cda8ff; }
.studio-object span:nth-child(4) { inset: 39%; transform: translate(32px, -38px) rotate(30deg); background: #f0e4ff; }
.studio-tiles { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 8%; }
.studio-tiles > span { padding: 10px; border: 1px solid #aa80e52e; border-radius: 5px; background: #ffffff06; }
.studio-tiles b { display: block; font: 10px ui-monospace, monospace; color: #b68aef; margin-bottom: 10px; }
.studio-tiles i { display: block; width: 80%; height: 3px; background: #ffffff25; margin-top: 4px; }
.studio-tiles i:last-child { width: 55%; }
.studio-scan { position: absolute; left: -10%; width: 120%; top: 0; height: 30%; background: linear-gradient(transparent, #c1a2ff12, transparent); transform: translateY(-100%); pointer-events: none; }
.studio-phone { position: absolute; z-index: 4; width: 27%; right: -1%; bottom: 8%; padding: 20px 12px 17px; border: 4px solid #282031; border-radius: 22px; background: #12101b; box-shadow: 0 0 0 1px #b58cd270, 0 25px 45px #0009; transform: rotate(8deg) translateY(0); }
.studio-phone-notch { position: absolute; top: 7px; left: 35%; width: 30%; height: 4px; border-radius: 5px; background: #65596f; }
.studio-phone img { width: 21px; height: 21px; margin-bottom: 12px; border: 0; box-shadow: none; }
.studio-phone strong { display: block; color: #faf5ff; line-height: 1.15; font-size: clamp(16px, 1.65vw, 23px); letter-spacing: -.04em; }
.studio-phone-art { display: block; height: 50px; margin-top: 15px; background: repeating-linear-gradient(125deg, #532380 0 8px, #b384f0 9px 13px, #311549 14px 20px); border-radius: 6px; }
.studio-phone .studio-button { width: 100%; height: 18px; line-height: 18px; margin-block: 10px; }
.studio-tag { position: absolute; bottom: 9%; left: 0; z-index: 3; display: flex; align-items: center; gap: 5px; width: 33%; height: 50px; padding: 12px; border: 1px solid #b998e970; background: #211930; border-radius: 8px; box-shadow: 0 15px 35px #0007; transform: rotate(-5deg); }
.studio-tag > span { color: #d9baff; font-size: 24px; margin-right: auto; }
.studio-tag i { width: 12%; height: 55%; background: #9c6cdf; border-radius: 2px; }
.studio-tag i:nth-last-child(2) { height: 80%; background: #c098f5; }
.studio-tag i:last-child { height: 100%; background: #e2c5ff; }
.delivery-milestones { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; padding: 0; }
.delivery-milestones li { position: relative; display: block; overflow: hidden; border: 1px solid #a78bfa30; border-radius: 6px; padding: 12px 10px; background: #181223; font-size: .73rem; }
.delivery-milestones span { display: block; color: #cba9ff; margin-bottom: 7px; font: 11px ui-monospace,monospace; }
.delivery-milestones strong { font-weight: 500; color: #e0d7eb; }
.delivery-milestones li::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #b685ff; transform: scaleX(0); transform-origin: left; }

/* One tall reading sequence: the story stays put while its stages progress. */
#projektin-vaiheet { overflow: clip; background: radial-gradient(ellipse at 12% 50%, #34195750, transparent 60%), #0b0c13; }
#projektin-vaiheet > .container { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(3rem,8vw,8rem); align-items: start; }
#projektin-vaiheet .section-head { position: sticky; top: 130px; text-align: left; margin: 0; }
#projektin-vaiheet h2 { font-size: clamp(2rem,3.3vw,3rem); }
.process-readout { position: relative; display: flex; align-items: baseline; gap: 18px; overflow: hidden; margin-top: 2.5rem; padding-bottom: 18px; color: #bc96f2; }
.process-readout-number { font-size: clamp(5rem,9vw,8rem); line-height: 1; letter-spacing: -.08em; font-weight: 600; }
.process-readout-total { font: 16px ui-monospace,monospace; color: #aca2bd; }
.process-readout-line { position: absolute; bottom: 0; height: 2px; left: 0; right: 0; background: linear-gradient(90deg,#a36aef,#e9d7ff); transform: scaleX(var(--process-progress,0)); transform-origin: left; }
.steps { display: grid; grid-template-columns: 1fr; gap: 28px; padding-left: 26px; }
.steps::before, .steps::after { content: ''; display: block; position: absolute; top: 35px; bottom: 35px; left: 0; right: auto; width: 2px; height: auto; background: #30273d; }
.steps::after { background: #b986ff; transform: scaleY(var(--process-progress,1)); transform-origin: top; }
.step { position: relative; text-align: left; min-height: 220px; padding: 28px; border: 1px solid #a78bfa24; border-radius: 12px; background: #111019; transition: transform .65s var(--motion-ease), border-color .5s, background-color .5s, box-shadow .5s; }
.step-number { width: auto; height: auto; display: inline-block; font: 14px ui-monospace,monospace; margin: 0 0 20px; padding: 0; border: 0; box-shadow: none; color: #bcb1cc; background: none; border-radius: 0; }
.step-number::before { content: '0'; }
.step-number::after { content: ''; position: absolute; left: -33px; top: 34px; width: 12px; height: 12px; border: 2px solid #5d4479; border-radius: 50%; background: #101017; transition: background-color .4s, box-shadow .4s; }
.step h3 { margin: 0 0 14px; font-size: 1.2rem; }
.step p { color: #beb6cc; }
.step.is-step-active { transform: translateX(12px); border-color: #b482ef99; background: linear-gradient(115deg,#271936,#16121e); box-shadow: 0 16px 40px #0003; }
.step.is-step-active .step-number { color: #dbbaff; }
.step.is-step-reached .step-number::after { background: #c297ff; box-shadow: 0 0 0 5px #ab73f01f,0 0 20px #b078fa55; }

/* Price surfaces catch the pointer light, with a stronger selected silhouette. */
.price-card, .price-mini { isolation: isolate; transition: transform .5s var(--motion-ease), border-color .35s, box-shadow .5s; }
.price-mini { position: relative; overflow: hidden; }
.price-card::after, .price-mini::after { content: ''; position: absolute; inset: 0; width: auto; height: auto; z-index: -1; transform: none; background: radial-gradient(350px circle at var(--px,50%) var(--py,0%), #a471ec38, transparent 70%); opacity: .5; transition: opacity .4s; pointer-events: none; }
.price-card::before { height: 2px; opacity: 1; background: linear-gradient(90deg,transparent,#9c66e6,#d8b8ff,transparent); }
.price-card.featured { background: linear-gradient(145deg,#37234f,#191221 65%); border-color: #a37adc99; }
.price-card.active { border-color: #d1a5ff; box-shadow: 0 0 0 2px #a367e930,0 24px 50px #0006; }
.price-card:focus-within, .price-mini:focus-visible { border-color: #dcbdff; }
.project-package-panel.is-open { animation: none; }
.price-mini-price { transition: transform .5s var(--motion-ease); }
.why-card .card-icon { transition: transform .6s var(--motion-ease), background-color .4s; }
.why-card:hover .card-icon { transform: rotate(-10deg) scale(1.15); background: #7042a855; }

/* Demos: deeper framing, a taller visible canvas and independent device layers. */
.template-showcase-layout { column-gap: clamp(2rem,4vw,4rem); grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr); }
.template-showcase--reverse .template-showcase-layout { grid-template-columns: minmax(0,1.18fr) minmax(0,.82fr); }
.template-device-stage { padding: 3rem 2.5rem 5rem 0; perspective: 1200px; }
.template-device-stage::before { inset: -10% -8%; border-radius: 50%; filter: none; opacity: 1; background: radial-gradient(ellipse,rgba(var(--template-accent-rgb),.28),transparent 67%); transform: translateY(var(--scroll-y,0px)); }
.template-device-stage::after { content: ''; position: absolute; inset: 0 -3% 3% -4%; border: 1px solid rgba(var(--template-accent-rgb),.2); border-radius: 50%; transform: rotate(-15deg) scaleY(.7); z-index: -1; }
.template-browser-preview { border-radius: 12px; border-color: rgba(var(--template-accent-rgb),.6); box-shadow: 6px 9px 0 -3px #1e1b29,12px 18px 0 -7px rgba(var(--template-accent-rgb),.28),0 32px 70px #0008; transform: rotateX(calc(3deg + var(--rx,0deg))) rotateY(calc(-7deg + var(--ry,0deg))) rotate(calc(-2deg + var(--scroll-turn,0deg))); transition: transform .7s var(--motion-ease),box-shadow .5s; }
.template-showcase--reverse .template-browser-preview { transform: rotateX(calc(3deg + var(--rx,0deg))) rotateY(calc(7deg + var(--ry,0deg))) rotate(calc(2deg + var(--scroll-turn,0deg))); }
.template-browser-bar { height: 38px; background: #1d1b27; }
.template-browser-bar b { color: #c5bdcf; }
.preview-viewport { display: block; overflow: hidden; }
.template-browser-preview .preview-viewport { aspect-ratio: 1.85; }
.template-preview-trigger .preview-viewport img { display: block; width: 100%; height: auto; transform: none; transition: none; }
.template-phone-preview { width: 28%; border-width: 6px; bottom: 0; border-radius: 25px; transform: rotate(7deg) translateY(var(--scroll-y,0px)); box-shadow: 0 0 0 1px rgba(var(--template-accent-rgb),.7),0 28px 50px #0009; transition: transform .7s var(--motion-ease); }
.template-phone-preview .preview-viewport { aspect-ratio: .57; }
.template-preview-trigger:focus-visible { outline: 3px solid #d6b5ff; outline-offset: 7px; }
.template-preview-trigger { cursor: pointer; }
.template-preview-affordance { position: absolute; right: 14px; bottom: 14px; z-index: 3; display: inline-flex; align-items: center; gap: 9px; max-width: calc(100% - 28px); padding: 8px 11px; border: 1px solid rgba(var(--template-accent-rgb),.45); border-radius: 999px; background: #0b0b13dc; color: #f2eaff; box-shadow: 0 8px 24px #0007; font-size: .7rem; font-weight: 700; line-height: 1.2; letter-spacing: .01em; opacity: .82; pointer-events: none; transform: translateY(2px); transition: opacity .3s,transform .3s,border-color .3s; }
.template-preview-affordance b { color: rgb(var(--template-accent-rgb)); font-size: .9rem; }
.template-phone-preview .template-preview-affordance { right: 8px; bottom: 8px; padding: 6px 8px; gap: 5px; font-size: .62rem; }
.template-preview-trigger:hover .template-preview-affordance, .template-preview-trigger:focus-visible .template-preview-affordance { opacity: 1; transform: none; border-color: rgba(var(--template-accent-rgb),.8); }
.template-device-stage:focus-within .template-browser-preview, .template-device-stage.is-pointed .template-browser-preview { transform: rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) rotate(0deg) translateY(-10px); }
.template-device-stage:focus-within .template-phone-preview, .template-device-stage.is-pointed .template-phone-preview { transform: rotate(0deg) translate(6px,-16px); }
.sample-card { transition: transform .6s var(--motion-ease),box-shadow .5s,border-color .5s; }
.sample-card img { transition: transform 1s var(--motion-ease); }
.sample-card:hover img, .sample-card:focus-visible img { transform: scale(1.09) translateY(-2%); }
.sample-card > span b { transition: transform .5s var(--motion-ease); }
.sample-card:hover > span b { transform: translate(5px,-5px) rotate(8deg); }

/* Deliberate controls: a sweep, a lift, a press, and a travelling nav underline. */
.btn { transition: transform .35s var(--motion-ease),box-shadow .4s,border-color .3s,background-color .3s; }
.btn-primary { box-shadow: 0 6px 24px #7834d940,inset 0 1px #ffffff30; }
.btn[data-page-transition]::before { display: block; opacity: .8; transition: transform .7s var(--motion-ease); }
.btn[data-page-transition]::after { transition: transform .4s var(--motion-ease); }
.btn[data-page-transition]:hover::after { transform: translateX(6px); }
.btn:not(:disabled):active { transform: scale(.96); }
.btn:focus-visible { outline: 2px solid #d9b9ff; outline-offset: 5px; }
.nav-link { position: relative; transition: color .3s,background-color .3s; }
.nav-link::after { content: ''; position: absolute; left: .7rem; right: .7rem; bottom: .15rem; height: 2px; background: #bd92ff; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--motion-ease); }
.nav-link:hover::after, .nav-link:focus-visible::after, .nav-link[aria-current='page']::after { transform: scaleX(1); transform-origin: left; }
.nav-link.active { box-shadow: none; }
.cta-section { background: radial-gradient(ellipse at 70% 20%,#4c25786b,transparent 70%),#14101e; }
.cta-section::before { opacity: .9; }
.cta-inner h2 { font-size: clamp(2rem,3.2vw,3rem); }
.motion-control { display: flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 8px; min-width: 44px; min-height: 44px; margin-top: 12px; padding: 9px 10px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #aaa5b5; font-family: inherit; font-size: .8125rem; line-height: 1.2; cursor: pointer; }
.motion-control:hover { color: #e2d5f4; background: #ffffff06; border-color: #a78bfa33; }
.motion-control-icon { width: 9px; height: 10px; border-inline: 3px solid currentColor; }
.motion-control[aria-pressed='true'] .motion-control-icon { border: 0; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid currentColor; }
.motion-control:focus-visible { outline: 2px solid #ddc3ff; outline-offset: 4px; }
.motion-control[hidden] { display: none; }

/* Loops are paused until their scene intersects; a single control stops them all. */
.studio-browser { animation: studio-float 8s ease-in-out infinite; }
.studio-phone { animation: phone-float 6s ease-in-out infinite; }
.studio-tag { animation: tag-float 7s ease-in-out infinite; }
.studio-orbit--one { animation: orbit-turn 24s linear infinite; }
.studio-orbit--two { animation: orbit-counter 32s linear infinite; }
.studio-object { animation: object-turn 12s ease-in-out infinite alternate; }
.studio-scan { animation: screen-scan 7s ease-in-out infinite; }
.studio-tiles > span { animation: tile-light 9s ease-in-out infinite; animation-play-state: paused; }
.studio-tiles > span:nth-child(2) { animation-delay: 3s; }
.studio-tiles > span:nth-child(3) { animation-delay: 6s; }
.delivery-milestones li::after { animation: milestone-light 9s ease-in-out infinite; }
.delivery-milestones li:nth-child(2)::after { animation-delay: 3s; }
.delivery-milestones li:nth-child(3)::after { animation-delay: 6s; }
.showcase-browser-silhouette, .contact-visual-window, .showcase-phone-silhouette, .project-hero-logo { animation: studio-float 8s ease-in-out infinite; animation-play-state: paused; }
.showcase-phone-silhouette { animation-direction: reverse; animation-duration: 6s; }
.studio-scene *, .delivery-milestones li::after, .showcase-browser-silhouette, .contact-visual-window, .showcase-phone-silhouette { animation-play-state: paused; }
.motion-ready .is-in-view .studio-scene *, .motion-ready .is-in-view .delivery-milestones li::after, .motion-ready .is-in-view .gradient-text,
.motion-ready .is-in-view .showcase-browser-silhouette, .motion-ready .is-in-view .contact-visual-window, .motion-ready .is-in-view .showcase-phone-silhouette { animation-play-state: running; }
.motion-ready .is-in-view .project-hero-logo { animation-play-state: running; }
@keyframes environment-drift { from { transform: translate3d(-3%,-2%,0) rotate(-3deg); } to { transform: translate3d(4%,3%,0) rotate(3deg); } }
@keyframes title-light { from { background-position: 0% center; } to { background-position: 100% center; } }
@keyframes studio-float { 0%,100% { translate: 0 0; } 50% { translate: 0 -16px; } }
@keyframes phone-float { 0%,100% { translate: 0 0; } 50% { translate: -5px -23px; } }
@keyframes tag-float { 0%,100% { translate: 0 0; } 50% { translate: 8px 13px; } }
@keyframes orbit-turn { from { transform: rotate(-24deg) scaleY(.75); } to { transform: rotate(336deg) scaleY(.75); } }
@keyframes orbit-counter { from { transform: rotate(36deg) scaleX(.75); } to { transform: rotate(-324deg) scaleX(.75); } }
@keyframes object-turn { from { transform: rotate(-20deg) translateY(5px); } to { transform: rotate(15deg) translateY(-6px); } }
@keyframes screen-scan { 0%,15% { transform: translateY(-100%); } 75%,100% { transform: translateY(440%); } }
@keyframes tile-light { 0%,35%,100% { border-color: #aa80e52e; background: #ffffff06; } 15%,25% { border-color: #ca98ffaa; background: #8651ba24; } }
@keyframes milestone-light { 0% { transform: scaleX(0); opacity: 1; } 30%,35% { transform: scaleX(1); opacity: 1; } 40%,100% { transform: scaleX(1); opacity: 0; } }

@media (hover:hover) and (pointer:fine) {
  .price-card:hover, .price-mini:hover { transform: perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateY(-12px); border-color: #be91f3; box-shadow: 0 24px 50px #0006,0 0 28px #9960e51a; }
  .price-card:hover::after, .price-mini:hover::after { opacity: 1; }
  .price-mini:hover .price-mini-price { transform: translateX(8px); }
  .sample-card:hover { transform: perspective(1000px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateY(-10px); }
  .btn:hover { transform: translateY(-4px); }
  .btn-primary:hover { box-shadow: 0 14px 35px #8a43e966,inset 0 1px #ffffff40; }
}
@media (max-width: 1000px) {
  .home-page .hero-inner { gap: 1.5rem; }
  .studio-type strong { font-size: 23px; }
  #projektin-vaiheet > .container { gap: 3rem; }
}
@media (max-width: 760px) {
  .home-page .hero-home { padding-block: 3rem 3.5rem; }
  .home-page .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .delivery-visual { max-width: 540px; margin-inline: auto; }
  .studio-scene { aspect-ratio: .87; }
  .studio-type strong { font-size: clamp(23px,5.5vw,32px); }
  .studio-phone strong { font-size: clamp(17px,4vw,23px); }
  .studio-browser { transform: rotateX(3deg) rotateY(-5deg) rotate(-3deg); }
  .studio-phone { padding: 18px 9px 12px; }
  .studio-phone-art { height: 38px; }
  .studio-tag { height: 42px; }
  .delivery-milestones { gap: 6px; }
  .delivery-milestones li { padding: 10px 7px; font-size: .68rem; }
  #projektin-vaiheet > .container { display: block; }
  #projektin-vaiheet .section-head { position: static; margin-bottom: 2rem; }
  .process-readout { margin-top: 1.5rem; }
  .process-readout-number { font-size: 4.5rem; }
  .steps { padding-left: 18px; gap: 20px; }
  .step { min-height: 190px; padding: 22px; }
  .step.is-step-active { transform: translateX(5px); }
  .step-number::after { left: -25px; }
  .template-showcase-layout, .template-showcase--reverse .template-showcase-layout { grid-template-columns: 1fr; grid-template-areas: 'copy' 'visual' 'actions'; }
  .template-device-stage { padding: 2rem 1.3rem 4rem 0; margin-block: 1rem; }
  .template-browser-preview, .template-showcase--reverse .template-browser-preview { transform: rotate(-2deg); }
  .template-browser-preview .preview-viewport { aspect-ratio: 1.72; }
  .template-browser-bar { height: 30px; }
  .template-phone-preview { width: 29%; min-width: 94px; border-width: 4px; border-radius: 19px; }
  .template-phone-preview .preview-viewport { aspect-ratio: .58; }
  .template-device-stage:focus-within .template-browser-preview { transform: rotate(0deg); }
  .price-card:active, .price-mini:active, .sample-card:active { transform: scale(.98); border-color: #c99df9; }
}
/* Services: layers becoming a website. Maintenance: a connected care cycle. */
.services-page .page-hero-inner { display: grid; grid-template-columns: 1.45fr 1fr; max-width: 1140px; gap: 4rem; align-items: center; }
.services-hero-copy > p:last-child { color: var(--muted); font-size: 1.1rem; line-height: 1.75; }
.service-blueprint { position: relative; height: 300px; perspective: 900px; }
.blueprint-layer { position: absolute; inset: 30% 4% 1%; display: grid; grid-template-columns: repeat(3,1fr); align-content: center; gap: 12px; padding: 25px; background: linear-gradient(130deg,#251a35f2,#15121e); border: 1px solid #a778e896; border-radius: 12px; transform: rotateX(25deg) rotateZ(-10deg); box-shadow: 0 18px 36px #0005; animation: blueprint-rise 7s ease-in-out infinite; animation-play-state: paused; }
.blueprint-layer:nth-child(2) { inset: 17% 9% 16%; background: linear-gradient(130deg,#3c2558f2,#1b1427); animation-delay: -.8s; }
.blueprint-layer:nth-child(3) { inset: 4% 14% 31%; background: linear-gradient(130deg,#604080,#251933); animation-delay: -1.6s; }
.blueprint-layer span { grid-column: 1/-1; color: #e4cdff; font: 13px ui-monospace,monospace; }
.blueprint-layer i { height: 44px; border: 1px solid #c49bea60; border-radius: 4px; background: #ca9cff15; }
.blueprint-layer i:last-child { background: linear-gradient(140deg,#a371e4,#56307a); }
.motion-ready .is-in-view .blueprint-layer { animation-play-state: running; }
@keyframes blueprint-rise { 0%,100% { translate: 0 0; } 50% { translate: 10px -22px; } }
.services-page .service-list { gap: 18px; }
.services-page .service-item { position: relative; padding: 25px; border: 1px solid #b387eb30; border-radius: 10px; background: linear-gradient(135deg,#1c1626,#101018); transition: border-color .4s,transform .5s var(--motion-ease); }
.services-page .service-item::before { content: ''; display: block; width: 28px; height: 3px; margin-bottom: 18px; background: #b18ae7; transform-origin: left; transition: transform .5s var(--motion-ease); }
.services-page .service-item:hover::before { transform: scaleX(2.4); }
.services-page .service-item:hover { border-color: #bf8ffa88; transform: translateY(-5px); }
.services-page .steps { grid-template-columns: repeat(2,minmax(0,1fr)); padding-left: 0; }
.services-page .steps::before, .services-page .steps::after, .services-page .step-number::after { display: none; }
.services-page .step.is-step-reached { border-color: #af83df88; background-color: #251b32; }
.contact-process-step > div, .template-process-step > div {
  position: relative;
  min-width: 0;
  padding: 24px 20px;
  border: 1px solid #a78bfa30;
  border-radius: 12px;
  background: radial-gradient(ellipse at 12% 0%,#9360cf14,transparent 72%),linear-gradient(145deg,#191421,#101018);
  box-shadow: inset 0 1px #ffffff08,0 14px 30px #0003;
  transition: border-color .5s,box-shadow .5s;
}
.contact-process-step.is-step-reached > div, .template-process-step.is-step-reached > div {
  border-color: #af83df66;
  box-shadow: inset 0 1px #d5b4ff12,0 14px 30px #0003,0 0 24px #9360cf08;
}
.contact-process-step > div::before, .template-process-step > div::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20px;
  width: 34px;
  height: 2px;
  background: linear-gradient(90deg,#c39aef,#8f5dbb44);
  border-radius: 2px;
}
.template-process-step > div::before { left: calc(50% - 17px); }
@media (min-width: 701px) { .contact-process-step > div { height: calc(100% - 74px); } }
@media (min-width: 641px) { .template-process-step > div { height: calc(100% - 72px); } }
@media (max-width: 640px) {
  .contact-process-step > div, .template-process-step > div { padding: 20px 16px; }
  .template-process-step > div::before { left: 16px; }
}
.maintenance-choice { position: relative; isolation: isolate; }
.maintenance-choice-item { position: relative; overflow: hidden; }
.maintenance-choice-item::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg,#8c55cf,#dbc2ff); transform: scaleX(0); transform-origin: left; animation: milestone-light 12s ease-in-out infinite; animation-play-state: paused; }
.maintenance-choice-item:nth-child(2)::after { animation-delay: 4s; }
.maintenance-choice-item:nth-child(3)::after { animation-delay: 8s; }
.motion-ready .maintenance-choice.is-in-view .maintenance-choice-item::after { animation-play-state: running; }
.contact-process-step, .template-process-step { transition: border-color .5s,background-color .5s; }
@media (max-width: 900px) {
  .services-page .page-hero-inner { grid-template-columns: 1fr; gap: 1rem; }
  .service-blueprint { width: min(100%,420px); height: 260px; justify-self: center; }
}
@media (max-width: 600px) { .services-page .steps { grid-template-columns: 1fr; } }
/* An open project path. Typography and a fine rail carry the sequence, not boxes. */
:is(#projektin-vaiheet.process-path, .services-process) { overflow-x: clip; overflow-y: visible; background: radial-gradient(ellipse at 0% 45%,#5830790d,transparent 65%),#0b0c13; }
:is(#projektin-vaiheet.process-path, .services-process) > .container { grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: clamp(40px,7vw,96px); }
:is(#projektin-vaiheet.process-path, .services-process) .section-head { padding-top: 30px; top: 115px; }
:is(#projektin-vaiheet.process-path, .services-process) .section-head .lead { max-width: 35ch; font-size: 1rem; color: #b0a6bd; }
:is(#projektin-vaiheet.process-path, .services-process) h2 { font-size: clamp(2rem,3.2vw,2.8rem); line-height: 1.16; letter-spacing: -.045em; }
:is(#projektin-vaiheet.process-path, .services-process) .process-readout { display: flex; align-items: baseline; gap: 12px; max-width: 285px; margin-top: 36px; padding: 20px 0; border-top: 1px solid #b49ccc28; }
:is(#projektin-vaiheet.process-path, .services-process) .process-readout-caption { margin-right: auto; color: #b5a8c1; font-size: .75rem; }
:is(#projektin-vaiheet.process-path, .services-process) .process-readout-number { font: 26px ui-monospace,monospace; letter-spacing: -.08em; color: #ddc4fa; }
:is(#projektin-vaiheet.process-path, .services-process) .process-readout-total { font-size: 12px; }
:is(#projektin-vaiheet.process-path, .services-process) .process-readout-line { height: 1px; }
:is(#projektin-vaiheet.process-path, .services-process) .steps { position: relative; gap: 0; padding: 0; margin: 0; }
:is(#projektin-vaiheet.process-path, .services-process) .steps::before, :is(#projektin-vaiheet.process-path, .services-process) .steps::after { top: 49px; bottom: 100px; left: 28px; width: 1px; background: #66517645; }
:is(#projektin-vaiheet.process-path, .services-process) .steps::after { background: linear-gradient(#d7b3ff,#aa75df); }
:is(#projektin-vaiheet.process-path, .services-process) .step { display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 28px; min-height: 0; padding: 30px 0 36px; border: 0; border-radius: 0; background: transparent; box-shadow: none; transform: none; }
:is(#projektin-vaiheet.process-path, .services-process) .step-number { position: relative; z-index: 1; align-self: start; display: flex; justify-content: center; align-items: center; height: 54px; padding: 0; margin: 0; background: #0b0c13; color: #81748e; font: 34px ui-monospace,monospace; font-weight: 400; letter-spacing: -.09em; transition: color .6s; }
:is(#projektin-vaiheet.process-path, .services-process) .step-number::after { display: none; }
:is(#projektin-vaiheet.process-path, .services-process) .process-step-copy { position: relative; padding: 2px 0 28px; border-bottom: 1px solid #b49ccc25; }
:is(#projektin-vaiheet.process-path, .services-process) .process-step-copy::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 48px; height: 1px; background: #c599f3; transform: scaleX(0); transform-origin: left; transition: transform .75s var(--motion-ease); }
:is(#projektin-vaiheet.process-path, .services-process) .process-step-label { display: block; margin-bottom: 12px; color: #95849f; font-size: .67rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; transition: color .6s; }
:is(#projektin-vaiheet.process-path, .services-process) .step h3 { margin: 0 0 12px; font-size: clamp(1.15rem,1.8vw,1.4rem); line-height: 1.35; letter-spacing: -.025em; color: #e2dbea; }
:is(#projektin-vaiheet.process-path, .services-process) .step p { margin: 0; color: #b5acbf; line-height: 1.8; font-size: .94rem; max-width: 44ch; }
:is(#projektin-vaiheet.process-path, .services-process) .step.is-step-active { background: transparent; border: 0; box-shadow: none; transform: none; }
:is(#projektin-vaiheet.process-path, .services-process) .step.is-step-active .step-number { color: #e2c7ff; text-shadow: 0 0 30px #b984ef2e; }
:is(#projektin-vaiheet.process-path, .services-process) .step.is-step-active .process-step-label { color: #c4a1e8; }
:is(#projektin-vaiheet.process-path, .services-process) .step.is-step-active .process-step-copy::after { transform: scaleX(1); }
@media (max-width: 760px) {
  :is(#projektin-vaiheet.process-path, .services-process) > .container { display: block; }
  :is(#projektin-vaiheet.process-path, .services-process) .section-head { position: static; padding-top: 0; margin-bottom: 26px; }
  :is(#projektin-vaiheet.process-path, .services-process) .process-readout { display: none; }
  :is(#projektin-vaiheet.process-path, .services-process) .step { grid-template-columns: 40px minmax(0,1fr); gap: 19px; padding: 22px 0 12px; }
  :is(#projektin-vaiheet.process-path, .services-process) .step-number { height: 44px; font-size: 27px; }
  :is(#projektin-vaiheet.process-path, .services-process) .steps::before, :is(#projektin-vaiheet.process-path, .services-process) .steps::after { left: 19px; top: 45px; bottom: 120px; }
  :is(#projektin-vaiheet.process-path, .services-process) .step p { font-size: .9rem; }
  :is(#projektin-vaiheet.process-path, .services-process) .process-step-copy { padding-bottom: 26px; }
}

/* Services uses the same open progression, overriding its former 2×2 card grid. */
.services-process > .container { display: grid; align-items: start; }
.services-process .section-head { position: sticky; text-align: left; margin: 0; }
.services-process .steps { grid-template-columns: 1fr; }
.services-process .steps::before, .services-process .steps::after { display: block; }
.services-process .process-step-copy { padding-top: 8px; }
@media (max-width: 760px) {
  .services-process .section-head { position: static; }
}

/* Calm is also a complete design, not a frozen half-way transition. */
.motion-paused *, .motion-paused *::before, .motion-paused *::after,
.motion-suspended *, .motion-suspended *::before, .motion-suspended *::after { animation-play-state: paused !important; }
.motion-paused *, .motion-paused *::before, .motion-paused *::after { transition: none !important; }
.motion-paused .motion-surface, .motion-paused .template-preview-trigger, .motion-paused .step, .motion-paused .btn { transform: none !important; transition: none !important; }
.motion-paused .preview-viewport img { transform: none !important; }
.motion-paused .process-readout-line, .motion-paused .steps::after { transform: none; }
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .studio-scene *, .template-preview-trigger, .motion-surface, .step.is-step-active, .btn, .btn::after { translate: none !important; }
  .template-preview-trigger, .motion-surface, .step.is-step-active, .btn, .btn::after { transform: none !important; }
  .hero::after, .page-hero::after, .cta-section::after, .template-device-stage::before { transform: none !important; }
  .process-readout-line, .steps::after { transform: none; }
  [data-motion-pending] { opacity: 1 !important; transform: none !important; }
}
