/* Shared desktop canvas. Loaded after the individual page styles. */
@media (min-width:800px){
 html:has(body.vg-shell){
  --vg-layout-max:1920px;
  --vg-frame:clamp(16px,1.05vw,24px);
  --vg-header-row-height:88px;
  --vg-header-height:calc(var(--vg-header-row-height) + var(--vg-frame));
  --vg-hero-radius:clamp(24px,1.5vw,32px);
  --vg-gutter:clamp(36px,4.2vw,80px);
  --vg-edge:max(var(--vg-gutter),calc((var(--vg-viewport-width,100vw) - var(--vg-layout-max))/2 + var(--vg-gutter)));
  --gutter:var(--vg-gutter);
 }
 html.products-mode{--pc-max:var(--vg-layout-max);--pc-side:var(--vg-gutter)}
 html.solutions-mode{--sol-max:var(--vg-layout-max);--sol-side:var(--vg-gutter)}
 html.project-story-mode,html.project-detail-mode{--ref-max:var(--vg-layout-max);--ref-side:var(--vg-gutter)}
 html.project-detail-mode{--pd-gutter:var(--vg-gutter)}
 html.support-mode{--sp-max:var(--vg-layout-max);--sp-side:var(--vg-gutter)}
 body.vg-shell .container{width:100%;max-width:var(--vg-layout-max)}
 body.vg-shell[data-page=about] .map-legend-key{display:none}
 body.vg-shell[data-page=about] .map-legend{justify-content:flex-end}
 body.vg-shell[data-page=project] .pd-page{max-width:var(--vg-layout-max)}
 body.vg-shell .reference-projects{padding-inline:var(--vg-gutter)}
 body.vg-shell .sp-detail-page .sp-detail-hero .sp-hero-photo,
 body.vg-shell .sp-hero .sp-hero-photo,
 body.vg-shell .pd-hero .pd-hero-figure>div,
 body.vg-shell .hero-media{border-radius:24px}

 /* The hero has its own frame; editorial content stops growing at 1920px. */
 body.vg-home.vg-overlay #root>.site{width:100%;max-width:none;margin-inline:0;overflow-x:visible}
 body.vg-home.vg-overlay .site-main{width:100%;max-width:none;padding:0}
 body.vg-overlay{padding-top:var(--vg-frame)}
 .vg-overlay .home-hero,.vg-overlay .pc-hero,.vg-overlay .sol-hero,.vg-overlay .ref-first-visual{
  width:calc(var(--vg-viewport-width,100vw) - 2 * var(--vg-frame));
  margin-inline:calc((100% - var(--vg-viewport-width,100vw))/2 + var(--vg-frame));
  margin-top:0;border-radius:var(--vg-hero-radius);
 }
 body.vg-home.vg-overlay .home-hero{width:calc(100% - 2 * var(--vg-frame));margin-inline:auto;height:calc(100svh - 2 * var(--vg-frame));min-height:660px;max-height:none;clip-path:inset(0 round var(--vg-hero-radius))}
 .vg-overlay .ref-first-visual .ref-full-scene{border-radius:var(--vg-hero-radius)}
 body.vg-home.vg-overlay .site-main>.section-padding,
 body.vg-home.vg-overlay .film-section.film-cinema{width:100%;max-width:var(--vg-layout-max);margin-inline:auto;padding-inline:var(--vg-gutter)}
 /* Fade the film's atmosphere independently so its content stays crisp. */
 body.vg-home.vg-overlay .film-section.film-cinema{background:transparent}
 body.vg-home.vg-overlay .film-section.film-cinema::before{
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:radial-gradient(ellipse at 75% 76%,#e9faed80,transparent 48%),linear-gradient(180deg,#fff,#f5f8f4 68%,#fff);
  mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent);
 }
 body.vg-home.vg-overlay .cinema-thread{mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent)}
 body.vg-home.vg-overlay .showcase,
 body.vg-home.vg-overlay .footer{width:calc(100% - 32px);max-width:calc(var(--vg-layout-max) - 32px);margin-inline:auto}
 body.vg-home.vg-overlay .footer{padding-inline:calc(var(--vg-gutter) - 16px)}
 body.vg-home.vg-overlay .hero-copy{inset-inline-start:calc(var(--vg-edge) - var(--vg-frame));width:min(78%,1320px);max-width:calc(100% - 2 * (var(--vg-edge) - var(--vg-frame)));bottom:clamp(142px,16svh,220px)}
 body.vg-home.vg-overlay .hero-topline{inset-inline:calc(var(--vg-edge) - var(--vg-frame))}
 body.vg-home.vg-overlay .hero-foot{inset-inline-start:calc(var(--vg-edge) - var(--vg-frame))}
 body.vg-home.vg-overlay .hero-side-note{inset-inline-end:calc(var(--vg-edge) - var(--vg-frame))}
 body.vg-home.vg-overlay .hero h1{font-size:clamp(62px,5.2vw,104px);letter-spacing:-.045em}
 body.vg-home.vg-overlay .hero-description{max-width:38em}

 /* The first image and the following content use the same horizontal guides. */
 .vg-overlay .pc-hero,.vg-overlay .sol-hero,.vg-overlay .ref-first-visual{padding-inline:calc(var(--vg-edge) - var(--vg-frame));min-height:clamp(660px,90svh,1080px)}
 .vg-overlay .pc-hero,.vg-overlay .sol-hero{padding-top:clamp(144px,16svh,224px)}
 .vg-overlay .ref-page-label{inset-inline:var(--vg-gutter);padding-inline:0}
 .vg-overlay .ref-floating-figures{right:calc(var(--vg-edge) - var(--vg-frame))}
 .vg-overlay .ref-first-summary{padding-left:0}
 .vg-overlay .pc-entry-grid{gap:clamp(18px,1.4vw,36px)}
 .vg-overlay .pc-entry{min-width:0}
 .vg-overlay .pc-entry>div{min-width:0}

 /* Reserve the same top inset and row height on every desktop page. */
 .vg-shell .vg-header{padding-top:var(--vg-frame)}
 .vg-overlay .vg-header{top:0;transition:background .25s,border-color .25s,color .25s,box-shadow .25s}
 /* Clip only the shade to the hero frame; the navigation keeps its fixed baseline. */
 .vg-overlay .vg-header:before{inset-inline:var(--vg-frame);height:220px;background:linear-gradient(180deg,#0a1c247a 0%,#0a1c2429 65%,transparent);clip-path:inset(max(0px,calc(var(--vg-frame) - var(--vg-header-scroll,0px))) 0 0 round var(--vg-hero-radius) var(--vg-hero-radius) 0 0)}

 /* One centered navigation row, including narrow desktop windows. */
 .vg-shell .vg-header-inner{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);max-width:var(--vg-layout-max);padding-inline:var(--vg-gutter);gap:20px}
 .vg-shell .vg-brand{justify-self:start}
 .vg-shell .vg-header-actions{justify-self:end;margin-left:0}
 .vg-shell .vg-desktop-nav{display:flex;padding:5px;gap:2px}
 .vg-shell:not(.vg-overlay) .vg-desktop-nav{border:1px solid transparent}
 .vg-shell .vg-desktop-nav>:is(a,button){font-size:clamp(12px,.7vw,14px);padding:9px clamp(10px,.78vw,18px);line-height:20px}
 .vg-shell .vg-header .vg-contact{font-size:clamp(12px,.7vw,14px)}
 .vg-shell .vg-menu-toggle,.vg-shell .vg-mobile-nav{display:none}
 .vg-shell .vg-language select{font-size:clamp(12px,.7vw,14px);width:58px}
}

@media (min-width:800px) and (max-width:1439px){
 html:has(body.vg-shell){--vg-header-row-height:80px;--vg-gutter:clamp(32px,4vw,56px)}
 .vg-shell .vg-header-inner{padding-inline:var(--vg-gutter);gap:14px}
 .vg-shell .vg-brand{font-size:19px;gap:7px}
 .vg-shell .vg-brand>svg{width:29px}
 .vg-shell .vg-desktop-nav{padding:5px;gap:2px}
 .vg-shell .vg-desktop-nav>:is(a,button){font-size:11px;padding:9px 9px;line-height:20px}
 .vg-shell .vg-header-actions{gap:12px}
 .vg-shell .vg-header .vg-contact{font-size:11px;padding-inline:14px;gap:9px;min-height:40px}
 .vg-shell .vg-language{gap:5px}
 .vg-shell .vg-language select{font-size:11px;width:49px}
}

/* Keep the film and chapter navigation together on compact desktop screens. */
@media (min-width:800px) and (max-width:1600px){
 body.vg-home.vg-overlay .film-cinema .cinema-tablist{margin-top:32px;padding-top:8px}
}

@media (min-width:1920px){
 html:has(body.vg-shell){--vg-header-row-height:96px}
 .vg-shell .vg-brand{font-size:24px;gap:9px}
 .vg-shell .vg-brand>svg{width:36px;height:32px}
 .vg-shell .vg-header .vg-contact{min-height:48px;padding-inline:24px}
 .vg-shell .vg-desktop-nav>:is(a,button){padding-block:11px}
 html.products-mode{--pc-body-size:16px;--pc-card-title:22px;--pc-item-title:19px;--pc-feature-title:25px}
 body.vg-shell .pd-hero .pd-copy{font-size:17px;line-height:1.85;max-width:38em}
 body.vg-shell .pd-section-heading .pd-copy,body.vg-shell .pd-split-heading>.pd-copy{font-size:16px;line-height:1.85}
 body.vg-shell .pd-application-grid .pd-copy{font-size:14px;line-height:1.75}
 body.vg-shell .sp-detail-page .sp-copy{font-size:15px;line-height:1.8}
 .pc-hero-description{max-width:650px}
 .pc-section-heading>p{max-width:42em;justify-self:end}
 .pc-composting-grid{grid-template-columns:minmax(0,2.5fr) minmax(320px,1fr);gap:clamp(56px,3.5vw,90px)}
 .pc-statistics{justify-content:center}
 .pc-equipment-image{height:230px}
 .pc-equipment-featured .pc-equipment-image{height:auto;min-height:420px}
 .sol-manure-layout{grid-template-columns:minmax(280px,.31fr) minmax(0,1fr);gap:32px}
 .sol-section-description,.sol-stage-description{font-size:16px}
 .ref-summary{font-size:16px;max-width:42em}
 .ref-second-media{min-height:720px}
 .ref-third-visual{min-height:580px}
 .ref-floating-figures{width:clamp(252px,12vw,304px);padding:38px}
 .ref-floating-figures .ref-metrics dd{font-size:38px}
 .ref-floating-figures .ref-metrics dt{font-size:13px}
 .ref-first-copy{max-width:calc(100% - 380px)}
 .ref-first-summary{max-width:calc(100% - 380px)}
 .vg-home .hero-description{font-size:18px}
 .vg-home .section-side>p,.vg-home .cinema-intro,.vg-home .inquiry-heading>p{font-size:17px}
}

@media (min-width:800px) and (max-height:760px){
 body.vg-home.vg-overlay .home-hero{height:calc(100svh - 2 * var(--vg-frame));min-height:640px}
 body.vg-home.vg-overlay .hero-copy{bottom:140px}
 body.vg-home.vg-overlay .hero h1{font-size:clamp(60px,4.8vw,88px)}
 .vg-overlay .pc-hero,.vg-overlay .sol-hero{min-height:640px;padding-top:132px;gap:40px}
}

@media (prefers-reduced-motion:reduce){
 .vg-overlay .vg-header{transition:none}
}

@media(min-width:800px) and (max-width:1199px){
 .vg-shell .vg-desktop-nav>:is(a,button){padding-inline:7px}
}
