/* Diffuse moving gradients inspired by Aceternity Background Gradient.
   Original MVM implementation: aqua/silver, layered breath, no moving text. */
:root { --breath-aqua:121 214 225; --breath-silver:213 240 248; }
:root[data-theme="bright"] { --breath-aqua:19 140 161; --breath-silver:68 178 197; }
.breathing-surface { position:relative;isolation:isolate; }
.surface-breath {
  display:block!important;position:absolute!important;inset:0!important;z-index:-1;
  margin:0!important;padding:0!important;border:0!important;border-radius:inherit;
  pointer-events:none;overflow:hidden;contain:paint;
  transition:filter 700ms ease,opacity 700ms ease;
}
.surface-breath::before,.surface-breath::after {
  content:"";position:absolute;inset:-38%;pointer-events:none;
  background:radial-gradient(ellipse at 28% 35%,rgb(var(--breath-silver) / .65),transparent 28%),radial-gradient(ellipse at 68% 65%,rgb(var(--breath-aqua) / .85),transparent 38%),radial-gradient(ellipse at 70% 20%,rgb(var(--breath-aqua) / .4),transparent 32%);
  filter:blur(19px);transform-origin:48% 52%;
  animation:aurora-inhale calc(var(--breath-cycle,7.3s) * 1.6) linear var(--breath-phase,0s) infinite;
}
.surface-breath::after {
  inset:-32%;background:radial-gradient(ellipse at 65% 32%,rgb(var(--breath-silver) / .55),transparent 26%),radial-gradient(ellipse at 30% 65%,rgb(var(--breath-aqua) / .7),transparent 34%);
  filter:blur(24px);animation-name:aurora-exhale;animation-duration:calc(var(--breath-cycle,7.3s) * 2.1);
}
@keyframes aurora-inhale {
  0% { transform:translate3d(-8%,5%,0) rotate(0deg) scale(.95,1.1);opacity:.55; }
  25% { transform:translate3d(8%,-7%,0) rotate(90deg) scale(1.15,.85);opacity:.9; }
  50% { transform:translate3d(5%,8%,0) rotate(180deg) scale(.9,1.15);opacity:.65; }
  75% { transform:translate3d(-7%,-4%,0) rotate(270deg) scale(1.1,.95);opacity:.95; }
  100% { transform:translate3d(-8%,5%,0) rotate(360deg) scale(.95,1.1);opacity:.55; }
}
@keyframes aurora-exhale {
  0% { transform:translate3d(9%,-6%,0) rotate(360deg) scale(1.1,.9);opacity:.45; }
  33% { transform:translate3d(-9%,7%,0) rotate(240deg) scale(.9,1.2);opacity:.8; }
  66% { transform:translate3d(6%,5%,0) rotate(120deg) scale(1.2,.95);opacity:.6; }
  100% { transform:translate3d(9%,-6%,0) rotate(0deg) scale(1.1,.9);opacity:.45; }
}
.service-card .surface-breath { z-index:-1;opacity:.72;mask-image:linear-gradient(110deg,rgb(0 0 0 / .06),rgb(0 0 0 / .28) 40%,#000 80%); }
.surface-focus {
  position:absolute;left:50%;top:50%;width:250px;height:250px;max-width:110%;
  border-radius:50%;transform:translate(-50%,-50%) scale(.65);opacity:0;
  background:radial-gradient(ellipse,rgb(var(--breath-silver) / .55),rgb(var(--breath-aqua) / .32) 30%,transparent 68%);
  filter:blur(14px);transition:opacity 650ms ease,transform 900ms ease,left 350ms ease-out,top 350ms ease-out;
}
@media(hover:hover) and (pointer:fine) {
  .breathing-surface:hover>.surface-breath { filter:saturate(1.25) brightness(1.2); }
  .service-card:hover>.surface-breath { opacity:1; }
  .breathing-surface:hover>.surface-breath>.surface-focus { opacity:.9;transform:translate(-50%,-50%) scale(1.3); }
}
.breathing-surface:focus-visible>.surface-breath>.surface-focus { opacity:.7;transform:translate(-50%,-50%) scale(1.1); }
.service-card-content { text-shadow:0 1px 10px rgb(0 0 0 / .4); }
[data-theme="bright"] .service-card-content { text-shadow:0 1px 8px rgb(255 255 255 / .65); }
.service-art::after { background:linear-gradient(90deg,rgb(8 13 16 / .94),rgb(8 13 16 / .72) 48%,rgb(8 13 16 / .1)); }
[data-theme="bright"] .service-art::after { background:linear-gradient(90deg,rgb(246 249 250 / .95),rgb(246 249 250 / .8) 48%,rgb(246 249 250 / .1)); }
.service-card-content,.service-open { z-index:2; }
/* The old bottom wave is removed: illumination now lives in the layered field. */
:root .service-deck.service-deck--unified .service-card::after { content:none; }
.service-shortcut { overflow:hidden; }
.service-shortcut>.surface-breath { opacity:.6; }
.service-shortcut>.service-icon,.service-shortcut>span:not(.surface-breath) { position:relative;z-index:1; }
.hero .primary { overflow:hidden; }
.hero .primary>.surface-breath { opacity:.45; }
.community>.surface-breath,.faq>.surface-breath { opacity:.3; }
.sheet-shell>.surface-breath { opacity:.38; }
.choice>.surface-breath { opacity:.16; }
.choice.is-active>.surface-breath { opacity:.5;transition:opacity 400ms ease; }

.breath-resting>.surface-breath::before,.breath-resting>.surface-breath::after,
.breath-suspended .surface-breath::before,.breath-suspended .surface-breath::after { animation-play-state:paused; }
.breath-resting.service-card::after,.breath-suspended .service-card::after { animation-play-state:paused; }
/* One component and one visual hierarchy for every service. */
:root .service-deck.service-deck--unified { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:4px; }
:root .service-deck.service-deck--unified .service { margin:0;min-width:0;--card-tilt:-.6deg; }
:root .service-deck.service-deck--unified .service:nth-child(even) { --card-tilt:.6deg; }
:root .service-deck.service-deck--unified .service .service-card { min-height:228px;height:100%;padding:22px 20px 54px;border-radius:24px;border-color:var(--cv-edge); }
:root .service-deck.service-deck--unified .service .service-card-content { padding:0; }
:root .service-deck.service-deck--unified .service .service-icon { position:static;width:28px;height:28px;margin:0 0 14px; }
:root .service-deck.service-deck--unified .service-card-title { font-size:21px;line-height:1.2; }
:root .service-deck.service-deck--unified .service-card-description { font-size:12px;line-height:1.5;color:var(--mvm-text);opacity:.84; }
:root .service-deck.service-deck--unified .service-open { width:32px;height:32px;bottom:14px;right:16px; }
:root .service-deck.service-deck--unified .service-card::before { display:none; }

/* Enhanced preview expands all six cards together; no-JS retains the full list. */
.hero { align-items:start; }
.hero-copy { align-self:center; }
.hero-copy { animation:intro-arrive 300ms var(--ease) both; }
@keyframes intro-arrive { from { opacity:.8;translate:0 6px; } to { opacity:1;translate:0 0; } }
:root .portal-button { position:fixed;z-index:90; }
body { padding-bottom:0; }
html { scroll-padding-top:88px; }
:root .hero .service-browser,#service-list,#spazi,#community,#studio { scroll-margin-top:0; }
:root.js .service-browser:not([data-enhanced]) .service-deck .service-card,
:root .service-browser[data-enhanced][data-expanded="false"] .service-deck .service-card { min-height:0;height:156px;padding:20px 18px; }
.js .service-browser:not([data-enhanced]) .service-card-description,
.service-browser[data-enhanced][data-expanded="false"] .service-card-description { display:none; }
.js .service-browser:not([data-enhanced]) .service-open,
.service-browser[data-enhanced][data-expanded="false"] .service-open { opacity:0; }
:root .service-browser[data-enhanced][data-expanded="true"] .service-deck .service-card { min-height:0;height:242px; }
.service-card { box-sizing:border-box;text-decoration:none; }
/* A continuous service sheet replaces the three-step wizard. */
#service-name { display:none; }
.sheet-body [data-section="detail"] { padding-bottom:22px; }
.sheet-body [data-section="mode"] { padding-block:22px 0;border-top:1px solid var(--cv-edge); }
.sheet-body [data-section="mode"] h2 { font-size:22px;margin-bottom:10px; }
.sheet-body [data-section="mode"]>.sheet-description { display:none; }
.sheet-body .choice { min-height:94px;padding:18px;overflow:hidden; }
.sheet-body .choice strong { font-size:16px; }
.sheet-body .choice small { font-size:12px; }
#equipment-field { margin-top:18px;overflow:hidden; }
.sheet-body .booking-note { margin-top:16px;font-size:11px;line-height:1.6; }
.project-details,.optional-timing { border-top:1px solid var(--cv-edge);padding:16px 0;margin:0; }
.project-details summary,.optional-timing summary { min-height:28px;font-size:13px;cursor:pointer; }
.project-details .field { margin-block:16px 0; }
.sheet-body [data-section="project"] { padding-bottom:4px; }
.sheet-service-art { height:140px;margin-bottom:18px; }
.sheet-description { margin-bottom:0; }
.sheet-footer { padding-top:14px; }
:root .sheet-bar button { width:44px;height:44px;min-width:44px;min-height:44px; }
@media(min-width:761px) and (max-width:1100px) {
  .hero { grid-template-columns:1fr;gap:34px; }
  .hero-copy { max-width:640px; }
  .hero .service-browser { width:100%;max-width:760px;justify-self:center; }
  .hero .hero-scene { inset:12px 0 auto;height:540px; }
}
@media(max-width:760px) {
  :root .service-browser[data-enhanced][data-expanded="true"] .service-deck .service-card { height:270px; }
  :root .service-deck.service-deck--unified { gap:12px; }
  :root .service-deck.service-deck--unified .service .service-card { min-height:238px;padding:18px 15px 50px;border-radius:22px; }
  :root .service-deck.service-deck--unified .service-card-title { font-size:18px;letter-spacing:-.035em; }
  :root .service-deck.service-deck--unified .service-card-description { font-size:12px; }
  :root .service-deck.service-deck--unified .service .service-icon { margin-bottom:12px;width:25px;height:25px; }
}
@media(max-width:359px) {
  :root .service-browser[data-enhanced][data-expanded="true"] .service-deck .service-card { height:210px; }
  :root .service-deck.service-deck--unified { grid-template-columns:1fr;gap:12px; }
  :root .service-deck.service-deck--unified .service .service-card { min-height:168px;padding:20px 64px 20px 20px; }
  :root .service-deck.service-deck--unified .service-card-title { font-size:21px; }
  :root .service-deck.service-deck--unified .service-open { right:18px;bottom:20px; }
}
@media(prefers-reduced-motion:reduce) {
  .surface-breath::before,.surface-breath::after { animation:none!important;opacity:.12;transform:none; }
  .service-card::after { animation:none!important;opacity:.2;transform:none; }
}

/* Keep the service entry point within reach throughout the page. */
#choose-services {
  position:fixed;
  z-index:90;
  left:50%;
  bottom:calc(18px + env(safe-area-inset-bottom,0px));
  transform:translateX(-50%);
  width:max-content;
  max-width:calc(100% - 32px);
  min-height:68px;
  padding:20px 40px;
  font-size:18px;
  animation:service-button-breathe 3.6s ease-in-out infinite;
  background:var(--cv-glass);
  color:var(--mvm-text);
  border-color:var(--cv-edge);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  box-shadow:inset 0 1px 0 rgb(255 255 255 / .08),var(--cv-soft-shadow);
}
body { padding-bottom:calc(108px + env(safe-area-inset-bottom,0px)); }
html { scroll-padding-bottom:calc(108px + env(safe-area-inset-bottom,0px)); }

/* The morph is a compositor surface, not a scaled form or a blurred snapshot. */
.service-morph { position:fixed;z-index:0;pointer-events:none;transform-origin:top left;background:var(--cv-sheet);border:1px solid var(--cv-edge);will-change:transform,opacity; }
.sheet-shell { z-index:1; }
.service-sheet::backdrop { backdrop-filter:none;-webkit-backdrop-filter:none;background:rgb(3 10 14 / .72); }
body.sheet-open .surface-breath::before,body.sheet-open .surface-breath::after { animation-play-state:paused; }
.service-card { backdrop-filter:none;-webkit-backdrop-filter:none; }
:root .service-deck.service-deck--unified .service { --card-tilt:0deg; }
:root .service-browser[data-enhanced][data-expanded="true"] .service-deck.service-deck--unified .service .service-card { height:auto;min-height:242px; }
.service-card-content { text-shadow:none; }
.surface-focus { transition:opacity 180ms ease,transform 240ms ease; }
@media(hover:none),(pointer:coarse) {
  .surface-breath::before,.surface-breath::after { animation:none; }
  .service-card .surface-breath { opacity:.35; }
}

/* Desktop uses one content grid and a service picker within reach. */
@media(min-width:1101px) {
  .hero .studio-caption { right:auto;width:max-content;max-width:calc(100% - 2 * var(--gutter)); }
  .hero .studio-current { display:none; }
  .hero { padding-bottom:64px; }
  #spazi { padding-top:48px; }
  .rooms { row-gap:0; }
  .room { display:grid;grid-template-rows:subgrid;grid-row:span 5; }
  .room .text-link { justify-self:start;align-self:end; }
  .faq { max-width:none;margin:48px 0 0; }
  .faq details:last-of-type { border-bottom:0;padding-bottom:0; }
  .community { width:min(calc(100% - 2 * var(--gutter)),calc(1440px - 2 * var(--gutter)));margin-inline:auto;padding-block:40px; }
  .community .wrap { padding-inline:32px; }
}
#desktop-services { position:fixed;inset:auto 0 108px;margin-inline:auto;width:min(600px,calc(100vw - 48px));max-height:calc(100dvh - 120px);overflow:auto;padding:24px;border:1px solid var(--cv-edge);border-radius:24px;background:var(--cv-sheet);color:var(--mvm-text);box-shadow:0 16px 60px rgb(0 0 0 / .3); }
#desktop-services h2 { font-size:20px;margin-bottom:18px; }
.desktop-service-options { display:grid;grid-template-columns:1fr 1fr;gap:10px; }
.desktop-service-options button { text-align:left;min-height:60px;padding:14px 16px;border:1px solid var(--cv-edge);border-radius:14px;background:var(--mvm-surface);color:var(--mvm-text);font:500 14px/1.4 var(--mvm-body); }
.desktop-service-options button:hover { background:var(--mvm-accent-soft);border-color:var(--mvm-accent); }
.desktop-services-close { display:block;margin:16px 0 0 auto;padding:8px 12px;background:transparent;border:0;color:var(--mvm-muted); }
#desktop-services { opacity:0;transform:translateY(8px);transition:opacity 160ms ease,transform 180ms var(--ease),display 180ms allow-discrete,overlay 180ms allow-discrete; }
#desktop-services:popover-open { opacity:1;transform:none; }
@starting-style { #desktop-services:popover-open { opacity:0;transform:translateY(8px); } }
/* Disclosure height is managed once by studio-reveal.js, including reversals. */
:root.js .faq details::details-content { transition:none; }
:root.js .faq details[open] p { animation:none; }
@media(prefers-reduced-motion:reduce) { #desktop-services { transition:none; } }

/* Keep the scrim in the same animation lifecycle as the card morph. */
:root .service-sheet { isolation:isolate; }
:root .service-sheet::backdrop { background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none; }
.sheet-dimmer { position:fixed;inset:0;z-index:-1;pointer-events:none;background:rgb(3 10 14 / .72); }
[data-theme="bright"] .sheet-dimmer { background:rgb(32 61 73 / .28); }

@keyframes service-button-breathe {
  0%,100% { transform:translateX(-50%) scale(1); }
  50% { transform:translateX(-50%) scale(1.035); }
}
#choose-services:hover,#choose-services:focus-visible,#choose-services[aria-expanded="true"],body.sheet-open #choose-services { animation-play-state:paused; }
@media(prefers-reduced-motion:reduce) { #choose-services { animation:none; } }
